Install ardour as a binary, a script and a set of shared
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / checkbutton.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_CHECKBUTTON_H
4 #define _GTKMM_CHECKBUTTON_H
5
6 #include <glibmm.h>
7
8 /* $Id$ */
9
10 /* checkbutton.h
11  * 
12  * Copyright (C) 1998-2002 The gtkmm Development Team
13  *
14  * This library is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU Library General Public
16  * License as published by the Free Software Foundation; either
17  * version 2 of the License, or (at your option) any later version.
18  *
19  * This library is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22  * Library General Public License for more details.
23  *
24  * You should have received a copy of the GNU Library General Public
25  * License along with this library; if not, write to the Free
26  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27  */
28
29 #include <gtkmm/togglebutton.h>
30
31
32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
33 typedef struct _GtkCheckButton GtkCheckButton;
34 typedef struct _GtkCheckButtonClass GtkCheckButtonClass;
35 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
36
37
38 namespace Gtk
39 { class CheckButton_Class; } // namespace Gtk
40 namespace Gtk
41 {
42
43 /** Create widgets with a discrete toggle button.
44  *
45  * A Gtk::CheckButton places a discrete Gtk::ToggleButton next to a widget,
46  * (usually a Gtk::Label).  See Gtk::ToggleButton widgets for more
47  * information about toggle/check buttons.  The important signal,
48  * signal_toggled() is also inherited from Gtk::ToggleButton.
49  *
50  * @ingroup Widgets
51  */
52
53 class CheckButton : public ToggleButton
54 {
55   public:
56 #ifndef DOXYGEN_SHOULD_SKIP_THIS
57   typedef CheckButton CppObjectType;
58   typedef CheckButton_Class CppClassType;
59   typedef GtkCheckButton BaseObjectType;
60   typedef GtkCheckButtonClass BaseClassType;
61 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
62
63   virtual ~CheckButton();
64
65 #ifndef DOXYGEN_SHOULD_SKIP_THIS
66
67 private:
68   friend class CheckButton_Class;
69   static CppClassType checkbutton_class_;
70
71   // noncopyable
72   CheckButton(const CheckButton&);
73   CheckButton& operator=(const CheckButton&);
74
75 protected:
76   explicit CheckButton(const Glib::ConstructParams& construct_params);
77   explicit CheckButton(GtkCheckButton* castitem);
78
79 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
80
81 public:
82 #ifndef DOXYGEN_SHOULD_SKIP_THIS
83   static GType get_type()      G_GNUC_CONST;
84   static GType get_base_type() G_GNUC_CONST;
85 #endif
86
87   ///Provides access to the underlying C GtkObject.
88   GtkCheckButton*       gobj()       { return reinterpret_cast<GtkCheckButton*>(gobject_); }
89
90   ///Provides access to the underlying C GtkObject.
91   const GtkCheckButton* gobj() const { return reinterpret_cast<GtkCheckButton*>(gobject_); }
92
93
94 public:
95   //C++ methods used to invoke GTK+ virtual functions:
96
97 protected:
98   //GTK+ Virtual Functions (override these to change behaviour):
99
100   //Default Signal Handlers::
101
102
103 private:
104
105 public:
106
107   /** Create an empty check button.
108    * With an empty button, you can Gtk::Button::add() a widget such as a
109    * Gtk::Pixmap or Gtk::Box.
110    *
111    * If you just wish to add a Gtk::Label, you may want to use the
112    * Gtk::CheckButton(const Glib::ustring &label) constructor directly
113    * instead.
114    */
115   CheckButton();
116
117   /** Create a check button with a label.
118    * You won't be able to add a widget to this button since it already
119    * contains a Gtk::Label
120    */
121   explicit CheckButton(const Glib::ustring& label, bool mnemonic = false);
122   
123
124 protected:
125   /** Emited on button redraw to update indicator.
126    * Triggered when the button is redrawn (e.g.after being toggled)
127    * Overload this signal if you want to implement your own check button
128    * look. Otherwise, you most likely don't care about it.
129    * The GdkRectangle specifies the area of the widget which will get
130    * redrawn.
131    */
132     virtual void draw_indicator_vfunc(GdkRectangle* area);
133   
134
135 };
136
137
138 } /* namespace Gtk */
139
140
141 namespace Glib
142 {
143   /** @relates Gtk::CheckButton
144    * @param object The C instance
145    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
146    * @result A C++ instance that wraps this C instance.
147    */
148   Gtk::CheckButton* wrap(GtkCheckButton* object, bool take_copy = false);
149 }
150 #endif /* _GTKMM_CHECKBUTTON_H */
151