1
/* $Id: checkbutton.hg,v 1.2 2004/01/19 19:48:44 murrayc Exp $ */
5
* Copyright (C) 1998-2002 The gtkmm Development Team
7
* This library is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU Lesser General Public
9
* License as published by the Free Software Foundation; either
10
* version 2.1 of the License, or (at your option) any later version.
12
* This library is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
* Lesser General Public License for more details.
17
* You should have received a copy of the GNU Lesser General Public
18
* License along with this library; if not, write to the Free
19
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22
#include <gtkmm/togglebutton.h>
24
_PINCLUDE(gtkmm/private/togglebutton_p.h)
29
/** Create widgets with a discrete toggle button.
31
* A Gtk::CheckButton places a discrete Gtk::ToggleButton next to a widget,
32
* (usually a Gtk::Label). See Gtk::ToggleButton widgets for more
33
* information about toggle/check buttons. The important signal,
34
* signal_toggled() is also inherited from Gtk::ToggleButton.
36
* The CheckButton widget looks like this:
37
* @image html checkbutton1.png
41
class CheckButton : public ToggleButton
43
_CLASS_GTKOBJECT(CheckButton,GtkCheckButton,GTK_CHECK_BUTTON,Gtk::ToggleButton,GtkToggleButton)
46
/** Create an empty check button.
47
* With an empty button, you can Gtk::Button::add() a widget such as a
48
* Gtk::Image or Gtk::Box.
50
* If you just wish to add a Gtk::Label, you may want to use the
51
* Gtk::CheckButton(const Glib::ustring& label) constructor directly
56
/** Create a check button with a label.
57
* You won't be able to add a widget to this button since it already
58
* contains a Gtk::Label
60
explicit CheckButton(const Glib::ustring& label, bool mnemonic = false);
66
dnl This extra conversion does the extra reference, often needed by code for vfuncs and signal.
67
_CONVERSION(`cairo_t*',`const Cairo::RefPtr<Cairo::Context>&',`Cairo::RefPtr<Cairo::Context>(new Cairo::Context($3, false /* has_reference */))')
70
/** Emited on button redraw to update indicator.
71
* Triggered when the button is redrawn (e.g.after being toggled)
72
* Overload this signal if you want to implement your own check button
73
* look. Otherwise, you most likely don't care about it.
74
* The GdkRectangle specifies the area of the widget which will get
77
_WRAP_VFUNC(void draw_indicator(const Cairo::RefPtr<Cairo::Context>& cr), "draw_indicator")