[gtkmm] Widget, CellRenderer, PrintUnixDialog: Wrapped some new functions.



commit db1bc0060116434ff8909e52c92bbe69258181c2
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Aug 24 16:41:00 2009 +0200

    Widget, CellRenderer, PrintUnixDialog: Wrapped some new functions.
    
    	* gtk/src/cellrenderer.hg: Added get/set_alignment(),
    	get/set_padding(), get/set_visible(),
    	get/set_sensitive().
    	* gtk/src/cellrenderertoggle.hg: Added set/get_activatable().
    	* gtk/src/filechooser.hg: Added get/set_create_folders() and property.
    	* gtk/src/label.hg: Added get/set_track_visited_links() and property.
    	* gtk/src/menu.hg: Added get/set_reserve_toggle_size() and property.
    	* gtk/src/printunixdialog.hg: Added set/get_support_selection(),
    	set/get_support_selection(), set/get_has_selection(),
    	set/get_embed_page_setup(), s/get_embed_page_setup(), and
    	get_page_setup_set().
    	* gtk/src/widget.[hg|ccg]:
    	is_sensitive(), can_focus(), has_focus(), has_grab(), has_default(),
    	is_visible(): Reimplement with new gtk_widget_*() functions.
    	sensitive(), double_buffered(), app_paintable(), can_default():
    	Deprecated in favour of new get_*() methods.
    	Added get/set_has_window().

 ChangeLog                     |   22 ++++++++++++++
 gtk/src/cellrenderer.hg       |   11 +++++++
 gtk/src/cellrenderertoggle.hg |    3 ++
 gtk/src/filechooser.hg        |    4 ++
 gtk/src/label.hg              |    7 ++++
 gtk/src/menu.hg               |    4 ++
 gtk/src/printunixdialog.hg    |   13 ++++++++
 gtk/src/widget.ccg            |   40 +++++++++----------------
 gtk/src/widget.hg             |   65 +++++++++++++++++++++++++++-------------
 9 files changed, 122 insertions(+), 47 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index bd3a878..cb770cb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,27 @@
 2009-08-24  Murray Cumming  <murrayc murrayc com>
 
+	Widget, CellRenderer, PrintUnixDialog: Wrapped some new functions.
+
+	* gtk/src/cellrenderer.hg: Added get/set_alignment(), 
+	get/set_padding(), get/set_visible(), 
+	get/set_sensitive().
+	* gtk/src/cellrenderertoggle.hg: Added set/get_activatable().
+	* gtk/src/filechooser.hg: Added get/set_create_folders() and property.
+	* gtk/src/label.hg: Added get/set_track_visited_links() and property.
+	* gtk/src/menu.hg: Added get/set_reserve_toggle_size() and property.
+	* gtk/src/printunixdialog.hg: Added set/get_support_selection(), 
+	set/get_support_selection(), set/get_has_selection(), 
+	set/get_embed_page_setup(), s/get_embed_page_setup(), and 
+	get_page_setup_set().
+	* gtk/src/widget.[hg|ccg]: 
+	is_sensitive(), can_focus(), has_focus(), has_grab(), has_default(), 
+	is_visible(): Reimplement with new gtk_widget_*() functions.
+	sensitive(), double_buffered(), app_paintable(), can_default(): 
+	Deprecated in favour of new get_*() methods.
+	Added get/set_has_window().
+  
+2009-08-24  Murray Cumming  <murrayc murrayc com>
+
 	Regenerated the main .defs files.
 
 	* gtk/src/gtk_enums.defs:
diff --git a/gtk/src/cellrenderer.hg b/gtk/src/cellrenderer.hg
index aa4d70e..0d2decf 100644
--- a/gtk/src/cellrenderer.hg
+++ b/gtk/src/cellrenderer.hg
@@ -90,6 +90,17 @@ public:
   _WRAP_METHOD(void set_fixed_size(int width, int height), gtk_cell_renderer_set_fixed_size)
   _WRAP_METHOD(void get_fixed_size(int& width, int& height) const, gtk_cell_renderer_get_fixed_size)
 
