ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

#include <tab.h>

Inheritance diagram for GUI::TabWidget:
Collaboration diagram for GUI::TabWidget:

List of all members.

Classes

struct  Tab

Public Member Functions

 TabWidget (GuiObject *boss, int x, int y, int w, int h)
 TabWidget (GuiObject *boss, const String &name)
 ~TabWidget ()
void init ()
int addTab (const String &title)
 Add a new tab with the given title.
void removeTab (int tabID)
 Remove the tab with the given tab ID.
int getActiveTab ()
void setActiveTab (int tabID)
 Set the active tab by specifying a valid tab ID.
void setTabTitle (int tabID, const String &title)
virtual void handleMouseDown (int x, int y, int button, int clickCount) override
virtual bool handleKeyDown (Common::KeyState state) override
virtual void handleCommand (CommandSender *sender, uint32 cmd, uint32 data) override
virtual int getFirstVisible () const
virtual void setFirstVisible (int tabID, bool adjustIfRoom=false)
virtual bool containsWidget (Widget *) const override
virtual void reflowLayout () override
void draw () override
 Redraw the widget if it was marked as dirty, and recursively proceed with its children.
void markAsDirty () override
 Mark the widget and its children as dirty so they are redrawn on the next screen update.

Protected Member Functions

virtual int16 getChildY () const override
virtual uint16 getHeight () const override
virtual void drawWidget () override
virtual WidgetfindWidget (int x, int y) override
virtual void adjustTabs (int value)
virtual void computeLastVisibleTab (bool adjustFirstIfRoom)

Protected Attributes

int _activeTab
int _firstVisibleTab
int _lastVisibleTab
TabList _tabs
int _tabHeight
int _minTabWidth
int _bodyRP
int _bodyTP
int _bodyLP
int _bodyBP
ThemeEngine::DialogBackground _bodyBackgroundType
int _titleVPad
int _butRP
int _butTP
int _butW
int _butH
ButtonWidget_navLeft
ButtonWidget_navRight
bool _navButtonsVisible

Private Types

typedef Common::String String
typedef Common::Array< TabTabList

Detailed Description

Definition at line 37 of file tab.h.


Member Typedef Documentation

Definition at line 38 of file tab.h.

Definition at line 44 of file tab.h.


Constructor & Destructor Documentation

GUI::TabWidget::TabWidget ( GuiObject boss,
int  x,
int  y,
int  w,
int  h 
)

Definition at line 38 of file tab.cpp.

GUI::TabWidget::TabWidget ( GuiObject boss,
const String name 
)

Definition at line 43 of file tab.cpp.

GUI::TabWidget::~TabWidget (  ) 

Definition at line 76 of file tab.cpp.


Member Function Documentation

int GUI::TabWidget::addTab ( const String title  ) 

Add a new tab with the given title.

Returns a unique ID which can be used to identify the tab (to remove it / activate it etc.).

Definition at line 106 of file tab.cpp.

void GUI::TabWidget::adjustTabs ( int  value  )  [protected, virtual]

Definition at line 228 of file tab.cpp.

void GUI::TabWidget::computeLastVisibleTab ( bool  adjustFirstIfRoom  )  [protected, virtual]

Definition at line 375 of file tab.cpp.

bool GUI::TabWidget::containsWidget ( Widget w  )  const [override, virtual]

Reimplemented from GUI::Widget.

Definition at line 349 of file tab.cpp.

void GUI::TabWidget::draw (  )  [override, virtual]

Redraw the widget if it was marked as dirty, and recursively proceed with its children.

Reimplemented from GUI::Widget.

Definition at line 331 of file tab.cpp.

void GUI::TabWidget::drawWidget (  )  [override, protected, virtual]

Implements GUI::Widget.

Definition at line 316 of file tab.cpp.

Widget * GUI::TabWidget::findWidget ( int  x,
int  y 
) [override, protected, virtual]

Reimplemented from GUI::Widget.

Definition at line 356 of file tab.cpp.

int GUI::TabWidget::getActiveTab (  )  [inline]

Definition at line 88 of file tab.h.

