#include <GameWindow.h>
Inherits MemoryPoolObject.
Inherited by W3DGameWindow.
Public Member Functions | |
| GameWindow (void) | |
| virtual void | winDrawBorder (void)=0 |
| draw border for this window only, NO child windows or anything | |
| Int | winSetWindowId (Int id) |
| set id for this window | |
| Int | winGetWindowId (void) |
| return window id for this window | |
| Int | winSetSize (Int width, Int height) |
| set size | |
| Int | winGetSize (Int *width, Int *height) |
| return size | |
| Int | winActivate (void) |
| pop window to top of list and activate | |
| Int | winBringToTop (void) |
| bring this window to the top of the win list | |
| Int | winEnable (Bool enable) |
| Bool | winGetEnabled (void) |
| Is window enabled? | |
| Int | winHide (Bool hide) |
| hide/unhide a window | |
| Bool | winIsHidden (void) |
| is this window hidden/ | |
| UnsignedInt | winSetStatus (UnsignedInt status) |
| set status bits | |
| UnsignedInt | winClearStatus (UnsignedInt status) |
| clear status bits | |
| UnsignedInt | winGetStatus (void) |
| get status bits | |
| UnsignedInt | winGetStyle (void) |
| get style bits | |
| Int | winNextTab (void) |
| advance focus to next window | |
| Int | winPrevTab (void) |
| change focus to previous window | |
| Int | winSetPosition (Int x, Int y) |
| set window position | |
| Int | winGetPosition (Int *x, Int *y) |
| get window position | |
| Int | winGetScreenPosition (Int *x, Int *y) |
| get screen coordinates | |
| Int | winGetRegion (IRegion2D *region) |
| get window region | |
| Int | winSetCursorPosition (Int x, Int y) |
| set window cursor position | |
| Int | winGetCursorPosition (Int *x, Int *y) |
| get window cursor position | |
| Int | winSetEnabledImage (Int index, const Image *image) |
| Int | winSetEnabledColor (Int index, Color color) |
| Int | winSetEnabledBorderColor (Int index, Color color) |
| const Image * | winGetEnabledImage (Int index) |
| Color | winGetEnabledColor (Int index) |
| Color | winGetEnabledBorderColor (Int index) |
| Int | winSetDisabledImage (Int index, const Image *image) |
| Int | winSetDisabledColor (Int index, Color color) |
| Int | winSetDisabledBorderColor (Int index, Color color) |
| const Image * | winGetDisabledImage (Int index) |
| Color | winGetDisabledColor (Int index) |
| Color | winGetDisabledBorderColor (Int index) |
| Int | winSetHiliteImage (Int index, const Image *image) |
| Int | winSetHiliteColor (Int index, Color color) |
| Int | winSetHiliteBorderColor (Int index, Color color) |
| const Image * | winGetHiliteImage (Int index) |
| Color | winGetHiliteColor (Int index) |
| Color | winGetHiliteBorderColor (Int index) |
| Int | winDrawWindow (void) |
| draws the default background | |
| void | winSetDrawOffset (Int x, Int y) |
| set offset for drawing background image data | |
| void | winGetDrawOffset (Int *x, Int *y) |
| get draw offset | |
| void | winSetHiliteState (Bool state) |
| set hilite state | |
| void | winSetTooltip (UnicodeString tip) |
| set tooltip text | |
| Int | getTooltipDelay () |
| get tooltip delay | |
| void | setTooltipDelay (Int delay) |
| set tooltip delay | |
| virtual Int | winSetText (UnicodeString newText) |
| set text string | |
| UnicodeString | winGetText (void) |
| get text string | |
| Int | winGetTextLength () |
| get number of chars in text string | |
| GameFont * | winGetFont (void) |
| get the font being used by this window | |
| virtual void | winSetFont (GameFont *font) |
| set font for window | |
| void | winSetEnabledTextColors (Color color, Color borderColor) |
| void | winSetDisabledTextColors (Color color, Color borderColor) |
| void | winSetIMECompositeTextColors (Color color, Color borderColor) |
| void | winSetHiliteTextColors (Color color, Color borderColor) |
| Color | winGetEnabledTextColor (void) |
| Color | winGetEnabledTextBorderColor (void) |
| Color | winGetDisabledTextColor (void) |
| Color | winGetDisabledTextBorderColor (void) |
| Color | winGetIMECompositeTextColor (void) |
| Color | winGetIMECompositeBorderColor (void) |
| Color | winGetHiliteTextColor (void) |
| Color | winGetHiliteTextBorderColor (void) |
| Int | winSetInstanceData (WinInstanceData *data) |
| copy over instance data | |
| WinInstanceData * | winGetInstanceData (void) |
| get instance data | |
| void * | winGetUserData (void) |
| get the window user data | |
| void | winSetUserData (void *userData) |
| set the user data | |
| Int | winSetParent (GameWindow *parent) |
| set parent | |
| GameWindow * | winGetParent (void) |
| get parent | |
| Bool | winIsChild (GameWindow *child) |
| verifies parent | |
| GameWindow * | winGetChild (void) |
| get the child window | |
| Int | winSetOwner (GameWindow *owner) |
| set owner | |
| GameWindow * | winGetOwner (void) |
| get window's owner | |
| void | winSetNext (GameWindow *next) |
| set next pointer | |
| void | winSetPrev (GameWindow *prev) |
| set prev pointer | |
| GameWindow * | winGetNext (void) |
| get next window in window list | |
| GameWindow * | winGetPrev (void) |
| get previous window in window list | |
| void | winSetNextInLayout (GameWindow *next) |
| set next in layout | |
| void | winSetPrevInLayout (GameWindow *prev) |
| set prev in layout | |
| void | winSetLayout (WindowLayout *layout) |
| set layout | |
| WindowLayout * | winGetLayout (void) |
| get layout layout | |
| GameWindow * | winGetNextInLayout (void) |
| get next window in layout | |
| GameWindow * | winGetPrevInLayout (void) |
| get prev window in layout | |
| Int | winSetSystemFunc (GameWinSystemFunc system) |
| set system | |
| Int | winSetInputFunc (GameWinInputFunc input) |
| set input | |
| Int | winSetDrawFunc (GameWinDrawFunc draw) |
| set draw | |
| Int | winSetTooltipFunc (GameWinTooltipFunc tooltip) |
| set tooltip | |
| Int | winSetCallbacks (GameWinInputFunc input, GameWinDrawFunc draw, GameWinTooltipFunc tooltip) |
| set draw, input, tooltip | |
| Bool | winPointInWindow (Int x, Int y) |
| GameWindow * | winPointInChild (Int x, Int y, Bool ignoreEnableCheck=FALSE, Bool playDisabledSound=FALSE) |
| GameWindow * | winPointInAnyChild (Int x, Int y, Bool ignoreHidden, Bool ignoreEnableCheck=FALSE) |
| GameWinInputFunc | winGetInputFunc (void) |
| GameWinSystemFunc | winGetSystemFunc (void) |
| GameWinDrawFunc | winGetDrawFunc (void) |
| GameWinTooltipFunc | winGetTooltipFunc (void) |
| void | winSetEditData (GameWindowEditData *editData) |
| GameWindowEditData * | winGetEditData (void) |
Public Member Functions inherited from MemoryPoolObject | |
| void | deleteInstance () |
Protected Member Functions | |
| void | freeImages (void) |
| 'images' should be taken care of when we hide ourselves or are destroyed | |
| Bool | isEnabled (void) |
| see if we and our parents are enabled | |
| void | normalizeWindowRegion (void) |
| put UL corner in window region.lo | |
| GameWindow * | findFirstLeaf (void) |
| return first leaf of branch | |
| GameWindow * | findLastLeaf (void) |
| return last leaf of branch | |
| GameWindow * | findPrevLeaf (void) |
| return prev leav in tree | |
| GameWindow * | findNextLeaf (void) |
| return next leaf in tree | |
Protected Member Functions inherited from MemoryPoolObject | |
| virtual | ~MemoryPoolObject () |
| void * | operator new (size_t s) |
| void | operator delete (void *p) |
| virtual MemoryPool * | getObjectMemoryPool ()=0 |
Protected Attributes | |
| Int | m_status |
| ICoord2D | m_size |
| IRegion2D | m_region |
| Int | m_cursorX |
| Int | m_cursorY |
| void * | m_userData |
| WinInstanceData | m_instData |
| void * | m_inputData |
| GameWinInputFunc | m_input |
| callback for input | |
| GameWinSystemFunc | m_system |
| callback for system messages | |
| GameWinDrawFunc | m_draw |
| callback for drawing | |
| GameWinTooltipFunc | m_tooltip |
| callback for tooltip execution | |
| GameWindow * | m_next |
| GameWindow * | m_prev |
| GameWindow * | m_parent |
| GameWindow * | m_child |
| GameWindow * | m_nextLayout |
| next in layout | |
| GameWindow * | m_prevLayout |
| prev in layout | |
| WindowLayout * | m_layout |
| layout this window is a part of | |
| GameWindowEditData * | m_editData |
Friends | |
| class | GameWindowManager |
| < this abstract class needs memory pool hooks | |
Class definition for a game window. These are the basic elements of the whole windowing sytem, all windows are GameWindows, as are all GUI controls etc.
Definition at line 230 of file GameWindow.h.
| GameWindow::GameWindow | ( | void | ) |
Definition at line 86 of file GameWindow.cpp.
|
protected |
return first leaf of branch
Returns the first leaf of the branch
Definition at line 171 of file GameWindow.cpp.
|
protected |
return last leaf of branch
Returns the last leaf of the branch
Definition at line 190 of file GameWindow.cpp.
|
protected |
return next leaf in tree
Returns the next leaf of the tree
Definition at line 283 of file GameWindow.cpp.
|
protected |
return prev leav in tree
Returns the prev leaf of the tree
Definition at line 216 of file GameWindow.cpp.
|
inlineprotected |
'images' should be taken care of when we hide ourselves or are destroyed
Definition at line 382 of file GameWindow.h.
|
inline |
get tooltip delay
Definition at line 299 of file GameWindow.h.
|
protected |
see if we and our parents are enabled
|
protected |
put UL corner in window region.lo
Puts the upper left corner in the window's region.lo field
Definition at line 144 of file GameWindow.cpp.
|
inline |
set tooltip delay
Definition at line 300 of file GameWindow.h.
| Int GameWindow::winActivate | ( | void | ) |
pop window to top of list and activate
Pop window to top of window list AND activate it
Definition at line 461 of file GameWindow.cpp.
| Int GameWindow::winBringToTop | ( | void | ) |
bring this window to the top of the win list
Bring this window to the top of the window list, if we have a parent we will go to the top of the child list for that parent
Definition at line 406 of file GameWindow.cpp.
| UnsignedInt GameWindow::winClearStatus | ( | UnsignedInt | status | ) |
clear status bits
Allows the user to directly clear a window's status flags.
Definition at line 734 of file GameWindow.cpp.
|
pure virtual |
draw border for this window only, NO child windows or anything
Implemented in W3DGameWindow.
| Int GameWindow::winDrawWindow | ( | void | ) |
draws the default background
Draws the default background for the specified window.
Definition at line 1377 of file GameWindow.cpp.
enable/disable a window, a disbled window can be seen but accepts no input
Enable or disable a window based on the enable parameter. A disabled window can be seen but accepts no input.
Definition at line 640 of file GameWindow.cpp.
| GameWindow * GameWindow::winGetChild | ( | void | ) |
get the child window
Get the child window of this window
Definition at line 1182 of file GameWindow.cpp.
get window cursor position
Get the window's cursor postion
Definition at line 528 of file GameWindow.cpp.
Definition at line 283 of file GameWindow.h.
Definition at line 282 of file GameWindow.h.
Definition at line 281 of file GameWindow.h.
| Color GameWindow::winGetDisabledTextBorderColor | ( | void | ) |
Get the disabled text color
Definition at line 968 of file GameWindow.cpp.
| Color GameWindow::winGetDisabledTextColor | ( | void | ) |
Get the disabled text color
Definition at line 958 of file GameWindow.cpp.
| GameWinDrawFunc GameWindow::winGetDrawFunc | ( | void | ) |
Definition at line 1779 of file GameWindow.cpp.
| GameWindowEditData * GameWindow::winGetEditData | ( | void | ) |
Definition at line 1797 of file GameWindow.cpp.
| Bool GameWindow::winGetEnabled | ( | void | ) |
Is window enabled?
Enable or disable a window based on the enable parameter. A disabled window can be seen but accepts no input.
Definition at line 665 of file GameWindow.cpp.
Definition at line 276 of file GameWindow.h.
Definition at line 275 of file GameWindow.h.
Definition at line 274 of file GameWindow.h.
| Color GameWindow::winGetEnabledTextBorderColor | ( | void | ) |
Get the enabled text color
Definition at line 948 of file GameWindow.cpp.
| Color GameWindow::winGetEnabledTextColor | ( | void | ) |
Get the enabled text color
Definition at line 938 of file GameWindow.cpp.
| GameFont * GameWindow::winGetFont | ( | void | ) |
get the font being used by this window
Get the font being used by this window
Definition at line 839 of file GameWindow.cpp.
Definition at line 290 of file GameWindow.h.
Definition at line 289 of file GameWindow.h.
Definition at line 288 of file GameWindow.h.
| Color GameWindow::winGetHiliteTextBorderColor | ( | void | ) |
Get the hilite text color
Definition at line 1008 of file GameWindow.cpp.
| Color GameWindow::winGetHiliteTextColor | ( | void | ) |
Get the hilite text color
Definition at line 998 of file GameWindow.cpp.
| Color GameWindow::winGetIMECompositeBorderColor | ( | void | ) |
Get the IME composite border color
Definition at line 988 of file GameWindow.cpp.
| Color GameWindow::winGetIMECompositeTextColor | ( | void | ) |
Get the IME composite text color
Definition at line 978 of file GameWindow.cpp.
| GameWinInputFunc GameWindow::winGetInputFunc | ( | void | ) |
Definition at line 1752 of file GameWindow.cpp.
| WinInstanceData * GameWindow::winGetInstanceData | ( | void | ) |
get instance data
Return pointer to the instance data for this window
Definition at line 1052 of file GameWindow.cpp.
| WindowLayout * GameWindow::winGetLayout | ( | void | ) |
get layout layout
Get layout this window is a part of, if any
Definition at line 1281 of file GameWindow.cpp.
| GameWindow * GameWindow::winGetNext | ( | void | ) |
| GameWindow * GameWindow::winGetNextInLayout | ( | void | ) |
get next window in layout
Get next window in layout list if any
Definition at line 1289 of file GameWindow.cpp.
| GameWindow * GameWindow::winGetOwner | ( | void | ) |
| GameWindow * GameWindow::winGetParent | ( | void | ) |
| GameWindow * GameWindow::winGetPrev | ( | void | ) |
get previous window in window list
Get the previous window
Definition at line 1247 of file GameWindow.cpp.
| GameWindow * GameWindow::winGetPrevInLayout | ( | void | ) |
get prev window in layout
Get prev window in layout list if any
Definition at line 1297 of file GameWindow.cpp.
get screen coordinates
Get the window's postion in screen coordinates
Definition at line 547 of file GameWindow.cpp.
| UnsignedInt GameWindow::winGetStatus | ( | void | ) |
| UnsignedInt GameWindow::winGetStyle | ( | void | ) |
| GameWinSystemFunc GameWindow::winGetSystemFunc | ( | void | ) |
Definition at line 1761 of file GameWindow.cpp.
| UnicodeString GameWindow::winGetText | ( | void | ) |
get text string
Get text from a window ... this works for static text windows and edit boxes
Definition at line 820 of file GameWindow.cpp.
| Int GameWindow::winGetTextLength | ( | ) |
get number of chars in text string
Definition at line 829 of file GameWindow.cpp.
| GameWinTooltipFunc GameWindow::winGetTooltipFunc | ( | void | ) |
Definition at line 1770 of file GameWindow.cpp.
| void * GameWindow::winGetUserData | ( | void | ) |
get the window user data
Return the user data stored
Definition at line 1062 of file GameWindow.cpp.
| Int GameWindow::winGetWindowId | ( | void | ) |
return window id for this window
Gets the window's id
Definition at line 1104 of file GameWindow.cpp.
hide/unhide a window
Hide or show a window based on the hide parameter. A hidden window can't be seen and accepts no input.
Definition at line 675 of file GameWindow.cpp.
| Bool GameWindow::winIsChild | ( | GameWindow * | child | ) |
verifies parent
Determins if a window is a child/grand-child of a parent
Definition at line 1161 of file GameWindow.cpp.
| Bool GameWindow::winIsHidden | ( | void | ) |
| Int GameWindow::winNextTab | ( | void | ) |
advance focus to next window
Go to next window in tab chain
Definition at line 333 of file GameWindow.cpp.
| GameWindow * GameWindow::winPointInAnyChild | ( | Int | x, |
| Int | y, | ||
| Bool | ignoreHidden, | ||
| Bool | ignoreEnableCheck = FALSE ) |
finds the child which contains the mouse pointer - reguardless of the enabled status of the child
Find the child in which the cursor resides; regardless of whether or not the window is actually enabled
Definition at line 1446 of file GameWindow.cpp.
| GameWindow * GameWindow::winPointInChild | ( | Int | x, |
| Int | y, | ||
| Bool | ignoreEnableCheck = FALSE, | ||
| Bool | playDisabledSound = FALSE ) |
is point inside this window? also return TRUE if point is in a child given a piont, return the child window which contains the mouse pointer, if the point is not in a chilc, the function returns the 'window' paramater back to the caller
Given a window and the mouse coordinates, return the child window which contains the mouse pointer. Child windows are relative to their parents
Definition at line 1392 of file GameWindow.cpp.
Check to see if the given point is inside the window. Will still return true if the point is actually in a child.
Definition at line 584 of file GameWindow.cpp.
| Int GameWindow::winPrevTab | ( | void | ) |
change focus to previous window
Go to previous window in tab chain
Definition at line 368 of file GameWindow.cpp.
| Int GameWindow::winSetCallbacks | ( | GameWinInputFunc | input, |
| GameWinDrawFunc | draw, | ||
| GameWinTooltipFunc | tooltip ) |
set draw, input, tooltip
Sets the window's input, tooltip, and redraw callback functions.
Definition at line 1361 of file GameWindow.cpp.
set window cursor position
Set the window's cursor postion
Definition at line 516 of file GameWindow.cpp.
set border color for state at this index
Definition at line 1669 of file GameWindow.cpp.
set color for disabled state at index
Definition at line 1648 of file GameWindow.cpp.
Set an disabled image into the draw data for the disabled state
Definition at line 1627 of file GameWindow.cpp.
Set the text colors for the disabled state
Definition at line 897 of file GameWindow.cpp.
| Int GameWindow::winSetDrawFunc | ( | GameWinDrawFunc | draw | ) |
set draw
Sets the window's redraw callback functions.
Definition at line 1334 of file GameWindow.cpp.
set offset for drawing background image data
Set offset for drawing images
Definition at line 781 of file GameWindow.cpp.
| void GameWindow::winSetEditData | ( | GameWindowEditData * | editData | ) |
Definition at line 1788 of file GameWindow.cpp.
set border color for state at this index
Definition at line 1606 of file GameWindow.cpp.
set color for enabled state at index
Definition at line 1585 of file GameWindow.cpp.
Set an enabled image into the draw data for the enabled state
Definition at line 1564 of file GameWindow.cpp.
Set the text colors for the enabled state
Definition at line 883 of file GameWindow.cpp.
|
virtual |
set font for window
Set font for text in this window
Reimplemented in W3DGameWindow.
Definition at line 849 of file GameWindow.cpp.
set border color for state at this index
Definition at line 1732 of file GameWindow.cpp.
set color for hilite state at index
Definition at line 1711 of file GameWindow.cpp.
Set an hilite image into the draw data for the hilite state
Definition at line 1690 of file GameWindow.cpp.
| void GameWindow::winSetHiliteState | ( | Bool | state | ) |
set hilite state
Set whether window is highlighted or not
Definition at line 768 of file GameWindow.cpp.
Set the text colors for the Hilite state
Definition at line 911 of file GameWindow.cpp.
Set the text colors for the IME Composite state
Definition at line 925 of file GameWindow.cpp.
| Int GameWindow::winSetInputFunc | ( | GameWinInputFunc | input | ) |
set input
Sets the window's input callback functions.
Definition at line 1319 of file GameWindow.cpp.
| Int GameWindow::winSetInstanceData | ( | WinInstanceData * | data | ) |
copy over instance data
Sets the window's instance data which includes parameters such as background color.
Definition at line 1019 of file GameWindow.cpp.
| void GameWindow::winSetLayout | ( | WindowLayout * | layout | ) |
set layout
Set this window as belonging to layout 'layout'
Definition at line 1273 of file GameWindow.cpp.
| void GameWindow::winSetNext | ( | GameWindow * | next | ) |
| void GameWindow::winSetNextInLayout | ( | GameWindow * | next | ) |
| Int GameWindow::winSetOwner | ( | GameWindow * | owner | ) |
| Int GameWindow::winSetParent | ( | GameWindow * | parent | ) |
| void GameWindow::winSetPrev | ( | GameWindow * | prev | ) |
| void GameWindow::winSetPrevInLayout | ( | GameWindow * | prev | ) |
set prev in layout
Set previous window in layout pointer
Definition at line 1265 of file GameWindow.cpp.
| UnsignedInt GameWindow::winSetStatus | ( | UnsignedInt | status | ) |
set status bits
Allows the user to directly set a window's status flags.
Definition at line 719 of file GameWindow.cpp.
| Int GameWindow::winSetSystemFunc | ( | GameWinSystemFunc | system | ) |
set system
Sets the window's input, system, and redraw callback functions.
Definition at line 1305 of file GameWindow.cpp.
|
virtual |
set text string
Sets the text in a window
Reimplemented in W3DGameWindow.
Definition at line 807 of file GameWindow.cpp.
| void GameWindow::winSetTooltip | ( | UnicodeString | tip | ) |
| Int GameWindow::winSetTooltipFunc | ( | GameWinTooltipFunc | tooltip | ) |
| void GameWindow::winSetUserData | ( | void * | data | ) |
|
friend |
< this abstract class needs memory pool hooks
Definition at line 234 of file GameWindow.h.
|
protected |
Definition at line 413 of file GameWindow.h.
|
protected |
Definition at line 398 of file GameWindow.h.
|
protected |
Definition at line 399 of file GameWindow.h.
|
protected |
callback for drawing
Definition at line 408 of file GameWindow.h.
|
protected |
Definition at line 425 of file GameWindow.h.
|
protected |
callback for input
Definition at line 406 of file GameWindow.h.
|
protected |
Definition at line 403 of file GameWindow.h.
|
protected |
Definition at line 402 of file GameWindow.h.
|
protected |
layout this window is a part of
Definition at line 422 of file GameWindow.h.
|
protected |
Definition at line 411 of file GameWindow.h.
|
protected |
next in layout
Definition at line 420 of file GameWindow.h.
|
protected |
Definition at line 412 of file GameWindow.h.
|
protected |
Definition at line 411 of file GameWindow.h.
|
protected |
prev in layout
Definition at line 421 of file GameWindow.h.
|
protected |
Definition at line 396 of file GameWindow.h.
|
protected |
Definition at line 395 of file GameWindow.h.
|
protected |
Definition at line 394 of file GameWindow.h.
|
protected |
callback for system messages
Definition at line 407 of file GameWindow.h.
|
protected |
callback for tooltip execution
Definition at line 409 of file GameWindow.h.
|
protected |
Definition at line 401 of file GameWindow.h.