Game Accessibility Library logo SourceForge.net Logo
Game Accessibility Suite: CATWindow Class Reference

CATWindow Class Reference

#include <CATWindow.h>

Inheritance diagram for CATWindow:

CATGuiObj CATXMLObject CATWaitDlg GASPilotWindow

List of all members.


Detailed Description

Basic windowing class.

Definition at line 99 of file CATWindow.h.


Public Types

typedef void(CATWindow::* GGCOMMANDFUNC )(CATCommand &command, CATControl *control)

Public Member Functions

 CATWindow (const CATString &element, const CATString &rootDir)
 CATWindow() constructor - based off CATXMLObject.
virtual ~CATWindow ()
 CATWindow destructor.
virtual void Show (CATWindow *parent=0, CATPOINT *origin=0)
virtual void Show (CATWND parentWnd)
 Show as a child with external hwnd....
virtual void Hide (bool destroy=false)
virtual bool IsVisible (const CATGuiObj *child=0) const
virtual bool IsPrimary ()
virtual bool IsOverlapped ()
virtual void DisplayMessage (const CATString &msg)
virtual void DisplayError (const CATResult &result)
virtual CATResult DisplayPrompt (const CATString &msg, CATApp::CATPROMPTTYPE prompt)
CATControlFindControlAndVerify (const CATString &controlName, const CATString &typeName, CATUInt32 *index=0)
CATResult EnableObject (const CATString &controlName, bool enabled)
virtual void MarkDirty (CATRect *dirtyRect=0, bool force=false)
virtual void Update ()
virtual void Draw (CATImage *background, const CATRect &dirtyRect)
virtual void PostDraw (CATDRAWCONTEXT drawContext, const CATRect &dirtyRect)
virtual void PostDrawText (const CATString &text, CATDRAWCONTEXT context, const CATRect &textRect, const CATRect &dirtyRect, const CATColor &textColor, const CATString &fontName, CATFloat32 fontSize, bool multiline=false, CATColor *bgColor=0, bool italics=false, bool centered=false, bool autosize=false)
 PostDrawText() draws text from a post-drawn control.
virtual void OnSize (const CATRect &newRect)
 OnSize() is called when the window changes size.
virtual CATResult OnEvent (const CATEvent &event, CATInt32 &retVal)
 OnEvent() is called when events occur that we should know about.
virtual void OnCommand (CATCommand &command, CATControl *ctrl)
virtual void OnThreadedCommand (CATCommand &command)
virtual void OnDestroy ()
 OnDestroy() is called just before the OS's window is destroyed.
virtual void OnCreate ()
 OnCreate() is called when a new window is created.
virtual bool OnClose ()
virtual void OnMove (const CATPOINT &newPos)
 OnMove() is called whenever the window moves.
virtual bool OnMoving (CATRect &moveRect, const CATRect &wndRect)
virtual CATResult Load (CATPROGRESSCB progressCB=0, void *progressParam=0, CATFloat32 progMin=0.0f, CATFloat32 progMax=1.0f)
void OSSetMouse (const CATPOINT &point, CATCursor &cursor)
void SetCursorType (CATCURSORTYPE type)
 SetCursorType() sets the active cursor type for the window.
void OSSetCursor ()
 OSSetCursor activates the current cursor.
void OSSetCursor (CATCursor &cursor)
 OSSetCursor for a specific cursor type..
void OSDrawCursor (CATDRAWCONTEXT context, const CATPOINT &point, CATCursor &cursor)
CATWND OSGetWnd ()
virtual CATRect OSGetWndRect ()
void OSMinimize ()
void OSMaximize ()
void OSWndToScreen (CATInt32 &x, CATInt32 &y)
void OSScreenToWnd (CATInt32 &x, CATInt32 &y)
void OSSetFocus (CATWND window=0)
virtual void OSMoveWnd (const CATRect &rect, CATWND wnd=0)
virtual void OSDestroyWnd (CATWND window=0)
virtual void SetFocus (CATControl *control)
virtual void KillFocus ()
 KillFocus() removes the focus from all controls.
