Xrb::ModalWidget Class Reference

Baseclass for modal widgets. More...

#include <xrb_modalwidget.hpp>

Inheritance diagram for Xrb::ModalWidget:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 ModalWidget (ContainerWidget *parent, std::string const &name="ModalWidget")
 Constructs a modal widget in the same manner as a Widget.
virtual ~ModalWidget ()
 Boring destructor.
void Shutdown ()
 Schedules this widget for deletion.

Protected Member Functions

virtual void UpdateRenderBackground ()
 Sets the render background to the WidgetSkin's ModalWidget background.
virtual void HandleChangedModalWidgetBackground ()
 Called by ModalWidget when specifically the ModalWidget background changes.
virtual void HandleChangedWidgetSkinWidgetBackground (WidgetSkin::WidgetBackgroundType widget_background_type)
 Used to catch when the modal widget background is changed.


Detailed Description

Baseclass for modal widgets.

This baseclass isn't strictly necessary to use modal widgets -- it just provides a bit of functionality to make things more convenient.

The Shutdown method is provided for ModalWidgets to delete themselves. This is accomplished by sending an asynchronous delete child widget event to its parent.

The ModalWidget class has a default widget background, provided by WidgetSkin. There are facilities to handle the necessary updating automatically (necessary only if you want the ModalWidget background provided by WidgetSkin).

Definition at line 35 of file xrb_modalwidget.hpp.


Member Function Documentation

void Xrb::ModalWidget::Shutdown (  ) 

Schedules this widget for deletion.

The widget makes itself not modal, and blocks all events.

Definition at line 28 of file xrb_modalwidget.cpp.

References Xrb::FrameHandler::MostRecentFrameTime(), Xrb::Widget::Parent(), Xrb::EventHandler::SetIsBlockingEvents(), and Xrb::Widget::SetIsModal().

Referenced by Xrb::Dialog::CancelButtonActivated(), and Xrb::Dialog::OKButtonActivated().

void Xrb::ModalWidget::HandleChangedModalWidgetBackground (  )  [protected, virtual]

Called by ModalWidget when specifically the ModalWidget background changes.

Simply calls UpdateRenderBackground.

Definition at line 48 of file xrb_modalwidget.cpp.

References UpdateRenderBackground().

Referenced by HandleChangedWidgetSkinWidgetBackground().

void Xrb::ModalWidget::HandleChangedWidgetSkinWidgetBackground ( WidgetSkin::WidgetBackgroundType  widget_background_type  )  [protected, virtual]

Used to catch when the modal widget background is changed.

If the changed background type is MODAL_WIDGET_BACKGROUND, HandleChangedModalWidgetBackground is called.

Reimplemented from Xrb::WidgetSkinHandler.

Definition at line 53 of file xrb_modalwidget.cpp.

References HandleChangedModalWidgetBackground().


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

Hosted by SourceForge.net Logo -- Generated on Fri Aug 21 21:46:39 2009 for XuqRijBuh by doxygen 1.5.8