add new sigc++2 directory
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / statusbar.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_STATUSBAR_H
4 #define _GTKMM_STATUSBAR_H
5
6
7 #include <glibmm.h>
8
9 /* $Id$ */
10
11 /* statusbar.h
12  * 
13  * Copyright (C) 1998-2002 The gtkmm Development Team
14  *
15  * This library is free software; you can redistribute it and/or
16  * modify it under the terms of the GNU Library General Public
17  * License as published by the Free Software Foundation; either
18  * version 2 of the License, or (at your option) any later version.
19  *
20  * This library is distributed in the hope that it will be useful,
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
23  * Library General Public License for more details.
24  *
25  * You should have received a copy of the GNU Library General Public
26  * License along with this library; if not, write to the Free
27  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28  */
29
30 #include <gtkmm/box.h>
31
32
33 #ifndef DOXYGEN_SHOULD_SKIP_THIS
34 typedef struct _GtkStatusbar GtkStatusbar;
35 typedef struct _GtkStatusbarClass GtkStatusbarClass;
36 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
37
38
39 namespace Gtk
40 { class Statusbar_Class; } // namespace Gtk
41 namespace Gtk
42 {
43
44 /** Text status indicator
45  * This widget is used to display status information.
46  * Messages are pushed and poped onto a message stack.
47  * When text is pushed it replaces the old contents.
48  * The old text is restored when popped.
49  *
50  * It derives from Gtk::HBox so that additional information can be added
51  * easily.
52  *
53  * @ingroup Widgets
54  */
55
56 class Statusbar : public HBox
57 {
58   public:
59 #ifndef DOXYGEN_SHOULD_SKIP_THIS
60   typedef Statusbar CppObjectType;
61   typedef Statusbar_Class CppClassType;
62   typedef GtkStatusbar BaseObjectType;
63   typedef GtkStatusbarClass BaseClassType;
64 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
65
66   virtual ~Statusbar();
67
68 #ifndef DOXYGEN_SHOULD_SKIP_THIS
69
70 private:
71   friend class Statusbar_Class;
72   static CppClassType statusbar_class_;
73
74   // noncopyable
75   Statusbar(const Statusbar&);
76   Statusbar& operator=(const Statusbar&);
77
78 protected:
79   explicit Statusbar(const Glib::ConstructParams& construct_params);
80   explicit Statusbar(GtkStatusbar* castitem);
81
82 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
83
84 public:
85 #ifndef DOXYGEN_SHOULD_SKIP_THIS
86   static GType get_type()      G_GNUC_CONST;
87   static GType get_base_type() G_GNUC_CONST;
88 #endif
89
90   ///Provides access to the underlying C GtkObject.
91   GtkStatusbar*       gobj()       { return reinterpret_cast<GtkStatusbar*>(gobject_); }
92
93   ///Provides access to the underlying C GtkObject.
94   const GtkStatusbar* gobj() const { return reinterpret_cast<GtkStatusbar*>(gobject_); }
95
96
97 public:
98   //C++ methods used to invoke GTK+ virtual functions:
99 #ifdef GLIBMM_VFUNCS_ENABLED
100 #endif //GLIBMM_VFUNCS_ENABLED
101
102 protected:
103   //GTK+ Virtual Functions (override these to change behaviour):
104 #ifdef GLIBMM_VFUNCS_ENABLED
105 #endif //GLIBMM_VFUNCS_ENABLED
106
107   //Default Signal Handlers::
108 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
109   virtual void on_text_pushed(guint context_id, const Glib::ustring& text);
110   virtual void on_text_popped(guint context_id, const Glib::ustring& text);
111 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
112
113
114 private:
115
116   
117 public:
118   Statusbar();
119
120   
121   /** Returns: an integer id
122    * @param context_description Textual description of what context 
123    * the new message is being used in.
124    * @return An integer id.
125    */
126   guint get_context_id(const Glib::ustring& context_description);
127   guint push(const Glib::ustring& text, guint context_id = 0);
128   
129   /** Removes the first message in the Gtk::StatusBar's stack
130    * with the given context id. 
131    * 
132    * Note that this may not change the displayed message, if 
133    * the message at the top of the stack has a different 
134    * context id.
135    * @param context_id A context identifier.
136    */
137   void pop(guint context_id = 0);
138   void remove_message(guint message_id, guint context_id = 0);
139   
140   /** Sets whether the statusbar has a resize grip. 
141    * <tt>true</tt> by default.
142    * @param setting <tt>true</tt> to have a resize grip.
143    */
144   void set_has_resize_grip(bool setting = true);
145   
146   /** Returns: <tt>true</tt> if the statusbar has a resize grip.
147    * @return <tt>true</tt> if the statusbar has a resize grip.
148    */
149   bool get_has_resize_grip() const;
150
151   
152   /**
153    * @par Prototype:
154    * <tt>void on_my_%text_pushed(guint context_id, const Glib::ustring& text)</tt>
155    */
156
157   Glib::SignalProxy2< void,guint,const Glib::ustring& > signal_text_pushed();
158
159   
160   /**
161    * @par Prototype:
162    * <tt>void on_my_%text_popped(guint context_id, const Glib::ustring& text)</tt>
163    */
164
165   Glib::SignalProxy2< void,guint,const Glib::ustring& > signal_text_popped();
166
167
168   #ifdef GLIBMM_PROPERTIES_ENABLED
169 /** Whether the statusbar has a grip for resizing the toplevel.
170    *
171    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
172    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
173    * the value of the property changes.
174    */
175   Glib::PropertyProxy<bool> property_has_resize_grip() ;
176 #endif //#GLIBMM_PROPERTIES_ENABLED
177
178 #ifdef GLIBMM_PROPERTIES_ENABLED
179 /** Whether the statusbar has a grip for resizing the toplevel.
180    *
181    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
182    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
183    * the value of the property changes.
184    */
185   Glib::PropertyProxy_ReadOnly<bool> property_has_resize_grip() const;
186 #endif //#GLIBMM_PROPERTIES_ENABLED
187
188
189 };
190
191 } /* namespace Gtk */
192
193
194 namespace Glib
195 {
196   /** A Glib::wrap() method for this object.
197    * 
198    * @param object The C instance.
199    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
200    * @result A C++ instance that wraps this C instance.
201    *
202    * @relates Gtk::Statusbar
203    */
204   Gtk::Statusbar* wrap(GtkStatusbar* object, bool take_copy = false);
205 } //namespace Glib
206
207
208 #endif /* _GTKMM_STATUSBAR_H */
209