newspeoplefor developersdocumentationdownloads

nGuiWindow Class Reference
[Graphical User Interface]

#include <nguiwindow.h>

Inheritance diagram for nGuiWindow:

nGuiWidget nRoot nObject nNode nReferenced nSignalEmitter nGuiClientWindow nGuiAdjustDisplayWindow nGuiCharacterControlWindow nGuiColorAdjustWindow nGuiConsoleWindow nGuiContextMenu nGuiDockWindow nGuiFileDialog nGuiGraphicsBrowserWindow nGuiHardpointsBrowserWindow nGuiMessageBox nGuiSceneControlWindow nGuiSettingsManagementWindow nGuiSystemInfoWindow nGuiTexBrowserWindow nGuiTextWindow nGuiWatcherWindow List of all members.

Detailed Description

A window that defines a rectangular area on screen and may contain other widgets.

(C) 2003 RadonLabs GmbH

Definition at line 16 of file nguiwindow.h.


Public Member Functions

 nGuiWindow ()
 constructor
virtual ~nGuiWindow ()
 destructor
virtual bool Render ()
 render the window and all contained widgets
virtual void SetFocusWindow (nGuiWindow *window)
 make window the new focus window
virtual nGuiWindowGetTopMostWindow ()
 get topmost visible child window
virtual void OnShow ()
 called when widget is becoming visible
virtual bool OnMouseMoved (const vector2 &mousePos)
 handle mouse move, route to focus window if exists
virtual bool OnButtonDown (const vector2 &mousePos)
 handle button down, route to focus window if exists
virtual bool OnButtonUp (const vector2 &mousePos)
 handle button up, route to focus window if exists
virtual bool OnRButtonDown (const vector2 &mousePos)
 handle right button down, route to focus window if exists
virtual bool OnRButtonUp (const vector2 &mousePos)
 handle right button up, route to focus window if exists
virtual void OnChar (uchar charCode)
 handle character key event, route to focus window if exists
virtual bool OnKeyDown (nKey key)
 handle a key down event, route to focus window if exists
virtual void OnKeyUp (nKey key)
 handle a key up event, route to focus window if exists
virtual void OnFrame ()
 called per frame
void SetModal (bool b)
 set modal flag
bool IsModal () const
 get modal flag
void SetEscapeCommand (const char *cmd)
 set escape key script handler
const char * GetEscapeCommand () const
 get escape key script handler
void SetDismissed (bool b)
 set dismissed flag
bool IsDismissed () const
 is dismissed?
void SetCloseRequested (bool b)
 set close request
bool IsCloseRequested () const
 get close request
void SetFadeInTime (nTime t)
 set fadein time
nTime GetFadeInTime () const
 get fadein time
void SetFadeOutTime (nTime t)
 set fadeout time
nTime GetFadeOutTime () const
 get fadeout time
const vector4GetWindowColor () const
 get window color
void SetWindowColor (const vector4 &)
 set window color
void SetCloseCommand (const char *cmd)
 set 'close' event script handler
const char * GetCloseCommand () const
 get 'close' event script handler

Protected Member Functions

virtual void UpdateWindowColor ()
 compute current window color

Protected Attributes

nString closeCommand
nString escapeCommand
nClasswindowClass
bool modal
bool dismissed
bool closeRequested
bool openFirstFrame
nTime fadeInTime
nTime fadeOutTime
nTime openedTime
nTime closeRequestTime
vector4 windowColor

Constructor & Destructor Documentation

nGuiWindow::nGuiWindow  ) 
 

constructor

Definition at line 15 of file nguiwindow_main.cc.

nGuiWindow::~nGuiWindow  )  [virtual]
 

destructor

Definition at line 36 of file nguiwindow_main.cc.


Member Function Documentation

bool nGuiWindow::Render  )  [virtual]
 

render the window and all contained widgets

Reimplemented from nGuiWidget.

Definition at line 427 of file nguiwindow_main.cc.

void nGuiWindow::SetFocusWindow nGuiWindow window  )  [virtual]
 

