Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
GameWindowManager Class Referenceabstract

#include <GameWindowManager.h>

Inherits SubsystemInterface.

Inherited by W3DGameWindowManager.

Public Member Functions

 GameWindowManager (void)
 
virtual ~GameWindowManager (void)
 
virtual void init (void)
 initialize function
 
virtual void reset (void)
 reset the system
 
virtual void update (void)
 update method, called once per frame
 
virtual GameWindowallocateNewWindow (void)=0
 new game window
 
void linkWindow (GameWindow *window)
 link into master list
 
void unlinkWindow (GameWindow *window)
 unlink from master list
 
void unlinkChildWindow (GameWindow *window)
 remove child from parent list
 
void insertWindowAheadOf (GameWindow *window, GameWindow *aheadOf)
 add window to list 'ahead of'
 
virtual GameWinDrawFunc getPushButtonImageDrawFunc (void)=0
 
virtual GameWinDrawFunc getPushButtonDrawFunc (void)=0
 
virtual GameWinDrawFunc getCheckBoxImageDrawFunc (void)=0
 
virtual GameWinDrawFunc getCheckBoxDrawFunc (void)=0
 
virtual GameWinDrawFunc getRadioButtonImageDrawFunc (void)=0
 
virtual GameWinDrawFunc getRadioButtonDrawFunc (void)=0
 
virtual GameWinDrawFunc getTabControlImageDrawFunc (void)=0
 
virtual GameWinDrawFunc getTabControlDrawFunc (void)=0
 
virtual GameWinDrawFunc getListBoxImageDrawFunc (void)=0
 
virtual GameWinDrawFunc getListBoxDrawFunc (void)=0
 
virtual GameWinDrawFunc getComboBoxImageDrawFunc (void)=0
 
virtual GameWinDrawFunc getComboBoxDrawFunc (void)=0
 
virtual GameWinDrawFunc getHorizontalSliderImageDrawFunc (void)=0
 
virtual GameWinDrawFunc getHorizontalSliderDrawFunc (void)=0
 
virtual GameWinDrawFunc getVerticalSliderImageDrawFunc (void)=0
 
virtual GameWinDrawFunc getVerticalSliderDrawFunc (void)=0
 
virtual GameWinDrawFunc getProgressBarImageDrawFunc (void)=0
 
virtual GameWinDrawFunc getProgressBarDrawFunc (void)=0
 
virtual GameWinDrawFunc getStaticTextImageDrawFunc (void)=0
 
virtual GameWinDrawFunc getStaticTextDrawFunc (void)=0
 
virtual GameWinDrawFunc getTextEntryImageDrawFunc (void)=0
 
virtual GameWinDrawFunc getTextEntryDrawFunc (void)=0
 
virtual GameWinDrawFunc getDefaultDraw (void)
 return default draw func
 
virtual GameWinSystemFunc getDefaultSystem (void)
 return default system func
 
virtual GameWinInputFunc getDefaultInput (void)
 return default input func
 
virtual GameWinTooltipFunc getDefaultTooltip (void)
 return default tooltip func
 
virtual GameWindowgogoMessageBox (Int x, Int y, Int width, Int height, UnsignedShort buttonFlags, UnicodeString titleString, UnicodeString bodyString, GameWinMsgBoxFunc yesCallback, GameWinMsgBoxFunc noCallback, GameWinMsgBoxFunc okCallback, GameWinMsgBoxFunc cancelCallback)
 
virtual GameWindowgogoMessageBox (Int x, Int y, Int width, Int height, UnsignedShort buttonFlags, UnicodeString titleString, UnicodeString bodyString, GameWinMsgBoxFunc yesCallback, GameWinMsgBoxFunc noCallback, GameWinMsgBoxFunc okCallback, GameWinMsgBoxFunc cancelCallback, Bool useLogo)
 
virtual GameWindowgogoGadgetPushButton (GameWindow *parent, UnsignedInt status, Int x, Int y, Int width, Int height, WinInstanceData *instData, GameFont *defaultFont, Bool defaultVisual)
 
virtual GameWindowgogoGadgetCheckbox (GameWindow *parent, UnsignedInt status, Int x, Int y, Int width, Int height, WinInstanceData *instData, GameFont *defaultFont, Bool defaultVisual)
 
virtual GameWindowgogoGadgetRadioButton (GameWindow *parent, UnsignedInt status, Int x, Int y, Int width, Int height, WinInstanceData *instData, RadioButtonData *rData, GameFont *defaultFont, Bool defaultVisual)
 
virtual GameWindowgogoGadgetTabControl (GameWindow *parent, UnsignedInt status, Int x, Int y, Int width, Int height, WinInstanceData *instData, TabControlData *rData, GameFont *defaultFont, Bool defaultVisual)
 
virtual GameWindowgogoGadgetListBox (GameWindow *parent, UnsignedInt status, Int x, Int y, Int width, Int height, WinInstanceData *instData, ListboxData *listboxData, GameFont *defaultFont, Bool defaultVisual)
 
virtual GameWindowgogoGadgetSlider (GameWindow *parent, UnsignedInt status, Int x, Int y, Int width, Int height, WinInstanceData *instData, SliderData *sliderData, GameFont *defaultFont, Bool defaultVisual)
 
