#include <BrowseInfoWnd.h>
Inheritance diagram for GG::BrowseInfoWnd:
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) |
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.
GG::BrowseInfoWnd::BrowseInfoWnd | ( | ) | [protected] |
default ctor
GG::BrowseInfoWnd::BrowseInfoWnd | ( | int | x, | |
int | y, | |||
int | w, | |||
int | h | |||
) | [protected] |
basic ctor
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.