[gtkmm] LevelBar: Add set_orientation().
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] LevelBar: Add set_orientation().
- Date: Mon, 14 Sep 2015 21:22:09 +0000 (UTC)
commit a985e6125a86336c63aa7889f6d4b40c9d26cd65
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Sep 14 23:11:36 2015 +0200
LevelBar: Add set_orientation().
This is just a convenience for until we can break ABI and properly
derive from Gtk::Orientable.
Bug #752568 (Tobias Hoffmann)
gtk/src/levelbar.ccg | 5 +++++
gtk/src/levelbar.hg | 15 ++++++++-------
2 files changed, 13 insertions(+), 7 deletions(-)
---
diff --git a/gtk/src/levelbar.ccg b/gtk/src/levelbar.ccg
index 0d7d964..8e13222 100644
--- a/gtk/src/levelbar.ccg
+++ b/gtk/src/levelbar.ccg
@@ -20,4 +20,9 @@
namespace Gtk
{
+void LevelBar::set_orientation(Orientation orientation)
+{
+ gtk_orientable_set_orientation(GTK_ORIENTABLE(gobj()), ((GtkOrientation)(orientation)));
+}
+
} //namespace Gtk
diff --git a/gtk/src/levelbar.hg b/gtk/src/levelbar.hg
index 93a7a18..c655296 100644
--- a/gtk/src/levelbar.hg
+++ b/gtk/src/levelbar.hg
@@ -53,13 +53,6 @@ _WRAP_ENUM(LevelBarMode, GtkLevelBarMode)
* set the minimum value to 0 and the maximum value to 5 after changing the indicator
* mode to discrete.
*
- * gtkmm's LevelBar class should derive from the Orientable interface but that would
- * now require an ABI break. You may instead use the C API to change the orientation.
- * For instance:
- * @code
- * gtk_orientable_set_orientation(GTK_ORIENTABLE(bar.gobj()), GTK_ORIENTATION_VERTICAL);
- * @endcode
- *
* @ingroup Widgets
* @newin{3,6}
*/
@@ -71,6 +64,14 @@ public:
_CTOR_DEFAULT()
_IGNORE(gtk_level_bar_new)
+ //TODO: Remove this when we can break ABI to derive from Orientable.
+ /** Sets the orientation of the widget.
+ *
+ * @newin{3,18}
+ *
+ * @param orientation The widget’s new orientation.
+ */
+ void set_orientation(Orientation orientation);
_WRAP_METHOD(void set_mode(LevelBarMode mode), gtk_level_bar_set_mode)
_WRAP_METHOD(LevelBarMode get_mode() const, gtk_level_bar_get_mode)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]