virtual GameWindowgogoGadgetProgressBar (GameWindow *parent, UnsignedInt status, Int x, Int y, Int width, Int height, WinInstanceData *instData, GameFont *defaultFont, Bool defaultVisual)
 
virtual GameWindowgogoGadgetStaticText (GameWindow *parent, UnsignedInt status, Int x, Int y, Int width, Int height, WinInstanceData *instData, TextData *textData, GameFont *defaultFont, Bool defaultVisual)
 
virtual GameWindowgogoGadgetTextEntry (GameWindow *parent, UnsignedInt status, Int x, Int y, Int width, Int height, WinInstanceData *instData, EntryData *entryData, GameFont *defaultFont, Bool defaultVisual)
 
virtual GameWindowgogoGadgetComboBox (GameWindow *parent, UnsignedInt status, Int x, Int y, Int width, Int height, WinInstanceData *instData, ComboBoxData *comboBoxDataTemplate, GameFont *defaultFont, Bool defaultVisual)
 
virtual void assignDefaultGadgetLook (GameWindow *gadget, GameFont *defaultFont, Bool assignVisual)
 
virtual GameWindowwinCreateFromScript (AsciiString filename, WindowLayoutInfo *info=NULL)
 create new window(s) from .wnd file ... see definition for what is returned
 
virtual WindowLayoutwinCreateLayout (AsciiString filename)
 create new window(s) from .wnd file and wrap in a WindowLayout
 
virtual void freeStaticStrings (void)
 free temporary strings to make the memory leak manager happy.
 
virtual GameWindowwinCreate (GameWindow *parent, UnsignedInt status, Int x, Int y, Int width, Int height, GameWinSystemFunc system, WinInstanceData *instData=NULL)
 create a new window by setting up parameters and callbacks
 
virtual Int winDestroy (GameWindow *window)
 destroy this window
 
virtual Int winDestroyAll (void)
 destroy all windows in the system
 
virtual GameWindowwinGetWindowList (void)
 get head of master list
 
virtual void hideWindowsInRange (GameWindow *baseWindow, Int first, Int last, Bool hideFlag)
 hide all windows in a certain range of id's (inclusinve );
 
virtual void enableWindowsInRange (GameWindow *baseWindow, Int first, Int last, Bool enableFlag)
 enable all windows in a range of id's (inclusive)
 
virtual void windowHiding (GameWindow *window)
 this gets called from winHide() when a window hides itself
 
virtual void winRepaint (void)
 draw GUI in reverse order
 
virtual void winNextTab (GameWindow *window)
 give keyboard focus to the next window in the tab list
 
virtual void winPrevTab (GameWindow *window)
 give keyboard focus to the previous window in the tab list
 
virtual void registerTabList (GameWindowList tabList)
 we have to register a Tab List
 
virtual void clearTabList (void)
 we's gotz ta clear the tab list yo!
 
virtual WinInputReturnCode winProcessMouseEvent (GameWindowMessage msg, ICoord2D *mousePos, void *data)
 process a single mouse event
 
virtual WinInputReturnCode winProcessKey (UnsignedByte key, UnsignedByte state)
 process a singke key event
 
virtual GameWindowwinGetFocus (void)
 return window that has the focus
 
virtual Int winSetFocus (GameWindow *window)
 set this window as has focus
 
virtual void winSetGrabWindow (GameWindow *window)
 set the grab window
 
virtual GameWindowwinGetGrabWindow (void)
 who is currently 'held' by mouse
 
virtual void winSetLoneWindow (GameWindow *window)
 set the open window
 
virtual Bool isEnabled (GameWindow *win)
 is window or parents enabled
 
virtual Bool isHidden (GameWindow *win)
 is parent or parents hidden
 
virtual void addWindowToParent (GameWindow *window, GameWindow *parent)
 
virtual void addWindowToParentAtEnd (GameWindow *window, GameWindow *parent)
 
virtual WindowMsgHandledType winSendSystemMsg (GameWindow *window, UnsignedInt msg, WindowMsgData mData1, WindowMsgData mData2)
 sends a system message to specified window
 
virtual WindowMsgHandledType winSendInputMsg (GameWindow *window, UnsignedInt msg, WindowMsgData mData1, WindowMsgData mData2)
 sends an input message to the specified window
 
virtual GameWindowwinGetWindowFromId (GameWindow *window, Int id)
 
virtual Int winCapture (GameWindow *window)
 captures the mouse
 
virtual Int winRelease (GameWindow *window)
 release mouse capture
 
virtual GameWindowwinGetCapture (void)
 current mouse capture settings
 
virtual Int winSetModal (GameWindow *window)
 put at top of modal stack
 
virtual Int winUnsetModal (GameWindow *window)
 
virtual void winDrawImage (const Image *image, Int startX, Int startY, Int endX, Int endY, Color color=0xFFFFFFFF)
 draw image, coord are in screen and should be kepth within that box specified
 
virtual void winFillRect (Color color, Real width, Int startX, Int startY, Int endX, Int endY)
 draw filled rect, coords are absolute screen coords
 
virtual void winOpenRect (Color color, Real width, Int startX, Int startY, Int endX, Int endY)
 draw rect outline, coords are absolute screen coords
 
virtual void winDrawLine (Color color, Real width, Int startX, Int startY, Int endX, Int endY)
 draw line, coords are absolute screen coords
 
