| [25140] | 1 | /* Copyright (C) 2021 Wildfire Games.
|
|---|
| [27965] | 2 | * This file is part of 0 A.D.
|
|---|
| [6830] | 3 | *
|
|---|
| [27965] | 4 | * 0 A.D. is free software: you can redistribute it and/or modify
|
|---|
| [6830] | 5 | * it under the terms of the GNU General Public License as published by
|
|---|
| 6 | * the Free Software Foundation, either version 2 of the License, or
|
|---|
| 7 | * (at your option) any later version.
|
|---|
| 8 | *
|
|---|
| [27965] | 9 | * 0 A.D. is distributed in the hope that it will be useful,
|
|---|
| [6830] | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 12 | * GNU General Public License for more details.
|
|---|
| 13 | *
|
|---|
| 14 | * You should have received a copy of the GNU General Public License
|
|---|
| [27965] | 15 | * along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
|
|---|
| [6830] | 16 | */
|
|---|
| 17 |
|
|---|
| [5040] | 18 | #ifndef INCLUDED_CCHECKBOX
|
|---|
| 19 | #define INCLUDED_CCHECKBOX
|
|---|
| [290] | 20 |
|
|---|
| [23005] | 21 | #include "gui/CGUISprite.h"
|
|---|
| [24352] | 22 | #include "gui/ObjectBases/IGUIObject.h"
|
|---|
| [23028] | 23 | #include "gui/ObjectBases/IGUIButtonBehavior.h"
|
|---|
| [290] | 24 |
|
|---|
| [23020] | 25 | class CCheckBox : public IGUIObject, public IGUIButtonBehavior
|
|---|
| [290] | 26 | {
|
|---|
| 27 | GUI_OBJECT(CCheckBox)
|
|---|
| 28 |
|
|---|
| 29 | public:
|
|---|
| [22741] | 30 | CCheckBox(CGUI& pGUI);
|
|---|
| [290] | 31 | virtual ~CCheckBox();
|
|---|
| 32 |
|
|---|
| [9340] | 33 | /**
|
|---|
| 34 | * @see IGUIObject#ResetStates()
|
|---|
| 35 | */
|
|---|
| [23020] | 36 | virtual void ResetStates();
|
|---|
| [290] | 37 |
|
|---|
| 38 | /**
|
|---|
| [9340] | 39 | * @see IGUIObject#HandleMessage()
|
|---|
| [290] | 40 | */
|
|---|
| [16931] | 41 | virtual void HandleMessage(SGUIMessage& Message);
|
|---|
| [290] | 42 |
|
|---|
| 43 | /**
|
|---|
| 44 | * Draws the control
|
|---|
| 45 | */
|
|---|
| [25588] | 46 | virtual void Draw(CCanvas2D& canvas);
|
|---|
| [23005] | 47 |
|
|---|
| 48 | protected:
|
|---|
| 49 | // Settings
|
|---|
| [25392] | 50 | CGUISimpleSetting<bool> m_Checked;
|
|---|
| 51 | CGUISimpleSetting<CGUISpriteInstance> m_SpriteUnchecked;
|
|---|
| 52 | CGUISimpleSetting<CGUISpriteInstance> m_SpriteUncheckedOver;
|
|---|
| 53 | CGUISimpleSetting<CGUISpriteInstance> m_SpriteUncheckedPressed;
|
|---|
| 54 | CGUISimpleSetting<CGUISpriteInstance> m_SpriteUncheckedDisabled;
|
|---|
| 55 | CGUISimpleSetting<CGUISpriteInstance> m_SpriteChecked;
|
|---|
| 56 | CGUISimpleSetting<CGUISpriteInstance> m_SpriteCheckedOver;
|
|---|
| 57 | CGUISimpleSetting<CGUISpriteInstance> m_SpriteCheckedPressed;
|
|---|
| 58 | CGUISimpleSetting<CGUISpriteInstance> m_SpriteCheckedDisabled;
|
|---|
| [290] | 59 | };
|
|---|
| 60 |
|
|---|
| [16931] | 61 | #endif // INCLUDED_CCHECKBOX
|
|---|