ui::Window Class Reference

Inheritance diagram for ui::Window:

Inheritance graph
[legend]
Collaboration diagram for ui::Window:

Collaboration graph
[legend]
List of all members.

Detailed Description

Defines basic functionality for Window based Components.


Public Member Functions

 Window ()
virtual ~Window ()
void addOwnedWindow (Window *window)
void removeOwnedWindow (Window *window)
void removeOwnedWindows ()
const WindowList & getOwnedWindows () const
void setContentPane (Container *pane)
ContainergetContentPane () const
void add (Component *comp, int constraints=-1)
void remove (Component *comp)
void show ()
void hide ()
void pack ()
void updateComponent (float deltaTime)
virtual bool isRootContainer () const
void addWindowListener (event::WindowListener *listener)
void removeWindowListener (event::WindowListener *listener)
void removeWindowListeners ()
const event::WindowListenerList getWindowListeners () const
void processWindowEvent (const event::WindowEvent &e)
void setTitleBar (TitleBar *titleBar)
TitleBar * getTitleBar () const
void setActiveWindow (Window *window)
WindowgetActiveWindow () const

Protected Member Functions

void paintChildren (Graphics &g)


Constructor & Destructor Documentation

ui::Window::Window  ) 
 

Creates a Window with default values.

ui::Window::~Window  )  [virtual]
 

Frees memory used by this class.


Member Function Documentation

void ui::Window::addOwnedWindow Window window  ) 
 

Add a window to this Window. This makes this Window the parent of the added window.

Parameters:
window the Window to add as a child.

void ui::Window::removeOwnedWindow Window window  ) 
 

Removes a registered window from this window.

Parameters:
window the window to be deleted.

void ui::Window::removeOwnedWindows  ) 
 

Removes all registered windows from this window.

const WindowList & ui::Window::getOwnedWindows  )  const
 

Returns the owned Windows.

void ui::Window::setContentPane Container pane  ) 
 

Sets the content pane for this Frame.

Parameters:
container container that should be used as content pane.

Container * ui::Window::getContentPane  )  const
 

Returns the current content Pane. A content pane is a Container which is the parent of all Components that are added to Window.

Returns:
the active content pane.

void ui::Window::add Component comp,
int  constraints = -1
[virtual]
 

Add a Component to the Window.

Note:
Components are added to the contentpane, not to the Window directly. As such these are only convenience methods, not methods that act directly on this container. A more true way would be to use getContentPane().add().

Reimplemented from ui::CompoundComponent.

void ui::Window::remove Component comp  )  [virtual]
 

Removes a Component from this Window.

Note:
Note that the Components are removed from the contentpane, not the Window itself.

Reimplemented from ui::CompoundComponent.

void ui::Window::show  ) 
 

Shows the Window. Initially, all windows are invisible. Issuing show() on them, makes them display.

Note:
The difference with setVisible(true) is that this function also sends a window opened event to registered window listeners.

void ui::Window::hide  ) 
 

Hides the Window. Hides the window if it's current visible. Otherwise this command is ignored.

Note:
The difference with setVisible(false) is that this function also sends a window closed event to registered window listeners.

void ui::Window::pack  ) 
 

Issues a recalculation of preferred sizes. Pack recalculates all the dimensions of the Components inside the window, and tries to give each their preferred size.

void ui::Window::updateComponent float  deltaTime  )  [virtual]
 

Updates the Window with the frame time. This function is used internally to update the components framerate independent. It's best not to call this method directly.

Parameters:
deltaTime time between frame updates.

Reimplemented from ui::Container.

bool ui::Window::isRootContainer  )  const [virtual]
 

Returns wether this Container is a top level Container.

Reimplemented from ui::Container.

void ui::Window::addWindowListener event::WindowListener listener  ) 
 

Adds a window listener to this Window.

Parameters:
listener The listener to be added to the Window.

void ui::Window::removeWindowListener event::WindowListener listener  ) 
 

Removes a window listener from this Window.

Parameters:
listener The listener to be removed from the Window.

void ui::Window::removeWindowListeners  ) 
 

Removes all window listeners from this Window.

const event::WindowListenerList ui::Window::getWindowListeners  )  const
 

Returns all registered Window listeners.

Returns:
All registered Window Listeners.

void ui::Window::processWindowEvent const event::WindowEvent e  ) 
 

Forwards the event to the registered listeners and appropriate methods.

Parameters:
e Event to be forwarded.

void ui::Window::paintChildren Graphics g  )  [protected, virtual]
 

Paints the Window and it's children.

Parameters:
g The graphics instance.

Reimplemented from ui::Container.


Generated on Mon Jun 20 19:41:54 2005 for UI by doxygen 1.3.1 using KingsTools