virtual Color winMakeColor (UnsignedByte red, UnsignedByte green, UnsignedByte blue, UnsignedByte alpha)
 Make a color representation out of RGBA components.
 
virtual const ImagewinFindImage (const char *name)
 
virtual Int winFontHeight (GameFont *font)
 get height of font in pixels
 
virtual Int winIsDigit (Int c)
 is character a digit
 
virtual Int winIsAscii (Int c)
 is character a digit
 
virtual Int winIsAlNum (Int c)
 is character alpha-numeric
 
virtual void winFormatText (GameFont *font, UnicodeString text, Color color, Int x, Int y, Int width, Int height)
 
virtual void winGetTextSize (GameFont *font, UnicodeString text, Int *width, Int *height, Int maxWidth)
 
virtual UnicodeString winTextLabelToText (AsciiString label)
 convert localizable text label to real text
 
virtual GameFontwinFindFont (AsciiString fontName, Int pointSize, Bool bold)
 get a font given a name
 
Bool initTestGUI (void)
 
virtual GameWindowgetWindowUnderCursor (Int x, Int y, Bool ignoreEnabled=FALSE)
 find the top window at the given coordinates
 
- Public Member Functions inherited from SubsystemInterface
 SubsystemInterface ()
 
virtual ~SubsystemInterface ()
 
virtual void postProcessLoad ()
 
virtual void draw (void)
 
void UPDATE (void)
 
void DRAW (void)
 
AsciiString getName (void)
 
void setName (AsciiString name)
 

Protected Member Functions

void processDestroyList (void)
 process windows waiting to be killed
 
Int drawWindow (GameWindow *window)
 draw this window
 
void dumpWindow (GameWindow *window)
 for debugging
 

Protected Attributes

GameWindowm_windowList
 
GameWindowm_windowTail
 
GameWindowm_destroyList
 
GameWindowm_currMouseRgn
 
GameWindowm_mouseCaptor
 
GameWindowm_keyboardFocus
 
ModalWindowm_modalHead
 
GameWindowm_grabWindow
 
GameWindowm_loneWindow
 
GameWindowList m_tabList
 
const Imagem_cursorBitmap
 
UnsignedInt m_captureFlags
 
- Protected Attributes inherited from SubsystemInterface
AsciiString m_name
 

Friends

class GameWindow
 

Detailed Description

There exists a singleton GameWindowManager that defines how we can interact with the game windowing system

Definition at line 76 of file GameWindowManager.h.

Constructor & Destructor Documentation

◆ GameWindowManager()

GameWindowManager::GameWindowManager ( void )

Definition at line 183 of file GameWindowManager.cpp.

◆ ~GameWindowManager()

GameWindowManager::~GameWindowManager ( void )
virtual

Definition at line 205 of file GameWindowManager.cpp.

Member Function Documentation

◆ addWindowToParent()

void GameWindowManager::addWindowToParent ( GameWindow * window,
GameWindow * parent )
virtual

Definition at line 488 of file GameWindowManager.cpp.

◆ addWindowToParentAtEnd()

void GameWindowManager::addWindowToParentAtEnd ( GameWindow * window,
GameWindow * parent )
virtual

Add a child window to the parent, put place it at the end of the parent window child list

Definition at line 513 of file GameWindowManager.cpp.

◆ allocateNewWindow()

virtual GameWindow * GameWindowManager::allocateNewWindow ( void )
pure virtual

new game window

Implemented in W3DGameWindowManager.

◆ assignDefaultGadgetLook()

void GameWindowManager::assignDefaultGadgetLook ( GameWindow * gadget,
GameFont * defaultFont,
Bool assignVisual )
virtual

Use this method to assign the default images to gadgets as they area created

Use this method to assign the default images/colors to gadgets as they area created

Definition at line 2865 of file GameWindowManager.cpp.

◆ clearTabList()

void GameWindowManager::clearTabList ( void )
virtual

we's gotz ta clear the tab list yo!

Definition at line 4096 of file GameWindowManager.cpp.

◆ drawWindow()

Int GameWindowManager::drawWindow ( GameWindow * window)
protected

draw this window

Draw a window and its children, in parent-first order. Children's coordinates are relative to their parents. Note that hidden windows automatically will not draw any of their children ... but see-thru windows only will not draw themselves, but will give their children an opportunity to draw

Todo
visit list boxes and borders, this is stupid!

Definition at line 1287 of file GameWindowManager.cpp.

◆ dumpWindow()

void GameWindowManager::dumpWindow ( GameWindow * window)
protected

for debugging

Dump information about all the windows for resource problems

Definition at line 1372 of file GameWindowManager.cpp.

◆ enableWindowsInRange()

void GameWindowManager::enableWindowsInRange ( GameWindow * baseWindow,
Int first,
Int last,
Bool enableFlag )
virtual

enable all windows in a range of id's (inclusive)

Definition at line 599 of file GameWindowManager.cpp.

◆ freeStaticStrings()

void GameWindowManager::freeStaticStrings ( void )
virtual

free temporary strings to make the memory leak manager happy.

Free up the memory used by static strings. Normally this memory is freed by the string destructor but we do it here to make the memory leak detection code happy.

Definition at line 2676 of file GameWindowManagerScript.cpp.

◆ getCheckBoxDrawFunc()

virtual GameWinDrawFunc GameWindowManager::getCheckBoxDrawFunc ( void )
pure virtual

