[gtkmm] Widget: Add get/set_clip().
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Widget: Add get/set_clip().
- Date: Mon, 15 Sep 2014 19:41:20 +0000 (UTC)
commit e8aadd138109c4d979ae0be4dbdeba089c685709
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Sep 15 21:05:10 2014 +0200
Widget: Add get/set_clip().
gtk/src/widget.ccg | 8 ++++++++
gtk/src/widget.hg | 15 +++++++++++++++
2 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/gtk/src/widget.ccg b/gtk/src/widget.ccg
index 1453189..61510c1 100644
--- a/gtk/src/widget.ccg
+++ b/gtk/src/widget.ccg
@@ -480,6 +480,14 @@ void Widget::set_window(const Glib::RefPtr<Gdk::Window>& window)
window->reference(); // gtk_widget_set_window does not add a ref.
}
+Allocation Widget::get_clip() const
+{
+ Allocation allocation;
+ gtk_widget_get_clip(const_cast<GtkWidget*>(gobj()), allocation.gobj());
+ return allocation;
+}
+
+
Allocation Widget::get_allocation() const
{
Allocation allocation;
diff --git a/gtk/src/widget.hg b/gtk/src/widget.hg
index 0568db2..8361f98 100644
--- a/gtk/src/widget.hg
+++ b/gtk/src/widget.hg
@@ -292,6 +292,21 @@ public:
#m4 _CONVERSION(`const Allocation&',`const GdkRectangle*',`($3).gobj()')
_WRAP_METHOD(void set_allocation(const Allocation& allocation), gtk_widget_set_allocation)
+ _WRAP_METHOD(void set_clip(const Allocation& clip), gtk_widget_set_clip)
+
+ /** Retrieves the widget’s clip area.
+ *
+ * The clip area is the area in which all of the widget's drawing will
+ * happen. Other toolkits call it the bounding box.
+ *
+ * Historically, in GTK+ the clip area has been equal to the allocation
+ * retrieved via get_allocation().
+ *
+ * @newin{3,14}
+ */
+ Allocation get_clip() const;
+ _IGNORE(gtk_widget_get_clip)
+
_WRAP_METHOD(Container* get_parent(), gtk_widget_get_parent)
_WRAP_METHOD(const Container* get_parent() const, gtk_widget_get_parent, constversion)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]