[cluttermm] Adds Margin methods.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cluttermm] Adds Margin methods.
- Date: Mon, 24 Mar 2014 08:55:47 +0000 (UTC)
commit 7cccfc4904b9cba831866e6f537a8231afc43cd2
Author: Ian Martin <martin_id vodafone co nz>
Date: Mon Mar 24 21:34:13 2014 +1300
Adds Margin methods.
The Margin struct is not wrapped at present.
clutter/src/actor.ccg | 9 ++++++++-
clutter/src/actor.hg | 19 +++++++++++++++++++
2 files changed, 27 insertions(+), 1 deletions(-)
---
diff --git a/clutter/src/actor.ccg b/clutter/src/actor.ccg
index 0df49e0..4bef621 100644
--- a/clutter/src/actor.ccg
+++ b/clutter/src/actor.ccg
@@ -95,6 +95,14 @@ Geometry Actor::get_allocation_geometry() const
}
_DEPRECATE_IFDEF_END
+void Actor::set_margins(float top, float left, float bottom, float right)
+{
+ set_margin_top(top);
+ set_margin_left(left);
+ set_margin_bottom(bottom);
+ set_margin_right(right);
+}
+
// Glib::RefPtr<Animation>
// Actor::animate(gulong mode, guint duration, const std::map<std::string, Glib::ValueBase>& properties)
// {
@@ -201,4 +209,3 @@ void Actor::get_paint_area_vfunc(ActorBox& box) const
#endif
} //namespace Clutter
-
diff --git a/clutter/src/actor.hg b/clutter/src/actor.hg
index b5a10f1..ecb6b6f 100644
--- a/clutter/src/actor.hg
+++ b/clutter/src/actor.hg
@@ -237,6 +237,25 @@ _DEPRECATE_IFDEF_END
_WRAP_METHOD(void move_anchor_point_from_gravity(Gravity gravity),
clutter_actor_move_anchor_point_from_gravity, deprecated "Use “pivot-point” instead.")
_WRAP_METHOD(void move_anchor_point(float anchor_x, float anchor_y), clutter_actor_move_anchor_point,
deprecated "Use “pivot-point” instead.")
+// IM: ClutterMargin.
+ _IGNORE(clutter_actor_set_margin, clutter_actor_get_margin)
+ _WRAP_METHOD(void set_margin_top(float margin), clutter_actor_set_margin_top)
+ _WRAP_METHOD(float get_margin_top() const, clutter_actor_get_margin_top)
+ _WRAP_METHOD(void set_margin_bottom(float margin), clutter_actor_set_margin_bottom)
+ _WRAP_METHOD(float get_margin_bottom() const, clutter_actor_get_margin_bottom)
+ _WRAP_METHOD(void set_margin_left(float margin), clutter_actor_set_margin_left)
+ _WRAP_METHOD(float get_margin_left() const, clutter_actor_get_margin_left)
+ _WRAP_METHOD(void set_margin_right(float margin), clutter_actor_set_margin_right)
+ _WRAP_METHOD(float get_margin_right() const, clutter_actor_get_margin_right)
+ /**
+ * Convenience method for setting all margins at once.
+ *
+ * @param top The top margin
+ * @param left the left margin
+ * @param bottom The bottom margin
+ * @param right The right margin.
+ * */
+ void set_margins(float top, float left, float bottom, float right);
_WRAP_METHOD(bool get_fixed_position_set() const, clutter_actor_get_fixed_position_set)
_WRAP_METHOD(void set_fixed_position_set(bool is_set), clutter_actor_set_fixed_position_set)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]