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 () override
void init ()
int addTab (const String &title, const String &dialogName)
 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)
void handleMouseDown (int x, int y, int button, int clickCount) override
void handleMouseMoved (int x, int y, int button) override
void handleMouseLeft (int button) override
bool handleKeyDown (Common::KeyState state) override
void handleCommand (CommandSender *sender, uint32 cmd, uint32 data) override
virtual int getFirstVisible () const
virtual void setFirstVisible (int tabID, bool adjustIfRoom=false)
bool containsWidget (Widget *) const override
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

int16 getChildY () const override
uint16 getHeight () const override
void drawWidget () override
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
int _lastRead

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 45 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 (  )  [override]

Definition at line 80 of file tab.cpp.


Member Function Documentation

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

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 110 of file tab.cpp.

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

Definition at line 275 of file tab.cpp.

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

Definition at line 426 of file tab.cpp.

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

Reimplemented from GUI::Widget.

Definition at line 400 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 382 of file tab.cpp.

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

Implements GUI::Widget.

Definition at line 367 of file tab.cpp.

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

Reimplemented from GUI::Widget.

Definition at line 407 of file tab.cpp.

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

Definition at line 90 of file tab.h.

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

Reimplemented from GUI::GuiObject.

Definition at line 96 of file tab.cpp.

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

Definition at line 286 of file tab.cpp.

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

Reimplemented from GUI::GuiObject.

Definition at line 102 of file tab.cpp.

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

Reimplemented from GUI::Widget.

Definition at line 187 of file tab.cpp.

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

Reimplemented from GUI::Widget.

Definition at line 266 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 222 of file tab.cpp.

void GUI::TabWidget::handleMouseLeft ( int  button  )  [inline, override, virtual]

Reimplemented from GUI::Widget.

Definition at line 108 of file tab.h.

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

Reimplemented from GUI::Widget.

Definition at line 241 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 391 of file tab.cpp.

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

Reimplemented from GUI::GuiObject.

Definition at line 299 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 133 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 165 of file tab.cpp.

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

Definition at line 290 of file tab.cpp.

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

Definition at line 101 of file tab.h.


Member Data Documentation

int GUI::TabWidget::_activeTab [protected]

Definition at line 48 of file tab.h.

int GUI::TabWidget::_bodyBP [protected]

Definition at line 55 of file tab.h.

int GUI::TabWidget::_bodyLP [protected]

Definition at line 55 of file tab.h.

int GUI::TabWidget::_bodyRP [protected]

Definition at line 55 of file tab.h.

int GUI::TabWidget::_bodyTP [protected]

Definition at line 55 of file tab.h.

int GUI::TabWidget::_butH [protected]

Definition at line 60 of file tab.h.

int GUI::TabWidget::_butRP [protected]

Definition at line 60 of file tab.h.

int GUI::TabWidget::_butTP [protected]

Definition at line 60 of file tab.h.

int GUI::TabWidget::_butW [protected]

Definition at line 60 of file tab.h.

Definition at line 49 of file tab.h.

int GUI::TabWidget::_lastRead [protected]

Definition at line 64 of file tab.h.

Definition at line 50 of file tab.h.

Definition at line 53 of file tab.h.

Definition at line 63 of file tab.h.

Definition at line 62 of file tab.h.

Definition at line 62 of file tab.h.

int GUI::TabWidget::_tabHeight [protected]

Definition at line 52 of file tab.h.

Definition at line 51 of file tab.h.

int GUI::TabWidget::_titleVPad [protected]

Definition at line 58 of file tab.h.


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


Generated on Sat May 30 2020 05:03:26 for ResidualVM by doxygen 1.7.1
curved edge   curved edge