+  _WRAP_METHOD(void set_alignment(float align, float yalign), gtk_cell_renderer_set_alignment)
+  _WRAP_METHOD(void get_alignment(float& xalign, float& yalign) const, gtk_cell_renderer_get_alignment)
+
+  _WRAP_METHOD(void set_padding(int xpad, int ypad), gtk_cell_renderer_set_padding)
+  _WRAP_METHOD(void get_padding(int& xpad, int& ypad) const, gtk_cell_renderer_get_padding)
+
+  _WRAP_METHOD(void set_visible(bool visible = true), gtk_cell_renderer_set_visible)
+  _WRAP_METHOD(bool get_visible() const, gtk_cell_renderer_get_visible)
+  _WRAP_METHOD(void set_sensitive(bool sensitive = true), gtk_cell_renderer_set_sensitive)
+  _WRAP_METHOD(bool get_sensitive() const, gtk_cell_renderer_get_sensitive)
+
   _WRAP_METHOD(void editing_canceled(), gtk_cell_renderer_editing_canceled, deprecated "Use stop_editing().")
 
   _WRAP_METHOD(void stop_editing(bool canceled = false), gtk_cell_renderer_stop_editing)
diff --git a/gtk/src/cellrenderertoggle.hg b/gtk/src/cellrenderertoggle.hg
index 0f88410..5181879 100644
--- a/gtk/src/cellrenderertoggle.hg
+++ b/gtk/src/cellrenderertoggle.hg
@@ -45,6 +45,9 @@ public:
   _WRAP_METHOD(void set_radio(bool radio = true), gtk_cell_renderer_toggle_set_radio)
   _WRAP_METHOD(bool get_active() const, gtk_cell_renderer_toggle_get_active)
   _WRAP_METHOD(void set_active(bool setting = true), gtk_cell_renderer_toggle_set_active)
+  _WRAP_METHOD(bool get_activatable() const, gtk_cell_renderer_toggle_get_activatable)
+  _WRAP_METHOD(void set_activatable(bool setting = true), gtk_cell_renderer_toggle_set_activatable)
+
 
 #m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING)
    //TODO: Maybe the parameter should be a TreePath.
diff --git a/gtk/src/filechooser.hg b/gtk/src/filechooser.hg
index 1f236aa..ab7b83d 100644
--- a/gtk/src/filechooser.hg
+++ b/gtk/src/filechooser.hg
@@ -91,6 +91,9 @@ public:
   _WRAP_METHOD(void set_do_overwrite_confirmation(bool do_overwrite_confirmation = true), gtk_file_chooser_set_do_overwrite_confirmation)
   _WRAP_METHOD(bool get_do_overwrite_confirmation() const, gtk_file_chooser_get_do_overwrite_confirmation)
 
+  _WRAP_METHOD(void set_create_folders(bool create_folders = true), gtk_file_chooser_set_create_folders)
+  _WRAP_METHOD(bool get_create_folders() const, gtk_file_chooser_get_create_folders)
+
   _WRAP_METHOD(void set_current_name(const Glib::ustring& name), gtk_file_chooser_set_current_name)
   _WRAP_METHOD(Glib::ustring get_filename() const, gtk_file_chooser_get_filename)
   _WRAP_METHOD(bool set_filename(const Glib::ustring& filename), gtk_file_chooser_set_filename)
@@ -256,6 +259,7 @@ public:
   _WRAP_PROPERTY("select-multiple", bool)
   _WRAP_PROPERTY("show-hidden", bool)
   _WRAP_PROPERTY("do-overwrite-confirmation", bool)
+  _WRAP_PROPERTY("create-folders", bool)
 };
 
 } // namespace Gtk
diff --git a/gtk/src/label.hg b/gtk/src/label.hg
index d400199..325ddca 100644
--- a/gtk/src/label.hg
+++ b/gtk/src/label.hg
@@ -140,12 +140,18 @@ public:
   
   _WRAP_METHOD(Glib::ustring get_current_uri() const, gtk_label_get_current_uri)
 
+  _WRAP_METHOD(void set_track_visited_links(bool track_links = true), gtk_label_set_track_visited_links)
+  _WRAP_METHOD(bool get_track_visited_links() const, gtk_label_get_track_visited_links)
 
   _WRAP_SIGNAL(void populate_popup(Menu* menu), "populate_popup")
 
+  #m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING)
+  _WRAP_SIGNAL(bool activate_link(const Glib::ustring& uri), "activate-link", no_default_handler)
+
   //Keybinding signals:
   _IGNORE_SIGNAL("move_cursor")
   _IGNORE_SIGNAL("copy_clipboard")
+  _IGNORE_SIGNAL("activate-current-link")
   
   _WRAP_PROPERTY("label", Glib::ustring)
   _WRAP_PROPERTY("attributes", Pango::AttrList)
@@ -165,6 +171,7 @@ public:
   _WRAP_PROPERTY("single-line-mode", bool)
   _WRAP_PROPERTY("angle", double)
   _WRAP_PROPERTY("max_width_chars", int)
+  _WRAP_PROPERTY("track-visited-links", bool)
 };
 
 }  // namespace Gtk
