Mana
Loading...
Searching...
No Matches
checkbox.h
Go to the documentation of this file.
1/*
2 * The Mana Client
3 * Copyright (C) 2004-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/checkbox.hpp>
25
31class CheckBox : public gcn::CheckBox
32{
33 public:
34 CheckBox(const std::string &caption, bool selected = false);
35
39 void draw(gcn::Graphics *graphics) override;
40
44 void drawBox(gcn::Graphics *graphics) override {}
45
49 void mouseEntered(gcn::MouseEvent &event) override;
50
54 void mouseExited(gcn::MouseEvent &event) override;
55
56 private:
57 bool mHasMouse = false;
58};
Check box widget.
Definition checkbox.h:32
void drawBox(gcn::Graphics *graphics) override
Overridden because box is drawn in CheckBox::draw.
Definition checkbox.h:44
void mouseEntered(gcn::MouseEvent &event) override
Called when the mouse enteres the widget area.
Definition checkbox.cpp:61
bool mHasMouse
Definition checkbox.h:57
void draw(gcn::Graphics *graphics) override
Draws the caption, then calls drawBox to draw the check box.
Definition checkbox.cpp:37
void mouseExited(gcn::MouseEvent &event) override
Called when the mouse leaves the widget area.
Definition checkbox.cpp:66
Graphics * graphics
Definition client.cpp:104