[gtkmm] Wrap GtkRevealer



commit 578c91b3546bc6529a9b5e32af284053c45992c9
Author: Juan R. GarcĂ­a Blanco <juanrgar gmail com>
Date:   Mon Aug 5 20:32:26 2013 +0200

    Wrap GtkRevealer

 gtk/gtkmm.h                               |    1 +
 gtk/src/enums.hg                          |    1 +
 gtk/src/filelist.am                       |    1 +
 gtk/src/revealer.ccg                      |   25 ++++++++++
 gtk/src/revealer.hg                       |   70 +++++++++++++++++++++++++++++
 tools/extra_defs_gen/generate_defs_gtk.cc |    1 +
 tools/m4/convert_gtk.m4                   |    1 +
 7 files changed, 100 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkmm.h b/gtk/gtkmm.h
index 191379f..df2ca6c 100644
--- a/gtk/gtkmm.h
+++ b/gtk/gtkmm.h
@@ -224,6 +224,7 @@ extern const int gtkmm_micro_version;
 #include <gtkmm/recentfilter.h>
 #include <gtkmm/recentinfo.h>
 #include <gtkmm/recentmanager.h>
+#include <gtkmm/revealer.h>
 #include <gtkmm/scale.h>
 #include <gtkmm/scalebutton.h>
 #include <gtkmm/scrollbar.h>
diff --git a/gtk/src/enums.hg b/gtk/src/enums.hg
index c84baa2..9c34180 100644
--- a/gtk/src/enums.hg
+++ b/gtk/src/enums.hg
@@ -88,6 +88,7 @@ _WRAP_ENUM(PolicyType, GtkPolicyType)
 _WRAP_ENUM(PositionType, GtkPositionType)
 _WRAP_ENUM(ReliefStyle, GtkReliefStyle)
 _WRAP_ENUM(ResizeMode, GtkResizeMode)
+_WRAP_ENUM(RevealerTransitionType, GtkRevealerTransitionType)
 _WRAP_ENUM(ScrollType, GtkScrollType)
 _WRAP_ENUM(SelectionMode, GtkSelectionMode)
 _WRAP_ENUM(ShadowType, GtkShadowType)
diff --git a/gtk/src/filelist.am b/gtk/src/filelist.am
index 81a6e93..32da356 100644
--- a/gtk/src/filelist.am
+++ b/gtk/src/filelist.am
@@ -128,6 +128,7 @@ gtkmm_files_any_hg =                \
        recentinfo.hg           \
        recentmanager.hg        \
        requisition.hg          \
+       revealer.hg             \
        scale.hg                \
        scalebutton.hg          \
        scrollable.hg           \
diff --git a/gtk/src/revealer.ccg b/gtk/src/revealer.ccg
new file mode 100644
index 0000000..0b15ffe
--- /dev/null
+++ b/gtk/src/revealer.ccg
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2013 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include <gtk/gtk.h>
+
+
+namespace Gtk
+{
+} // namespace Gtk
+
diff --git a/gtk/src/revealer.hg b/gtk/src/revealer.hg
new file mode 100644
index 0000000..23ec570
--- /dev/null
+++ b/gtk/src/revealer.hg
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2013 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include <gtkmm/bin.h>
+_DEFS(gtkmm,gtk)
+_PINCLUDE(gtkmm/private/bin_p.h)
+
+namespace Gtk
+{
+
+/** Hide and show with animation.
+ *
+ * The Gtk::Revealer widget is a container which animates
+ * the transition of its child from invisible to visible.
+ *
+ * The style of transition can be controlled with
+ * Gtk::Revealer::set_transition_type().
+ *
+ * @ingroup Widgets
+ * @newin{3,10}
+ */
+class Revealer
+  : public Bin
+{
+  _CLASS_GTKOBJECT(Revealer, GtkRevealer, GTK_REVEALER, Gtk::Bin, GtkBin)
+public:
+
+  /** Create Gtk::Revealer widget.
+   *
+   *
+   */
+  _CTOR_DEFAULT
+
+
+  _WRAP_METHOD(bool get_reveal_child() const, gtk_revealer_get_reveal_child)
+  _WRAP_METHOD(void set_reveal_child(bool reveal_child = true), gtk_revealer_set_reveal_child)
+
+  _WRAP_METHOD(bool get_child_revealed() const, gtk_revealer_get_child_revealed)
+
+  _WRAP_METHOD(guint get_transition_duration() const, gtk_revealer_get_transition_duration)
+  _WRAP_METHOD(void set_transition_duration(guint duration), gtk_revealer_set_transition_duration)
+
+  _WRAP_METHOD(RevealerTransitionType get_transition_type() const, gtk_revealer_get_transition_type)
+  _WRAP_METHOD(void set_transition_type(RevealerTransitionType transition), gtk_revealer_set_transition_type)
+
+
+  _WRAP_PROPERTY("transition-type", RevealerTransitionType)
+  _WRAP_PROPERTY("transition-duration", guint)
+  _WRAP_PROPERTY("reveal-child", bool)
+  _WRAP_PROPERTY("child-revealed", bool)
+
+  // Gtk::Revealer has no signals nor vfuncs as of 3.10.
+};
+
+} // namespace Gtk
diff --git a/tools/extra_defs_gen/generate_defs_gtk.cc b/tools/extra_defs_gen/generate_defs_gtk.cc
index 60eacfb..2577070 100644
--- a/tools/extra_defs_gen/generate_defs_gtk.cc
+++ b/tools/extra_defs_gen/generate_defs_gtk.cc
@@ -168,6 +168,7 @@ int main(int argc, char** argv)
             << get_defs( GTK_TYPE_RECENT_CHOOSER_WIDGET )
             << get_defs( GTK_TYPE_RECENT_FILTER )
             << get_defs( GTK_TYPE_RECENT_MANAGER )
+            << get_defs( GTK_TYPE_REVEALER )
             << get_defs( GTK_TYPE_SCALE )
             << get_defs( GTK_TYPE_SCALE_BUTTON )
             << get_defs( GTK_TYPE_SCROLLABLE )
diff --git a/tools/m4/convert_gtk.m4 b/tools/m4/convert_gtk.m4
index 07b1649..a21e3f6 100644
--- a/tools/m4/convert_gtk.m4
+++ b/tools/m4/convert_gtk.m4
@@ -97,6 +97,7 @@ _CONV_ENUM(Gtk,ProgressBarOrientation)
 _CONV_ENUM(Gtk,ProgressBarStyle)
 _CONV_ENUM(Gtk,ReliefStyle)
 _CONV_ENUM(Gtk,ResizeMode)
+_CONV_ENUM(Gtk,RevealerTransitionType)
 _CONV_ENUM(Gtk,ScrollType)
 _CONV_ENUM(Gtk,SelectionMode)
 _CONV_ENUM(Gtk,ShadowType)


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