diff --git a/gtk/src/menu.hg b/gtk/src/menu.hg
index c36f57f..387c468 100644
--- a/gtk/src/menu.hg
+++ b/gtk/src/menu.hg
@@ -117,6 +117,9 @@ public:
   void reorder_child(const MenuItem& child, int position);
   _IGNORE(gtk_menu_reorder_child)
 
+  _WRAP_METHOD(void set_reserve_toggle_size(bool reserve_toggle_size = true), gtk_menu_set_reserve_toggle_size)
+  _WRAP_METHOD(bool get_reserve_toggle_size() const, gtk_menu_get_reserve_toggle_size)
+
   _IGNORE_SIGNAL("move_scroll")
 
 
@@ -127,6 +130,7 @@ public:
   _WRAP_PROPERTY("tearoff-title", Glib::ustring)
   _WRAP_PROPERTY("tearoff-state", bool)
   _WRAP_PROPERTY("monitor", int)
+  _WRAP_PROPERTY("reserve-toggle-size", bool)
 
 protected:
 
diff --git a/gtk/src/printunixdialog.hg b/gtk/src/printunixdialog.hg
index 428a13a..b28f3dc 100644
--- a/gtk/src/printunixdialog.hg
+++ b/gtk/src/printunixdialog.hg
@@ -76,10 +76,23 @@ public:
   _WRAP_METHOD(void add_custom_tab(const Widget& child, const Widget& tab_label), gtk_print_unix_dialog_add_custom_tab)
   _WRAP_METHOD(void set_manual_capabilities(PrintCapabilities capabilities), gtk_print_unix_dialog_set_manual_capabilities)
 
+  _WRAP_METHOD(void get_support_selection(bool support_selection = true), gtk_print_unix_dialog_set_support_selection)
+  _WRAP_METHOD(bool get_support_selection() const, gtk_print_unix_dialog_get_support_selection)
+  _WRAP_METHOD(void set_has_selection(bool has_selection = true), gtk_print_unix_dialog_set_has_selection)
+  _WRAP_METHOD(bool get_has_selection() const, gtk_print_unix_dialog_get_has_selection)
+  _WRAP_METHOD(void set_embed_page_setup(bool embed = true), gtk_print_unix_dialog_set_embed_page_setup)
+  _WRAP_METHOD(bool get_embed_page_setup() const, gtk_print_unix_dialog_get_embed_page_setup)
+  _WRAP_METHOD(bool get_page_setup_set() const, gtk_print_unix_dialog_get_page_setup_set)
+
   _WRAP_PROPERTY("page_setup",  Glib::RefPtr<PageSetup>)
   _WRAP_PROPERTY("current_page", int)
   _WRAP_PROPERTY("print_settings",  Glib::RefPtr<PrintSettings>)
   _WRAP_PROPERTY("selected_printer", Glib::RefPtr<Printer>)
+  _WRAP_PROPERTY("manual-capabilities", bool)
+  _WRAP_PROPERTY("support-selection", bool)
+  _WRAP_PROPERTY("has-selection", bool)
+  _WRAP_PROPERTY("embed-page-setup", bool)
+
 };
 
 } // namespace Gtk
diff --git a/gtk/src/widget.ccg b/gtk/src/widget.ccg
index 5eb482b..a680d04 100644
--- a/gtk/src/widget.ccg
+++ b/gtk/src/widget.ccg
@@ -290,35 +290,29 @@ bool Widget::is_realized() const
 bool Widget::is_mapped() const
   { return GTK_WIDGET_MAPPED(gobj()); }
 
-bool Widget::is_visible() const
-  { return GTK_WIDGET_VISIBLE(gobj()); }
 
 bool Widget::is_drawable() const
   { return GTK_WIDGET_DRAWABLE(gobj()); }
 
+//deprecated:
 bool Widget::sensitive() const
-  { return GTK_WIDGET_SENSITIVE(gobj()); }
+  { return get_sensitive(); }
 
-bool Widget::parent_sensitive() const
-  { return GTK_WIDGET_PARENT_SENSITIVE(gobj()); }
-
-bool Widget::is_sensitive() const
-  { return GTK_WIDGET_IS_SENSITIVE(gobj()); }
-
-bool Widget::can_focus() const
-  { return GTK_WIDGET_CAN_FOCUS(gobj()); }
-
-bool Widget::has_focus() const
-  { return GTK_WIDGET_HAS_FOCUS(gobj()); }
+//deprecated:
+bool Widget::app_paintable() const
+  { return get_app_paintable(); }
 
