neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
check_box.hpp
Go to the documentation of this file.
1// check_box.hpp
2/*
3neogfx C++ App/Game Engine
4Copyright (c) 2015, 2020 Leigh Johnston. All Rights Reserved.
5
6This program is free software: you can redistribute it and / or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation, either version 3 of the License, or
9(at your option) any later version.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#pragma once
21
22#include <neogfx/neogfx.hpp>
25
26namespace neogfx
27{
28 class check_box : public button<>
29 {
31 private:
32 class box : public widget<>
33 {
34 public:
35 box(check_box& aParent);
36 public:
37 size minimum_size(optional_size const& aAvailableSpace = optional_size{}) const override;
38 size maximum_size(optional_size const& aAvailableSpace = optional_size{}) const override;
39 };
40 public:
41 check_box(std::string const& aText = std::string(), button_checkable aCheckable = button_checkable::BiState);
42 check_box(i_widget& aParent, std::string const& aText = std::string(), button_checkable aCheckable = button_checkable::BiState);
43 check_box(i_layout& aLayout, std::string const& aText = std::string(), button_checkable aCheckable = button_checkable::BiState);
44 public:
45 neogfx::size_policy size_policy() const override;
46 public:
47 rect element_rect(skin_element aElement) const override;
48 protected:
49 void paint(i_graphics_context& aGc) const override;
50 protected:
51 void mouse_entered(const point& aPosition) override;
52 void mouse_left() override;
53 private:
54 box iBox;
55 };
56}
void paint(i_graphics_context &aGc) const override
check_box(i_layout &aLayout, std::string const &aText=std::string(), button_checkable aCheckable=button_checkable::BiState)
void mouse_entered(const point &aPosition) override
neogfx::size_policy size_policy() const override
void mouse_left() override
rect element_rect(skin_element aElement) const override
check_box(std::string const &aText=std::string(), button_checkable aCheckable=button_checkable::BiState)
check_box(i_widget &aParent, std::string const &aText=std::string(), button_checkable aCheckable=button_checkable::BiState)
button_checkable
Definition i_button.hpp:30
#define meta_object(...)
Definition i_object.hpp:28