Implemented in W3DGameWindowManager.

◆ getCheckBoxImageDrawFunc()

virtual GameWinDrawFunc GameWindowManager::getCheckBoxImageDrawFunc ( void )
pure virtual

Implemented in W3DGameWindowManager.

◆ getComboBoxDrawFunc()

virtual GameWinDrawFunc GameWindowManager::getComboBoxDrawFunc ( void )
pure virtual

Implemented in W3DGameWindowManager.

◆ getComboBoxImageDrawFunc()

virtual GameWinDrawFunc GameWindowManager::getComboBoxImageDrawFunc ( void )
pure virtual

Implemented in W3DGameWindowManager.

◆ getDefaultDraw()

GameWinDrawFunc GameWindowManager::getDefaultDraw ( void )
inlinevirtual

return default draw func

Reimplemented in W3DGameWindowManager.

Definition at line 361 of file GameWindowManager.h.

◆ getDefaultInput()

GameWinInputFunc GameWindowManager::getDefaultInput ( void )
inlinevirtual

return default input func

Definition at line 363 of file GameWindowManager.h.

◆ getDefaultSystem()

GameWinSystemFunc GameWindowManager::getDefaultSystem ( void )
inlinevirtual

return default system func

Definition at line 362 of file GameWindowManager.h.

◆ getDefaultTooltip()

GameWinTooltipFunc GameWindowManager::getDefaultTooltip ( void )
inlinevirtual

return default tooltip func

Definition at line 364 of file GameWindowManager.h.

◆ getHorizontalSliderDrawFunc()

virtual GameWinDrawFunc GameWindowManager::getHorizontalSliderDrawFunc ( void )
pure virtual

Implemented in W3DGameWindowManager.

◆ getHorizontalSliderImageDrawFunc()

virtual GameWinDrawFunc GameWindowManager::getHorizontalSliderImageDrawFunc ( void )
pure virtual

Implemented in W3DGameWindowManager.

◆ getListBoxDrawFunc()

virtual GameWinDrawFunc GameWindowManager::getListBoxDrawFunc ( void )
pure virtual

Implemented in W3DGameWindowManager.

◆ getListBoxImageDrawFunc()

virtual GameWinDrawFunc GameWindowManager::getListBoxImageDrawFunc ( void )
pure virtual

Implemented in W3DGameWindowManager.

◆ getProgressBarDrawFunc()

virtual GameWinDrawFunc GameWindowManager::getProgressBarDrawFunc ( void )
pure virtual

Implemented in W3DGameWindowManager.

◆ getProgressBarImageDrawFunc()

virtual GameWinDrawFunc GameWindowManager::getProgressBarImageDrawFunc ( void )
pure virtual

Implemented in W3DGameWindowManager.

◆ getPushButtonDrawFunc()

virtual GameWinDrawFunc GameWindowManager::getPushButtonDrawFunc ( void )
pure virtual

Implemented in W3DGameWindowManager.

◆ getPushButtonImageDrawFunc()

virtual GameWinDrawFunc GameWindowManager::getPushButtonImageDrawFunc ( void )
pure virtual

Implemented in W3DGameWindowManager.

◆ getRadioButtonDrawFunc()

virtual GameWinDrawFunc GameWindowManager::getRadioButtonDrawFunc ( void )
pure virtual

Implemented in W3DGameWindowManager.

◆ getRadioButtonImageDrawFunc()

virtual GameWinDrawFunc GameWindowManager::getRadioButtonImageDrawFunc ( void )
pure virtual

Implemented in W3DGameWindowManager.

◆ getStaticTextDrawFunc()

virtual GameWinDrawFunc GameWindowManager::getStaticTextDrawFunc ( void )
pure virtual

Implemented in W3DGameWindowManager.

◆ getStaticTextImageDrawFunc()

virtual GameWinDrawFunc GameWindowManager::getStaticTextImageDrawFunc ( void )
pure virtual

Implemented in W3DGameWindowManager.

◆ getTabControlDrawFunc()

virtual GameWinDrawFunc GameWindowManager::getTabControlDrawFunc ( void )
pure virtual

Implemented in W3DGameWindowManager.

◆ getTabControlImageDrawFunc()

virtual GameWinDrawFunc GameWindowManager::getTabControlImageDrawFunc ( void )
pure virtual

Implemented in W3DGameWindowManager.

◆ getTextEntryDrawFunc()

virtual GameWinDrawFunc GameWindowManager::getTextEntryDrawFunc ( void )
pure virtual

Implemented in W3DGameWindowManager.

◆ getTextEntryImageDrawFunc()

virtual GameWinDrawFunc GameWindowManager::getTextEntryImageDrawFunc ( void )
pure virtual

Implemented in W3DGameWindowManager.

◆ getVerticalSliderDrawFunc()

virtual GameWinDrawFunc GameWindowManager::getVerticalSliderDrawFunc ( void )
pure virtual

Implemented in W3DGameWindowManager.

◆ getVerticalSliderImageDrawFunc()

virtual GameWinDrawFunc GameWindowManager::getVerticalSliderImageDrawFunc ( void )
pure virtual

Implemented in W3DGameWindowManager.

◆ getWindowUnderCursor()

GameWindow * GameWindowManager::getWindowUnderCursor ( Int x,
Int y,
Bool ignoreEnabled = FALSE )
virtual