virtual void SetFocusNext ()
virtual void SetFocusPrev ()
virtual CATControlGetFocusControl ()
virtual CATResult RegCtlWnd (CATControlWnd *wndCtl, CATWND wndHandle)
virtual CATResult UnRegCtlWnd (CATWND wndHandle)
virtual CATControlWndGetCtlWnd (CATWND wndHandle)
virtual CATResult RectFromAttribs ()
virtual void SetEnabled (bool enabled)
virtual void SetActive ()
virtual void OSHideToolTip ()
virtual bool IsTemplate ()
virtual void SetIsTemplate (bool isTemplate)
virtual CATFONT AutoFontSize (const CATString &text, CATRect rect, const CATString &fontName, CATFloat32 fontSize, bool bold=false, bool italic=false, bool underlined=false)
virtual CATFONT OSGetFont (const CATString &fontName, CATFloat32 fontSize, bool bold=false, bool italic=false, bool underlined=false)
virtual void OSReleaseFont (CATFONT &font)
virtual void OnMouseWheel (const CATPOINT &point, CATFloat32 wheelMove, CATMODKEY modKey)
virtual void SetKnobOverride (CATKNOB_STYLE knobStyle)
virtual void OnKeyDown (const CATKeystroke &keystroke)
virtual void OnKeyUp (const CATKeystroke &keystroke)
virtual void OnKeyPress (const CATKeystroke &keystroke)
virtual void OnHelp ()
virtual void CenterWindow (CATWindow *parent)
virtual CATWindowGetWindow () const
 GetWindow() retrieves the parent window.
virtual void WindowToWidget (CATGuiObj *widget, CATPOINT &pt)
virtual void WindowToWidget (CATGuiObj *widget, CATRect &rect)
virtual void WidgetToWindow (CATGuiObj *widget, CATPOINT &pt)
virtual void WidgetToWindow (CATGuiObj *widget, CATRect &rect)
virtual CATResult ResetBackground ()
virtual CATResult OnDropFile (const CATString &filePath)
virtual void OnClose (CATCommand &command, CATControl *ctrl)
virtual void OnMinimize (CATCommand &command, CATControl *ctrl)
virtual void OnMaximize (CATCommand &command, CATControl *ctrl)
virtual void OnNoop (CATCommand &command, CATControl *ctrl)
bool GetPref (const CATString &prefName, CATString &prefValue)
bool GetPref (const CATString &prefName, CATInt32 &prefValue)
bool GetPref (const CATString &prefName, CATUInt32 &prefValue)
bool GetPref (const CATString &prefName, CATFloat32 &prefValue)
bool GetPref (const CATString &prefName, bool &prefValue)
bool SetPref (const CATString &prefName, const CATString &prefValue)
bool SetPref (const CATString &prefName, CATInt32 prefValue)
bool SetPref (const CATString &prefName, CATUInt32 prefValue)
bool SetPref (const CATString &prefName, CATFloat32 prefValue)
bool SetPref (const CATString &prefName, bool prefValue)
virtual void OnBuildMenu (CATMenu *menu)
CATWND GetBaseWindow ()
CATResult PostEvent (CATEvent *event)
CATResult PostThreadedCommand (CATCommand &cmd)
virtual CATRect GetRectAbs (bool screenCoordinates=false)
virtual CATControlHitTest (const CATPOINT &point)
virtual CATUInt32 GetAccessRole ()
virtual CATResult GetScale (CATFloat32 &xScale, CATFloat32 &yScale)
void GetControlStruct (CATFINDCONTROLSTRUCT &ctrlStruct, CATControl *control)

Static Public Member Functions

static void SetTrackMouse (CATWND hwnd)

Protected Member Functions

CATResult SendEvent (const CATEvent &event, CATInt32 &lRes)
CATResult ProcessCommandTable (CATCommand &cmd, CATControl *control, const GGWINDOWCMDFUNC *cmdTable, CATUInt32 cmdTableLen, bool inThread)
bool CalcSlack (CATInt32 &movePos, CATInt32 &opposite, const CATInt32 &dockPos, CATInt32 &slackCounter, bool inside=false)
virtual CATResult CleanBackground (CATRect *dirtyRect)
 CleanBackground() cleans the dirty rectangle in the background.
virtual CATResult ParseAttributes ()
 ParseAttributes() parses the known attributes for an object.
virtual void OSDraw (CATDRAWCONTEXT drawContext, CATRect *dirtyRect)
virtual CATOSREGION OSGenRegion (CATStack< CATRect > &rectStack)
virtual void OSFreeRegion (CATOSREGION rgn)
virtual CATRect OSGetDockRect ()
virtual CATResult OSCreateWnd (CATWND wnd=0)
virtual void OSShowWnd ()
virtual void OSShowToolTip (CATControl *toolTip, const CATPOINT &point)
virtual void OSUpdateToolTip ()
virtual void OSBuildToolTips ()
 OSBuildToolTips() builds up the initial tool tip window(s) for the window.