make window the new focus window

Moves the window in front of all other child windows.

Definition at line 46 of file nguiwindow_main.cc.

nGuiWindow * nGuiWindow::GetTopMostWindow  )  [virtual]
 

get topmost visible child window

Returns the topmost visible child window, if one such exists.

Definition at line 70 of file nguiwindow_main.cc.

void nGuiWindow::OnShow  )  [virtual]
 

called when widget is becoming visible

Reimplemented from nGuiWidget.

Reimplemented in nGuiAdjustDisplayWindow, nGuiCharacterControlWindow, nGuiClientWindow, nGuiColorAdjustWindow, nGuiConsoleWindow, nGuiContextMenu, nGuiDockWindow, nGuiFileDialog, nGuiGraphicsBrowserWindow, nGuiHardpointsBrowserWindow, nGuiMessageBox, nGuiSceneControlWindow, nGuiSettingsManagementWindow, nGuiSystemInfoWindow, nGuiTexBrowserWindow, nGuiTextWindow, and nGuiWatcherWindow.

Definition at line 87 of file nguiwindow_main.cc.

bool nGuiWindow::OnMouseMoved const vector2 mousePos  )  [virtual]
 

handle mouse move, route to focus window if exists

OnMouseMoved goes to ALL child widgets, not just the focus window!

Reimplemented from nGuiWidget.

Reimplemented in nGuiClientWindow.

Definition at line 147 of file nguiwindow_main.cc.

bool nGuiWindow::OnButtonDown const vector2 mousePos  )  [virtual]
 

handle button down, route to focus window if exists

Reimplemented from nGuiWidget.

Definition at line 171 of file nguiwindow_main.cc.

bool nGuiWindow::OnButtonUp const vector2 mousePos  )  [virtual]
 

handle button up, route to focus window if exists

Reimplemented from nGuiWidget.

Definition at line 221 of file nguiwindow_main.cc.

bool nGuiWindow::OnRButtonDown const vector2 mousePos  )  [virtual]
 

handle right button down, route to focus window if exists

Reimplemented from nGuiWidget.

Definition at line 243 of file nguiwindow_main.cc.

bool nGuiWindow::OnRButtonUp const vector2 mousePos  )  [virtual]
 

handle right button up, route to focus window if exists

Reimplemented from nGuiWidget.

Definition at line 265 of file nguiwindow_main.cc.

void nGuiWindow::OnChar uchar  charCode  )  [virtual]
 

handle character key event, route to focus window if exists

Reimplemented from nGuiWidget.

Definition at line 287 of file nguiwindow_main.cc.

bool nGuiWindow::OnKeyDown nKey  key  )  [virtual]
 

handle a key down event, route to focus window if exists

Reimplemented from nGuiWidget.

Definition at line 307 of file nguiwindow_main.cc.

void nGuiWindow::OnKeyUp nKey  key  )  [virtual]
 

handle a key up event, route to focus window if exists

Reimplemented from nGuiWidget.

Reimplemented in nGuiTexBrowserWindow.

Definition at line 342 of file nguiwindow_main.cc.

void nGuiWindow::OnFrame  )  [virtual]
 

called per frame

Called per frame. This just makes sure that the topmost window is also the focus window (this may change if the previous focus window has disappeared.

  • 07-Jun-05 kims Added close event handler to provides fading and prevents crashes when a custom nguibutton tries to close parent window.

Reimplemented from nGuiWidget.

Reimplemented in nGuiCharacterControlWindow, nGuiSystemInfoWindow, and nGuiWatcherWindow.

Definition at line 103 of file nguiwindow_main.cc.

void nGuiWindow::SetModal bool  b  )  [inline]
 

set modal flag

Definition at line 147 of file nguiwindow.h.

bool nGuiWindow::IsModal  )  const [inline]
 

get modal flag

Definition at line 157 of file nguiwindow.h.

void nGuiWindow::SetEscapeCommand const char *  cmd  )  [inline]
 

set escape key script handler

Definition at line 127 of file nguiwindow.h.

