Sleeping Wombat GUI  0.100
swGUI
INativeWindow.h
Go to the documentation of this file.
1 #pragma once
2 
5 
6 #include <string>
7 
8 
9 
10 namespace sw {
11 namespace gui
12 {
13 
14 
18 {
20  unsigned short Width;
21  unsigned short Height;
22  unsigned short PositionX;
23  unsigned short PositionY;
24  bool Fullscreen : 1;
25  bool ShowWindow : 1;
26  bool AddExitButton : 1;
29  bool AddFrame : 1;
30  bool AddTitleBar : 1;
31  bool AdjustSize : 1;
32  std::string WindowTitle;
33 
34 
35 // ================================ //
36 //
38  {
39  InitDefaults();
40  }
41 
42  NativeWindowDescriptor( const std::string& windowTitle )
43  : WindowTitle( windowTitle )
44  {
45  InitDefaults();
46  }
47 
48  void InitDefaults()
49  {
50  ParentHandle = nullptr;
51  Width = 1024;
52  Height = 768;
53  PositionX = 0;
54  PositionY = 0;
55  Fullscreen = false;
56  ShowWindow = true;
57  AddExitButton = true;
58  AddMinimizeButton = true;
59  AddMaximizeButton = true;
60  AddFrame = true;
61  AddTitleBar = true;
62  AdjustSize = true;
63  }
64 };
65 
66 
75 {
76 private:
77 protected:
78 public:
79  INativeWindow() = default;
80  ~INativeWindow() = default;
81 
82  virtual uint16 GetWidth () const = 0;
83  virtual uint16 GetHeight () const = 0;
84 
85  virtual uint16 GetClientWidth () const = 0;
86  virtual uint16 GetClientHeight () const = 0;
87 
88  virtual WindowHandler GetHandle () const = 0;
89  virtual std::string GetTitle () const = 0;
90 
91  virtual void Show () = 0;
92  virtual void Hide () = 0;
93 
94  virtual void SetTitle ( const std::string& newTitle ) = 0;
95 };
96 
97 
98 
99 } // gui
100 } // sw
bool AddExitButton
Definition: INativeWindow.h:26
uint16_t uint16
Definition: TypesDefinitions.h:29
void * WindowHandler
Definition: SwapChain.h:6
bool AddMinimizeButton
Definition: INativeWindow.h:27
Definition: DirectInputModule.cpp:11
std::string WindowTitle
Definition: INativeWindow.h:32
bool AdjustSize
Adjust window size to client area.
Definition: INativeWindow.h:31
bool Fullscreen
Definition: INativeWindow.h:24
bool ShowWindow
Show window immediately after creation.
Definition: INativeWindow.h:25
unsigned short Height
Definition: INativeWindow.h:21
unsigned short PositionX
Definition: INativeWindow.h:22
bool AddMaximizeButton
Definition: INativeWindow.h:28
Dedcriptor used to create native GUI window.
Definition: INativeWindow.h:17
virtual void Show()=0
unsigned short PositionY
Definition: INativeWindow.h:23
virtual std::string GetTitle() const =0
void InitDefaults()
Definition: INativeWindow.h:48
virtual uint16 GetHeight() const =0
Plik zawiera deklaracje formatów wierzchołków oraz klas zawierających assety shadery itp...
unsigned short Width
Definition: INativeWindow.h:20
virtual uint16 GetClientHeight() const =0
bool AddFrame
Definition: INativeWindow.h:29
NativeWindowDescriptor()
Definition: INativeWindow.h:37
Interface for native window sing OS specific ffunctions.
Definition: INativeWindow.h:74
virtual WindowHandler GetHandle() const =0
virtual void Hide()=0
virtual uint16 GetWidth() const =0
virtual uint16 GetClientWidth() const =0
NativeWindowDescriptor(const std::string &windowTitle)
Definition: INativeWindow.h:42
bool AddTitleBar
Definition: INativeWindow.h:30
virtual void SetTitle(const std::string &newTitle)=0
WindowHandler ParentHandle
Definition: INativeWindow.h:19