Mana
Loading...
Searching...
No Matches
tab.h
Go to the documentation of this file.
1/*
2 * The Mana Client
3 * Copyright (C) 2008-2009 The Mana World Development Team
4 * Copyright (C) 2009-2012 The Mana Developers
5 *
6 * This file is part of The Mana Client.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#pragma once
23
24#include <guichan/widgets/tab.hpp>
25
26class TabbedArea;
27
32class Tab : public gcn::Tab
33{
34 public:
35 Tab();
36
42 void setCaption(const std::string& caption);
43
47 void draw(gcn::Graphics *graphics) override;
48
52 void drawFrame(gcn::Graphics *graphics) override;
53
57 void setTabColor(const gcn::Color *color);
58
62 void setFlash(bool flash);
63
64 protected:
65 friend class TabbedArea;
66 virtual void setCurrent() {}
67
68 private:
69 const gcn::Color *mTabColor = nullptr;
70 bool mFlash = false;
71 int mPadding = 8;
72};
A tab, the same as the Guichan tab in 0.8, but extended to allow transparency.
Definition tab.h:33
bool mFlash
Definition tab.h:70
Tab()
Definition tab.cpp:34
const gcn::Color * mTabColor
Definition tab.h:69
void drawFrame(gcn::Graphics *graphics) override
Draw the tab frame.
Definition tab.cpp:104
void setCaption(const std::string &caption)
Sets the caption of the tab.
Definition tab.cpp:49
void draw(gcn::Graphics *graphics) override
Draw the tab.
Definition tab.cpp:61
void setTabColor(const gcn::Color *color)
Set the normal color fo the tab's text.
Definition tab.cpp:117
void setFlash(bool flash)
Set tab flashing state.
Definition tab.cpp:122
virtual void setCurrent()
Definition tab.h:66
int mPadding
Definition tab.h:71
A tabbed area, the same as the guichan tabbed area in 0.8, but extended.
Definition tabbedarea.h:40
Graphics * graphics
Definition client.cpp:104