Kigs Framework
Doc version 0.8
Open source multi purpose Rapid Application Development framework
|
#include <WindowWin32.h>
Public Member Functions | |
WindowWin32 (const kstl::string &name, DECLARE_CLASS_NAME_TREE_ARG) | |
constructor | |
void | Show () |
show method, display the window More... | |
virtual void | Update (const Timer &timer, void *) |
update method, call rendering screen update and manage messages More... | |
void | ShowMouse (bool bOn) |
show or hide system mouse | |
virtual void | SetParentWindow (HWND hParent) |
callback called when window is resized More... | |
WindowWin32 (const kstl::string &name, DECLARE_CLASS_NAME_TREE_ARG) | |
constructor | |
virtual void | Show () |
show method, display the window | |
virtual void | Update (const Timer &timer, void *) |
update method, call rendering screen update and manage messages | |
void | ShowMouse (bool bOn) |
show or hide system mouse | |
Public Member Functions inherited from Window | |
Window (const kstl::string &name, DECLARE_CLASS_NAME_TREE_ARG) | |
constructor More... | |
RenderingScreen * | GetRenderingScreen () |
return the rendering screen associated with this window | |
void | SetKeyDownCallback (KeyDownCallbackFn Callback) |
Set the callback which is called when the user types the given character. | |
void | SetKeyUpCallback (KeyDownCallbackFn Callback) |
Set the callback which is called when the user types the given character (key up) | |
void | SetDestroyCallback (DestroyCallbackFn Callback) |
Set the callback which is called when the window is destroyed. | |
void | SetClickCallback (ClickMessageCallbackFn Callback) |
Set the callback when clicking in the window (X,Y) range in pixels (from left to right, bottom to up) | |
void | SetDoubleClickCallback (ClickMessageCallbackFn Callback) |
Set the callback when double clicking in the window (X,Y) range in pixels (from left to right, bottom to up) | |
bool | addItem (const CMSP &item, ItemPosition pos=Last DECLARE_DEFAULT_LINK_NAME) override |
add item. Manage rendering screen More... | |
bool | removeItem (const CMSP &item DECLARE_DEFAULT_LINK_NAME) override |
remove item. Manage rendering screen More... | |
void * | GetHandle () |
return the window handle | |
Public Member Functions inherited from CoreModifiable | |
void | Init () |
Modifiable managmenent. | |
void | EmptyItemList () |
remove all items (sons) | |
CMSP | GetInstanceByPath (const std::string &path) |
return the instance corresponding to the given path in sons tree | |
std::string | GetRuntimeID () const |
ID. | |
CoreModifiableAttribute * | getAttribute (KigsID labelid) const |
Attribute management. | |
u32 | getNbArrayElements (KigsID attributeLabel) const |
return element count for an array type attribute | |
template<typename attribute_type , typename value_type > | |
attribute_type * | AddDynamicAttribute (KigsID ID, const value_type &value) |
Dynamic attribute management. | |
const kigs::unordered_map< KigsID, ModifiableMethodStruct > * | GetMethods () |
Method management. | |
bool | aggregateWith (CMSP &item, ItemPosition pos=Last) |
Aggregate management. | |
void | flagAsNotificationCenterRegistered () |
Flags. | |
void | InitParametersFromList (const std::vector< CoreModifiableAttribute * > *params) |
Utility. More... | |
virtual void | UninitModifiable () |
called when InitModifiable has failled : reset read/write flag on all init params More... | |
virtual void | ProtectedDestroy () |
Destroy method decrement refcounter and delete instance if no more used. More... | |
virtual void | addUser (CoreModifiable *user) |
add the given parent to list | |
virtual void | removeUser (CoreModifiable *user) |
remove user (parent) | |
virtual bool | removeItem (const CMSP &item) |
remove item (son) | |
Protected Member Functions | |
virtual | ~WindowWin32 () |
destructor More... | |
virtual void | ProtectedInit () |
os dependant Window creation, or fullscreen mode setup More... | |
virtual | ~WindowWin32 () |
destructor | |
virtual void | ProtectedInit () |
os dependant Window creation, or fullscreen mode setup | |
Protected Member Functions inherited from Window | |
virtual | ~Window () |
destructor | |
void | InitModifiable () override |
init method More... | |
Protected Member Functions inherited from CoreModifiable | |
void | UpdateAggregates (const Timer &timer, void *addParam) |
Internals. | |
void | Export (std::vector< CoreModifiable * > &savedList, XMLNode *currentNode, bool recursive, ExportSettings *settings) |
Export. More... | |
CoreModifiableAttribute * | GenericCreateDynamicAttribute (CoreModifiable::ATTRIBUTE_TYPE type, KigsID ID) |
create and add dynamic attribute except arrays | |
Static Protected Member Functions | |
static LRESULT WINAPI | MsgProc (HWND hWnd, ::UINT msg, WPARAM wParam, LPARAM lParam) |
message management callback More... | |
Static Protected Member Functions inherited from CoreModifiable | |
template<typename StringType > | |
static CMSP | Import (XMLNodeTemplate< StringType > *currentNode, CoreModifiable *currentModifiable, ImportState &importState) |
recusrive method to add sons and attributes found in the XML file | |
Protected Attributes | |
WNDCLASSEX | mWC |
win32 handle | |
HWND | mParent |
Parent window at creation. | |
MSG | mMsg |
stored msg | |
bool | mScreenSaverActive |
manage screensaver desactivation | |
Protected Attributes inherited from Window | |
maBool | mFullScreen |
parameter for fullscreen window | |
maBool | mShowMouseCursor |
flag to show/hide the mouse | |
maBool | mIsMainWindow |
flag to decide if the window is the main window. If you close the main window, the application should be terminated | |
maInt | mPositionX |
window size and position on screen (size is also used if fullscreen) | |
void * | mHandle |
platform independant handle | |
RenderingScreen * | mScreen |
windows rendering screen | |
ClickMessageCallbackFn | mClickCallback |
mouse callbacks | |
KeyDownCallbackFn | mKeyDownCallback |
key callback | |
DestroyCallbackFn | mDestroyCallback |
destroy callback | |
Additional Inherited Members | |
Public Types inherited from Window | |
typedef void(* | ClickMessageCallbackFn) (CoreModifiable *pWindow, int buttonId, kfloat X, kfloat Y, bool isDown) |
Typedefs for callbacks for the window events. They are not used by other projects at the moment. | |
typedef void(* | KeyDownCallbackFn) (Window *pWindow, char C, int VirtualKeyCode) |
Typedefs for callbacks for the window events. They are not used by other projects at the moment. | |
typedef void(* | DestroyCallbackFn) (CoreModifiable *pWindow) |
Typedefs for callbacks for the window events. They are not used by other projects at the moment. | |
Static Public Member Functions inherited from CoreModifiable | |
static std::vector< CMSP > | GetRootInstances (const KigsID &cid, bool exactTypeOnly=false) |
static method : return the set of all root instances of the given type | |
static void | Append (std::string &XMLString, const std::list< CoreModifiable * > &toexport, bool recursive, ExportSettings *settings=nullptr) |
static method to export the several CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree More... | |
static void | Export (const std::string &filename, CoreModifiable *toexport, bool recursive=false, ExportSettings *settings=nullptr) |
static method to export the given CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree More... | |
static XMLNode * | ExportToXMLNode (CoreModifiable *toexport, XML *owner_xml_file, bool recursive, ExportSettings *settings=nullptr) |
static method to export the given CoreModifiable to an XML Node. if recursive flag is set to true, export also all sons tree More... | |
static std::string | ExportToXMLString (CoreModifiable *toexport, bool recursive, ExportSettings *settings=nullptr) |
static method to export the given CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree More... | |
static void | Export (std::string &XMLString, const std::list< CoreModifiable * > &toexport, bool recursive, ExportSettings *settings=nullptr) |
static method to export the several CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree More... | |
static CMSP | Import (const std::string &filename, bool noInit=false, bool keepImportFileName=false, ImportState *state=nullptr, const std::string &override_name="") |
return an new CoreModifiable instance using the description found in XML file given by name | |
static CMSP | GetInstanceByGlobalPath (const std::string &path) |
static method : return the instance corresponding to the given path, and given search start | |
static void | debugPrintfFullTree (int maxindent=3) |
Editor. More... | |
|
protectedvirtual |
destructor
if fullscreen mode, switch back to init settings
destroy rendering screen
win32 stuff
enable again screen saver if needed
|
staticprotected |
message management callback
manage some messages (destroy and resize)
|
protectedvirtual |
os dependant Window creation, or fullscreen mode setup
init the window, and if OK, show it
if fullscreen mode, try to have fullscreen settings with given sizex and sizey, and with given rendering screen bitsPerPixel
create windowed window (:o)
win32 stuff
resize window to fit size
Create the window
init msg buffer
and show the window
Implements Window.
|
virtual |
callback called when window is resized
Set parent Window for creation
|
virtual |
show method, display the window
show window
init rendering screen after first show window
win32 stuff
Implements Window.
|
virtual |
update method, call rendering screen update and manage messages
update window
call screen update
manage messages
Reimplemented from CoreModifiable.