newspeoplefor developersdocumentationdownloads

nGuiClientWindow Class Reference
[Graphical User Interface]

#include <nguiclientwindow.h>

Inheritance diagram for nGuiClientWindow:

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

Detailed Description

A window with optional titlebar, close button, size handles and a client area.

(C) 2004 RadonLabs GmbH

Definition at line 19 of file nguiclientwindow.h.


Public Member Functions

 nGuiClientWindow ()
 constructor
virtual ~nGuiClientWindow ()
 destructor
virtual bool OnMouseMoved (const vector2 &mousePos)
 handle mouse move, route to focus window if exists
virtual void OnShow ()
 called when widget is becoming visible
virtual void OnHide ()
 called when widget is becoming invisible
virtual void OnRectChange (const rectangle &newRect)
 called when widget position or size changes
virtual void OnEvent (const nGuiEvent &event)
 notify widget of an event
void SetMovable (bool b)
 set movable flag
bool IsMovable () const
 get movable flag
void SetResizable (bool b)
 set resize flag
bool IsResizable () const
 get resizeable flag
void SetCloseButton (bool b)
 enable/disable close button
bool HasCloseButton () const
 has close button?
void SetTitleBar (bool b)
 has the window a title bar (default yes)
bool HasTitleBar () const
 return if title bar is enabled
void SetTitle (const char *s)
 set title string
const char * GetTitle () const
 get title string
void CloseSiblings ()
 close all sibling windows of the same class
void SetBorder (const rectangle &border)
 set border (overrides the default border setup of the skin)
const rectangleGetBorder () const
 get border
nGuiFormLayoutGetFormLayout () const
 get the window's form layout object

Protected Types

enum  Flags {
  Movable = (1<<0),
  Resizable = (1<<1),
  CloseButton = (1<<2),
  TitleBar = (1<<3)
}

Protected Member Functions

virtual void UpdateLayout (const rectangle &newRect)
 update the child widget layout, when position or size changes
void BeginDrag ()
 begin dragging
void EndDrag ()
 end dragging
void CancelDrag ()
 cancel dragging
void BeginResize ()
 begin sizing
void EndResize ()
 end resizing
void CancelResize ()
 cancel resizing

Protected Attributes

nString title
ushort flags
nRef< nGuiButtonrefCloseButton
nRef< nGuiButtonrefSizeButton
nRef< nGuiTextButtonrefTitleBar
nRef< nGuiFormLayoutrefFormLayout
bool dragging
bool resizing
vector2 startMousePos
rectangle startRect
float titleHeight
bool hasBorder
rectangle border

Member Enumeration Documentation

enum nGuiClientWindow::Flags [protected]
 

Enumerator:
Movable 
Resizable 
CloseButton 
TitleBar 

Definition at line 81 of file nguiclientwindow.h.


Constructor & Destructor Documentation

nGuiClientWindow::nGuiClientWindow  ) 
 

constructor

Definition at line 16 of file nguiclientwindow_main.cc.

nGuiClientWindow::~nGuiClientWindow  )  [virtual]
 

destructor

Definition at line 33 of file nguiclientwindow_main.cc.


Member Function Documentation

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

handle mouse move, route to focus window if exists

The mouse handler will care about window movement and resizing.

Reimplemented from nGuiWindow.

Definition at line 216 of file nguiclientwindow_main.cc.

void nGuiClientWindow::OnShow  )  [virtual]
 

called when widget is becoming visible

Create and initialize child widgets.

Reimplemented from nGuiWindow.

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

Definition at line 101 of file nguiclientwindow_main.cc.

void nGuiClientWindow::OnHide  )  [virtual]
 

called when widget is becoming invisible

Reimplemented from nGuiWidget.

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

Definition at line 184 of file nguiclientwindow_main.cc.

void nGuiClientWindow::OnRectChange const rectangle newRect  )  [virtual]
 

called when widget position or size changes

Called when the client window rectangle changes. This repositions the child widget.

Reimplemented from nGuiWidget.

Definition at line 280 of file nguiclientwindow_main.cc.

void nGuiClientWindow::OnEvent const nGuiEvent event  )  [virtual]
 

notify widget of an event

Check for events from our child widgets and handle them accordingly.

Reimplemented from nGuiWidget.

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

Definition at line 294 of file nguiclientwindow_main.cc.

void nGuiClientWindow::SetMovable bool  b  )  [inline]
 

set movable flag

Definition at line 129 of file nguiclientwindow.h.

bool nGuiClientWindow::IsMovable  )  const [inline]
 

get movable flag

Definition at line 140 of file nguiclientwindow.h.

void nGuiClientWindow::SetResizable bool  b  )  [inline]
 

set resize flag

Definition at line 150 of file nguiclientwindow.h.

bool nGuiClientWindow::IsResizable  )  const [inline]
 

