aboutsummaryrefslogtreecommitdiff
path: root/dw/fltkviewbase.hh
diff options
context:
space:
mode:
Diffstat (limited to 'dw/fltkviewbase.hh')
-rw-r--r--dw/fltkviewbase.hh10
1 files changed, 10 insertions, 0 deletions
diff --git a/dw/fltkviewbase.hh b/dw/fltkviewbase.hh
index 4dc0a27f..c502d2f7 100644
--- a/dw/fltkviewbase.hh
+++ b/dw/fltkviewbase.hh
@@ -25,6 +25,16 @@ private:
void draw (const core::Rectangle *rect, DrawType type);
void drawChildWidgets ();
+ inline void clipPoint (int *x, int *y) {
+ if (*x < 0)
+ *x = 0;
+ if (*x > w ())
+ *x = w ();
+ if (*y < 0)
+ *y = 0;
+ if (*y > h ())
+ *y = h ();
+ }
protected:
core::Layout *theLayout;