8 #ifndef META_OCEAN_PLATFORM_WIN_WINDOW_H
9 #define META_OCEAN_PLATFORM_WIN_WINDOW_H
30 class OCEAN_PLATFORM_WIN_EXPORT
Window
52 typedef std::vector<std::wstring>
Files;
59 typedef std::unordered_map<std::wstring, unsigned int>
ClassMap;
69 virtual bool initialize(
const HICON icon =
nullptr,
const std::string& windowClass =
"window");
78 inline bool initialize(
const HINSTANCE applicationInstance,
const int iconId,
const std::string& windowClass =
"window");
99 virtual void repaint(
const bool eraseBackground =
false);
106 bool move(
const int x,
const int y);
114 bool resize(
const unsigned int width,
const unsigned int height);
120 inline HINSTANCE applicationInstance()
const;
126 inline const std::wstring& name()
const;
132 inline HWND handle()
const;
138 inline HWND parentHandle()
const;
144 inline HDC dc()
const;
199 Window(HINSTANCE applicationInstance,
const std::wstring& name,
const HWND parent =
nullptr,
const bool isChild =
false);
236 virtual void modifyWindowStyle(DWORD& windowStyle,
int& windowLeft,
int& windowTop,
int& windowWidth,
int& windowHeight);
275 virtual void onResize(
const unsigned int clientWidth,
const unsigned int clientHeight);
349 static LRESULT CALLBACK
windowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
366 HWND parentHandle_ =
nullptr;
372 HINSTANCE applicationInstance_ =
nullptr;
378 HWND handle_ =
nullptr;
384 bool isChild_ =
false;
387 inline bool Window::initialize(
const HINSTANCE applicationInstance,
const int iconId,
const std::string& windowClass)
390 ocean_assert(iconId >= 0);
This class implements a recursive lock object.
Definition: Lock.h:31
@ BUTTON_MIDDLE
Middle button.
Definition: SceneDescription.h:82
@ BUTTON_NONE
Definition: SceneDescription.h:78
@ BUTTON_RIGHT
Right button.
Definition: SceneDescription.h:84
@ BUTTON_LEFT
Left button.
Definition: SceneDescription.h:80
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15