Sparkle 0.0.1
Loading...
Searching...
No Matches
spk::Win32::Class Class Reference

Registers a Win32 window class and instantiates windows from it. More...

#include <spk_class.hpp>

Collaboration diagram for spk::Win32::Class:
Collaboration graph

Public Member Functions

 Class (const std::wstring &p_className, const WNDPROC &p_windowProcedure)
 Registers a Win32 class name with a window procedure.
Window instanciate (const std::wstring &p_title, const spk::Extend2D &p_extend, void *p_userPtr)
 Creates a window instance bound to this class.

Detailed Description

Registers a Win32 window class and instantiates windows from it.

spk::Win32::Class windowClass{L"SparkleWindow", MyWndProc};
auto window = windowClass.instanciate(L"Sparkle", {100, 100, 800, 600}, nullptr);
window.show();
Registers a Win32 window class and instantiates windows from it.
Definition spk_class.hpp:24
Window instanciate(const std::wstring &p_title, const spk::Extend2D &p_extend, void *p_userPtr)
Creates a window instance bound to this class.
Definition spk_class.cpp:62
void show() const
Shows the window using SW_SHOW.
Definition spk_window.cpp:63

Constructor & Destructor Documentation

◆ Class()

spk::Win32::Class::Class ( const std::wstring & p_className,
const WNDPROC & p_windowProcedure )

Registers a Win32 class name with a window procedure.

Parameters
p_classNameUnique class name to register.
p_windowProcedureWindow procedure callback.

Member Function Documentation

◆ instanciate()

Window spk::Win32::Class::instanciate ( const std::wstring & p_title,
const spk::Extend2D & p_extend,
void * p_userPtr )

Creates a window instance bound to this class.

Parameters
p_titleWindow title string.
p_extendDesired client area and position.
p_userPtrOptional user pointer passed to creation data.
Returns
Created Window wrapper.

The documentation for this class was generated from the following files:
  • includes/structure/win32/spk_class.hpp
  • srcs/structure/win32/spk_class.cpp