const char * nGuiWindow::GetEscapeCommand  )  const [inline]
 

get escape key script handler

Definition at line 137 of file nguiwindow.h.

void nGuiWindow::SetDismissed bool  b  )  [inline]
 

set dismissed flag

Set the dismiss flag. The gui server will check for dismissed windows under the current root window and release them.

Definition at line 169 of file nguiwindow.h.

bool nGuiWindow::IsDismissed  )  const [inline]
 

is dismissed?

Definition at line 179 of file nguiwindow.h.

void nGuiWindow::SetCloseRequested bool  b  ) 
 

set close request

Set the close requested flag. This will start the fade out.

Definition at line 464 of file nguiwindow_main.cc.

bool nGuiWindow::IsCloseRequested  )  const [inline]
 

get close request

Definition at line 189 of file nguiwindow.h.

void nGuiWindow::SetFadeInTime nTime  t  )  [inline]
 

set fadein time

Definition at line 199 of file nguiwindow.h.

nTime nGuiWindow::GetFadeInTime  )  const [inline]
 

get fadein time

Definition at line 209 of file nguiwindow.h.

void nGuiWindow::SetFadeOutTime nTime  t  )  [inline]
 

set fadeout time

Definition at line 219 of file nguiwindow.h.

nTime nGuiWindow::GetFadeOutTime  )  const [inline]
 

get fadeout time

Definition at line 229 of file nguiwindow.h.

const vector4 & nGuiWindow::GetWindowColor  )  const [inline]
 

get window color

Definition at line 107 of file nguiwindow.h.

void nGuiWindow::SetWindowColor const vector4  )  [inline]
 

set window color

Definition at line 117 of file nguiwindow.h.

void nGuiWindow::SetCloseCommand const char *  cmd  )  [inline]
 

set 'close' event script handler

  • 07-Jun-05 kims Added 'close', 'setclosecommand' and 'getclosecommand' to provide fading and prevent crashes when a custom nguibutton tries to close parent window.

Definition at line 243 of file nguiwindow.h.

const char * nGuiWindow::GetCloseCommand  )  const [inline]
 

get 'close' event script handler

  • 07-Jun-05 kims Added 'close', 'setclosecommand' and 'getclosecommand' to provide fading and prevent crashes when a custom nguibutton tries to close parent window.

Definition at line 256 of file nguiwindow.h.

void nGuiWindow::UpdateWindowColor  )  [protected, virtual]
 

compute current window color

This computes the window color (takes fade in and fade out effect into account).

Definition at line 364 of file nguiwindow_main.cc.


Member Data Documentation

nString nGuiWindow::closeCommand [protected]
 

Definition at line 86 of file nguiwindow.h.

nString nGuiWindow::escapeCommand [protected]
 

Definition at line 87 of file nguiwindow.h.

nClass* nGuiWindow::windowClass [protected]
 

Reimplemented from nGuiWidget.

Definition at line 88 of file nguiwindow.h.

bool nGuiWindow::modal [protected]
 

Definition at line 90 of file nguiwindow.h.

bool nGuiWindow::dismissed [protected]
 

Definition at line 91 of file nguiwindow.h.

bool nGuiWindow::closeRequested [protected]
 

Definition at line 92 of file nguiwindow.h.

bool nGuiWindow::openFirstFrame [protected]
 

Definition at line 94 of file nguiwindow.h.

nTime nGuiWindow::fadeInTime [protected]
 

Definition at line 95 of file nguiwindow.h.

nTime nGuiWindow::fadeOutTime [protected]
 

Definition at line 96 of file nguiwindow.h.

nTime nGuiWindow::openedTime [protected]
 

Definition at line 97 of file nguiwindow.h.

nTime nGuiWindow::closeRequestTime [protected]
 

Definition at line 98 of file nguiwindow.h.

vector4 nGuiWindow::windowColor [protected]
 

Definition at line 99 of file nguiwindow.h.


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

Copyright © 1999-2005 by the contributing authors. Ideas, requests, problems: Send feedback.