GG::BrowseInfoWnd Class Reference

The abstract base class for all browse-info display windows. More...

#include <BrowseInfoWnd.h>

Inheritance diagram for GG::BrowseInfoWnd:

GG::Wnd GG::TextBoxBrowseInfoWnd List of all members.

Accessors

virtual bool WndHasBrowseInfo (const Wnd *wnd, int mode) const=0

Mutators

virtual void Render ()=0
void Update (int mode, const Wnd *target)
void SetCursorPosition (const Pt &cursor_pos)

Structors

 BrowseInfoWnd ()
 BrowseInfoWnd (int x, int y, int w, int h)

Detailed Description

The abstract base class for all browse-info display windows.

Each frame that a BrowseInfoWnd is displayed, its Update() method is called. The Wnd* parameter passed in this call is the window about which the BrowseInfoWnd is displaying info (the target Wnd); the BrowseInfoWnd can collect whatever information it requires from the target Wnd before it is rendered. Note that a BrowseInfoWnd should never be CLICKABLE.

Definition at line 49 of file BrowseInfoWnd.h.


Constructor & Destructor Documentation

GG::BrowseInfoWnd::BrowseInfoWnd (  )  [protected]

default ctor

GG::BrowseInfoWnd::BrowseInfoWnd ( int  x,
int  y,
int  w,
int  h 
) [protected]

basic ctor


Member Function Documentation

virtual bool GG::BrowseInfoWnd::WndHasBrowseInfo ( const Wnd wnd,
int  mode 
) const [pure virtual]

Returns true iff wnd's browse mode mode contains browse info that is usable by this BrowseInfoWnd.

This method is used by GUI to determine whether a Wnd w has suitable browse info available; if not, w's ancestors may instead be asked for browse info recursively.

Implemented in GG::TextBoxBrowseInfoWnd.

virtual void GG::BrowseInfoWnd::Render (  )  [pure virtual]

draws this Wnd.

Note that Wnds being dragged for a drag-and-drop operation are rendered twice -- once in-place as normal, once in the location of the drag operation, attached to the cursor. Such Wnds may wish to render themselves differently in those two cases. To determine which render is being performed, they can call GUI::GetGUI()->RenderingDragDropWnds().

Reimplemented from GG::Wnd.

Implemented in GG::TextBoxBrowseInfoWnd.

void GG::BrowseInfoWnd::Update ( int  mode,
const Wnd target 
)

Collects data from target that is needed by Render().

Note that the one datum that is always available for any Wnd is the text to display for mode, accessible through Wnd::BrowseInfoText() (though this may be the empty string). Other data that are provided by a Wnd subclass can be recovered by casting target to its actual subclass type.

void GG::BrowseInfoWnd::SetCursorPosition ( const Pt cursor_pos  ) 

Sets the current cursor position to the one given.


The documentation for this class was generated from the following file:
Generated on Wed Mar 26 14:35:42 2008 for GG by  doxygen 1.5.2