class MASKING_DLL_DECLSPEC Window

A movable and resizable dialog aka window.

Inheritance:

Window - Dialog - Widget - Rect


Public Fields

[more]Label title
The window's title Label.

Public Methods

[more]void HandleEvent(Widget &obj, int msg, int arg1=0, int arg2=0)
Handles events such as icon clicks
[more]void Add(Widget &w)
Adds a widget to the client area
[more]void Remove(Widget &w)
Removes a widget from the client area
[more]virtual void SetClientArea(Dialog* clientArea)
Sets the passed dialog as the window's client area.
[more]Dialog* GetClientArea()
Returns a pointer to the window's client area dialog
[more]virtual void Minimize()
Minimizes the window or restores it if it is already minimized.
[more]virtual void Maximize()
Maximizes the window or restores it if it is already maximized
[more]virtual void Autorollup(bool)
Enables or disables the autorollup (or auto-minimize) feature.

Protected Fields

[more]FrameBorder bLeft
Left border
[more]FrameBorder bRight
Right border
[more]FrameBorder bTop
Top border
[more]FrameBorder bBottom
Bottom border
[more]FrameBorder bGrip
The caption area
[more]WinIcon iconMin
Minimize icon
[more]WinIcon iconMax
Maximize icon
[more]WinIcon iconExit
Exit icon.
[more]TextBack textBack
The background for the window title.
[more]Dialog* clientArea
A pointer to the window's client area
[more]WinClientArea ownClientArea
The window's own client area that is used by default if the user doesn't provide one
[more]Rect restoreRect
The restore rectangle.
[more]int extraFlags
Some window specific flags that don't fit in the normal widget flags scheme.

Protected Methods

[more]void MsgInitSkin()
Initilizes the window item with the default bitmaps, fonts and font colours as defined by the skin
[more]void MsgGotfocus()
Sends a MSG_GOTFOCUS to all the widgets (except for the client area) and plays an appropriate sample to indicate the window got input focus
[more]void MsgLostfocus()
Sends a MSG_LOSTFOCUS to all the widgets (except for the client area) and plays an appropriate sample to indicate the window lost input focus
[more]void MsgGotmouse()
Restores the window when it gets the mouse if the autorollup feature is enabled
[more]void MsgLostmouse()
Minimizes the window when it loses the mouse if the autorollup feature is enabled
[more]void UpdateSize()
Resizes and repositions some of the child widgets after the window has been resized or moved.
[more]ActionType GetAction()
Returns the ActionType accordin to the position of the mouse.
[more]void UpdateWindowProperties()
A helper function for enabling and disabling the icons according to the window's properties


Documentation

A movable and resizable dialog aka window.

A Window implements a dialog that has a frame with a caption area, three icons for minimizing, maximizing and closing the window and a client area for holding the window's contents. A window can be modal (it takes exclusive input focus) or modeless (it coexists with other widgets in a dialog). A window can but doeasn't have to be movable and/or resizable. It can use it's own client area for holding its contents or you can give it any dialog to act as a client area.

oLabel title
The window's title Label. This is public so you can access it freely without the need of a special access function.

oFrameBorder bLeft
Left border

oFrameBorder bRight
Right border

oFrameBorder bTop
Top border

oFrameBorder bBottom
Bottom border

oFrameBorder bGrip
The caption area

oWinIcon iconMin
Minimize icon

oWinIcon iconMax
Maximize icon

oWinIcon iconExit
Exit icon. The exit icon actually closes a modal window but if the window is modeless, it will just send MSG_REMOVEME to the parent dialog and the dialog needs to actually remove the window from itself.

oTextBack textBack
The background for the window title. Note that only some skins use this.

oDialog* clientArea
A pointer to the window's client area

oWinClientArea ownClientArea
The window's own client area that is used by default if the user doesn't provide one

oRect restoreRect
The restore rectangle. This rectangle stores the original window size and position so the window can be restored after being minimized or maximized.

oint extraFlags
Some window specific flags that don't fit in the normal widget flags scheme.
         W_MINIMIZED=1      - the window is minimized
         W_MAXIMIZED=2      - the window is maximized
         W_AUTOROLLUP=4     - the window automatically minimizes when it loses the mouse

ovoid MsgInitSkin()
Initilizes the window item with the default bitmaps, fonts and font colours as defined by the skin

ovoid MsgGotfocus()
Sends a MSG_GOTFOCUS to all the widgets (except for the client area) and plays an appropriate sample to indicate the window got input focus

ovoid MsgLostfocus()
Sends a MSG_LOSTFOCUS to all the widgets (except for the client area) and plays an appropriate sample to indicate the window lost input focus

ovoid MsgGotmouse()
Restores the window when it gets the mouse if the autorollup feature is enabled

ovoid MsgLostmouse()
Minimizes the window when it loses the mouse if the autorollup feature is enabled

ovoid UpdateSize()
Resizes and repositions some of the child widgets after the window has been resized or moved. You should overload this function if you want your widgets to follow the window's size and position properly.

oActionType GetAction()
Returns the ActionType accordin to the position of the mouse. This makes sure the window can be resized when the mouse is on top of a border and moved when it is on top of the caption area.

ovoid UpdateWindowProperties()
A helper function for enabling and disabling the icons according to the window's properties

ovoid HandleEvent(Widget &obj, int msg, int arg1=0, int arg2=0)
Handles events such as icon clicks

ovoid Add(Widget &w)
Adds a widget to the client area

ovoid Remove(Widget &w)
Removes a widget from the client area

ovirtual void SetClientArea(Dialog* clientArea)
Sets the passed dialog as the window's client area. The window contains its own default client area dialog but if you want you can have any dialog act as a client area for a window.

oDialog* GetClientArea()
Returns a pointer to the window's client area dialog

ovirtual void Minimize()
Minimizes the window or restores it if it is already minimized. Note that in MASkinG minimizing a window isn't exactly the same as minimizing a window in MS Windows. In MASkinG minimizing is about halfway between rolling up and normal minimizing.

Note: this can change in the future.

ovirtual void Maximize()
Maximizes the window or restores it if it is already maximized

ovirtual void Autorollup(bool)
Enables or disables the autorollup (or auto-minimize) feature. If enabled, the window will automatically minimize itself when it loses the mouse and restore itself when it gets it back.


Direct child classes:
MessageBox
FileSelect
ColorSelect

Alphabetic index Hierarchy of classes


Back to front page   |   page generated with DOC++