GG
|
Contains several Wnds, and only displays the Wnd currently specified. More...
#include <TabWnd.h>
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 |
Wnd * | CurrentWnd () 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) |
Wnd * | RemoveWnd (std::size_t index) |
Wnd * | RemoveWnd (Wnd *wnd) |
void | SetCurrentWnd (std::size_t index) |
Contains several Wnds, and only displays the Wnd currently specified.
typedef boost::signal<void (std::size_t)> GG::OverlayWnd::WndChangedSignalType |
Basic ctor.
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.
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 | ) |
const std::size_t GG::OverlayWnd::NO_WND [static] |