get resizeable flag

Definition at line 161 of file nguiclientwindow.h.

void nGuiClientWindow::SetCloseButton bool  b  )  [inline]
 

enable/disable close button

Definition at line 171 of file nguiclientwindow.h.

bool nGuiClientWindow::HasCloseButton  )  const [inline]
 

has close button?

Definition at line 182 of file nguiclientwindow.h.

void nGuiClientWindow::SetTitleBar bool  b  )  [inline]
 

has the window a title bar (default yes)

Definition at line 108 of file nguiclientwindow.h.

bool nGuiClientWindow::HasTitleBar  )  const [inline]
 

return if title bar is enabled

Definition at line 119 of file nguiclientwindow.h.

void nGuiClientWindow::SetTitle const char *  s  )  [inline]
 

set title string

Definition at line 192 of file nguiclientwindow.h.

const char * nGuiClientWindow::GetTitle  )  const [inline]
 

get title string

Definition at line 206 of file nguiclientwindow.h.

void nGuiClientWindow::CloseSiblings  ) 
 

close all sibling windows of the same class

Close all sibling windows which are of the same class of me. Can be used to implement Singleton windows.

Definition at line 414 of file nguiclientwindow_main.cc.

void nGuiClientWindow::SetBorder const rectangle border  )  [inline]
 

set border (overrides the default border setup of the skin)

Definition at line 216 of file nguiclientwindow.h.

const rectangle & nGuiClientWindow::GetBorder  )  const [inline]
 

get border

Definition at line 227 of file nguiclientwindow.h.

nGuiFormLayout * nGuiClientWindow::GetFormLayout  )  const [inline]
 

get the window's form layout object

Definition at line 244 of file nguiclientwindow.h.

void nGuiClientWindow::UpdateLayout const rectangle newRect  )  [protected, virtual]
 

update the child widget layout, when position or size changes

Update child widget rectangles.

Definition at line 43 of file nguiclientwindow_main.cc.

void nGuiClientWindow::BeginDrag  )  [protected]
 

begin dragging

Begin dragging the window. This is usually invoked by the title bar button through the script interface.

Definition at line 340 of file nguiclientwindow_main.cc.

void nGuiClientWindow::EndDrag  )  [protected]
 

end dragging

Finish dragging. This is usually invoked by the title bar button through the script interface.

Definition at line 354 of file nguiclientwindow_main.cc.

void nGuiClientWindow::CancelDrag  )  [protected]
 

cancel dragging

Finish dragging. This is usually invoked by the title bar button through the script interface.

Definition at line 365 of file nguiclientwindow_main.cc.

void nGuiClientWindow::BeginResize  )  [protected]
 

begin sizing

Begin resizing. This is usually invoked by the resize button through the script interface.

Definition at line 377 of file nguiclientwindow_main.cc.

void nGuiClientWindow::EndResize  )  [protected]
 

end resizing

End resizing. This is usually invoked by the resize button through the script interface.

Definition at line 391 of file nguiclientwindow_main.cc.

void nGuiClientWindow::CancelResize  )  [protected]
 

cancel resizing

Cancel resizing. This is usually invoked by the resize button through the script interface.

Definition at line 402 of file nguiclientwindow_main.cc.


Member Data Documentation

nString nGuiClientWindow::title [protected]
 

Definition at line 88 of file nguiclientwindow.h.

ushort nGuiClientWindow::flags [protected]
 

Definition at line 89 of file nguiclientwindow.h.

nRef<nGuiButton> nGuiClientWindow::refCloseButton [protected]
 

Definition at line 90 of file nguiclientwindow.h.

nRef<nGuiButton> nGuiClientWindow::refSizeButton [protected]
 

Definition at line 91 of file nguiclientwindow.h.

nRef<nGuiTextButton> nGuiClientWindow::refTitleBar [protected]
 

Definition at line 92 of file nguiclientwindow.h.

nRef<nGuiFormLayout> nGuiClientWindow::refFormLayout [protected]
 

Definition at line 93 of file nguiclientwindow.h.

bool nGuiClientWindow::dragging [protected]
 

Definition at line 94 of file nguiclientwindow.h.

bool nGuiClientWindow::resizing [protected]
 

Definition at line 95 of file nguiclientwindow.h.

vector2 nGuiClientWindow::startMousePos [protected]
 

Definition at line 96 of file nguiclientwindow.h.

rectangle nGuiClientWindow::startRect [protected]
 

Definition at line 97 of file nguiclientwindow.h.

float nGuiClientWindow::titleHeight [protected]
 

Definition at line 98 of file nguiclientwindow.h.

bool nGuiClientWindow::hasBorder [protected]
 

Definition at line 99 of file nguiclientwindow.h.

rectangle nGuiClientWindow::border [protected]
 

Definition at line 100 of file nguiclientwindow.h.


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

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