[clutter-gtkmm] Viewport: Correct the constructor.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter-gtkmm] Viewport: Correct the constructor.
- Date: Wed, 5 May 2010 21:49:32 +0000 (UTC)
commit 42e4240e4563eda29b78f9c9c738a0ed9913feb6
Author: Murray Cumming <murrayc murrayc com>
Date: Wed May 5 23:43:31 2010 +0200
Viewport: Correct the constructor.
* clutter-gtk/src/viewport.hg: Constructor and create(): Use the Adjustments
via pointer, not reference, allowing default values of 0. Added properties.
This also seems to fix the constructor to really use the properties.
Added class documentation based on the C docs.
ChangeLog | 9 +++++++++
clutter-gtk/src/viewport.hg | 23 ++++++++++++++++++-----
2 files changed, 27 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 1b8b7b7..993db6d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2010-05-05 Murray Cumming <murrayc murrayc com>
+ Viewport: Correct the constructor.
+
+ * clutter-gtk/src/viewport.hg: Constructor and create(): Use the Adjustments
+ via pointer, not reference, allowing default values of 0. Added properties.
+ This also seems to fix the constructor to really use the properties.
+ Added class documentation based on the C docs.
+
+2010-05-05 Murray Cumming <murrayc murrayc com>
+
Updated for latest clutter-gtk.
* configure.ac: Depend on latest clutter-gtk and cluttermm.
diff --git a/clutter-gtk/src/viewport.hg b/clutter-gtk/src/viewport.hg
index 8d62c90..e12a771 100644
--- a/clutter-gtk/src/viewport.hg
+++ b/clutter-gtk/src/viewport.hg
@@ -27,20 +27,33 @@ namespace Clutter
namespace Gtk
{
-//TODO: Documentation.
+/** This is a scrollable actor that can contain a single Clutter::Actor.
+ *
+ * Using two Gtk::Adjustments it is possible to control the visible area of the
+ * child actor if the size of the viewport is smaller than the size of the child.
+ *
+ * The Gtk::Adjustments used to control the horizontal and vertical scrolling
+ * can be attached to a Gtk::Scrollbar subclass, like Gtk::HScrollbar or Gtk::VScrollbar.
+ *
+ * The Viewport can be used inside any Clutter::Container implementation.
+ */
class Viewport :
public ::Clutter::Actor
{
_CLASS_GOBJECT(Viewport, GtkClutterViewport, GTK_CLUTTER_VIEWPORT, ::Clutter::Actor, ClutterActor)
protected:
-#m4 _CONVERSION(`::Gtk::Adjustment&',`GtkAdjustment*',`($3).gobj()')
- _WRAP_CTOR(Viewport(::Gtk::Adjustment& h_adjustment, ::Gtk::Adjustment& v_adjustment), gtk_clutter_viewport_new)
+#m4 _CONVERSION(`::Gtk::Adjustment*',`GtkAdjustment*',`($3 ? ($3)->gobj() : 0)')
+ _WRAP_CTOR(Viewport(::Gtk::Adjustment* h_adjustment = 0, ::Gtk::Adjustment* v_adjustment = 0, ::Gtk::Adjustment* z_adjustment = 0), gtk_clutter_viewport_new)
public:
- _WRAP_CREATE(::Gtk::Adjustment& h_adjustment, ::Gtk::Adjustment& v_adjustment)
- _WRAP_METHOD(void get_origin(float& x, float& y, float& z), gtk_clutter_viewport_get_origin)
+ _WRAP_CREATE(::Gtk::Adjustment* h_adjustment = 0, ::Gtk::Adjustment* v_adjustment = 0, ::Gtk::Adjustment* z_adjustment = 0)
+ _WRAP_METHOD(void get_origin(float& x, float& y, float& z) const, gtk_clutter_viewport_get_origin)
+
+ _WRAP_PROPERTY("h_adjustment", ::Gtk::Adjustment*)
+ _WRAP_PROPERTY("v_adjustment", ::Gtk::Adjustment*)
+ _WRAP_PROPERTY("z_adjustment", ::Gtk::Adjustment*)
};
} // namespace Gtk
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]