Sleeping Wombat GUI  0.100
swGUI
Win32ApiWindow.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 
6 #include <Windows.h>
7 #undef CreateWindow
8 #undef min
9 #undef max
10 #undef XBUTTON1
11 #undef XBUTTON2
12 
13 
14 namespace sw {
15 namespace gui
16 {
17 
18 
22 {
23 private:
24 
26  std::wstring m_title;
27 
30 
31 public:
32  explicit Win32ApiWindow ();
33  ~Win32ApiWindow ();
34 
35 
37 
38 private:
39  void ShowAppWindow ();
40  void HideAppWindow ();
41 
42  bool Initialize ( NativeWindowDescriptor& descriptor );
43 
44 
45 public:
46  // Inherited via INativeWindow
47  virtual uint16 GetWidth () const override;
48  virtual uint16 GetHeight () const override;
49  virtual uint16 GetClientWidth () const override;
50  virtual uint16 GetClientHeight () const override;
51 
52  virtual WindowHandler GetHandle () const override;
53 
54  virtual std::string GetTitle () const override;
55 
56  virtual void Show () override;
57  virtual void Hide () override;
58 
59  virtual void SetTitle ( const std::string & newTitle ) override;
60 };
61 
62 
63 } // gui
64 } // sw
uint16_t uint16
Definition: TypesDefinitions.h:29
std::wstring m_title
Definition: Win32ApiWindow.h:26
void * WindowHandler
Definition: SwapChain.h:6
uint16 m_width
Definition: Win32ApiWindow.h:28
virtual uint16 GetHeight() const override
Definition: Win32ApiWindow.cpp:112
Definition: DirectInputModule.cpp:11
uint16 m_height
Definition: Win32ApiWindow.h:29
virtual uint16 GetClientHeight() const override
Definition: Win32ApiWindow.cpp:165
~Win32ApiWindow()
Definition: Win32ApiWindow.cpp:18
Dedcriptor used to create native GUI window.
Definition: INativeWindow.h:17
virtual void Hide() override
Definition: Win32ApiWindow.cpp:140
void HideAppWindow()
Definition: Win32ApiWindow.cpp:183
virtual std::string GetTitle() const override
Definition: Win32ApiWindow.cpp:126
void ShowAppWindow()
Definition: Win32ApiWindow.cpp:176
Interface for native window sing OS specific ffunctions.
Definition: INativeWindow.h:74
bool Initialize(NativeWindowDescriptor &descriptor)
Definition: Win32ApiWindow.cpp:35
virtual uint16 GetClientWidth() const override
Definition: Win32ApiWindow.cpp:155
virtual void Show() override
Definition: Win32ApiWindow.cpp:133
virtual uint16 GetWidth() const override
Definition: Win32ApiWindow.cpp:105
Native window uses WinApi.
Definition: Win32ApiWindow.h:21
HWND m_windowHandle
Definition: Win32ApiWindow.h:25
virtual void SetTitle(const std::string &newTitle) override
Definition: Win32ApiWindow.cpp:147
Win32ApiWindow()
Definition: Win32ApiWindow.cpp:14
static Win32ApiWindow * CreateWindowInstance(NativeWindowDescriptor &descriptor)
Definition: Win32ApiWindow.cpp:22
virtual WindowHandler GetHandle() const override
Definition: Win32ApiWindow.cpp:119