diff options
author | David Robillard <d@drobilla.net> | 2011-12-07 01:34:32 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-12-07 01:34:32 +0000 |
commit | a3b80d07bc180dfbf2679930b0137321ff0b477f (patch) | |
tree | 017507c4890365ba7de3e1ec4ffe5daed5003022 /ganv | |
parent | 9646e7a855c1c0741ba4fec6c3dd2dc48e174e17 (diff) | |
download | ganv-a3b80d07bc180dfbf2679930b0137321ff0b477f.tar.gz ganv-a3b80d07bc180dfbf2679930b0137321ff0b477f.tar.bz2 ganv-a3b80d07bc180dfbf2679930b0137321ff0b477f.zip |
More work towards making the canvas usable via the C API only.
git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@3823 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'ganv')
-rw-r--r-- | ganv/Canvas.hpp | 11 | ||||
-rw-r--r-- | ganv/canvas.h | 10 |
2 files changed, 13 insertions, 8 deletions
diff --git a/ganv/Canvas.hpp b/ganv/Canvas.hpp index 54118aa..91427bf 100644 --- a/ganv/Canvas.hpp +++ b/ganv/Canvas.hpp @@ -121,11 +121,8 @@ public: /** Shift all canvas contents so the top-left object is at (x, y). */ void move_contents_to(double x, double y); - /** Return the width of the canvas. */ - double width() const; - - /** Return the height of the canvas. */ - double height() const; + RW_PROPERTY(double, width) + RW_PROPERTY(double, height) /** Resize the canvas to the given dimensions. */ void resize(double width, double height); @@ -190,8 +187,8 @@ public: GanvCanvas* gobj(); const GanvCanvas* gobj() const; - /** Canvas event handler. */ - virtual bool on_event(GdkEvent* event); + sigc::signal<void, Node*, Node*> signal_connect; + sigc::signal<void, Node*, Node*> signal_disconnect; /** Signal emitted when the mouse pointer enters an Item. */ sigc::signal<void, GnomeCanvasItem*> signal_item_entered; diff --git a/ganv/canvas.h b/ganv/canvas.h index c910edf..4e3c687 100644 --- a/ganv/canvas.h +++ b/ganv/canvas.h @@ -44,6 +44,8 @@ struct _GanvCanvas GnomeCanvas canvas; struct GanvCanvasImpl* impl; GanvDirection direction; + double width; + double height; gboolean locked; }; @@ -53,7 +55,10 @@ struct _GanvCanvasClass { GType ganv_canvas_get_type(void); -GanvCanvas* ganv_canvas_new(void); +GanvCanvas* ganv_canvas_new(double width, double height); + +void +ganv_canvas_resize(GanvCanvas* canvas, double width, double height); GnomeCanvasGroup* ganv_canvas_get_root(const GanvCanvas* canvas); @@ -67,6 +72,9 @@ double ganv_canvas_get_font_size(const GanvCanvas* canvas); void +ganv_canvas_set_font_size(GanvCanvas* canvas, double points); + +void ganv_canvas_clear_selection(GanvCanvas* canvas); typedef void (*GanvEdgeFunction)(GanvEdge* edge); |