-bool Widget::can_default() const
-  { return GTK_WIDGET_CAN_DEFAULT(gobj()); }
+//deprecated:
+bool Widget::double_buffered() const
+  { return get_double_buffered(); }
 
-bool Widget::has_default() const
-  { return GTK_WIDGET_HAS_DEFAULT(gobj()); }
+Allocation Widget::get_allocation() const
+{
+  return (Allocation)(Glib::wrap(&(gobj()->allocation)));
+}
 
-bool Widget::has_grab() const
-  { return GTK_WIDGET_HAS_GRAB(gobj()); }
+bool Widget::parent_sensitive() const
+  { return GTK_WIDGET_PARENT_SENSITIVE(gobj()); }
 
 bool Widget::rc_style() const
   { return GTK_WIDGET_RC_STYLE(gobj()); }
@@ -326,15 +320,9 @@ bool Widget::rc_style() const
 bool Widget::is_composite_child() const
   { return GTK_WIDGET_COMPOSITE_CHILD(gobj()); }
 
-bool Widget::app_paintable() const
-  { return GTK_WIDGET_APP_PAINTABLE(gobj()); }
-
 bool Widget::receives_default() const
   { return GTK_WIDGET_RECEIVES_DEFAULT(gobj()); }
 
-bool Widget::double_buffered() const
-  { return GTK_WIDGET_DOUBLE_BUFFERED(gobj()); }
-
 WidgetFlags Widget::get_flags() const
   { return static_cast<WidgetFlags>(GTK_WIDGET_FLAGS(gobj())); }
 
diff --git a/gtk/src/widget.hg b/gtk/src/widget.hg
index c4d2162..6d8b7ce 100644
--- a/gtk/src/widget.hg
+++ b/gtk/src/widget.hg
@@ -172,7 +172,8 @@ public:
   
   _WRAP_METHOD(bool mnemonic_activate(bool group_cycling), gtk_widget_mnemonic_activate)
 
-  //Probably not usefule. Too C-specific: _WRAP_METHOD(bool can_activate_accel(guint signal_id) const, gtk_widget_can_activate_accel)
+  _IGNORE(gtk_widget_can_activate_accel)
+  //Probably not useful. Too C-specific: _WRAP_METHOD(bool can_activate_accel(guint signal_id) const, gtk_widget_can_activate_accel)
 
   //TODO: Use C++ type
   _WRAP_METHOD(bool event(GdkEvent* event), gtk_widget_event)
@@ -187,12 +188,20 @@ public:
   _WRAP_METHOD(Gdk::Region region_intersect(const Gdk::Region& region) const, gtk_widget_region_intersect)
 
   _WRAP_METHOD(void freeze_child_notify(), gtk_widget_freeze_child_notify)
-  _WRAP_METHOD(void	child_notify(const Glib::ustring& child_property), gtk_widget_child_notify)
-  _WRAP_METHOD(void	thaw_child_notify(), gtk_widget_thaw_child_notify)
+  _WRAP_METHOD(void child_notify(const Glib::ustring& child_property), gtk_widget_child_notify)
+  _WRAP_METHOD(void thaw_child_notify(), gtk_widget_thaw_child_notify)
+
+  _WRAP_METHOD(void set_can_focus(bool can_focus = true), gtk_widget_set_can_focus)
+  _WRAP_METHOD(bool get_can_focus() const, gtk_widget_get_can_focus)
+  _WRAP_METHOD(bool has_focus() const, gtk_widget_has_focus)
 
   _WRAP_METHOD(bool is_focus() const, gtk_widget_is_focus)
