summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabbedarea.h
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-01-26 16:07:54 +0100
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-01-26 16:07:54 +0100
commit5afe88df2538274859a162ffd63ed52118e80c19 (patch)
treeb610dfd58dc748fd63f49565b2a43eea2316714f /src/gui/widgets/tabbedarea.h
parent73ba2a95f5bd4a0dd09af52d5864800be2b0a4c6 (diff)
downloadmana-5afe88df2538274859a162ffd63ed52118e80c19.tar.gz
mana-5afe88df2538274859a162ffd63ed52118e80c19.tar.bz2
mana-5afe88df2538274859a162ffd63ed52118e80c19.tar.xz
mana-5afe88df2538274859a162ffd63ed52118e80c19.zip
Apply C++11 fixits
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using
Diffstat (limited to 'src/gui/widgets/tabbedarea.h')
-rw-r--r--src/gui/widgets/tabbedarea.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h
index b43078a4..53bb2bb2 100644
--- a/src/gui/widgets/tabbedarea.h
+++ b/src/gui/widgets/tabbedarea.h
@@ -44,7 +44,7 @@ class TabbedArea : public gcn::TabbedArea, public gcn::WidgetListener
/**
* Draw the tabbed area.
*/
- void draw(gcn::Graphics *graphics);
+ void draw(gcn::Graphics *graphics) override;
/**
* Return how many tabs have been created.
@@ -74,7 +74,7 @@ class TabbedArea : public gcn::TabbedArea, public gcn::WidgetListener
* @param tab The tab widget for the tab.
* @param widget The widget to view when the tab is selected.
*/
- void addTab(gcn::Tab* tab, gcn::Widget* widget);
+ void addTab(gcn::Tab* tab, gcn::Widget* widget) override;
/**
* Add a tab. Overridden since it needs to create an instance of Tab
@@ -83,7 +83,7 @@ class TabbedArea : public gcn::TabbedArea, public gcn::WidgetListener
* @param caption The Caption to display
* @param widget The widget to show when tab is selected
*/
- void addTab(const std::string &caption, gcn::Widget *widget);
+ void addTab(const std::string &caption, gcn::Widget *widget) override;
/**
* Overload the remove tab function as it's broken in guichan 0.8.
@@ -93,27 +93,27 @@ class TabbedArea : public gcn::TabbedArea, public gcn::WidgetListener
/**
* Overload the logic function since it's broken in guichan 0.8.
*/
- void logic();
+ void logic() override;
int getContainerHeight() const
{ return mWidgetContainer->getHeight(); }
- void setSelectedTab(unsigned int index)
+ void setSelectedTab(unsigned int index) override
{ gcn::TabbedArea::setSelectedTab(index); }
- void setSelectedTab(gcn::Tab *tab);
+ void setSelectedTab(gcn::Tab *tab) override;
- void widgetResized(const gcn::Event &event);
+ void widgetResized(const gcn::Event &event) override;
void adjustTabPositions();
- void action(const gcn::ActionEvent& actionEvent);
+ void action(const gcn::ActionEvent& actionEvent) override;
// Inherited from MouseListener
- void mousePressed(gcn::MouseEvent &mouseEvent);
+ void mousePressed(gcn::MouseEvent &mouseEvent) override;
private:
- typedef std::vector< std::pair<gcn::Tab*, gcn::Widget*> > TabContainer;
+ using TabContainer = std::vector<std::pair<gcn::Tab *, gcn::Widget *>>;
/** The tab arrows */
Button *mArrowButton[2];