From 9306840a17b29faa3dccb614dfe27a15fa0250c8 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 21 Dec 2012 19:30:29 +0000 Subject: Implement item stacking. git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@4876 a436a847-0d15-0410-975c-d299462d15a1 --- ganv/Item.hpp | 1 - ganv/canvas-base.h | 13 +++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'ganv') diff --git a/ganv/Item.hpp b/ganv/Item.hpp index 08ad2d3..1009e12 100644 --- a/ganv/Item.hpp +++ b/ganv/Item.hpp @@ -55,7 +55,6 @@ public: METHOD0(ganv_item, show); METHOD0(ganv_item, hide); - METHOD0(ganv_item, raise_to_top); METHOD2(ganv_item, move, double, dx, double, dy); GanvItem* property_parent() const { diff --git a/ganv/canvas-base.h b/ganv/canvas-base.h index 816fb28..161df81 100644 --- a/ganv/canvas-base.h +++ b/ganv/canvas-base.h @@ -83,6 +83,9 @@ struct _GanvItem { /* Parent for this item */ GanvItem* parent; + /* Layer (z order), higher values are on top */ + guint layer; + /* Position in parent-relative coordinates. */ double x, y; @@ -172,14 +175,12 @@ void ganv_item_set(GanvItem* item, const gchar* first_arg_name, ...); void ganv_item_set_valist(GanvItem* item, const gchar* first_arg_name, va_list args); -/* Move an item by the specified amount */ -void ganv_item_move(GanvItem* item, double dx, double dy); +void ganv_item_raise(GanvItem* item); -/* Raise an item to the top of its parent's z-order. */ -void ganv_item_raise_to_top(GanvItem* item); +void ganv_item_lower(GanvItem* item); -/* Lower an item to the bottom of its parent's z-order */ -void ganv_item_lower_to_bottom(GanvItem* item); +/* Move an item by the specified amount */ +void ganv_item_move(GanvItem* item, double dx, double dy); /* Show an item (make it visible). If the item is already shown, it has no * effect. -- cgit v1.2.1