GG
Static Public Attributes

GG::OverlayWnd Class Reference

Contains several Wnds, and only displays the Wnd currently specified. More...

#include <TabWnd.h>

Inheritance diagram for GG::OverlayWnd:
GG::Wnd

List of all members.

Static Public Attributes

static const std::size_t NO_WND

Signal Types

typedef boost::signal< void(std::size_t)> WndChangedSignalType

Structors

 OverlayWnd (X x, Y y, X w, Y h, Flags< WndFlag > flags=Flags< WndFlag >())
 ~OverlayWnd ()
 OverlayWnd ()

Accessors

virtual Pt MinUsableSize () const
bool Empty () const
std::size_t NumWnds () const
WndCurrentWnd () const
std::size_t CurrentWndIndex () const
const std::vector< Wnd * > & Wnds () const

Mutators

std::size_t AddWnd (Wnd *wnd)
void InsertWnd (std::size_t index, Wnd *wnd)
WndRemoveWnd (std::size_t index)
WndRemoveWnd (Wnd *wnd)
void SetCurrentWnd (std::size_t index)

Detailed Description

Contains several Wnds, and only displays the Wnd currently specified.

Definition at line 42 of file TabWnd.h.


Member Typedef Documentation

typedef boost::signal<void (std::size_t)> GG::OverlayWnd::WndChangedSignalType

Emitted when the currently-selected Wnd has changed; the new selected Wnd's index in the group is provided (this may be NO_WND if no Wnd is currently selected).

Definition at line 49 of file TabWnd.h.


Constructor & Destructor Documentation

GG::OverlayWnd::OverlayWnd ( X  x,
Y  y,
X  w,
Y  h,
Flags< WndFlag >  flags = Flags< WndFlag >() 
)

Basic ctor.


Member Function Documentation

virtual Pt GG::OverlayWnd::MinUsableSize ( ) const [virtual]

Returns the size of the minimum bounding box that can enclose the Wnd and still show all of its elements, plus enough room for interaction with those elements (if applicable). For example, a TextControl's MinUsableSize() is just the area of its text, and a Scroll's MinUsableSize() is the combined sizes of its up-button, down-button, and tab (plus a bit of room in which to drag the tab).

Reimplemented from GG::Wnd.

bool GG::OverlayWnd::Empty ( ) const

Returns true iff NumWnds() == 0.

std::size_t GG::OverlayWnd::NumWnds ( ) const

Returns the number of Wnds currently in this OverlayWnd.

Wnd* GG::OverlayWnd::CurrentWnd ( ) const

Returns the Wnd currently visible in the OverlayWnd, or 0 if there is none.

std::size_t GG::OverlayWnd::CurrentWndIndex ( ) const

Returns the index into the sequence of Wnds in this OverlayWnd of the Wnd currently shown. NO_WND is returned if there is no Wnd currently visible.

const std::vector<Wnd*>& GG::OverlayWnd::Wnds ( ) const

Returns the set of Wnds currently controlled by this OverlayWnd.

std::size_t GG::OverlayWnd::AddWnd ( Wnd wnd)

Adds wnd to the sequence of Wnds in this OverlayWnd, with name name. name can be used later to remove the Wnd (name is not checked for uniqueness). Returns the index at which wnd is placed.

void GG::OverlayWnd::InsertWnd ( std::size_t  index,
Wnd wnd 
)

Adds wnd to the sequence of Wnds in this OverlayWnd, inserting it at the index location within the sequence. name can be used later to remove the Wnd (name is not checked for uniqueness). Not range checked.

Wnd* GG::OverlayWnd::RemoveWnd ( std::size_t  index)

Removes and returns the Wnd at index index from the sequence of Wnds in this OverlayWnd, or 0 if there is no Wnd at that index.

Wnd* GG::OverlayWnd::RemoveWnd ( Wnd wnd)

Removes and returns wnd from the sequence of Wnds in this OverlayWnd, or 0 if there is no such Wnd in this OverlayWnd.

void GG::OverlayWnd::SetCurrentWnd ( std::size_t  index)

Sets the currently visible Wnd in the sequence to the Wnd in the index position within the sequence. Not range checked.


Member Data Documentation

const std::size_t GG::OverlayWnd::NO_WND [static]

The invalid Wnd position index that there is no currently-selected Wnd.

Definition at line 106 of file TabWnd.h.


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