[gtkmm] Gtk::StackSwitcher: Add unset_stack()



commit fa14f6ad28ca24ff241071079d60ff4908aa21ae
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date:   Thu Feb 19 10:21:24 2015 +0100

    Gtk::StackSwitcher: Add unset_stack()
    
    * gtk/src/stackswitcher.[ccg|hg]: Add unset_stack().

 gtk/src/stackswitcher.ccg |    5 +++++
 gtk/src/stackswitcher.hg  |   14 ++++++++++----
 2 files changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/gtk/src/stackswitcher.ccg b/gtk/src/stackswitcher.ccg
index acb379f..818224b 100644
--- a/gtk/src/stackswitcher.ccg
+++ b/gtk/src/stackswitcher.ccg
@@ -21,4 +21,9 @@
 namespace Gtk
 {
 
+void StackSwitcher::unset_stack()
+{
+  gtk_stack_switcher_set_stack(gobj(), 0);
+}
+
 } //namespace Gtk
diff --git a/gtk/src/stackswitcher.hg b/gtk/src/stackswitcher.hg
index 8eeb69d..93f463a 100644
--- a/gtk/src/stackswitcher.hg
+++ b/gtk/src/stackswitcher.hg
@@ -24,7 +24,9 @@ _PINCLUDE(gtkmm/private/box_p.h)
 
 namespace Gtk
 {
-_CC_INCLUDE(gtk/gtk.h)
+// Gtk::StackSwitcher is formally a container widget, but it's not included
+// in group Containers. A StackSwitcher adds its children itself, when a Stack
+// is connected. Users of StackSwitcher shall not call its inherited add() method.
 
 /** A controller for a Gtk::Stack.
  *
@@ -48,14 +50,18 @@ public:
   _CTOR_DEFAULT
 
   _WRAP_METHOD(void set_stack(Stack& stack), gtk_stack_switcher_set_stack)
+  /** Unsets the associated Stack.
+   * @see set_stack().
+   * @newin{3,16}
+   */
+  void unset_stack();
 
   _WRAP_METHOD(Stack* get_stack(), gtk_stack_switcher_get_stack)
   _WRAP_METHOD(const Stack* get_stack() const, gtk_stack_switcher_get_stack, constversion)
 
   _WRAP_PROPERTY("stack", Stack*)
+
+  // There are no signals or vfuncs.
 };
 
 } // namespace Gtk
-
-
-


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]