find the top window at the given coordinates

find the top window at the given coordinates

Definition at line 3603 of file GameWindowManager.cpp.

◆ gogoGadgetCheckbox()

GameWindow * GameWindowManager::gogoGadgetCheckbox ( GameWindow * parent,
UnsignedInt status,
Int x,
Int y,
Int width,
Int height,
WinInstanceData * instData,
GameFont * defaultFont,
Bool defaultVisual )
virtual

Create a checkbox UI element

Definition at line 1908 of file GameWindowManager.cpp.

◆ gogoGadgetComboBox()

GameWindow * GameWindowManager::gogoGadgetComboBox ( GameWindow * parent,
UnsignedInt status,
Int x,
Int y,
Int width,
Int height,
WinInstanceData * instData,
ComboBoxData * comboBoxDataTemplate,
GameFont * defaultFont,
Bool defaultVisual )
virtual

Create a Combo Box GUI element

Definition at line 2385 of file GameWindowManager.cpp.

◆ gogoGadgetListBox()

GameWindow * GameWindowManager::gogoGadgetListBox ( GameWindow * parent,
UnsignedInt status,
Int x,
Int y,
Int width,
Int height,
WinInstanceData * instData,
ListboxData * listboxDataTemplate,
GameFont * defaultFont,
Bool defaultVisual )
virtual

Create a list box GUI control

Definition at line 2116 of file GameWindowManager.cpp.

◆ gogoGadgetProgressBar()

GameWindow * GameWindowManager::gogoGadgetProgressBar ( GameWindow * parent,
UnsignedInt status,
Int x,
Int y,
Int width,
Int height,
WinInstanceData * instData,
GameFont * defaultFont,
Bool defaultVisual )
virtual

Create a progress bar GUI element

Definition at line 2591 of file GameWindowManager.cpp.

◆ gogoGadgetPushButton()

GameWindow * GameWindowManager::gogoGadgetPushButton ( GameWindow * parent,
UnsignedInt status,
Int x,
Int y,
Int width,
Int height,
WinInstanceData * instData,
GameFont * defaultFont,
Bool defaultVisual )
virtual

Create a button GUI control

Definition at line 1841 of file GameWindowManager.cpp.

◆ gogoGadgetRadioButton()

GameWindow * GameWindowManager::gogoGadgetRadioButton ( GameWindow * parent,
UnsignedInt status,
Int x,
Int y,
Int width,
Int height,
WinInstanceData * instData,
RadioButtonData * rData,
GameFont * defaultFont,
Bool defaultVisual )
virtual

Create a radio button GUI element

Definition at line 1973 of file GameWindowManager.cpp.

◆ gogoGadgetSlider()

GameWindow * GameWindowManager::gogoGadgetSlider ( GameWindow * parent,
UnsignedInt status,
Int x,
Int y,
Int width,
Int height,
WinInstanceData * instData,
SliderData * sliderData,
GameFont * defaultFont,
Bool defaultVisual )
virtual

Does all generic window creation, calls appropriate slider create function to set up slider-specific data

Definition at line 2261 of file GameWindowManager.cpp.

◆ gogoGadgetStaticText()

GameWindow * GameWindowManager::gogoGadgetStaticText ( GameWindow * parent,
UnsignedInt status,
Int x,
Int y,
Int width,
Int height,
WinInstanceData * instData,
TextData * textData,
GameFont * defaultFont,
Bool defaultVisual )
virtual

Does all generic window creation, calls appropriate text field create function to set up specific data

Definition at line 2649 of file GameWindowManager.cpp.

◆ gogoGadgetTabControl()

GameWindow * GameWindowManager::gogoGadgetTabControl ( GameWindow * parent,
UnsignedInt status,
Int x,
Int y,
Int width,
Int height,
WinInstanceData * instData,
TabControlData * tData,
GameFont * defaultFont,
Bool defaultVisual )
virtual

Create a tab control GUI element

Definition at line 2045 of file GameWindowManager.cpp.

◆ gogoGadgetTextEntry()

GameWindow * GameWindowManager::gogoGadgetTextEntry ( GameWindow * parent,
UnsignedInt status,
Int x,
Int y,
Int width,
Int height,
WinInstanceData * instData,
EntryData * entryData,
GameFont * defaultFont,
Bool defaultVisual )
virtual

Does all generic window creation, calls appropriate entry field create function to set up specific data

Definition at line 2718 of file GameWindowManager.cpp.

◆ gogoMessageBox() [1/2]

GameWindow * GameWindowManager::gogoMessageBox ( Int x,
Int y,
Int width,
Int height,
UnsignedShort buttonFlags,
UnicodeString titleString,
UnicodeString bodyString,
GameWinMsgBoxFunc yesCallback,
GameWinMsgBoxFunc noCallback,
GameWinMsgBoxFunc okCallback,
GameWinMsgBoxFunc cancelCallback )
virtual

Create a Modal Message Box

Definition at line 1660 of file GameWindowManager.cpp.

◆ gogoMessageBox() [2/2]

GameWindow * GameWindowManager::gogoMessageBox ( Int x,
Int y,
Int width,
Int height,
UnsignedShort buttonFlags,
UnicodeString titleString,
UnicodeString bodyString,
GameWinMsgBoxFunc yesCallback,
GameWinMsgBoxFunc noCallback,
GameWinMsgBoxFunc okCallback,
GameWinMsgBoxFunc cancelCallback,
Bool useLogo )
virtual

