[gtkmm] ComboBox: Add methods.



commit bba5dd26ef846cec8640543cc183299c1cc69615
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Nov 30 09:39:36 2010 +0100

    ComboBox: Add methods.
    
    	* gtk/src/gtk_methods.defs: Regenerated with h2defs.py.
    	* gtk/src/gtk_signals.defs: Regenerated partly.
    	* gtk/src/combobox.hg: Added get/set_id_column(), get/set_active_id() and
    	properties.

 ChangeLog                |    9 +
 gtk/src/combobox.hg      |    9 +
 gtk/src/gtk_methods.defs |  125 +++++++++++++---
 gtk/src/gtk_signals.defs |  362 ++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 480 insertions(+), 25 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index eb1df1b..01d171f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2010-11-30  Murray Cumming  <murrayc murrayc com>
+
+	ComboBox: Add methods.
+
+	* gtk/src/gtk_methods.defs: Regenerated with h2defs.py.
+	* gtk/src/gtk_signals.defs: Regenerated partly.
+	* gtk/src/combobox.hg: Added get/set_id_column(), get/set_active_id() and 
+	properties.
+
 2010-11-29  Murray Cumming  <murrayc murrayc com>
 
 	Fix the build with latest GTK+ 3.
diff --git a/gtk/src/combobox.hg b/gtk/src/combobox.hg
index 51c6870..3e2d925 100644
--- a/gtk/src/combobox.hg
+++ b/gtk/src/combobox.hg
@@ -168,6 +168,11 @@ public:
 
   _WRAP_METHOD(Glib::RefPtr<Atk::Object> get_popup_accessible(), gtk_combo_box_get_popup_accessible, ifdef GTKMM_ATKMM_ENABLED)
   _WRAP_METHOD(Glib::RefPtr<const Atk::Object> get_popup_accessible() const, gtk_combo_box_get_popup_accessible, constversion, ifdef GTKMM_ATKMM_ENABLED)
+  
+  _WRAP_METHOD(int get_id_column() const, gtk_combo_box_get_id_column)
+  _WRAP_METHOD(void set_id_column(int id_column), gtk_combo_box_set_id_column)
+  _WRAP_METHOD(Glib::ustring get_active_id() const, gtk_combo_box_get_active_id)
+  _WRAP_METHOD(void get_active_id(const Glib::ustring& active_id), gtk_combo_box_set_active_id)
 
   _IGNORE(gtk_combo_box_append_text, gtk_combo_box_insert_text, gtk_combo_box_prepend_text, gtk_combo_box_remove_text, gtk_combo_box_get_active_text) //deprecated
 
@@ -192,6 +197,10 @@ public:
   _WRAP_PROPERTY("popup-shown", bool)
   _WRAP_PROPERTY("button-sensitivity", SensitivityType)
   _WRAP_PROPERTY("popup-fixed-width", bool)
