[gtkmm] Wrap GtkActionBar



commit 7e1f2287e2bec69f8d020d98707e350e60049ebf
Author: Juan R. GarcĂ­a Blanco <juanrgar gmail com>
Date:   Mon Jan 27 22:32:38 2014 +0100

    Wrap GtkActionBar
    
    Bug #723124

 gtk/gtkmm.h                               |    1 +
 gtk/src/actionbar.ccg                     |   25 ++++++++++++
 gtk/src/actionbar.hg                      |   61 +++++++++++++++++++++++++++++
 gtk/src/filelist.am                       |    1 +
 tools/extra_defs_gen/generate_defs_gtk.cc |    1 +
 5 files changed, 89 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkmm.h b/gtk/gtkmm.h
index b16c4ce..8e31248 100644
--- a/gtk/gtkmm.h
+++ b/gtk/gtkmm.h
@@ -101,6 +101,7 @@ extern const int gtkmm_micro_version;
 #include <gtkmm/accelmap.h>
 #include <gtkmm/accelgroup.h>
 #include <gtkmm/actionable.h>
+#include <gtkmm/actionbar.h>
 #include <gtkmm/adjustment.h>
 #include <gtkmm/alignment.h>
 #include <gtkmm/appchooserbutton.h>
diff --git a/gtk/src/actionbar.ccg b/gtk/src/actionbar.ccg
new file mode 100644
index 0000000..0b15ffe
--- /dev/null
+++ b/gtk/src/actionbar.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/actionbar.hg b/gtk/src/actionbar.hg
new file mode 100644
index 0000000..04ce8d7
--- /dev/null
+++ b/gtk/src/actionbar.hg
@@ -0,0 +1,61 @@
+/*
+ * 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/container.h>
+_DEFS(gtkmm,gtk)
+_PINCLUDE(gtkmm/private/container_p.h)
+
+namespace Gtk
+{
+
+/** A box with a centered child.
+ *
+ * Gtk::ActionBar is similar to a horizontal Gtk::Box, it allows to place
+ * children at the start or the end. In addition, it contains an
+ * internal centered box which is centered with respect to the full
+ * width of the box, even if the children at either side take up
+ * different amounts of space.
+ *
+ * @ingroup Containers
+ * @newin{3,12}
+ */
+class ActionBar
+  : public Container
+{
+  _CLASS_GTKOBJECT(ActionBar, GtkActionBar, GTK_ACTION_BAR, Gtk::Container, GtkContainer)
+public:
+
+  /** Creates a new ActionBar widget.
+   */
+  _CTOR_DEFAULT
+
+  _WRAP_METHOD(void pack_start(Gtk::Widget& child), gtk_action_bar_pack_start)
+  _WRAP_METHOD(void pack_end(Gtk::Widget& child), gtk_action_bar_pack_end)
+
+  // transfer none
+  _WRAP_METHOD(Widget* get_center_widget(), gtk_action_bar_get_center_widget)
+  _WRAP_METHOD(const Widget* get_center_widget() const, gtk_action_bar_get_center_widget, constversion)
+  _WRAP_METHOD(void set_center_widget(Widget& center_widget), gtk_action_bar_set_center_widget)
+
+  _WRAP_PROPERTY("spacing", int)
+  _WRAP_PROPERTY("center-widget", Widget*)
+
+  // Gtk::ActionBar has no signals nor vfuncs as of 3.12.
+};
+
+} // namespace Gtk
diff --git a/gtk/src/filelist.am b/gtk/src/filelist.am
index c7fb56c..b3234f8 100644
--- a/gtk/src/filelist.am
+++ b/gtk/src/filelist.am
@@ -17,6 +17,7 @@ gtkmm_files_any_hg =          \
        accellabel.hg           \
        action.hg               \
        actionable.hg           \
+       actionbar.hg            \
        actiongroup.hg          \
        activatable.hg          \
        adjustment.hg           \
diff --git a/tools/extra_defs_gen/generate_defs_gtk.cc b/tools/extra_defs_gen/generate_defs_gtk.cc
index 3086a56..ce3b9e0 100644
--- a/tools/extra_defs_gen/generate_defs_gtk.cc
+++ b/tools/extra_defs_gen/generate_defs_gtk.cc
@@ -50,6 +50,7 @@ int main(int argc, char** argv)
             << get_defs( GTK_TYPE_ACTION )
             << get_defs( GTK_TYPE_ACTION_GROUP )
             << get_defs( GTK_TYPE_ACTIONABLE )
+            << get_defs( GTK_TYPE_ACTION_BAR )
             << get_defs( GTK_TYPE_ACTIVATABLE )
             << get_defs( GTK_TYPE_ADJUSTMENT )
             << get_defs( GTK_TYPE_ALIGNMENT)


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