Definition at line 1670 of file GameWindowManager.cpp.

◆ hideWindowsInRange()

void GameWindowManager::hideWindowsInRange ( GameWindow * baseWindow,
Int first,
Int last,
Bool hideFlag )
virtual

hide all windows in a certain range of id's (inclusinve );

Hide all windows in a certain range of id's (inclusive)

Definition at line 578 of file GameWindowManager.cpp.

◆ init()

void GameWindowManager::init ( void )
virtual

initialize function

Initialize the game window manager system

Implements SubsystemInterface.

Reimplemented in GUIEditWindowManager, and W3DGameWindowManager.

Definition at line 219 of file GameWindowManager.cpp.

◆ initTestGUI()

Bool GameWindowManager::initTestGUI ( void )
Todo
just for testing, remov this

Just for testing

Definition at line 3732 of file GameWindowManager.cpp.

◆ insertWindowAheadOf()

void GameWindowManager::insertWindowAheadOf ( GameWindow * window,
GameWindow * aheadOf )

add window to list 'ahead of'

Insert the window ahead of the the 'aheadOf' window. 'aheadOf' can be a window in the master list or a child of any window in that master list

Definition at line 309 of file GameWindowManager.cpp.

◆ isEnabled()

Bool GameWindowManager::isEnabled ( GameWindow * win)
virtual

is window or parents enabled

Check window and parents to see if this window is enabled

Definition at line 432 of file GameWindowManager.cpp.

◆ isHidden()

Bool GameWindowManager::isHidden ( GameWindow * win)
virtual

is parent or parents hidden

Check window and parents to see if this window is hidden

Definition at line 460 of file GameWindowManager.cpp.

◆ linkWindow()

void GameWindowManager::linkWindow ( GameWindow * window)

link into master list

Puts a window at the head of the window list

Definition at line 255 of file GameWindowManager.cpp.

◆ processDestroyList()

void GameWindowManager::processDestroyList ( void )
protected

process windows waiting to be killed

Process windows waiting to be destroyed

Definition at line 83 of file GameWindowManager.cpp.

◆ registerTabList()

void GameWindowManager::registerTabList ( GameWindowList tabList)
virtual

we have to register a Tab List

Definition at line 4090 of file GameWindowManager.cpp.

◆ reset()

void GameWindowManager::reset ( void )
virtual

reset the system

Reset window system

Implements SubsystemInterface.

Definition at line 230 of file GameWindowManager.cpp.

◆ unlinkChildWindow()

void GameWindowManager::unlinkChildWindow ( GameWindow * window)

remove child from parent list

Takes a child window off its parent's window list

Definition at line 390 of file GameWindowManager.cpp.

◆ unlinkWindow()

void GameWindowManager::unlinkWindow ( GameWindow * window)

unlink from master list

Takes a window off the window list

Definition at line 369 of file GameWindowManager.cpp.

◆ update()

void GameWindowManager::update ( void )
virtual

update method, called once per frame

Update cycle for game widnow manager

Implements SubsystemInterface.

Definition at line 243 of file GameWindowManager.cpp.

◆ winCapture()

Int GameWindowManager::winCapture ( GameWindow * window)
virtual

captures the mouse

Captures the mouse capture.

Definition at line 620 of file GameWindowManager.cpp.

◆ winCreate()

GameWindow * GameWindowManager::winCreate ( GameWindow * parent,
UnsignedInt status,
Int x,
Int y,
Int width,
Int height,
GameWinSystemFunc system,
WinInstanceData * instData = NULL )
virtual

create a new window by setting up parameters and callbacks

Create a new window by setting up its parameters and callbacks.

Reimplemented in GUIEditWindowManager.

Definition at line 1393 of file GameWindowManager.cpp.

◆ winCreateFromScript()

GameWindow * GameWindowManager::winCreateFromScript ( AsciiString filenameString,
WindowLayoutInfo * info = NULL )
virtual

create new window(s) from .wnd file ... see definition for what is returned

Parse through a window .wnd file and create all the windows within it.

NOTE: The FIRST window created from the script is returned, this way if you want to know ALL of the windows created from this layout file you must iterate over info->windows, since the windows will not be at the head of the window list if there is a modal window active.

Definition at line 2706 of file GameWindowManagerScript.cpp.

◆ winCreateLayout()

WindowLayout * GameWindowManager::winCreateLayout ( AsciiString filename)
virtual

create new window(s) from .wnd file and wrap in a WindowLayout

Load window(s) from a .wnd definition file and wrap within a new window layout

Definition at line 2652 of file GameWindowManagerScript.cpp.

◆ winDestroy()

Int GameWindowManager::winDestroy ( GameWindow * window)
virtual

destroy this window

Take a window and its children off the top level list and free their allocation class data.

Reimplemented in GUIEditWindowManager.

Definition at line 1464 of file GameWindowManager.cpp.

◆ winDestroyAll()

Int GameWindowManager::winDestroyAll ( void )
virtual

destroy all windows in the system

Destroy all windows on the window list IMMEDIATELY

Definition at line 1531 of file GameWindowManager.cpp.

◆ windowHiding()

void GameWindowManager::windowHiding ( GameWindow * window)
virtual

this gets called from winHide() when a window hides itself