+  _WRAP_PROPERTY("has-entry", bool)
+  _WRAP_PROPERTY("entry-text-column", int)
+  _WRAP_PROPERTY("id-column", int)
+  _WRAP_PROPERTY("active-id", Glib::ustring)
 
   /** The changed signal gets emitted when the active
    * item is changed. This can be due to the user selecting
diff --git a/gtk/src/gtk_methods.defs b/gtk/src/gtk_methods.defs
index 779278d..1d1890a 100644
--- a/gtk/src/gtk_methods.defs
+++ b/gtk/src/gtk_methods.defs
@@ -435,6 +435,13 @@
   (gtype-id "GTK_TYPE_WIDGET")
 )
 
+(define-object Switch
+  (in-module "Gtk")
+  (parent "GtkWidget")
+  (c-name "GtkSwitch")
+  (gtype-id "GTK_TYPE_SWITCH")
+)
+
 (define-object Spinner
   (in-module "Gtk")
   (parent "GtkWidget")
@@ -1573,17 +1580,6 @@
   )
 )
 
-(define-enum MetricType
-  (in-module "Gtk")
-  (c-name "GtkMetricType")
-  (gtype-id "GTK_TYPE_METRIC_TYPE")
-  (values
-    '("pixels" "GTK_PIXELS")
-    '("inches" "GTK_INCHES")
-    '("centimeters" "GTK_CENTIMETERS")
-  )
-)
-
 (define-enum MovementStep
   (in-module "Gtk")
   (c-name "GtkMovementStep")
@@ -6830,6 +6826,36 @@
   (return-type "AtkObject*")
 )
 
+(define-method get_id_column
+  (of-object "GtkComboBox")
+  (c-name "gtk_combo_box_get_id_column")
+  (return-type "gint")
+)
+
+(define-method set_id_column
+  (of-object "GtkComboBox")
+  (c-name "gtk_combo_box_set_id_column")
+  (return-type "none")
+  (parameters
+    '("gint" "id_column")
+  )
+)
+
+(define-method get_active_id
+  (of-object "GtkComboBox")
+  (c-name "gtk_combo_box_get_active_id")
+  (return-type "const-gchar*")
+)
+
+(define-method set_active_id
+  (of-object "GtkComboBox")
+  (c-name "gtk_combo_box_set_active_id")
+  (return-type "none")
+  (parameters
+    '("const-gchar*" "active_id")
+  )
+)
+
 
 
 ;; From gtkcomboboxtext.h
@@ -6899,6 +6925,37 @@
   (return-type "gchar*")
 )
 
+(define-method insert
+  (of-object "GtkComboBoxText")
+  (c-name "gtk_combo_box_text_insert")
+  (return-type "none")
+  (parameters
+    '("gint" "position")
+    '("const-gchar*" "id")
+    '("const-gchar*" "text")
+  )
+)
+
+(define-method append
+  (of-object "GtkComboBoxText")
+  (c-name "gtk_combo_box_text_append")
+  (return-type "none")
+  (parameters
+    '("const-gchar*" "id")
+    '("const-gchar*" "text")
+  )
+)
+
+(define-method prepend
+  (of-object "GtkComboBoxText")
+  (c-name "gtk_combo_box_text_prepend")
+  (return-type "none")
+  (parameters
+    '("const-gchar*" "id")
+    '("const-gchar*" "text")
+  )
+)
+
 
 
 ;; From gtkcontainer.h
@@ -13002,15 +13059,6 @@
   )
 )
 
-(define-function gtk_init_add
-  (c-name "gtk_init_add")
-  (return-type "none")
-  (parameters
-    '("GtkFunction" "function")
-    '("gpointer" "data")
-  )
-)
-
 (define-function gtk_quit_add_destroy
   (c-name "gtk_quit_add_destroy")
   (return-type "none")
@@ -19954,6 +20002,36 @@
 
 
 
+;; From gtkswitch.h
+
+(define-function gtk_switch_get_type
+  (c-name "gtk_switch_get_type")
+  (return-type "GType")
+)
+
+(define-function gtk_switch_new
+  (c-name "gtk_switch_new")
+  (is-constructor-of "GtkSwitch")
+  (return-type "GtkWidget*")
+)
+
+(define-method set_active
+  (of-object "GtkSwitch")
+  (c-name "gtk_switch_set_active")
+  (return-type "none")
+  (parameters
+    '("gboolean" "is_active")
+  )
+)
+
+(define-method get_active
+  (of-object "GtkSwitch")
+  (c-name "gtk_switch_get_active")
+  (return-type "gboolean")
+)
+
+
+
 ;; From gtktable.h
 
 (define-function gtk_table_get_type
@@ -26668,11 +26746,6 @@
   (return-type "GType")
 )
 
-(define-function gtk_metric_type_get_type
-  (c-name "gtk_metric_type_get_type")
-  (return-type "GType")
-)
-
 (define-function gtk_movement_step_get_type
   (c-name "gtk_movement_step_get_type")
   (return-type "GType")
@@ -30546,3 +30619,5 @@
 
 
 ;; From gtkunixprint.h
+
+
diff --git a/gtk/src/gtk_signals.defs b/gtk/src/gtk_signals.defs
index e9e52af..c7e06b7 100644
--- a/gtk/src/gtk_signals.defs
+++ b/gtk/src/gtk_signals.defs
@@ -12443,6 +12443,24 @@
   (construct-only #f)
 )
 
+(define-property id-column
+  (of-object "GtkComboBox")
+  (prop-type "GParamInt")
+  (docs "The column in the combo box's model that provides string IDs for the values in the model")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property active-id
+  (of-object "GtkComboBox")
+  (prop-type "GParamString")
+  (docs "The value of the id column for the active row")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
 ;; From GtkContainer
 
 (define-signal add
@@ -40877,6 +40895,350 @@
   (when "first")
 )
 
+;; From GtkSwitch
+
+(define-property related-action
+  (of-object "GtkSwitch")
+  (prop-type "GParamObject")
+  (docs "The action this activatable will activate and receive updates from")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property use-action-appearance
+  (of-object "GtkSwitch")
+  (prop-type "GParamBoolean")
+  (docs "Whether to use the related actions appearance properties")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property name
+  (of-object "GtkSwitch")
+  (prop-type "GParamString")
+  (docs "The name of the widget")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property parent
+  (of-object "GtkSwitch")
+  (prop-type "GParamObject")
+  (docs "The parent widget of this widget. Must be a Container widget")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property width-request
+  (of-object "GtkSwitch")
+  (prop-type "GParamInt")
+  (docs "Override for width request of the widget, or -1 if natural request should be used")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property height-request
+  (of-object "GtkSwitch")
+  (prop-type "GParamInt")
+  (docs "Override for height request of the widget, or -1 if natural request should be used")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property visible
+  (of-object "GtkSwitch")
+  (prop-type "GParamBoolean")
+  (docs "Whether the widget is visible")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property sensitive
+  (of-object "GtkSwitch")
+  (prop-type "GParamBoolean")
+  (docs "Whether the widget responds to input")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property app-paintable
+  (of-object "GtkSwitch")
+  (prop-type "GParamBoolean")
+  (docs "Whether the application will paint directly on the widget")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property can-focus
+  (of-object "GtkSwitch")
+  (prop-type "GParamBoolean")
+  (docs "Whether the widget can accept the input focus")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property has-focus
+  (of-object "GtkSwitch")
+  (prop-type "GParamBoolean")
+  (docs "Whether the widget has the input focus")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property is-focus
+  (of-object "GtkSwitch")
+  (prop-type "GParamBoolean")
+  (docs "Whether the widget is the focus widget within the toplevel")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property can-default
+  (of-object "GtkSwitch")
+  (prop-type "GParamBoolean")
+  (docs "Whether the widget can be the default widget")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property has-default
+  (of-object "GtkSwitch")
+  (prop-type "GParamBoolean")
+  (docs "Whether the widget is the default widget")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property receives-default
+  (of-object "GtkSwitch")
+  (prop-type "GParamBoolean")
+  (docs "If TRUE, the widget will receive the default action when it is focused")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property composite-child
+  (of-object "GtkSwitch")
+  (prop-type "GParamBoolean")
+  (docs "Whether the widget is part of a composite widget")
+  (readable #t)
+  (writable #f)
+  (construct-only #f)
+)
+
+(define-property style
+  (of-object "GtkSwitch")
+  (prop-type "GParamObject")
+  (docs "The style of the widget, which contains information about how it will look (colors etc)")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property events
+  (of-object "GtkSwitch")
+  (prop-type "GParamFlags")
+  (docs "The event mask that decides what kind of GdkEvents this widget gets")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property extension-events
+  (of-object "GtkSwitch")
+  (prop-type "GParamEnum")
+  (docs "The mask that decides what kind of extension events this widget gets")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property no-show-all
+  (of-object "GtkSwitch")
+  (prop-type "GParamBoolean")
+  (docs "Whether gtk_widget_show_all() should not affect this widget")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property has-tooltip
+  (of-object "GtkSwitch")
+  (prop-type "GParamBoolean")
+  (docs "Whether this widget has a tooltip")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property tooltip-markup
+  (of-object "GtkSwitch")
+  (prop-type "GParamString")
+  (docs "The contents of the tooltip for this widget")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property tooltip-text
+  (of-object "GtkSwitch")
+  (prop-type "GParamString")
+  (docs "The contents of the tooltip for this widget")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property window
+  (of-object "GtkSwitch")
+  (prop-type "GParamObject")
+  (docs "The widget's window if it is realized")
+  (readable #t)
+  (writable #f)
+  (construct-only #f)
+)
+
+(define-property double-buffered
+  (of-object "GtkSwitch")
+  (prop-type "GParamBoolean")
+  (docs "Whether the widget is double buffered")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property halign
+  (of-object "GtkSwitch")
+  (prop-type "GParamEnum")
+  (docs "How to position in extra horizontal space")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property valign
+  (of-object "GtkSwitch")
+  (prop-type "GParamEnum")
+  (docs "How to position in extra vertical space")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property margin-left
+  (of-object "GtkSwitch")
+  (prop-type "GParamInt")
+  (docs "Pixels of extra space on the left side")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property margin-right
+  (of-object "GtkSwitch")
+  (prop-type "GParamInt")
+  (docs "Pixels of extra space on the right side")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property margin-top
+  (of-object "GtkSwitch")
+  (prop-type "GParamInt")
+  (docs "Pixels of extra space on the top side")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property margin-bottom
+  (of-object "GtkSwitch")
+  (prop-type "GParamInt")
+  (docs "Pixels of extra space on the bottom side")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property margin
+  (of-object "GtkSwitch")
+  (prop-type "GParamInt")
+  (docs "Pixels of extra space on all four sides")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property hexpand
+  (of-object "GtkSwitch")
+  (prop-type "GParamBoolean")
+  (docs "Whether widget wants more horizontal space")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property vexpand
+  (of-object "GtkSwitch")
+  (prop-type "GParamBoolean")
+  (docs "Whether widget wants more vertical space")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property hexpand-set
+  (of-object "GtkSwitch")
+  (prop-type "GParamBoolean")
+  (docs "Whether to use the hexpand property")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property vexpand-set
+  (of-object "GtkSwitch")
+  (prop-type "GParamBoolean")
+  (docs "Whether to use the vexpand property")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property expand
+  (of-object "GtkSwitch")
+  (prop-type "GParamBoolean")
+  (docs "Whether widget wants to expand in both directions")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property active
+  (of-object "GtkSwitch")
+  (prop-type "GParamBoolean")
+  (docs "Whether the switch is on or off")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
 ;; From GtkTable
 
 (define-property name



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