Planeshift
Classes | Public Member Functions

pawsControlWindow Class Reference

Window that drives the main interface. More...

#include <pawscontrolwindow.h>

List of all members.

Classes

struct  WindowNames

Public Member Functions

void AddWindow (csString wndName, csString btnName)
 Creates a new WBName structure to hold window and button status.
bool Contains (int x, int y)
 Determines if the coordinates are within this widget.
pawsButtonFindButtonFromWindow (csString wndName)
 The find window and find button methods are used to match a button to it's related window.
pawsControlledWindowFindWindowFromButton (csString btnName)
 The find window and find button methods are used to match a button to it's related window.
IconGetIcon (csString btnName)
 Matchs the button name to the icon that represents it on the display.
csString getWindowInfo (csString widgetStr)
 Used to get the size and position of windows from a command.
csString getWindowNames ()
 Used to get all names and alternative names of windows from a command.
void HandleQuit ()
 When the quit button is pressed this method displays the yes/no dialog box to confirm that a user really wants to quit.
bool HandleWindow (csString widgetStr)
 Used for generic controlled window behavior when a window's button is pressed.
bool HandleWindowName (csString widgetStr)
 Used for generic controlled window behavior when a window's is called Displays a window that is hidden when asked for by a command.
void Hide ()
 Makes widget invisible and removes focus if widget has current focus.
bool hideWindow (csString widgetStr)
 Used to hide a window.
bool hideWindowName (csString widgetStr)
 Used to hide a window from a command.
void NextStyle ()
 Advances through the available styles when a users clicks the right mouse button in the control window.
bool OnButtonReleased (int mouseButton, int keyModifier, pawsWidget *reporter)
 Called whenever a button is released.
bool OnChildMouseEnter (pawsWidget *child)
 Called when mouse enters a child widget.
bool OnChildMouseExit (pawsWidget *child)
 Called when a mouse exits a child widget.
bool OnMouseEnter ()
 Called whenever the mouse enters this widget.
bool OnMouseExit ()
 Called whenever the mouse leaves this widget.
 pawsControlWindow (const pawsControlWindow &origin)
 pawsControlWindow ()
bool PostSetup ()
 This is called after the widget and all of it's children have been created.
void Register (pawsControlledWindow *window)
 When a new window registers make an entry for them in our list.
bool setWindowPositionName (csString widgetStr, int x, int y)
 Used to set the position of windows from a command.
bool setWindowSizeName (csString widgetStr, int width, int height)
 Used to set the size of windows from a command.
void Show ()
 Makes widget visible and brings it to the front.
bool showWindow (csString widgetStr)
 Used to show a window.
bool showWindowName (csString widgetStr)
 Used to show a window from a command.
void Toggle ()
 Toggle a window and it's children from hidden to visible or back depending on the window state when called.
void WindowClose (pawsWidget *wnd)
 Changes the icon IsActive flag to FALSE and displays the proper background for it when a window is closed.
void WindowOpen (pawsWidget *wnd)
 Changes the icon IsActive flag to TRUE and displays the proper background for it when a window is opened.
virtual ~pawsControlWindow ()

Detailed Description

Window that drives the main interface.

This widget controls the behavior of the main toolbar and the interaction with the various windows it controls.

Definition at line 55 of file pawscontrolwindow.h.


Constructor & Destructor Documentation

pawsControlWindow::pawsControlWindow ( )
virtual pawsControlWindow::~pawsControlWindow ( ) [virtual]
pawsControlWindow::pawsControlWindow ( const pawsControlWindow origin) [inline]

Definition at line 60 of file pawscontrolwindow.h.


Member Function Documentation

void pawsControlWindow::AddWindow ( csString  wndName,
csString  btnName 
)

Creates a new WBName structure to hold window and button status.

Parameters:
wndName,:The name of the window to add.
btnName,:The name of the button associated with the window.
bool pawsControlWindow::Contains ( int  x,
int  y 
) [virtual]

Determines if the coordinates are within this widget.

Typically the border or screenFrame.

Parameters:
xThe x screen position.
yThe y screen position.
Returns:
TRUE if yes otherwise FALSE

Reimplemented from pawsWidget.

pawsButton* pawsControlWindow::FindButtonFromWindow ( csString  wndName)

The find window and find button methods are used to match a button to it's related window.

If you have the window name you can find the button.

Parameters:
wndName,:The window name who's button you need.
pawsControlledWindow* pawsControlWindow::FindWindowFromButton ( csString  btnName)

The find window and find button methods are used to match a button to it's related window.

If you have the button name you can find the window.

Parameters:
btnName,:The button name who's window you need.
Icon* pawsControlWindow::GetIcon ( csString  btnName)

Matchs the button name to the icon that represents it on the display.

Parameters:
btnName,:The name to match.
csString pawsControlWindow::getWindowInfo ( csString  widgetStr)

Used to get the size and position of windows from a command.

Parameters:
widgetStr,:The window that should return its info or "all"
Returns:
a string containing the requested info
csString pawsControlWindow::getWindowNames ( )

Used to get all names and alternative names of windows from a command.

Returns:
a string containing all the window names
void pawsControlWindow::HandleQuit ( )

When the quit button is pressed this method displays the yes/no dialog box to confirm that a user really wants to quit.

bool pawsControlWindow::HandleWindow ( csString  widgetStr)

Used for generic controlled window behavior when a window's button is pressed.

Displays a window that is hidden when it's button is pressed. Hides a window that is currently diplayed.

Parameters:
widgetStr,:The window to handle.
Returns:
TRUE if it makes it visible, returns FALSE if it made it invisible or error.
bool pawsControlWindow::HandleWindowName ( csString  widgetStr)

Used for generic controlled window behavior when a window's is called Displays a window that is hidden when asked for by a command.

Hides a window that is currently diplayed.

Parameters:
widgetStr,:The window to handle.
Returns:
TRUE if the toggle was possible, returns FALSE if it was not found.
void pawsControlWindow::Hide ( ) [virtual]

Makes widget invisible and removes focus if widget has current focus.

Sets visible FALSE, hides border if present and then if focused when called it calls SetCurrentFocusedWidget(NULL).

Reimplemented from pawsWidget.

bool pawsControlWindow::hideWindow ( csString  widgetStr)

Used to hide a window.

If the window was already hidden nothing happens.

Parameters:
widgetStr,:The window to show
Returns:
FALSE in case of an error otherwise TRUE
bool pawsControlWindow::hideWindowName ( csString  widgetStr)

Used to hide a window from a command.

If the window was already hidden nothing happens.

Parameters:
widgetStr,:The window to hide (command form, translated to the actual window name by the function)
Returns:
FALSE in case of an error otherwise TRUE
void pawsControlWindow::NextStyle ( )

Advances through the available styles when a users clicks the right mouse button in the control window.

bool pawsControlWindow::OnButtonReleased ( int  button,
int  keyModifier,
pawsWidget widget 
) [virtual]

Called whenever a button is released.

Parameters:
buttonThe button released.
keyModifierModifier key in effect.
widgetThe widget the button belongs to.
Returns:
bool Parent's result or FALSE if no parent.

Reimplemented from pawsWidget.

bool pawsControlWindow::OnChildMouseEnter ( pawsWidget child) [virtual]

Called when mouse enters a child widget.

If child wants to inform parent.

Parameters:
childThe child widget.
Returns:
true

Reimplemented from pawsWidget.

bool pawsControlWindow::OnChildMouseExit ( pawsWidget child) [virtual]

Called when a mouse exits a child widget.

If child wants to inform parent.

Parameters:
childThe child widget.
Returns:
bool Parent's result or TRUE if no parent.

Reimplemented from pawsWidget.

bool pawsControlWindow::OnMouseEnter ( ) [virtual]

Called whenever the mouse enters this widget.

Returns:
bool Parent's result or TRUE if no parent.
Remarks:
Acts recursively on it's parents.

Reimplemented from pawsWidget.

bool pawsControlWindow::OnMouseExit ( ) [virtual]

Called whenever the mouse leaves this widget.

Returns:
bool Parent's result or TRUE if no parent.

Reimplemented from pawsWidget.

bool pawsControlWindow::PostSetup ( ) [virtual]

This is called after the widget and all of it's children have been created.

Remarks:
This can be useful for widgets that want to get pointers to some of it's children for quick access.

Reimplemented from pawsWidget.

void pawsControlWindow::Register ( pawsControlledWindow window)

When a new window registers make an entry for them in our list.

Parameters:
windowThe window to register.
bool pawsControlWindow::setWindowPositionName ( csString  widgetStr,
int  x,
int  y 
)

Used to set the position of windows from a command.

Parameters:
widgetStr,:The window to hide (command form, translated to the actual window name by the function)
x,:New x postion ofthe window
y,:New y postion ofthe window
Returns:
FALSE in case of an error otherwise TRUE
bool pawsControlWindow::setWindowSizeName ( csString  widgetStr,
int  width,
int  height 
)

Used to set the size of windows from a command.

Parameters:
widgetStr,:The window to resizehide (command form, translated to the actual window name by the function)
width,:New width of the window
height,:New height of the window
Returns:
FALSE in case of an error otherwise TRUE
void pawsControlWindow::Show ( ) [virtual]

Makes widget visible and brings it to the front.

Sets visible TRUE shows border if present then calls BringToTop() on itself.

Reimplemented from pawsWidget.

bool pawsControlWindow::showWindow ( csString  widgetStr)

Used to show a window.

If the window was already shown nothing happens.

Parameters:
widgetStr,:The window to show
Returns:
FALSE in case of an error otherwise TRUE
bool pawsControlWindow::showWindowName ( csString  widgetStr)

Used to show a window from a command.

If the window was already shown nothing happens.

Parameters:
widgetStr,:The window to hide (command form, translated to the actual window name by the function)
Returns:
FALSE in case of an error otherwise TRUE
void pawsControlWindow::Toggle ( )

Toggle a window and it's children from hidden to visible or back depending on the window state when called.

void pawsControlWindow::WindowClose ( pawsWidget wnd)

Changes the icon IsActive flag to FALSE and displays the proper background for it when a window is closed.

Parameters:
wnd,:The window that closed.
void pawsControlWindow::WindowOpen ( pawsWidget wnd)

Changes the icon IsActive flag to TRUE and displays the proper background for it when a window is opened.

Parameters:
wnd,:The window that opened.

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