this gets called from winHide() when a window hides itself

Definition at line 549 of file GameWindowManager.cpp.

◆ winDrawImage()

void GameWindowManager::winDrawImage ( const Image * image,
Int startX,
Int startY,
Int endX,
Int endY,
Color color = 0xFFFFFFFF )
virtual

draw image, coord are in screen and should be kepth within that box specified

draw image, coord are in screen and should be kepth within that box specified

Definition at line 77 of file GameWindowGlobal.cpp.

◆ winDrawLine()

void GameWindowManager::winDrawLine ( Color color,
Real width,
Int startX,
Int startY,
Int endX,
Int endY )
virtual

draw line, coords are absolute screen coords

draw line, coords are absolute screen coords

Definition at line 116 of file GameWindowGlobal.cpp.

◆ winFillRect()

void GameWindowManager::winFillRect ( Color color,
Real width,
Int startX,
Int startY,
Int endX,
Int endY )
virtual

draw filled rect, coords are absolute screen coords

draw filled rect, coords are absolute screen coords

Definition at line 88 of file GameWindowGlobal.cpp.

◆ winFindFont()

GameFont * GameWindowManager::winFindFont ( AsciiString fontName,
Int pointSize,
Bool bold )
virtual

get a font given a name

Get a font

Definition at line 226 of file GameWindowGlobal.cpp.

◆ winFindImage()

const Image * GameWindowManager::winFindImage ( const char * name)
virtual

Find an image reference and return a pointer to its image, you may recreate all Image structs to suit your project

Given an image name, return an image loc to that image information. You may reorganize the image loc structure however you like to suit your individual project

Definition at line 130 of file GameWindowGlobal.cpp.

◆ winFontHeight()

Int GameWindowManager::winFontHeight ( GameFont * font)
virtual

get height of font in pixels

Return the font height in pixels

Definition at line 186 of file GameWindowGlobal.cpp.

◆ winFormatText()

void GameWindowManager::winFormatText ( GameFont * font,
UnicodeString text,
Color color,
Int x,
Int y,
Int width,
Int height )
virtual

draw text to the screen

Todo
make all display string rendering go through here!

Definition at line 158 of file GameWindowGlobal.cpp.

◆ winGetCapture()

GameWindow * GameWindowManager::winGetCapture ( void )
virtual

current mouse capture settings

Returns the current mouse captor.

Definition at line 648 of file GameWindowManager.cpp.

◆ winGetFocus()

GameWindow * GameWindowManager::winGetFocus ( void )
virtual

return window that has the focus

Get the current input focus

Definition at line 735 of file GameWindowManager.cpp.

◆ winGetGrabWindow()

GameWindow * GameWindowManager::winGetGrabWindow ( void )
virtual

who is currently 'held' by mouse

Get the grabbed window

Definition at line 1626 of file GameWindowManager.cpp.

◆ winGetTextSize()

void GameWindowManager::winGetTextSize ( GameFont * font,
UnicodeString text,
Int * width,
Int * height,
Int maxWidth )
virtual

get the extent size of text

Todo
make display string size stuff go through here

Definition at line 169 of file GameWindowGlobal.cpp.

◆ winGetWindowFromId()

GameWindow * GameWindowManager::winGetWindowFromId ( GameWindow * window,
Int id )
virtual

get the window pointer from id, starting at 'window' and searching down the heirarchy. If 'window' is NULL then all windows will be searched

Gets the window pointer from its id

Definition at line 658 of file GameWindowManager.cpp.

◆ winGetWindowList()

GameWindow * GameWindowManager::winGetWindowList ( void )
virtual

get head of master list

Gets the Window List Pointer

Definition at line 687 of file GameWindowManager.cpp.

◆ winIsAlNum()

Int GameWindowManager::winIsAlNum ( Int c)
virtual

is character alpha-numeric

Your implementation of whether or not character is alpha numeric

Definition at line 216 of file GameWindowGlobal.cpp.

◆ winIsAscii()

Int GameWindowManager::winIsAscii ( Int c)
virtual

is character a digit

You implementation of whether or not character is ascii

Definition at line 206 of file GameWindowGlobal.cpp.

◆ winIsDigit()

Int GameWindowManager::winIsDigit ( Int c)
virtual

is character a digit

You implementation of whether or not character is a digit

Definition at line 196 of file GameWindowGlobal.cpp.

◆ winMakeColor()

Color GameWindowManager::winMakeColor ( UnsignedByte red,
UnsignedByte green,
UnsignedByte blue,
UnsignedByte alpha )
virtual

Make a color representation out of RGBA components.

Given RGBA, make a color, you can change color representation for your individual project needs

Definition at line 145 of file GameWindowGlobal.cpp.

◆ winNextTab()

void GameWindowManager::winNextTab ( GameWindow * window)
virtual

give keyboard focus to the next window in the tab list

Definition at line 4042 of file GameWindowManager.cpp.

◆ winOpenRect()

void GameWindowManager::winOpenRect ( Color color,
Real width,
Int startX,
Int startY,
Int endX,
Int endY )
virtual

draw rect outline, coords are absolute screen coords

draw rect outline, coords are absolute screen coords

Definition at line 102 of file GameWindowGlobal.cpp.

◆ winPrevTab()

void GameWindowManager::winPrevTab ( GameWindow * window)
virtual

give keyboard focus to the previous window in the tab list

