2 GoatKit - a themable/animated widget toolkit for games
3 Copyright (C) 2014-2015 John Tsiombikas <nuclear@member.fsf.org>
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
29 cbox = new CheckBoxImpl;
30 cbox->checked = false;
31 cbox->checked.set_transition_duration(60);
39 const char *CheckBox::get_type_name() const
45 void CheckBox::check()
47 cbox->checked.change(true);
50 void CheckBox::uncheck()
52 cbox->checked.change(false);
55 float CheckBox::get_checked() const
57 return cbox->checked.get_value();
60 bool CheckBox::is_checked() const
62 return cbox->checked.get_state();
65 void CheckBox::toggle()
74 void CheckBox::set_toggle_transition(long msec)
76 cbox->checked.set_transition_duration(msec);
79 long CheckBox::get_toggle_transition() const
81 return cbox->checked.get_transition_duration();
84 void CheckBox::on_click()
93 } // namespace goatkit