-  _WRAP_METHOD(void	grab_focus(), gtk_widget_grab_focus)
-  _WRAP_METHOD(void	grab_default(), gtk_widget_grab_default)
+  _WRAP_METHOD(void grab_focus(), gtk_widget_grab_focus)
+  _WRAP_METHOD(void set_can_default(bool can_default = true), gtk_widget_set_can_default)
+  _WRAP_METHOD(bool get_can_default() const, gtk_widget_get_can_default)
+  _WRAP_METHOD(bool has_default() const, gtk_widget_has_default)
+  _WRAP_METHOD(void grab_default(), gtk_widget_grab_default)
+  _WRAP_METHOD(bool has_grab() const, gtk_widget_has_grab)
 
   /** Block events to everything else than this widget and its children. This
    * way you can get modal behaviour (usually not recommended). One practical
@@ -215,10 +224,19 @@ public:
   void unset_name();
   _WRAP_METHOD(Glib::ustring get_name() const, gtk_widget_get_name)
 
-  _WRAP_METHOD(void set_state(Gtk::StateType state), gtk_widget_set_state)
+  _WRAP_METHOD(void set_state(StateType state), gtk_widget_set_state)
+  _WRAP_METHOD(StateType get_state() const, gtk_widget_get_state)
   _WRAP_METHOD(void set_sensitive(bool sensitive = true), gtk_widget_set_sensitive)
+  _WRAP_METHOD(bool get_sensitive() const, gtk_widget_get_sensitive)
+  _WRAP_METHOD(bool is_sensitive() const, gtk_widget_is_sensitive)
+  _WRAP_METHOD(void set_visible(bool visible = true), gtk_widget_set_visible)
+  _WRAP_METHOD(bool get_visible() const, gtk_widget_get_visible)
+  _WRAP_METHOD(void set_has_window(bool has_window = true), gtk_widget_set_has_window)
+  _WRAP_METHOD(bool get_has_window() const, gtk_widget_get_has_window)
   _WRAP_METHOD(void set_app_paintable(bool app_paintable = true), gtk_widget_set_app_paintable)
+  _WRAP_METHOD(bool get_app_paintable() const, gtk_widget_get_app_paintable)
   _WRAP_METHOD(void set_double_buffered(bool double_buffered = true), gtk_widget_set_double_buffered)
+  _WRAP_METHOD(bool get_double_buffered() const, gtk_widget_get_double_buffered)
 
   _WRAP_METHOD(void set_redraw_on_allocate(bool redraw_on_allocate = true),
                gtk_widget_set_redraw_on_allocate)
@@ -229,6 +247,13 @@ public:
   _WRAP_METHOD(Glib::RefPtr<Gdk::Window> get_window(), gtk_widget_get_window, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const Gdk::Window> get_window() const, gtk_widget_get_window, refreturn, constversion)
 
+  //TODO: Documentation.
+  Allocation get_allocation() const;
+  _IGNORE(gtk_widget_get_allocation)
+
+  #m4  _CONVERSION(`const Allocation&',`const GtkAllocation*',`($3).gobj()')
+  _WRAP_METHOD(void set_allocation(const Allocation& allocation), gtk_widget_set_allocation)
+
   _WRAP_METHOD(Container* get_parent(), gtk_widget_get_parent)
   _WRAP_METHOD(const Container* get_parent() const, gtk_widget_get_parent, constversion)
 
@@ -570,29 +595,32 @@ public:
   //: Returns property {flags.mapped}.
   bool is_mapped() const;
 
-  //: Returns property {flags.visible}.
-  bool is_visible() const; 
-
   //: Returns if the widget is ready to be drawn to.
   // Checks to see if the widget is both visible and mapped which
   // makes it possible to perform drawing commands on.
   bool is_drawable() const;
   
-  //: Returns property {flags.sensitive}. You might want to check
-  // is_sensitive instead.
+  /** @deprecated: Use get_sensitive() instead.
+   */
   bool sensitive() const;
 
   bool parent_sensitive() const;
-  bool is_sensitive() const;
-  bool can_focus() const;
-  bool has_focus() const;
+
+  /** @deprecated: Use get_can_default() instead.
+   */
   bool can_default() const;
-  bool has_default() const;
-  bool has_grab() const;
+
   bool rc_style() const;
   bool is_composite_child() const;
+
+  /** @deprecated: Use get_app_paintable() instead.
+   */
   bool app_paintable() const;
+
   bool receives_default() const;
+
+  /** @deprecated: Use get_double_buffered() instead.
+   */
   bool double_buffered() const;
 
   WidgetFlags get_flags() const;
@@ -608,13 +636,9 @@ public:
   _WRAP_METHOD(Glib::RefPtr<Action> get_action(), gtk_widget_get_action, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const Action> get_action() const, gtk_widget_get_action, refreturn, constversion)
 
-  _MEMBER_GET(state, state, Gtk::StateType, guint8)
   _MEMBER_GET(saved_state, saved_state, Gtk::StateType, guint8)
   _MEMBER_GET(requisition, requisition, Requisition, GtkRequisition)
 
-#m4  _CONVERSION(`GtkAllocation',`Allocation',`($2)(Glib::wrap(&($3)))')
-  _MEMBER_GET(allocation, allocation, Allocation, GtkAllocation)
-
 
   _WRAP_SIGNAL(void show(),"show")
   _WRAP_SIGNAL(void hide(),"hide")
@@ -953,7 +977,6 @@ protected:
 
   void realize_if_needed();
 
-  _MEMBER_SET(allocation, allocation, Allocation, GtkAllocation)
   _MEMBER_SET_GOBJECT(window, window, Gdk::Window, GdkWindow*)
 
 #m4begin



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]