Sleeping Wombat GUI  0.100
swGUI
MockWindow.h
Go to the documentation of this file.
1 #pragma once
2 
10 
11 
12 
13 
14 namespace sw {
15 namespace gui
16 {
17 
18 
21 class MockWindow : public INativeWindow
22 {
23 private:
24 
25  std::wstring m_title;
26 
30 
31 public:
32  explicit MockWindow ();
33  ~MockWindow ();
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
Fake window for tests.
Definition: MockWindow.h:21
void * WindowHandler
Definition: SwapChain.h:6
Definition: DirectInputModule.cpp:11
virtual WindowHandler GetHandle() const override
Definition: MockWindow.cpp:75
virtual void SetTitle(const std::string &newTitle) override
Definition: MockWindow.cpp:103
bool Initialize(NativeWindowDescriptor &descriptor)
Definition: MockWindow.cpp:46
void HideAppWindow()
Definition: MockWindow.cpp:129
uint16 m_height
Definition: MockWindow.h:29
virtual uint16 GetHeight() const override
Definition: MockWindow.cpp:68
Dedcriptor used to create native GUI window.
Definition: INativeWindow.h:17
void ShowAppWindow()
Definition: MockWindow.cpp:125
WindowHandler m_windowHandle
Definition: MockWindow.h:27
std::wstring m_title
Definition: MockWindow.h:25
static MockWindow * CreateWindowInstance(NativeWindowDescriptor &descriptor)
Definition: MockWindow.cpp:33
MockWindow()
Definition: MockWindow.cpp:22
virtual std::string GetTitle() const override
Definition: MockWindow.cpp:82
uint16 m_width
Definition: MockWindow.h:28
~MockWindow()
Definition: MockWindow.cpp:28
virtual void Hide() override
Definition: MockWindow.cpp:96
Interface for native window sing OS specific ffunctions.
Definition: INativeWindow.h:74
virtual void Show() override
Definition: MockWindow.cpp:89
virtual uint16 GetClientWidth() const override
Definition: MockWindow.cpp:110
virtual uint16 GetWidth() const override
Definition: MockWindow.cpp:61
virtual uint16 GetClientHeight() const override
Definition: MockWindow.cpp:117