Merged revisions 6293,6296-6306,6308 via svnmerge from
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / togglebutton.h
index df0da34b34be4d7998fbbbe7f0185849ddd79bd0..cc86bcfaafda6d92d6b63eab0e17fead77022ef7 100644 (file)
@@ -3,6 +3,7 @@
 #ifndef _GTKMM_TOGGLEBUTTON_H
 #define _GTKMM_TOGGLEBUTTON_H
 
+
 #include <glibmm.h>
 
 /* $Id$ */
@@ -90,12 +91,18 @@ public:
 
 public:
   //C++ methods used to invoke GTK+ virtual functions:
+#ifdef GLIBMM_VFUNCS_ENABLED
+#endif //GLIBMM_VFUNCS_ENABLED
 
 protected:
   //GTK+ Virtual Functions (override these to change behaviour):
+#ifdef GLIBMM_VFUNCS_ENABLED
+#endif //GLIBMM_VFUNCS_ENABLED
 
   //Default Signal Handlers::
+#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
   virtual void on_toggled();
+#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
 
 
 private:
@@ -117,13 +124,19 @@ public:
    * to add a widget to this button since it already contains a Gtk::Label
    */
   explicit ToggleButton(const Glib::ustring& label, bool mnemonic = false);
-  
 
+  /** Creates a toggle button containing the image and text from a stock item.
+   * Stock ids have identifiers like Gtk::Stock::OK and Gtk::Stock::APPLY.
+   * @param stock_id The stock item.
+   */
+  explicit ToggleButton(const StockID& stock_id);
+  
+  
   /** Sets whether the button is displayed as a separate indicator and label.
    * You can call this function on a checkbutton or a radiobutton with
    *  @a draw_indicator  = <tt>false</tt> to make the button look like a normal button
    * 
-   * This function only effects instances of classes like Gtk::CheckButton
+   * This function only affects instances of classes like Gtk::CheckButton
    * and Gtk::RadioButton that derive from Gtk::ToggleButton,
    * not instances of Gtk::ToggleButton itself.
    * @param draw_indicator If <tt>true</tt>, draw the button as a separate indicator
@@ -164,18 +177,26 @@ public:
   
   void toggled();
 
-  
+  /** Emitted whenever the toggle tool button changes state.
+   *
+   * @par Prototype:
+   * <tt>void on_my_%toggled()</tt>
+   */
+
   Glib::SignalProxy0< void > signal_toggled();
 
 
-  /** If the toggle button should be pressed in or not.
+  #ifdef GLIBMM_PROPERTIES_ENABLED
+/** If the toggle button should be pressed in or not.
    *
    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
    * the value of the property changes.
    */
   Glib::PropertyProxy<bool> property_active() ;
+#endif //#GLIBMM_PROPERTIES_ENABLED
 
+#ifdef GLIBMM_PROPERTIES_ENABLED
 /** If the toggle button should be pressed in or not.
    *
    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
@@ -183,31 +204,39 @@ public:
    * the value of the property changes.
    */
   Glib::PropertyProxy_ReadOnly<bool> property_active() const;
+#endif //#GLIBMM_PROPERTIES_ENABLED
 
-  /** If the toggle button is in an in-between state.
+  #ifdef GLIBMM_PROPERTIES_ENABLED
+/** If the toggle button is in an in between state.
    *
    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
    * the value of the property changes.
    */
   Glib::PropertyProxy<bool> property_inconsistent() ;
+#endif //#GLIBMM_PROPERTIES_ENABLED
 
-/** If the toggle button is in an in-between state.
+#ifdef GLIBMM_PROPERTIES_ENABLED
+/** If the toggle button is in an in between state.
    *
    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
    * the value of the property changes.
    */
   Glib::PropertyProxy_ReadOnly<bool> property_inconsistent() const;
+#endif //#GLIBMM_PROPERTIES_ENABLED
 
-  /** If the toggle part of the button is displayed.
+  #ifdef GLIBMM_PROPERTIES_ENABLED
+/** If the toggle part of the button is displayed.
    *
    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
    * the value of the property changes.
    */
   Glib::PropertyProxy<bool> property_draw_indicator() ;
+#endif //#GLIBMM_PROPERTIES_ENABLED
 
+#ifdef GLIBMM_PROPERTIES_ENABLED
 /** If the toggle part of the button is displayed.
    *
    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
@@ -215,6 +244,7 @@ public:
    * the value of the property changes.
    */
   Glib::PropertyProxy_ReadOnly<bool> property_draw_indicator() const;
+#endif //#GLIBMM_PROPERTIES_ENABLED
 
 
 };
@@ -224,12 +254,17 @@ public:
 
 namespace Glib
 {
-  /** @relates Gtk::ToggleButton
-   * @param object The C instance
+  /** A Glib::wrap() method for this object.
+   * 
+   * @param object The C instance.
    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
    * @result A C++ instance that wraps this C instance.
+   *
+   * @relates Gtk::ToggleButton
    */
   Gtk::ToggleButton* wrap(GtkToggleButton* object, bool take_copy = false);
-}
+} //namespace Glib
+
+
 #endif /* _GTKMM_TOGGLEBUTTON_H */