|
FifeGUI 0.2.0
A C++ GUI library designed for games.
|
#include <tabbedarea.hpp>
Public Member Functions | |
| void | action (ActionEvent const &actionEvent) override |
| virtual void | addTab (Tab *tab, Widget *widget) |
| void | adjustSize () override |
| virtual void | death (Event const &event) |
| void | draw (Graphics *graphics) override |
| void | expandContent () |
| void | expandContent (bool recursion) override |
| Widget * | getBackgroundWidget () |
| Rectangle | getChildrenArea () override |
| virtual unsigned int | getHorizontalSpacing () const |
| Container::LayoutPolicy | getLayout () const |
| int | getNumberOfTabs () const |
| Tab * | getSelectedTab () const |
| virtual int | getSelectedTabIndex () const |
| virtual unsigned int | getVerticalSpacing () const |
| bool | isOpaque () const |
| virtual bool | isTabSelected (Tab *tab) const |
| virtual bool | isTabSelected (unsigned int index) const |
| virtual bool | isUniformSize () const |
| void | keyPressed (KeyEvent &keyEvent) override |
| void | mousePressed (MouseEvent &mouseEvent) override |
| TabbedArea & | operator= (TabbedArea &&)=delete |
| TabbedArea & | operator= (TabbedArea const &)=delete |
| virtual void | removeTab (Tab *tab) |
| virtual void | removeTabWithIndex (unsigned int index) |
| void | resizeToContent () |
| void | resizeToContent (bool recursion) override |
| void | setBackgroundWidget (Widget *widget) |
| void | setBaseColor (Color const &color) override |
| void | setDimension (Rectangle const &dimension) |
| void | setHeight (int height) |
| virtual void | setHorizontalSpacing (unsigned int spacing) |
| void | setLayout (Container::LayoutPolicy policy) |
| void | setOpaque (bool opaque) |
| virtual void | setSelectedTab (Tab *tab) |
| virtual void | setSelectedTab (unsigned int index) |
| void | setSize (int width, int height) |
| virtual void | setUniformSize (bool uniform) |
| virtual void | setVerticalSpacing (unsigned int spacing) |
| void | setWidth (int width) |
| TabbedArea (TabbedArea &&)=delete | |
| TabbedArea (TabbedArea const &)=delete | |
| Public Member Functions inherited from fcn::ActionListener | |
| ActionListener (ActionListener &&)=delete | |
| ActionListener (ActionListener const &)=delete | |
| ActionListener & | operator= (ActionListener &&)=delete |
| ActionListener & | operator= (ActionListener const &)=delete |
| Public Member Functions inherited from fcn::KeyListener | |
| KeyListener (KeyListener &&)=default | |
| KeyListener (KeyListener const &)=default | |
| virtual void | keyReleased (KeyEvent &keyEvent) |
| KeyListener & | operator= (KeyListener &&)=default |
| KeyListener & | operator= (KeyListener const &)=default |
| Public Member Functions inherited from fcn::MouseListener | |
| virtual void | mouseClicked (MouseEvent &mouseEvent) |
| virtual void | mouseDragged (MouseEvent &mouseEvent) |
| virtual void | mouseEntered (MouseEvent &mouseEvent) |
| virtual void | mouseExited (MouseEvent &mouseEvent) |
| MouseListener (MouseListener &&)=default | |
| MouseListener (MouseListener const &)=default | |
| virtual void | mouseMoved (MouseEvent &mouseEvent) |
| virtual void | mouseReleased (MouseEvent &mouseEvent) |
| virtual void | mouseWheelMovedDown (MouseEvent &mouseEvent) |
| virtual void | mouseWheelMovedLeft (MouseEvent &mouseEvent) |
| virtual void | mouseWheelMovedRight (MouseEvent &mouseEvent) |
| virtual void | mouseWheelMovedUp (MouseEvent &mouseEvent) |
| MouseListener & | operator= (MouseListener &&)=default |
| MouseListener & | operator= (MouseListener const &)=default |
| Public Member Functions inherited from fcn::Widget | |
| virtual void | _draw (Graphics *graphics) |
| virtual FocusHandler * | _getFocusHandler () |
| virtual std::list< FocusListener * > const & | _getFocusListeners () |
| virtual FocusHandler * | _getInternalFocusHandler () |
| virtual std::list< KeyListener * > const & | _getKeyListeners () |
| virtual std::list< MouseListener * > const & | _getMouseListeners () |
| virtual void | _logic () |
| virtual void | _setFocusHandler (FocusHandler *focusHandler) |
| virtual void | _setParent (Widget *parent) |
| void | adaptLayout () |
| virtual void | adaptLayout (bool top) |
| void | addActionListener (ActionListener *actionListener) |
| void | addDeathListener (DeathListener *deathListener) |
| void | addFocusListener (FocusListener *focusListener) |
| void | addKeyListener (KeyListener *keyListener) |
| void | addMouseListener (MouseListener *mouseListener) |
| void | addWidgetListener (WidgetListener *widgetListener) |
| virtual void | drawBorder (Graphics *graphics) |
| virtual void | drawOutline (Graphics *graphics) |
| virtual void | drawSelectionFrame (Graphics *graphics) |
| void | expandContent () |
| virtual void | focusNext () |
| virtual void | focusPrevious () |
| virtual void | fontChanged () |
| virtual void | getAbsolutePosition (int &x, int &y) const |
| std::string const & | getActionEventId () const |
| Color const & | getBackgroundColor () const |
| Color const & | getBaseColor () const |
| Color const & | getBorderColor () const |
| unsigned int | getBorderSize () const |
| unsigned int | getChildrenCount () const |
| Rectangle const & | getDimension () const |
| Size const & | getFixedSize () const |
| Font * | getFont () const |
| Color const & | getForegroundColor () const |
| int | getHeight () const |
| std::string const & | getId () const |
| void | getLastPosition (int &x, int &y) const |
| int | getMarginBottom () const |
| int | getMarginLeft () const |
| int | getMarginRight () const |
| int | getMarginTop () const |
| Size const & | getMaxSize () const |
| Size const & | getMinSize () const |
| Color const & | getOutlineColor () const |
| unsigned int | getOutlineSize () const |
| unsigned int | getPaddingBottom () const |
| unsigned int | getPaddingLeft () const |
| unsigned int | getPaddingRight () const |
| unsigned int | getPaddingTop () const |
| virtual Widget * | getParent () const |
| Color const & | getSelectionColor () const |
| SelectionMode | getSelectionMode () const |
| virtual Widget * | getTop () const |
| unsigned int | getVisibleChildrenCount () const |
| Widget * | getWidgetAt (int x, int y) |
| virtual Widget * | getWidgetAt (int x, int y, Widget *exclude) |
| std::list< Widget * > | getWidgetsIn (Rectangle const &area) |
| virtual std::list< Widget * > | getWidgetsIn (Rectangle const &area, Widget *ignore) |
| int | getWidth () const |
| int | getX () const |
| int | getY () const |
| bool | isEnabled () const |
| bool | isFixedSize () const |
| bool | isFocusable () const |
| virtual bool | isFocused () const |
| bool | isHorizontalExpand () const |
| bool | isLastPositionSet () const |
| virtual bool | isLayouted () |
| virtual bool | isModalFocusable () const |
| virtual bool | isModalFocused () const |
| virtual bool | isModalMouseInputFocusable () const |
| virtual bool | isModalMouseInputFocused () const |
| bool | isSetVisible () const |
| bool | isTabInEnabled () const |
| bool | isTabOutEnabled () const |
| bool | isVerticalExpand () const |
| bool | isVisible () const |
| virtual void | logic () |
| virtual void | moveToBottom (Widget *widget) |
| virtual void | moveToTop (Widget *widget) |
| Widget & | operator= (Widget &&)=delete |
| Widget & | operator= (Widget const &)=delete |
| virtual void | releaseModalFocus () |
| virtual void | releaseModalMouseInputFocus () |
| void | removeActionListener (ActionListener *actionListener) |
| void | removeDeathListener (DeathListener *deathListener) |
| void | removeFocusListener (FocusListener *focusListener) |
| void | removeKeyListener (KeyListener *keyListener) |
| void | removeMouseListener (MouseListener *mouseListener) |
| void | removeWidgetListener (WidgetListener *widgetListener) |
| virtual void | requestFocus () |
| virtual void | requestModalFocus () |
| virtual void | requestModalMouseInputFocus () |
| virtual void | requestMoveToBottom () |
| virtual void | requestMoveToTop () |
| void | resizeToContent () |
| void | setActionEventId (std::string const &actionEventId) |
| virtual void | setBackgroundColor (Color const &color) |
| virtual void | setBorderColor (Color const &color) |
| void | setBorderSize (unsigned int size) |
| void | setDimension (Rectangle const &dimension) |
| void | setEnabled (bool enabled) |
| void | setFixedSize (Size const &size) |
| void | setFocusable (bool focusable) |
| virtual void | setFont (Font *font) |
| virtual void | setForegroundColor (Color const &color) |
| void | setHeight (int height) |
| void | setHorizontalExpand (bool expand) |
| void | setId (std::string const &id) |
| void | setInternalFocusHandler (FocusHandler *internalFocusHandler) |
| void | setLastPosition (int x, int y) |
| void | setMargin (int margin) |
| void | setMarginBottom (int margin) |
| void | setMarginLeft (int margin) |
| void | setMarginRight (int margin) |
| void | setMarginTop (int margin) |
| void | setMaxSize (Size const &size) |
| void | setMinSize (Size const &size) |
| virtual void | setOutlineColor (Color const &color) |
| void | setOutlineSize (unsigned int size) |
| void | setPadding (unsigned int padding) |
| void | setPaddingBottom (unsigned int padding) |
| void | setPaddingLeft (unsigned int padding) |
| void | setPaddingRight (unsigned int padding) |
| void | setPaddingTop (unsigned int padding) |
| void | setPosition (int x, int y) |
| virtual void | setSelectionColor (Color const &color) |
| virtual void | setSelectionMode (SelectionMode mode) |
| void | setSize (int width, int height) |
| void | setTabInEnabled (bool enabled) |
| void | setTabOutEnabled (bool enabled) |
| void | setVerticalExpand (bool expand) |
| void | setVisible (bool visible) |
| void | setWidth (int width) |
| void | setX (int x) |
| void | setY (int y) |
| virtual void | showPart (Rectangle rectangle) |
| virtual void | showWidgetPart (Widget *widget, Rectangle area) |
| Widget () | |
| Widget (Widget &&)=delete | |
| Widget (Widget const &)=delete | |
Protected Member Functions | |
| void | adjustTabPositions () |
| Protected Member Functions inherited from fcn::ActionListener | |
| ActionListener ()=default | |
| Protected Member Functions inherited from fcn::KeyListener | |
| KeyListener ()=default | |
| Protected Member Functions inherited from fcn::MouseListener | |
| MouseListener ()=default | |
| Protected Member Functions inherited from fcn::Widget | |
| void | add (Widget *widget) |
| void | calculateSize () |
| void | distributeActionEvent () |
| void | distributeAncestorHiddenEvent (Widget *ancestor) |
| void | distributeAncestorMovedEvent (Widget *ancestor) |
| void | distributeAncestorShownEvent (Widget *ancestor) |
| void | distributeHiddenEvent () |
| void | distributeMovedEvent () |
| void | distributeResizedEvent () |
| void | distributeShownEvent () |
| virtual Widget * | findWidgetById (std::string const &id) |
| std::list< Widget * > const & | getChildren () const |
| virtual void | remove (Widget *widget) |
| virtual void | removeAllChildren () |
| void | resizeToChildren () |
Protected Attributes | |
| bool | mOpaque {false} |
| Tab * | mSelectedTab {nullptr} |
| Container * | mTabContainer |
| std::vector< std::pair< Tab *, Widget * > > | mTabs |
| std::vector< std::unique_ptr< Tab > > | mTabsToDelete |
| Container * | mWidgetContainer |
| Protected Attributes inherited from fcn::Widget | |
| std::string | mActionEventId |
| std::list< ActionListener * > | mActionListeners |
| Color | mBackgroundColor {0xf9fafb} |
| Color | mBaseColor {0xe5e7eb} |
| Color | mBorderColor {0xd1d5db} |
| unsigned int | mBorderSize {0} |
| std::list< Widget * > | mChildren |
| Font * | mCurrentFont {nullptr} |
| std::list< DeathListener * > | mDeathListeners |
| Rectangle | mDimension |
| bool | mEnabled {true} |
| Size | mFixedSize {-1, -1} |
| bool | mFixedSizeUsed {false} |
| bool | mFocusable {false} |
| FocusHandler * | mFocusHandler {nullptr} |
| std::list< FocusListener * > | mFocusListeners |
| Color | mForegroundColor {0x1f2933} |
| bool | mHExpand {false} |
| std::string | mId |
| FocusHandler * | mInternalFocusHandler {nullptr} |
| std::list< KeyListener * > | mKeyListeners |
| int | mLastX {0} |
| int | mLastY {0} |
| int | mMarginBottom {0} |
| int | mMarginLeft {0} |
| int | mMarginRight {0} |
| int | mMarginTop {0} |
| Size | mMaxSize {std::numeric_limits<int>::max(), std::numeric_limits<int>::max()} |
| Size | mMinSize {0, 0} |
| std::list< MouseListener * > | mMouseListeners |
| Rectangle | mOffsetRect |
| Color | mOutlineColor {0x9ca3af} |
| unsigned int | mOutlineSize {0} |
| unsigned int | mPaddingBottom {0} |
| unsigned int | mPaddingLeft {0} |
| unsigned int | mPaddingRight {0} |
| unsigned int | mPaddingTop {0} |
| Widget * | mParent {nullptr} |
| Color | mSelectionColor {0x3b82f6} |
| SelectionMode | mSelectionMode {SelectionMode::None} |
| bool | mTabIn {true} |
| bool | mTabOut {true} |
| bool | mVExpand {false} |
| bool | mVisible {true} |
| std::list< WidgetListener * > | mWidgetListeners |
Friends | |
| class | Tab |
Additional Inherited Members | |
| Public Types inherited from fcn::Widget | |
| enum class | SelectionMode : uint8_t { None = 0 , Border = 1 , Background = 2 } |
| Static Public Member Functions inherited from fcn::Widget | |
| static DeathListener * | _getGuiDeathListener () |
| static VisibilityEventHandler * | _getVisibilityEventHandler () |
| static void | _setGuiDeathListener (DeathListener *deathListener) |
| static void | _setVisibilityEventHandler (VisibilityEventHandler *visibilityEventHandler) |
| static void | setGlobalFont (Font *font) |
| static bool | widgetExists (Widget const *widget) |
| Static Protected Attributes inherited from fcn::Widget | |
| static DefaultFont | mDefaultFont |
| static Font * | mGlobalFont = nullptr |
| static DeathListener * | mGuiDeathListener = nullptr |
| static VisibilityEventHandler * | mVisibilityEventHandler = nullptr |
| static std::list< Widget * > | mWidgetInstances |
A container organizing content into selectable tabs.
A tabbed area where a user can display a widget by selecting a tab.
Definition at line 32 of file tabbedarea.hpp.
| fcn::TabbedArea::TabbedArea | ( | ) |
Definition at line 18 of file tabbedarea.cpp.
|
override |
Definition at line 34 of file tabbedarea.cpp.
|
overridevirtual |
Called when an action is received from a widget.
It is used to receive notifications about actions that have occurred. The actionEvent contains information about the action.
| actionEvent | The event of the action. |
Implements fcn::ActionListener.
Definition at line 438 of file tabbedarea.cpp.
References action(), fcn::Event::getSource(), setSelectedTab(), and fcn::Widget::Widget().
Referenced by action().
|
virtual |
Adds a tab to the tabbed area.
The tab will not be deleted by the tabbed area when it is removed.
| tab | The tab widget for the tab. |
| widget | The widget to view when the tab is selected. |
Definition at line 43 of file tabbedarea.cpp.
References fcn::Widget::adaptLayout(), fcn::Widget::addActionListener(), addTab(), fcn::Widget::getBaseColor(), fcn::Container::getLayout(), getLayout(), mSelectedTab, mTabContainer, mTabs, fcn::Widget::setBaseColor(), fcn::Container::setLayout(), setSelectedTab(), fcn::Tab::setTabbedArea(), and fcn::Widget::Widget().
Referenced by addTab().
|
overridevirtual |
Adjusts the size of the tab container and the widget container.
Reimplemented from fcn::Widget.
Definition at line 268 of file tabbedarea.cpp.
References adjustSize(), fcn::Widget::getHeight(), getLayout(), fcn::Widget::getWidth(), mTabContainer, mTabs, and mWidgetContainer.
Referenced by adjustSize(), expandContent(), resizeToContent(), setDimension(), setHeight(), setSize(), and setWidth().
|
protected |
Adjusts the positions of the tabs.
Definition at line 295 of file tabbedarea.cpp.
References adjustTabPositions(), fcn::Widget::getHeight(), getLayout(), fcn::Widget::getWidth(), mTabs, and fcn::Widget::setPosition().
Referenced by adjustTabPositions(), expandContent(), and resizeToContent().
|
virtual |
DeathListener callback invoked when a child widget dies.
Definition at line 427 of file tabbedarea.cpp.
References death(), and removeTab().
Referenced by death().
|
overridevirtual |
Draws the widget.
The call to draw is initiated by the widget's parent. The graphics object is set up so that all drawing is relative to the widget, i.e coordinate (0,0) is the top left corner of the widget. It is not possible to draw outside of a widget's dimension. If a widget has children, the parent's draw function will always be called before the children's draw functions are called.
NOTE: A widget with children won't draw its children unless the children area given by Widget::getChildrenArea returns a none empty rectangle inside the widgets dimension. The children area is considered relative to the widget's position.
| Graphics & Rendering | A graphics object to draw with. |
Implements fcn::Widget.
Definition at line 198 of file tabbedarea.cpp.
References fcn::Color::a, draw(), fcn::Graphics::drawLine(), fcn::Graphics::fillRectangle(), fcn::Widget::getBaseColor(), fcn::Widget::getHeight(), fcn::Widget::getWidth(), isOpaque(), mSelectedTab, mTabContainer, and fcn::Graphics::setColor().
Referenced by draw().
|
inline |
Expands the child widgets to the size of this widget, calls recursively all childs.
This is a convenience wrapper that calls expandContent(true).
Definition at line 1440 of file widget.hpp.
|
overridevirtual |
Expands child widgets to fit this widget's size.
| recursion | If true, call expandContent recursively on children. |
Reimplemented from fcn::Widget.
Definition at line 258 of file tabbedarea.cpp.
References adjustSize(), adjustTabPositions(), expandContent(), mTabContainer, and mWidgetContainer.
Referenced by expandContent().
| Widget * fcn::TabbedArea::getBackgroundWidget | ( | ) |
Get the background widget, or nullptr if none is set.
Definition at line 193 of file tabbedarea.cpp.
References getBackgroundWidget(), mTabContainer, and fcn::Widget::Widget().
Referenced by getBackgroundWidget().
|
overridevirtual |
Gets the area of the widget occupied by the widget's children.
By default this method returns an empty rectangle as not all widgets are containers. If you want to make a container this method should return the area where the children resides. This method is used when drawing children of a widget when computing clip rectangles for the children.
NOTE: The returned rectangle should be relative to the widget, i.e a rectangle with x and y coordinate (0,0) and with width and height the same as the widget will let the children draw themselves in the whole widget.
An example of a widget that overloads this method is ScrollArea. A ScrollArea has a view of its constant and that view is the children area. The size of a ScrollArea's children area might vary depending on if the scroll bars of the ScrollArea is shown or not.
Reimplemented from fcn::Widget.
Definition at line 237 of file tabbedarea.cpp.
References fcn::Widget::getBorderSize(), getChildrenArea(), fcn::Widget::getHeight(), fcn::Widget::getPaddingBottom(), fcn::Widget::getPaddingLeft(), fcn::Widget::getPaddingRight(), fcn::Widget::getPaddingTop(), fcn::Widget::getWidth(), fcn::Rectangle::height, fcn::Rectangle::width, fcn::Rectangle::x, and fcn::Rectangle::y.
Referenced by getChildrenArea().
|
virtual |
Get the horizontal spacing between rows.
Definition at line 495 of file tabbedarea.cpp.
References getHorizontalSpacing(), and mTabContainer.
Referenced by getHorizontalSpacing().
| Container::LayoutPolicy fcn::TabbedArea::getLayout | ( | ) | const |
Gets the layout of the tabbedarea.
Definition at line 465 of file tabbedarea.cpp.
References getLayout(), and mTabContainer.
Referenced by addTab(), adjustSize(), adjustTabPositions(), and getLayout().
| int fcn::TabbedArea::getNumberOfTabs | ( | ) | const |
Returns the number of tabs in this tabbed area.
Definition at line 111 of file tabbedarea.cpp.
References getNumberOfTabs(), and mTabs.
Referenced by getNumberOfTabs().
| Tab * fcn::TabbedArea::getSelectedTab | ( | ) | const |
Gets the selected tab.
Definition at line 172 of file tabbedarea.cpp.
References getSelectedTab(), and mSelectedTab.
Referenced by getSelectedTab().
|
virtual |
Gets the index of the selected tab.
Definition at line 160 of file tabbedarea.cpp.
References getSelectedTabIndex(), mSelectedTab, and mTabs.
Referenced by getSelectedTabIndex(), keyPressed(), and removeTab().
|
virtual |
Get the vertical spacing between rows.
Definition at line 485 of file tabbedarea.cpp.
References getVerticalSpacing(), and mTabContainer.
Referenced by getVerticalSpacing().
| bool fcn::TabbedArea::isOpaque | ( | ) | const |
Checks if the tabbed area is opaque or not.
Definition at line 182 of file tabbedarea.cpp.
References isOpaque(), and mOpaque.
Referenced by draw(), and isOpaque().
|
virtual |
Checks if a tab is selected or not.
| tab | The tab to check. |
Definition at line 125 of file tabbedarea.cpp.
References isTabSelected(), and mSelectedTab.
|
virtual |
Checks if a tab given an index is selected or not.
| index | The index of the tab to check. |
Definition at line 116 of file tabbedarea.cpp.
References isTabSelected(), mSelectedTab, and mTabs.
Referenced by isTabSelected(), and isTabSelected().
|
virtual |
True if the tab container tries to expand the childs to a uniform size.
Definition at line 475 of file tabbedarea.cpp.
References isUniformSize(), and mTabContainer.
Referenced by isUniformSize().
|
overridevirtual |
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.
| keyEvent | Describes the event. |
Reimplemented from fcn::KeyListener.
Definition at line 371 of file tabbedarea.cpp.
References fcn::InputEvent::consume(), fcn::KeyEvent::getKey(), getSelectedTabIndex(), fcn::Key::getValue(), fcn::InputEvent::isConsumed(), fcn::Widget::isFocused(), keyPressed(), mTabs, and setSelectedTab().
Referenced by keyPressed().
|
overridevirtual |
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.
| mouseEvent | Describes the event. |
Reimplemented from fcn::MouseListener.
Definition at line 402 of file tabbedarea.cpp.
References fcn::MouseEvent::getButton(), fcn::Event::getSource(), fcn::MouseEvent::getX(), fcn::MouseEvent::getY(), fcn::Widget::isFocusable(), mousePressed(), mTabContainer, fcn::Widget::requestFocus(), setSelectedTab(), and fcn::Widget::Widget().
Referenced by mousePressed().
|
virtual |
Removes a tab from the tabbed area.
| tab | The tab to remove. |
Definition at line 70 of file tabbedarea.cpp.
References fcn::Widget::adaptLayout(), getSelectedTabIndex(), mSelectedTab, mTabContainer, mTabs, mTabsToDelete, mWidgetContainer, removeTab(), and setSelectedTab().
Referenced by death(), removeTab(), and removeTabWithIndex().
|
virtual |
Removes a tab from the tabbed area.
| index | The index of the tab to remove. |
Definition at line 61 of file tabbedarea.cpp.
References mTabs, removeTab(), and removeTabWithIndex().
Referenced by removeTabWithIndex().
|
inline |
Resizes the widget's size to fit the content exactly, calls recursively all childs.
This is a convenience wrapper that calls resizeToContent(true).
Definition at line 1417 of file widget.hpp.
|
overridevirtual |
Resize this widget to fit its content.
| recursion | If true, perform the resize operation recursively on children. |
Reimplemented from fcn::Widget.
Definition at line 247 of file tabbedarea.cpp.
References adjustSize(), adjustTabPositions(), mTabContainer, mWidgetContainer, fcn::Widget::resizeToChildren(), and resizeToContent().
Referenced by resizeToContent().
| void fcn::TabbedArea::setBackgroundWidget | ( | Widget * | widget | ) |
Set the background widget which is drawn behind tabs.
Definition at line 187 of file tabbedarea.cpp.
References mTabContainer, mWidgetContainer, setBackgroundWidget(), and fcn::Widget::Widget().
Referenced by setBackgroundWidget().
|
overridevirtual |
Set the base/background color used for the tabbed area.
Reimplemented from fcn::Widget.
Definition at line 450 of file tabbedarea.cpp.
References mTabContainer, mTabs, mWidgetContainer, setBaseColor(), and fcn::Widget::setBaseColor().
Referenced by setBaseColor().
| void fcn::TabbedArea::setDimension | ( | Rectangle const & | dimension | ) |
Set the area dimension for the tabbed area.
Definition at line 359 of file tabbedarea.cpp.
References adjustSize(), fcn::Widget::mDimension, setDimension(), and fcn::Widget::setDimension().
Referenced by setDimension().
| void fcn::TabbedArea::setHeight | ( | int | height | ) |
Set the height of the tabbed area in pixels.
Definition at line 334 of file tabbedarea.cpp.
References adjustSize(), fcn::Widget::mDimension, setHeight(), and fcn::Widget::setHeight().
Referenced by setHeight().
|
virtual |
Set the horizontal spacing between columns.
| spacing | spacing in pixels. |
Definition at line 490 of file tabbedarea.cpp.
References mTabContainer, and setHorizontalSpacing().
Referenced by setHorizontalSpacing().
| void fcn::TabbedArea::setLayout | ( | Container::LayoutPolicy | policy | ) |
Sets the layout of the tabbedarea.
| policy | The LayoutPolicy of the tabbedarea. |
Definition at line 460 of file tabbedarea.cpp.
References mTabContainer, and setLayout().
Referenced by setLayout().
| void fcn::TabbedArea::setOpaque | ( | bool | opaque | ) |
Sets the tabbed area to be opaque or not.
If the tabbed area is opaque its background will be drawn, if it's not opaque its background will not be drawn. By default, a tabbed area is not opaque.
The tabbed area's background is normally only visible behind the tabs, since the container holding the tab contents is opaque by default.
| opaque | True if the tabbed area should be opaque, false otherwise. |
Definition at line 177 of file tabbedarea.cpp.
References mOpaque, and setOpaque().
Referenced by setOpaque().
|
virtual |
Sets a tab to be selected or not.
| tab | The tab to be selected. |
Definition at line 139 of file tabbedarea.cpp.
References fcn::Widget::adaptLayout(), mSelectedTab, mTabs, mWidgetContainer, and setSelectedTab().
|
virtual |
Sets a tab given an index to be selected.
| index | The index of the tab to be selected. |
Definition at line 130 of file tabbedarea.cpp.
References mTabs, and setSelectedTab().
Referenced by action(), addTab(), keyPressed(), mousePressed(), removeTab(), setSelectedTab(), and setSelectedTab().
| void fcn::TabbedArea::setSize | ( | int | width, |
| int | height ) |
Set the size (width and height) of the tabbed area in pixels.
Definition at line 346 of file tabbedarea.cpp.
References adjustSize(), fcn::Widget::mDimension, setSize(), and fcn::Widget::setSize().
Referenced by setSize().
|
virtual |
If enabled, the free space is distributed in a way that the size of the childrens will be equal (if possible).
Otherwise the free space will evenly distributed.
| uniform | Indicates if uniform size is enabled or not. |
Definition at line 470 of file tabbedarea.cpp.
References mTabContainer, and setUniformSize().
Referenced by setUniformSize().
|
virtual |
Set the vertical spacing between rows.
| spacing | spacing in pixels. |
Definition at line 480 of file tabbedarea.cpp.
References mTabContainer, and setVerticalSpacing().
Referenced by setVerticalSpacing().
| void fcn::TabbedArea::setWidth | ( | int | width | ) |
Set the width of the tabbed area in pixels.
Definition at line 322 of file tabbedarea.cpp.
References adjustSize(), fcn::Widget::mDimension, setWidth(), and fcn::Widget::setWidth().
Referenced by setWidth().
|
friend |
Definition at line 34 of file tabbedarea.hpp.
|
protected |
True if the tabbed area is opaque, false otherwise.
Definition at line 315 of file tabbedarea.hpp.
Referenced by isOpaque(), and setOpaque().
|
protected |
Holds the selected tab.
Definition at line 287 of file tabbedarea.hpp.
Referenced by addTab(), draw(), getSelectedTab(), getSelectedTabIndex(), isTabSelected(), isTabSelected(), removeTab(), and setSelectedTab().
|
protected |
Holds the container for the tabs.
Definition at line 292 of file tabbedarea.hpp.
Referenced by addTab(), adjustSize(), draw(), expandContent(), getBackgroundWidget(), getHorizontalSpacing(), getLayout(), getVerticalSpacing(), isUniformSize(), mousePressed(), removeTab(), resizeToContent(), setBackgroundWidget(), setBaseColor(), setHorizontalSpacing(), setLayout(), setUniformSize(), and setVerticalSpacing().
|
protected |
A map between a tab and a widget to display when the tab is selected.
Definition at line 310 of file tabbedarea.hpp.
Referenced by addTab(), adjustSize(), adjustTabPositions(), getNumberOfTabs(), getSelectedTabIndex(), isTabSelected(), keyPressed(), removeTab(), removeTabWithIndex(), setBaseColor(), setSelectedTab(), and setSelectedTab().
|
protected |
Holds a vector of tabs to delete in the destructor.
A tab that is to be deleted is a tab that has been internally created by the tabbed area.
Definition at line 304 of file tabbedarea.hpp.
Referenced by removeTab().
|
protected |
Holds the container for the widgets.
Definition at line 297 of file tabbedarea.hpp.
Referenced by adjustSize(), expandContent(), removeTab(), resizeToContent(), setBackgroundWidget(), setBaseColor(), and setSelectedTab().