int16 GUI::TabWidget::getChildY (  )  const [override, protected, virtual]

Reimplemented from GUI::GuiObject.

Definition at line 92 of file tab.cpp.

int GUI::TabWidget::getFirstVisible (  )  const [virtual]

Definition at line 239 of file tab.cpp.

uint16 GUI::TabWidget::getHeight (  )  const [override, protected, virtual]

Reimplemented from GUI::GuiObject.

Definition at line 98 of file tab.cpp.

void GUI::TabWidget::handleCommand ( CommandSender sender,
uint32  cmd,
uint32  data 
) [override, virtual]

Reimplemented from GUI::Widget.

Definition at line 182 of file tab.cpp.

bool GUI::TabWidget::handleKeyDown ( Common::KeyState  state  )  [override, virtual]

Reimplemented from GUI::Widget.

Definition at line 219 of file tab.cpp.

void GUI::TabWidget::handleMouseDown ( int  x,
int  y,
int  button,
int  clickCount 
) [override, virtual]

Reimplemented from GUI::Widget.

Definition at line 200 of file tab.cpp.

void GUI::TabWidget::init (  ) 

Reimplemented from GUI::Widget.

Definition at line 48 of file tab.cpp.

void GUI::TabWidget::markAsDirty (  )  [override, virtual]

Mark the widget and its children as dirty so they are redrawn on the next screen update.

Reimplemented from GUI::Widget.

Definition at line 340 of file tab.cpp.

void GUI::TabWidget::reflowLayout (  )  [override, virtual]

Reimplemented from GUI::GuiObject.

Definition at line 252 of file tab.cpp.

void GUI::TabWidget::removeTab ( int  tabID  ) 

Remove the tab with the given tab ID.

Disposes all child widgets of that tab. TODO: This code is *unfinished*. In particular, it changes the tabIDs, so that they are not unique anymore! This is bad. If we need to, we could fix this by changing the tab IDs from being an index into the _tabs array to a real "unique" ID, which gets stored in the Tab struct. It won't be difficult to implement this, but since currently no code seems to make use of the feature...

Definition at line 128 of file tab.cpp.

void GUI::TabWidget::setActiveTab ( int  tabID  ) 

Set the active tab by specifying a valid tab ID.

setActiveTab changes the value of _firstWidget. This means new Widgets are always added to the active tab.

Definition at line 160 of file tab.cpp.

void GUI::TabWidget::setFirstVisible ( int  tabID,
bool  adjustIfRoom = false 
) [virtual]

Definition at line 243 of file tab.cpp.

void GUI::TabWidget::setTabTitle ( int  tabID,
const String title 
) [inline]

Definition at line 99 of file tab.h.


Member Data Documentation

int GUI::TabWidget::_activeTab [protected]

Definition at line 47 of file tab.h.

int GUI::TabWidget::_bodyBP [protected]

Definition at line 54 of file tab.h.

int GUI::TabWidget::_bodyLP [protected]

Definition at line 54 of file tab.h.

int GUI::TabWidget::_bodyRP [protected]

Definition at line 54 of file tab.h.

int GUI::TabWidget::_bodyTP [protected]

Definition at line 54 of file tab.h.

int GUI::TabWidget::_butH [protected]

Definition at line 59 of file tab.h.

int GUI::TabWidget::_butRP [protected]

Definition at line 59 of file tab.h.

int GUI::TabWidget::_butTP [protected]

Definition at line 59 of file tab.h.

int GUI::TabWidget::_butW [protected]

Definition at line 59 of file tab.h.

Definition at line 48 of file tab.h.

Definition at line 49 of file tab.h.

Definition at line 52 of file tab.h.

Definition at line 62 of file tab.h.

Definition at line 61 of file tab.h.

Definition at line 61 of file tab.h.

int GUI::TabWidget::_tabHeight [protected]

Definition at line 51 of file tab.h.

Definition at line 50 of file tab.h.

int GUI::TabWidget::_titleVPad [protected]

Definition at line 57 of file tab.h.


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


Generated on Sat Mar 23 2019 05:08:21 for ResidualVM by doxygen 1.7.1
curved edge   curved edge