Definition at line 4066 of file GameWindowManager.cpp.

◆ winProcessKey()

WinInputReturnCode GameWindowManager::winProcessKey ( UnsignedByte key,
UnsignedByte state )
virtual

process a singke key event

Process key press through the GUI.

Definition at line 795 of file GameWindowManager.cpp.

◆ winProcessMouseEvent()

WinInputReturnCode GameWindowManager::winProcessMouseEvent ( GameWindowMessage msg,
ICoord2D * mousePos,
void * data )
virtual

process a single mouse event

Process a single mouse event through the window system

Todo
Colin, there are 3 cases here that are nearly identical code, break them up into functions with parameters
Todo
should allow for left handed mouse configs here?

Definition at line 834 of file GameWindowManager.cpp.

◆ winRelease()

Int GameWindowManager::winRelease ( GameWindow * window)
virtual

release mouse capture

Releases the mouse capture.

Definition at line 635 of file GameWindowManager.cpp.

◆ winRepaint()

void GameWindowManager::winRepaint ( void )
virtual

draw GUI in reverse order

Draw the GUI in reverse order to correlate with clicking priority

Definition at line 1333 of file GameWindowManager.cpp.

◆ winSendInputMsg()

WindowMsgHandledType GameWindowManager::winSendInputMsg ( GameWindow * window,
UnsignedInt msg,
WindowMsgData mData1,
WindowMsgData mData2 )
virtual

sends an input message to the specified window

Send a system message to the specified window

Definition at line 716 of file GameWindowManager.cpp.

◆ winSendSystemMsg()

WindowMsgHandledType GameWindowManager::winSendSystemMsg ( GameWindow * window,
UnsignedInt msg,
WindowMsgData mData1,
WindowMsgData mData2 )
virtual

sends a system message to specified window

Send a system message to the specified window

Definition at line 697 of file GameWindowManager.cpp.

◆ winSetFocus()

Int GameWindowManager::winSetFocus ( GameWindow * window)
virtual

set this window as has focus

Set the current input focus

Definition at line 745 of file GameWindowManager.cpp.

◆ winSetGrabWindow()

void GameWindowManager::winSetGrabWindow ( GameWindow * window)
virtual

set the grab window

Explicitly set the grab window

Definition at line 1636 of file GameWindowManager.cpp.

◆ winSetLoneWindow()

void GameWindowManager::winSetLoneWindow ( GameWindow * window)
virtual

set the open window

Explicitly set the grab window

Definition at line 1646 of file GameWindowManager.cpp.

◆ winSetModal()

Int GameWindowManager::winSetModal ( GameWindow * window)
virtual

put at top of modal stack

Sets selected window into a modal state. This window will get put at the top of a modal stack

Definition at line 1562 of file GameWindowManager.cpp.

◆ winTextLabelToText()

UnicodeString GameWindowManager::winTextLabelToText ( AsciiString label)
virtual

convert localizable text label to real text

Given a text label, retreive the real localized text associated with that label

Todo
we need to write the string manager here, this is TEMPORARY!!!

Definition at line 3586 of file GameWindowManager.cpp.

◆ winUnsetModal()

Int GameWindowManager::winUnsetModal ( GameWindow * window)
virtual

take window off modal stack, if window is not at top of stack and error will occur

pops window off of the modal stack. If this window is not the top of the modal stack an error will occur.

Definition at line 1596 of file GameWindowManager.cpp.

Friends And Related Symbol Documentation

◆ GameWindow

friend class GameWindow
friend

Definition at line 79 of file GameWindowManager.h.

Member Data Documentation

◆ m_captureFlags

UnsignedInt GameWindowManager::m_captureFlags
protected

Definition at line 356 of file GameWindowManager.h.

◆ m_currMouseRgn

GameWindow* GameWindowManager::m_currMouseRgn
protected

Definition at line 348 of file GameWindowManager.h.

◆ m_cursorBitmap

const Image* GameWindowManager::m_cursorBitmap
protected

Definition at line 355 of file GameWindowManager.h.

◆ m_destroyList

GameWindow* GameWindowManager::m_destroyList
protected

Definition at line 346 of file GameWindowManager.h.

◆ m_grabWindow

GameWindow* GameWindowManager::m_grabWindow
protected

Definition at line 352 of file GameWindowManager.h.

◆ m_keyboardFocus

GameWindow* GameWindowManager::m_keyboardFocus
protected

Definition at line 350 of file GameWindowManager.h.

◆ m_loneWindow

GameWindow* GameWindowManager::m_loneWindow
protected

Definition at line 353 of file GameWindowManager.h.

◆ m_modalHead

ModalWindow* GameWindowManager::m_modalHead
protected

Definition at line 351 of file GameWindowManager.h.

◆ m_mouseCaptor

GameWindow* GameWindowManager::m_mouseCaptor
protected

Definition at line 349 of file GameWindowManager.h.

◆ m_tabList

GameWindowList GameWindowManager::m_tabList
protected

Definition at line 354 of file GameWindowManager.h.

◆ m_windowList

GameWindow* GameWindowManager::m_windowList
protected

Definition at line 343 of file GameWindowManager.h.

◆ m_windowTail

GameWindow* GameWindowManager::m_windowTail
protected

Definition at line 344 of file GameWindowManager.h.


The documentation for this class was generated from the following files: