GG
|
#include <TabWnd.h>
Public Attributes | |
TabChangedSignalType | TabChangedSignal |
Static Public Attributes | |
static const std::size_t | NO_TAB |
static const X | BUTTON_WIDTH |
Signal Types | |
typedef boost::signal< void(std::size_t)> | TabChangedSignalType |
Structors | |
TabBar (X x, Y y, X w, const boost::shared_ptr< Font > &font, Clr color, Clr text_color=CLR_BLACK, TabBarStyle style=TAB_BAR_ATTACHED, Flags< WndFlag > flags=INTERACTIVE) | |
TabBar () |
Accessors | |
virtual Pt | MinUsableSize () const |
bool | Empty () const |
std::size_t | NumTabs () const |
std::size_t | CurrentTabIndex () const |
Clr | TextColor () const |
const Button * | LeftButton () const |
const Button * | RightButton () const |
Mutators | |
virtual void | SizeMove (const Pt &ul, const Pt &lr) |
virtual void | Render () |
std::size_t | AddTab (const std::string &name) |
void | InsertTab (std::size_t index, const std::string &name) |
void | RemoveTab (const std::string &name) |
void | SetCurrentTab (std::size_t index) |
virtual bool | EventFilter (Wnd *w, const WndEvent &event) |
void | RaiseCurrentTabButton () |
Additional Inherited Members | |
![]() | |
virtual void | DropsAcceptable (DropsAcceptableIter first, DropsAcceptableIter last, const Pt &pt) const |
Clr | Color () const |
bool | Disabled () const |
virtual void | AcceptDrops (const std::vector< Wnd * > &wnds, const Pt &pt) |
virtual void | SetColor (Clr c) |
virtual void | Disable (bool b=true) |
![]() | |
virtual void | MouseWheel (const Pt &pt, int move, Flags< ModKey > mod_keys) |
virtual void | KeyPress (Key key, boost::uint32_t key_code_point, Flags< ModKey > mod_keys) |
virtual void | KeyRelease (Key key, boost::uint32_t key_code_point, Flags< ModKey > mod_keys) |
Control () | |
Control (X x, Y y, X w, Y h, Flags< WndFlag > flags=INTERACTIVE) | |
![]() | |
Wnd () | |
Wnd (X x, Y y, X w, Y h, Flags< WndFlag > flags=INTERACTIVE|DRAGABLE) | |
DragDropRenderingState | GetDragDropRenderingState () const |
virtual void | LButtonDown (const Pt &pt, Flags< ModKey > mod_keys) |
virtual void | LDrag (const Pt &pt, const Pt &move, Flags< ModKey > mod_keys) |
virtual void | LButtonUp (const Pt &pt, Flags< ModKey > mod_keys) |
virtual void | LClick (const Pt &pt, Flags< ModKey > mod_keys) |
virtual void | LDoubleClick (const Pt &pt, Flags< ModKey > mod_keys) |
virtual void | MButtonDown (const Pt &pt, Flags< ModKey > mod_keys) |
virtual void | MDrag (const Pt &pt, const Pt &move, Flags< ModKey > mod_keys) |
virtual void | MButtonUp (const Pt &pt, Flags< ModKey > mod_keys) |
virtual void | MClick (const Pt &pt, Flags< ModKey > mod_keys) |
virtual void | MDoubleClick (const Pt &pt, Flags< ModKey > mod_keys) |
virtual void | RButtonDown (const Pt &pt, Flags< ModKey > mod_keys) |
virtual void | RDrag (const Pt &pt, const Pt &move, Flags< ModKey > mod_keys) |
virtual void | RButtonUp (const Pt &pt, Flags< ModKey > mod_keys) |
virtual void | RClick (const Pt &pt, Flags< ModKey > mod_keys) |
virtual void | RDoubleClick (const Pt &pt, Flags< ModKey > mod_keys) |
virtual void | MouseEnter (const Pt &pt, Flags< ModKey > mod_keys) |
virtual void | MouseHere (const Pt &pt, Flags< ModKey > mod_keys) |
virtual void | MouseLeave () |
virtual void | DragDropEnter (const Pt &pt, const std::map< Wnd *, Pt > &drag_drop_wnds, Flags< ModKey > mod_keys) |
virtual void | DragDropHere (const Pt &pt, const std::map< Wnd *, Pt > &drag_drop_wnds, Flags< ModKey > mod_keys) |
virtual void | DragDropLeave () |
virtual void | GainingFocus () |
virtual void | LosingFocus () |
virtual void | TimerFiring (unsigned int ticks, Timer *timer) |
void | HandleEvent (const WndEvent &event) |
void | ForwardEventToParent () |
void | BeginClipping () |
void | EndClipping () |
void | BeginNonclientClipping () |
void | EndNonclientClipping () |
![]() | |
Clr | m_color |
bool | m_disabled |
![]() | |
bool | m_done |
Contains a sequence of buttons (hereafter "tabs") that act together in a RadioButtonGroup.
This class is intended to be used to select the current Wnd in a TabWnd.
typedef boost::signal<void (std::size_t)> GG::TabBar::TabChangedSignalType |
GG::TabBar::TabBar | ( | X | x, |
Y | y, | ||
X | w, | ||
const boost::shared_ptr< Font > & | font, | ||
Clr | color, | ||
Clr | text_color = CLR_BLACK , |
||
TabBarStyle | style = TAB_BAR_ATTACHED , |
||
Flags< WndFlag > | flags = INTERACTIVE |
||
) |
Basic ctor.
|
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::TabBar::Empty | ( | ) | const |
Returns true iff NumWnds() == 0.
std::size_t GG::TabBar::NumTabs | ( | ) | const |
Returns the number of tabs currently in this TabWnd.
std::size_t GG::TabBar::CurrentTabIndex | ( | ) | const |
Returns the index into the sequence of tabs in this TabBar of the tab currently selected. NO_TAB is returned if there is no tab currently selected.
Resizes and/or moves window to new upper-left and lower right boundaries.
Reimplemented from GG::Wnd.
|
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().
Implements GG::Control.
std::size_t GG::TabBar::AddTab | ( | const std::string & | name | ) |
Adds a tab called name to the sequence of tabs in this TabBar. name can be used later to remove the tab (name is not checked for uniqueness). Returns the index at which the tab is placed.
void GG::TabBar::InsertTab | ( | std::size_t | index, |
const std::string & | name | ||
) |
Adds tab to the sequence of tabs in this TabBar, inserting it at the index location within the sequence. name can be used later to remove the tab (name is not checked for uniqueness). Not range checked.
void GG::TabBar::RemoveTab | ( | const std::string & | name | ) |
Removes the first tab previously added witht he name name from the sequence of tab in this TabBar.
void GG::TabBar::SetCurrentTab | ( | std::size_t | index | ) |
Sets the current tab in the sequence to the tab in the index position within the sequence. Not range checked.
|
protected |
Brings the currently-selected tab button to the top within the tab button group.
|
static |
|
static |