summaryrefslogtreecommitdiffstats
path: root/ganv
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-07-30 21:14:41 +0200
committerDavid Robillard <d@drobilla.net>2020-07-30 21:14:41 +0200
commit1d33505fa45fe69010719e45546de4523254d510 (patch)
treef3849dcfa78f32fc2cead41b686b06bfb1d294fd /ganv
parent6d41e6aad3255a62af3c1b566921eedca6dad931 (diff)
downloadganv-1d33505fa45fe69010719e45546de4523254d510.tar.gz
ganv-1d33505fa45fe69010719e45546de4523254d510.tar.bz2
ganv-1d33505fa45fe69010719e45546de4523254d510.zip
Expand canvas automatically to fit nodes
Diffstat (limited to 'ganv')
-rw-r--r--ganv/Canvas.hpp1
-rw-r--r--ganv/canvas.h8
2 files changed, 9 insertions, 0 deletions
diff --git a/ganv/Canvas.hpp b/ganv/Canvas.hpp
index 1a11408..eaf08fd 100644
--- a/ganv/Canvas.hpp
+++ b/ganv/Canvas.hpp
@@ -58,6 +58,7 @@ public:
METHOD0(ganv_canvas, clear)
METHODRET0(ganv_canvas, gboolean, empty)
+ METHOD2(ganv_canvas, get_size, double*, width, double*, height)
METHOD2(ganv_canvas, resize, double, width, double, height)
METHOD4(ganv_canvas, set_scroll_region, double, x1, double, y1, double, x2, double, y2)
METHOD4(ganv_canvas, get_scroll_region, double*, x1, double*, y1, double*, x2, double*, y2)
diff --git a/ganv/canvas.h b/ganv/canvas.h
index 3ffb55c..5d1c5ee 100644
--- a/ganv/canvas.h
+++ b/ganv/canvas.h
@@ -134,6 +134,14 @@ gboolean
ganv_canvas_empty(const GanvCanvas* canvas);
/**
+ * ganv_canvas_get_size:
+ *
+ * Gets the width and height of the canvas.
+ */
+void
+ganv_canvas_get_size(GanvCanvas* canvas, double* width, double* height);
+
+/**
* ganv_canvas_resize:
*
* Resize the canvas to the given dimensions.