ManaPlus
|
#include <tabbedarea.h>
Public Member Functions | |
TabbedArea (const Widget2 *const widget) | |
~TabbedArea () | |
void | postInit () |
void | draw (Graphics *const graphics) |
void | safeDraw (Graphics *const graphics) |
int | getNumberOfTabs () const |
Tab * | getTab (const std::string &name) const |
Tab * | getTabByIndex (const int index) const |
Widget * | getWidgetByIndex (const int index) const |
Widget * | getWidget (const std::string &name) const |
Widget * | getCurrentWidget () const |
void | addTab (Tab *const tab, Widget *const widget) |
void | addTab (const std::string &caption, Widget *const widget) |
void | addTab (Image *const image, Widget *const widget) |
bool | isTabSelected (const size_t index) const |
bool | isTabSelected (const Tab *const tab) const |
bool | isTabPresent (const Tab *const tab) const |
void | removeTab (Tab *const tab) |
void | removeAll (const bool del) |
void | logic () |
int | getContainerHeight () const |
void | setSelectedTab (Tab *const tab) |
void | setSelectedTabDefault () |
void | setSelectedTabByIndex (const size_t index) |
int | getSelectedTabIndex () const |
Tab * | getSelectedTab () const |
void | setOpaque (const Opaque opaque) |
bool | isOpaque () const |
void | adjustSize () |
void | setSelectedTabByName (const std::string &name) |
void | widgetResized (const Event &event) |
void | adjustTabPositions () |
void | action (const ActionEvent &actionEvent) |
void | mousePressed (MouseEvent &event) |
void | enableScrollButtons (const bool enable) |
void | setRightMargin (const int n) |
int | getRightMargin () const |
void | setFollowDownScroll (const bool n) |
bool | getFollowDownScroll () const |
void | keyPressed (KeyEvent &event) |
void | setBlockSwitching (const bool b) |
void | setWidth (int width) |
void | setHeight (int height) |
void | setSize (int width, int height) |
void | setDimension (const Rect &dimension) |
void | death (const Event &event) |
void | setResizeHeight (bool b) |
void | adjustWidget (Widget *const widget) const |
void | selectNextTab () |
void | selectPrevTab () |
Widget * | getTabContainer () const |
Widget * | getWidgetContainer () const |
Public Member Functions inherited from ActionListener | |
virtual | ~ActionListener () |
Public Member Functions inherited from BasicContainer | |
BasicContainer (const Widget2 *const widget) | |
~BasicContainer () | |
void | showWidgetPart (Widget *const widget, const Rect &area) |
void | moveToTop (Widget *const widget) |
void | moveToBottom (Widget *const widget) |
Rect | getChildrenArea () |
void | focusNext () |
void | focusPrevious () |
void | setFocusHandler (FocusHandler *const focusHandler) |
void | setInternalFocusHandler (FocusHandler *const focusHandler) |
Widget * | getWidgetAt (int x, int y) |
Widget * | findFirstWidget (const std::set< Widget * > &list) |
void | add (Widget *const widget) |
virtual void | remove (Widget *const widget) |
virtual void | clear () |
Public Member Functions inherited from Widget | |
Widget (const Widget2 *const widget) | |
~Widget () | |
virtual void | drawFrame (Graphics *graphics) |
virtual void | safeDrawFrame (Graphics *graphics) |
void | setFrameSize (const unsigned int frameSize) |
unsigned int | getFrameSize () const |
Widget * | getParent () const |
void | setWidth (const int width) |
int | getWidth () const |
void | setHeight (const int height) |
int | getHeight () const |
void | setSize (const int width, const int height) |
void | setX (const int x) |
int | getX () const |
void | setY (const int y) |
int | getY () const |
void | setPosition (const int x, const int y) |
void | setDimension (const Rect &dimension) |
const Rect & | getDimension () const |
void | setFocusable (const bool focusable) |
bool | isFocusable () const |
virtual bool | isFocused () const |
void | setEnabled (const bool enabled) |
bool | isEnabled () const |
void | setVisible (Visible visible) |
bool | isVisible () const |
void | setBaseColor (const Color &color) |
const Color & | getBaseColor () const |
void | setForegroundColor (const Color &color) |
const Color & | getForegroundColor () const |
void | setBackgroundColor (const Color &color) |
const Color & | getBackgroundColor () const |
virtual void | requestFocus () |
virtual void | requestMoveToTop () |
virtual void | requestMoveToBottom () |
FocusHandler * | getFocusHandler () |
void | addActionListener (ActionListener *const actionListener) |
void | removeActionListener (ActionListener *const actionListener) |
void | addDeathListener (WidgetDeathListener *const deathListener) |
void | removeDeathListener (WidgetDeathListener *const deathListener) |
void | addMouseListener (MouseListener *const mouseListener) |
void | removeMouseListener (MouseListener *const mouseListener) |
void | addKeyListener (KeyListener *const keyListener) |
void | removeKeyListener (KeyListener *const keyListener) |
void | addFocusListener (FocusListener *const focusListener) |
void | removeFocusListener (FocusListener *const focusListener) |
void | addWidgetListener (WidgetListener *const widgetListener) |
void | removeWidgetListener (WidgetListener *const widgetListener) |
void | setActionEventId (const std::string &actionEventId) |
const std::string & | getActionEventId () const |
virtual void | getAbsolutePosition (int &x, int &y) const |
virtual void | setParent (Widget *parent) |
Font * | getFont () const |
void | setFont (Font *const font) |
virtual void | fontChanged () |
bool | isTabInEnabled () const |
void | setTabInEnabled (const bool enabled) |
bool | isTabOutEnabled () const |
void | setTabOutEnabled (const bool enabled) |
void | requestModalFocus () |
virtual void | requestModalMouseInputFocus () |
virtual void | releaseModalFocus () |
virtual void | releaseModalMouseInputFocus () |
virtual bool | isModalFocused () const |
virtual bool | isModalMouseInputFocused () const |
const std::list< MouseListener * > & | getMouseListeners () const A_CONST |
const std::list< KeyListener * > & | getKeyListeners () const A_CONST |
const std::list< FocusListener * > & | getFocusListeners () const A_CONST |
virtual FocusHandler * | getInternalFocusHandler () |
void | setInternalFocusHandler (FocusHandler *const internalFocusHandler) |
void | setId (const std::string &id) |
const std::string & | getId () const |
virtual void | showPart (const Rect &rectangle) |
bool | isAllowLogic () const |
void | setMouseConsume (const bool b) |
bool | isMouseConsume () const |
void | setRedraw (const bool b) |
virtual bool | isSelectable () const |
void | setSelectable (const bool selectable) |
void | windowResized () |
Public Member Functions inherited from Widget2 | |
virtual | ~Widget2 () |
const Color & | getThemeColor (const ThemeColorIdT type, const unsigned int alpha) const A_INLINE |
const Color & | getThemeCharColor (const signed char c, bool &valid) const A_INLINE |
virtual void | setWidget2 (const Widget2 *const widget) |
void | setPalette (int palette) |
void | checkPalette () |
void | setForegroundColor2 (const Color &color) |
Widget * | getWindow () const |
virtual void | setWindow (Widget *const window) |
Public Member Functions inherited from WidgetDeathListener | |
virtual | ~WidgetDeathListener () |
Public Member Functions inherited from KeyListener | |
virtual | ~KeyListener () |
virtual void | keyReleased (KeyEvent &event) |
Public Member Functions inherited from MouseListener | |
virtual | ~MouseListener () |
virtual void | mouseEntered (MouseEvent &event) |
virtual void | mouseExited (MouseEvent &event) |
virtual void | mouseReleased (MouseEvent &event) |
virtual void | mouseClicked (MouseEvent &event) |
virtual void | mouseWheelMovedUp (MouseEvent &event) |
virtual void | mouseWheelMovedDown (MouseEvent &event) |
virtual void | mouseMoved (MouseEvent &event) |
virtual void | mouseDragged (MouseEvent &event) |
Public Member Functions inherited from WidgetListener | |
virtual | ~WidgetListener () |
virtual void | widgetMoved (const Event &event) |
virtual void | widgetHidden (const Event &event) |
virtual void | widgetShown (const Event &event) |
Private Types | |
typedef std::vector< std::pair< Tab *, Widget * > > | TabContainer |
Private Member Functions | |
void | updateArrowEnableState () |
void | updateTabsWidth () |
void | updateVisibleTabsWidth () |
Private Attributes | |
Button * | mArrowButton [2] |
Tab * | mSelectedTab |
BasicContainer2 * | mTabContainer |
BasicContainer2 * | mWidgetContainer |
std::vector< Tab * > | mTabsToDelete |
TabContainer | mTabs |
int | mTabsWidth |
int | mVisibleTabsWidth |
unsigned int | mTabScrollIndex |
int | mRightMargin |
Opaque | mOpaque |
bool | mEnableScrollButtons |
bool | mFollowDownScroll |
bool | mBlockSwitching |
bool | mResizeHeight |
Additional Inherited Members | |
Static Public Member Functions inherited from Widget | |
static void | setGlobalFont (Font *const font) |
static Font * | getGloablFont () |
static void | cleanGlobalFont () |
static bool | widgetExists (const Widget *const widget) |
static void | distributeWindowResizeEvent () |
static Widget * | callPostInit (Widget *const widget) |
Data Fields inherited from Widget | |
Visible | mVisible |
Protected Types inherited from BasicContainer | |
typedef std::vector< Widget * > | WidgetList |
typedef WidgetList::iterator | WidgetListIterator |
typedef WidgetList::const_iterator | WidgetListConstIterator |
typedef WidgetList::reverse_iterator | WidgetListReverseIterator |
typedef WidgetList::const_reverse_iterator | WidgetListCReverseIterator |
Protected Types inherited from Widget | |
typedef std::list< MouseListener * > | MouseListenerList |
typedef MouseListenerList::iterator | MouseListenerIterator |
typedef std::list< KeyListener * > | KeyListenerList |
typedef KeyListenerList::iterator | KeyListenerIterator |
typedef std::list< ActionListener * > | ActionListenerList |
typedef ActionListenerList::iterator | ActionListenerIterator |
typedef std::list< WidgetDeathListener * > | WidgetDeathListenerList |
typedef WidgetDeathListenerList::iterator | WidgetDeathListenerIterator |
typedef std::list< FocusListener * > | FocusListenerList |
typedef FocusListenerList::iterator | FocusListenerIterator |
typedef std::list< WidgetListener * > | WidgetListenerList |
typedef WidgetListenerList::iterator | WidgetListenerIterator |
Protected Member Functions inherited from ActionListener | |
ActionListener () | |
Protected Member Functions inherited from BasicContainer | |
virtual void | drawChildren (Graphics *const graphics) |
virtual void | safeDrawChildren (Graphics *const graphics) |
virtual void | logicChildren () |
Protected Member Functions inherited from Widget | |
void | distributeActionEvent () |
void | distributeResizedEvent () |
void | distributeMovedEvent () |
void | distributeHiddenEvent () |
void | distributeShownEvent () |
Protected Member Functions inherited from Widget2 | |
Widget2 (const Widget2 *const widget) | |
Protected Member Functions inherited from WidgetDeathListener | |
WidgetDeathListener () | |
Protected Member Functions inherited from KeyListener | |
KeyListener () | |
Protected Member Functions inherited from MouseListener | |
MouseListener () | |
Protected Member Functions inherited from WidgetListener | |
WidgetListener () | |
Protected Attributes inherited from BasicContainer | |
WidgetList | mWidgets |
WidgetList | mLogicWidgets |
Protected Attributes inherited from Widget | |
MouseListenerList | mMouseListeners |
KeyListenerList | mKeyListeners |
ActionListenerList | mActionListeners |
WidgetDeathListenerList | mDeathListeners |
FocusListenerList | mFocusListeners |
WidgetListenerList | mWidgetListeners |
Color | mForegroundColor |
Color | mBackgroundColor |
Color | mBaseColor |
Rect | mDimension |
std::string | mActionEventId |
std::string | mId |
FocusHandler * | mFocusHandler |
FocusHandler * | mInternalFocusHandler |
Widget * | mParent |
Font * | mCurrentFont |
unsigned int | mFrameSize |
bool | mFocusable |
bool | mTabIn |
bool | mTabOut |
bool | mEnabled |
bool | mAllowLogic |
bool | mMouseConsume |
bool | mRedraw |
bool | mSelectable |
Protected Attributes inherited from Widget2 | |
int | mPaletteOffset |
Widget * | mWindow |
Color | mForegroundColor2 |
Static Protected Attributes inherited from Widget | |
static Font * | mGlobalFont = 0 |
A tabbed area, the same as the guichan tabbed area in 0.8, but extended
Definition at line 85 of file tabbedarea.h.
|
private |
Definition at line 248 of file tabbedarea.h.
|
explicit |
Constructor.
Definition at line 80 of file tabbedarea.cpp.
References Widget::addKeyListener(), Widget::addMouseListener(), and Widget::setFocusable().
TabbedArea::~TabbedArea | ( | ) |
Definition at line 131 of file tabbedarea.cpp.
References delete2, gui, mArrowButton, mTabContainer, mTabsToDelete, mWidgetContainer, BasicContainer::remove(), and Gui::removeDragged().
|
virtual |
Called when an action is recieved from a widget. It is used to be able to recieve a notification that an action has occured.
actionEvent | The event of the action. |
Implements ActionListener.
Definition at line 649 of file tabbedarea.cpp.
References adjustTabPositions(), CAST_SIZE, ActionEvent::getId(), Event::getSource(), mTabs, mTabScrollIndex, setSelectedTab(), and updateArrowEnableState().
void TabbedArea::addTab | ( | const std::string & | caption, |
Widget *const | widget | ||
) |
Definition at line 274 of file tabbedarea.cpp.
References addTab(), mTabsToDelete, and Tab::setCaption().
Definition at line 283 of file tabbedarea.cpp.
References addTab(), mTabsToDelete, and Tab::setImage().
Add a tab. Overridden since it needs to size the widget.
tab | The tab widget for the tab. |
widget | The widget to view when the tab is selected. |
Definition at line 238 of file tabbedarea.cpp.
References BasicContainer2::add(), Widget::addActionListener(), adjustSize(), adjustTabPositions(), Widget::getHeight(), Widget::getWidth(), Widget::mFrameSize, mSelectedTab, mTabContainer, mTabs, Widget::mVisible, setSelectedTab(), Widget::setSize(), Tab::setTabbedArea(), updateArrowEnableState(), updateTabsWidth(), Visible_true, and widgetResized().
Referenced by SkillDialog::addDefaultTab(), ChatWindow::addTab(), addTab(), StatusWindow::addTab(), ShortcutWindow::addTab(), SocialWindow::addTab(), StatusWindow::addTabBasic(), ClanWindow::ClanWindow(), DebugWindow::DebugWindow(), SetupWindow::externalUpdate(), SkillDialog::loadXmlFile(), EmoteWindow::postInit(), SetupWindow::postInit(), and SocialWindow::postInit().
void TabbedArea::adjustSize | ( | ) |
Definition at line 569 of file tabbedarea.cpp.
References getCurrentWidget(), Widget::getFrameSize(), Widget::getHeight(), Widget::getWidth(), Rect::height, Widget::mDimension, mResizeHeight, mRightMargin, mTabContainer, mTabs, mWidgetContainer, Widget::setPosition(), Widget::setSize(), and Rect::width.
Referenced by addTab(), StatusWindow::addTabs(), ChatWindow::adjustTabSize(), removeTab(), setDimension(), setHeight(), setSize(), setWidth(), widgetResized(), SkillDialog::widgetResized(), and SocialWindow::widgetResized().
void TabbedArea::adjustTabPositions | ( | ) |
Definition at line 606 of file tabbedarea.cpp.
References Widget::getHeight(), Widget::getWidth(), mArrowButton, mEnableScrollButtons, mTabs, mTabScrollIndex, Widget::mVisible, Widget::setPosition(), Visible_false, Visible_true, and x.
Referenced by action(), SkillDialog::addDefaultTab(), SkillDialog::addSkill(), addTab(), Tab::adjustSize(), SkillDialog::updateSkill(), and widgetResized().
void TabbedArea::adjustWidget | ( | Widget *const | widget | ) | const |
Definition at line 265 of file tabbedarea.cpp.
References Widget::getHeight(), Widget::getWidth(), Widget::mFrameSize, mTabContainer, and Widget::setSize().
Referenced by EmoteWindow::widgetResized().
|
virtual |
Called when a widget dies. It is used to be able to recieve a notification when a death of a widget occurs.
event | The event of the death. |
Reimplemented from BasicContainer.
Definition at line 809 of file tabbedarea.cpp.
References BasicContainer::death(), and removeTab().
|
virtual |
Draw the tabbed area.
Implements Widget.
Definition at line 188 of file tabbedarea.cpp.
References BLOCK_END, BLOCK_START, BasicContainer::drawChildren(), and mTabs.
void TabbedArea::enableScrollButtons | ( | const bool | enable | ) |
Definition at line 150 of file tabbedarea.cpp.
References BasicContainer::add(), mArrowButton, mEnableScrollButtons, and BasicContainer::remove().
Referenced by ChatWindow::ChatWindow(), and SetupWindow::postInit().
|
inline |
Definition at line 164 of file tabbedarea.h.
References Widget::getHeight(), and mWidgetContainer.
Referenced by ChatWindow::adjustTabSize().
Widget * TabbedArea::getCurrentWidget | ( | ) | const |
Returns the widget for the current tab
Definition at line 229 of file tabbedarea.cpp.
References Tab::getCaption(), getSelectedTab(), and getWidget().
Referenced by adjustSize(), ShortcutWindow::widgetHidden(), and widgetResized().
|
inline |
int TabbedArea::getNumberOfTabs | ( | ) | const |
Return how many tabs have been created.
Definition at line 169 of file tabbedarea.cpp.
References CAST_S32, and mTabs.
Referenced by ChatWindow::nextTab(), ChatWindow::prevTab(), removeAll(), and ChatWindow::selectTabByType().
|
inline |
|
inline |
Definition at line 175 of file tabbedarea.h.
References mSelectedTab.
Referenced by SkillDialog::action(), ChatWindow::autoComplete(), ChatTab::chatLog(), getCurrentWidget(), ChatWindow::getFocused(), ChatWindow::mousePressed(), SocialWindow::updateCounter(), SocialWindow::updateMenu(), and SkillDialog::updateTabSelection().
int TabbedArea::getSelectedTabIndex | ( | ) | const |
Definition at line 449 of file tabbedarea.cpp.
References CAST_U32, mSelectedTab, and mTabs.
Referenced by ChatWindow::closeTab(), ShortcutWindow::getTabIndex(), keyPressed(), ChatWindow::nextTab(), ChatWindow::prevTab(), removeAll(), removeTab(), selectNextTab(), selectPrevTab(), ClanWindow::slowLogic(), and DebugWindow::slowLogic().
Tab * TabbedArea::getTab | ( | const std::string & | name | ) | const |
Return tab with specified name as caption.
Definition at line 174 of file tabbedarea.cpp.
References mTabs.
Referenced by SetupWindow::unloadTab().
Tab * TabbedArea::getTabByIndex | ( | const int | index | ) | const |
Definition at line 716 of file tabbedarea.cpp.
References CAST_S32, and mTabs.
Referenced by ChatWindow::closeTab(), ChatWindow::joinRoom(), ChatWindow::selectTabByType(), and EmoteWindow::~EmoteWindow().
|
inline |
Definition at line 241 of file tabbedarea.h.
References mTabContainer.
Referenced by ClanWindow::ClanWindow(), DebugWindow::DebugWindow(), SetupWindow::postInit(), SocialWindow::postInit(), SkillDialog::SkillDialog(), and StatusWindow::StatusWindow().
Widget * TabbedArea::getWidget | ( | const std::string & | name | ) | const |
Returns the widget with the tab that has specified caption
Definition at line 214 of file tabbedarea.cpp.
References mTabs.
Referenced by getCurrentWidget().
Widget * TabbedArea::getWidgetByIndex | ( | const int | index | ) | const |
|
inline |
Definition at line 244 of file tabbedarea.h.
References mWidgetContainer.
Referenced by ClanWindow::ClanWindow(), DebugWindow::DebugWindow(), SetupWindow::postInit(), SocialWindow::postInit(), SkillDialog::SkillDialog(), and StatusWindow::StatusWindow().
|
inline |
bool TabbedArea::isTabPresent | ( | const Tab *const | tab | ) | const |
Definition at line 300 of file tabbedarea.cpp.
References FOR_EACH, and mTabs.
Referenced by ChatWindow::isTabPresent().
bool TabbedArea::isTabSelected | ( | const size_t | index | ) | const |
Definition at line 292 of file tabbedarea.cpp.
References mSelectedTab, and mTabs.
Referenced by Tab::draw(), and Tab::safeDraw().
bool TabbedArea::isTabSelected | ( | const Tab *const | tab | ) | const |
Definition at line 310 of file tabbedarea.cpp.
References mSelectedTab.
|
virtual |
Called if a key is pressed when the widget has keyboard focus. If a key is held down the widget will generate multiple key presses.
event | Discribes the event. |
Reimplemented from KeyListener.
Definition at line 778 of file tabbedarea.cpp.
References CAST_S32, getSelectedTabIndex(), InputAction::GUI_LEFT, InputAction::GUI_RIGHT, InputGuiEvent::isConsumed(), Widget::isFocused(), mBlockSwitching, mTabs, and setSelectedTab().
|
virtual |
Overload the logic function since it's broken in guichan 0.8.
Reimplemented from BasicContainer.
Definition at line 380 of file tabbedarea.cpp.
References BLOCK_END, BLOCK_START, and BasicContainer::logicChildren().
|
virtual |
Called when a mouse button has been pressed on the widget area.
NOTE: A mouse press is NOT equal to a mouse click. Use mouseClickMessage to check for mouse clicks.
event | Describes the event. |
Reimplemented from MouseListener.
Definition at line 387 of file tabbedarea.cpp.
References MouseEvent::getButton(), BasicContainer::getWidgetAt(), MouseEvent::getX(), MouseEvent::getY(), InputGuiEvent::isConsumed(), MouseButton::LEFT, mTabContainer, Widget::requestFocus(), and setSelectedTab().
|
virtual |
Reimplemented from Widget.
Definition at line 107 of file tabbedarea.cpp.
References BasicContainer::add(), Widget::addWidgetListener(), BUTTON_SKIN, mArrowButton, mTabContainer, mWidgetContainer, Opaque_false, BasicContainer2::setOpaque(), and widgetResized().
void TabbedArea::removeAll | ( | const bool | del | ) |
Definition at line 730 of file tabbedarea.cpp.
References CAST_U32, getNumberOfTabs(), getSelectedTabIndex(), mTabs, removeTab(), and setSelectedTabByIndex().
Referenced by SkillDialog::clearSkills(), EmoteWindow::~EmoteWindow(), and ShortcutWindow::~ShortcutWindow().
void TabbedArea::removeTab | ( | Tab *const | tab | ) |
Overload the remove tab function as it's broken in guichan 0.8.
Definition at line 323 of file tabbedarea.cpp.
References adjustSize(), CAST_S32, BasicContainer::clear(), getSelectedTabIndex(), mSelectedTab, mTabContainer, mTabs, mTabsToDelete, mWidgetContainer, BasicContainer::remove(), setSelectedTabByIndex(), updateTabsWidth(), and widgetResized().
Referenced by death(), removeAll(), ChatWindow::removeTab(), SocialWindow::removeTab(), SetupWindow::unloadTab(), and EmoteWindow::~EmoteWindow().
|
virtual |
Implements Widget.
Definition at line 201 of file tabbedarea.cpp.
References BLOCK_END, BLOCK_START, mTabs, and BasicContainer::safeDrawChildren().
void TabbedArea::selectNextTab | ( | ) |
Definition at line 819 of file tabbedarea.cpp.
References CAST_S32, getSelectedTabIndex(), mTabs, and setSelectedTab().
Referenced by ShortcutWindow::nextTab(), and SocialWindow::nextTab().
void TabbedArea::selectPrevTab | ( | ) |
Definition at line 828 of file tabbedarea.cpp.
References CAST_S32, getSelectedTabIndex(), mTabs, and setSelectedTab().
Referenced by ShortcutWindow::prevTab(), and SocialWindow::prevTab().
|
inline |
void TabbedArea::setDimension | ( | const Rect & | dimension | ) |
Definition at line 771 of file tabbedarea.cpp.
References adjustSize(), and Widget::setDimension().
Referenced by ClanWindow::ClanWindow(), DebugWindow::DebugWindow(), SetupWindow::postInit(), ClanWindow::widgetResized(), DebugWindow::widgetResized(), and SetupWindow::widgetResized().
|
inline |
Definition at line 211 of file tabbedarea.h.
References mFollowDownScroll.
Referenced by ChatWindow::ChatWindow().
void TabbedArea::setHeight | ( | int | height | ) |
Definition at line 757 of file tabbedarea.cpp.
References adjustSize(), and Widget::setHeight().
Referenced by ChatWindow::adjustTabSize(), and EmoteWindow::postInit().
|
inline |
|
inline |
Definition at line 232 of file tabbedarea.h.
References mResizeHeight.
Referenced by ChatWindow::ChatWindow().
|
inline |
Definition at line 205 of file tabbedarea.h.
References mRightMargin.
Referenced by ChatWindow::updateTabsMargin().
void TabbedArea::setSelectedTab | ( | Tab *const | tab | ) |
Definition at line 407 of file tabbedarea.cpp.
References BasicContainer2::add(), mSelectedTab, mTabs, mWidgetContainer, BasicContainer::remove(), Tab::setCurrent(), and widgetResized().
Referenced by action(), ChatWindow::addChannelTab(), ChatWindow::addSpecialChannelTab(), addTab(), ChatWindow::addWhisperTab(), keyPressed(), mousePressed(), selectNextTab(), selectPrevTab(), ChatWindow::selectTabByType(), setSelectedTabByIndex(), setSelectedTabByName(), and setSelectedTabDefault().
void TabbedArea::setSelectedTabByIndex | ( | const size_t | index | ) |
Definition at line 315 of file tabbedarea.cpp.
References mTabs, and setSelectedTab().
Referenced by ChatWindow::defaultTab(), ChatWindow::nextTab(), ChatWindow::prevTab(), removeAll(), and removeTab().
void TabbedArea::setSelectedTabByName | ( | const std::string & | name | ) |
Definition at line 462 of file tabbedarea.cpp.
References FOR_EACH, mTabs, and setSelectedTab().
Referenced by SetupWindow::activateTab().
void TabbedArea::setSelectedTabDefault | ( | ) |
Definition at line 432 of file tabbedarea.cpp.
References mSelectedTab, mTabs, Widget::mVisible, setSelectedTab(), Visible_false, and Visible_true.
Referenced by SkillDialog::addDefaultTab(), SkillDialog::addSkill(), and SkillDialog::updateSkill().
void TabbedArea::setSize | ( | int | width, |
int | height | ||
) |
Definition at line 764 of file tabbedarea.cpp.
References adjustSize(), and Widget::setSize().
Referenced by EmoteWindow::widgetResized().
void TabbedArea::setWidth | ( | int | width | ) |
Definition at line 750 of file tabbedarea.cpp.
References adjustSize(), and Widget::setWidth().
Referenced by ChatWindow::adjustTabSize(), and EmoteWindow::postInit().
|
private |
Check whether the arrow should be clickable
Definition at line 676 of file tabbedarea.cpp.
References Widget::getWidth(), mArrowButton, Widget::mDimension, mRightMargin, mTabScrollIndex, mTabsWidth, mVisibleTabsWidth, Widget::setEnabled(), Widget::setVisible(), updateTabsWidth(), Visible_false, Visible_true, and Rect::width.
Referenced by action(), addTab(), and widgetResized().
|
private |
Update the overall width of all tab. Used to know whether the arrows have to be drawn or not.
Definition at line 545 of file tabbedarea.cpp.
References FOR_EACH, Widget::getWidth(), mTabs, mTabsWidth, Widget::mVisible, updateVisibleTabsWidth(), and Visible_true.
Referenced by addTab(), removeTab(), and updateArrowEnableState().
|
private |
Update the overall width of visible tab. Used to know whether the arrows have to be enable or not.
Definition at line 557 of file tabbedarea.cpp.
References CAST_S32, Widget::getWidth(), mTabs, mTabScrollIndex, Widget::mVisible, mVisibleTabsWidth, and Visible_true.
Referenced by updateTabsWidth().
|
virtual |
Invoked when a widget changes its size.
event | Describes the event. |
Reimplemented from WidgetListener.
Definition at line 474 of file tabbedarea.cpp.
References adjustSize(), adjustTabPositions(), getCurrentWidget(), Widget::getDimension(), Widget::getFrameSize(), Widget::getHeight(), ScrollArea::getVerticalMaxScroll(), ScrollArea::getVerticalScrollAmount(), Widget::getWidth(), Widget::getY(), Rect::height, mArrowButton, Widget::mDimension, mFollowDownScroll, Widget::mFrameSize, mRightMargin, mTabs, mTabScrollIndex, Widget::mVisible, mVisibleTabsWidth, mWidgetContainer, Widget::setPosition(), Widget::setSize(), ScrollArea::setVerticalScrollAmount(), updateArrowEnableState(), Visible_true, and Rect::width.
Referenced by addTab(), postInit(), removeTab(), and setSelectedTab().
|
private |
The tab arrows
Definition at line 251 of file tabbedarea.h.
Referenced by adjustTabPositions(), enableScrollButtons(), postInit(), updateArrowEnableState(), widgetResized(), and ~TabbedArea().
|
private |
Definition at line 296 of file tabbedarea.h.
Referenced by keyPressed(), and setBlockSwitching().
|
private |
Definition at line 294 of file tabbedarea.h.
Referenced by adjustTabPositions(), and enableScrollButtons().
|
private |
Definition at line 295 of file tabbedarea.h.
Referenced by getFollowDownScroll(), setFollowDownScroll(), and widgetResized().
|
private |
Definition at line 293 of file tabbedarea.h.
Referenced by isOpaque(), and setOpaque().
|
private |
Definition at line 297 of file tabbedarea.h.
Referenced by adjustSize(), and setResizeHeight().
|
private |
Definition at line 291 of file tabbedarea.h.
Referenced by adjustSize(), getRightMargin(), setRightMargin(), updateArrowEnableState(), and widgetResized().
|
private |
Definition at line 262 of file tabbedarea.h.
Referenced by addTab(), getSelectedTab(), getSelectedTabIndex(), isTabSelected(), removeTab(), setSelectedTab(), and setSelectedTabDefault().
|
private |
Definition at line 263 of file tabbedarea.h.
Referenced by addTab(), adjustSize(), adjustWidget(), getTabContainer(), mousePressed(), postInit(), removeTab(), and ~TabbedArea().
|
private |
Definition at line 266 of file tabbedarea.h.
Referenced by action(), addTab(), adjustSize(), adjustTabPositions(), draw(), getNumberOfTabs(), getSelectedTabIndex(), getTab(), getTabByIndex(), getWidget(), getWidgetByIndex(), isTabPresent(), isTabSelected(), keyPressed(), removeAll(), removeTab(), safeDraw(), selectNextTab(), selectPrevTab(), setSelectedTab(), setSelectedTabByIndex(), setSelectedTabByName(), setSelectedTabDefault(), updateTabsWidth(), updateVisibleTabsWidth(), and widgetResized().
|
private |
The tab scroll index. When scrolling with the arrows, the tabs must be displayed according to the current index. So the first tab displayed may not be the first in the list.
Definition at line 290 of file tabbedarea.h.
Referenced by action(), adjustTabPositions(), updateArrowEnableState(), updateVisibleTabsWidth(), and widgetResized().
|
private |
Definition at line 265 of file tabbedarea.h.
Referenced by addTab(), removeTab(), and ~TabbedArea().
|
private |
The overall width of all tab.
Definition at line 271 of file tabbedarea.h.
Referenced by updateArrowEnableState(), and updateTabsWidth().
|
private |
The overall width of visible tab.
Definition at line 282 of file tabbedarea.h.
Referenced by updateArrowEnableState(), updateVisibleTabsWidth(), and widgetResized().
|
private |
Definition at line 264 of file tabbedarea.h.
Referenced by adjustSize(), getContainerHeight(), getWidgetContainer(), postInit(), removeTab(), setSelectedTab(), widgetResized(), and ~TabbedArea().