summaryrefslogtreecommitdiffstats
path: root/ganv
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-12-21 19:30:29 +0000
committerDavid Robillard <d@drobilla.net>2012-12-21 19:30:29 +0000
commit9306840a17b29faa3dccb614dfe27a15fa0250c8 (patch)
tree7eb3cdfcd74d4371a9e234e8bea60e1b23656583 /ganv
parent2c3cbd04b0d62382bad891e7933f709ef48c4be1 (diff)
downloadganv-9306840a17b29faa3dccb614dfe27a15fa0250c8.tar.gz
ganv-9306840a17b29faa3dccb614dfe27a15fa0250c8.tar.bz2
ganv-9306840a17b29faa3dccb614dfe27a15fa0250c8.zip
Implement item stacking.
git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@4876 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'ganv')
-rw-r--r--ganv/Item.hpp1
-rw-r--r--ganv/canvas-base.h13
2 files changed, 7 insertions, 7 deletions
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.