12bool scl::windows_window::OnCreate(
window_handle WindowHandle, CREATESTRUCT *CS)
18 SetTimer(
Handle, InitialisationTimer, 0,
nullptr);
22void scl::windows_window::OnSize(
window_handle WindowHandle,
u32 State,
int W,
int H)
28 if (!IsInitialised)
return;
37 DestroyWindow(Handle);
41void scl::windows_window::OnDestroy(
window_handle WindowHandle)
52void scl::windows_window::OnTimer(
window_handle WindowHandle, UINT
id)
54 if (IsInitialised)
return;
57 KillTimer(Handle, InitialisationTimer);
64bool scl::windows_window::OnEraseBackground(
window_handle WindowHandle, HDC hDC)
74 hDC = BeginPaint(WindowHandle, &ps);
75 EndPaint(WindowHandle, &ps);
78void scl::windows_window::OnActivate(
window_handle WindowHandle,
u32 Reason, HWND hWndActDeact,
bool IsMinimized)
82void scl::windows_window::OnMMove(HWND hwnd,
int x,
int y,
u32 keyFlags)
84 if (!IsInitialised)
return;
86 mouse_move_event e { x, y,
87 (bool)(keyFlags & MK_RBUTTON), (bool)(keyFlags & MK_LBUTTON), (bool)(keyFlags & MK_MBUTTON),
88 (bool)(keyFlags & MK_SHIFT), (bool)(keyFlags & MK_CONTROL)
93void scl::windows_window::OnMWheel(
window_handle WindowHandle,
int X,
int Y,
int Z,
u32 Keys)
95 if (!IsInitialised)
return;
97 this->MouseWheel +=
Z;
100 mouse_wheel_event e {
Z };
104void scl::windows_window::OnMButDown(
window_handle WindowHandle,
bool IsDblClick,
int X,
int Y,
u32 Keys)
106 if (!IsInitialised)
return;
112void scl::windows_window::OnMButUp(
window_handle WindowHandle,
int X,
int Y,
u32 Keys)
114 if (!IsInitialised)
return;
120void scl::windows_window::OnKey(HWND hwnd,
u32 vk,
bool fDown,
int cRepeat,
u32 flags)
122 if (!IsInitialised)
return;
124 keyboard_event e { (bool)fDown, (
bool)(flags & (1 << 14)), (
keycode)vk};
static void Invoke(Tevent &Event)
static const int ViewportId
Sculpto library prehompiled header. Defines common definitions, includes commonly used modules.