virtual void OSHideWnd ()
virtual CATUInt32 OSGetWindowStyle ()
 Retrieve window style indicator based on our parameters for window.
virtual void OSBeginMouseTrack ()
virtual void OSEndMouseTrack ()
virtual void OnMouseMove (const CATPOINT &point, bool leftButton, CATMODKEY modKey)
virtual void OnMouseHover (const CATPOINT &point, bool leftButton, CATMODKEY modKey)
virtual void OnMouseDown (const CATPOINT &point, CATMODKEY modKey)
virtual void OnMouseUp (const CATPOINT &point, CATMODKEY modKey)
virtual void OnRightMouseDown (const CATPOINT &point, CATMODKEY modKey)
virtual void OnRightMouseUp (const CATPOINT &point, CATMODKEY modKey)
virtual void OnMouseDoubleClick (const CATPOINT &point, CATMODKEY modKey)
virtual void OnMouseLeave ()
virtual void OnMouseTimer (CATMODKEY modKey)
virtual void SetWindowTimer (CATFloat32 frequencyHz)
virtual void KillWindowTimer ()
virtual void OnWindowTimer ()
virtual void SetStatusBarHint (const CATString &hintText)
virtual CATString GetStatusBarHint ()
CATResult RegWindow ()
void GGUnregWindow ()
 GGUnRegWindow() unregisters the image app's window class.
void PostEventNotification ()
void ProcessPostedEvent ()
virtual void OSWaitOnCmdThread ()
void ThreadedCmdThread ()
 Threaded commands.
void OSStartCmdThread ()

Static Protected Member Functions

static bool FindControlCallback (CATControl *curControl, void *userParam)
static bool GetControlSiblingsCallback (CATControl *curControl, void *userParam)
static bool SetKnobCallback (CATControl *curControl, void *userParam)

Protected Attributes

CATString fStatusBarHint
CATControlfMouseTrackTarget
CATControlfRightTrack
CATControlfActiveControl
CATControlfFocusControl
bool fMouseInWindow
 fMouseInWindow is true if the mouse is currently in the window
bool fPrimary
bool fSizeable
 fSizeable determines if the window is sizeable.
bool fScale
CATSIZE fBaseSize
 Base width/height for scaling NOT IMPLEMENTED YET.
bool fCaptionBar
 fCaptionBar determines if we use an OS-specific caption bar or not
bool fDragAnywhere
bool fDragging
CATPOINT fDragLastPoint
CATOSREGION fPostRegion
CATImagefImageCopy
CATString fClassName
 Window class name. This may just be a win32 thing...
CATString fTitle
 Window title - may differ from name.
CATString fIconPath
 Path to icon, if any.
HICON fUserIcon
CATSkinfSkin
 fSkin is the base skin object (the Window's parent)
CATWND fWindow
 fWindow is an OS-specific identifier for the window
bool fUseToolTips
CATString fLastTipText
CATPOINT fLastTipPos
CATWND fToolTip
 fToolTip is an OS-specific identifier for the tooltip window
CATControlfCurTool
CATColor fToolTipFore
CATColor fToolTipBg
bool fRegistered
 fRegistered is true if the window has been registered
CATCursor fCursor
 fCursor holds the window's current cursor
clock_t fLastMouseUpdate
CATLabelfStatusLabel
CATPOINT fLastPoint
 fLastPoint
bool fAutoDock
 fAutoDock - if true, snaps to other windows and edges
CATInt32 fLeftSlack
 Slack counters for docking...
CATInt32 fTopSlack
CATInt32 fRightSlack
CATInt32 fBottomSlack
bool fMaximized
bool fIsTemplate
bool fIsOverlapped
std::map< CATWND, CATControlWnd * > fCWT
CATQueue< CATEvent * > fEventQueue
CATQueue< CATCommandfThreadedCmdQueue
CATSignal fThreadedCmdSignal
CATMutex fThreadedCmdLock
void * fCmdThread
CATMutex fEventLock
bool fExiting
bool fExitThread
CATPOINT fScreenPos

Classes

struct  GGWINDOWCMDFUNC

The documentation for this class was generated from the following files:
Generated on Mon Feb 11 04:11:11 2008 for Game Accessibility Suite by doxygen 1.5.4