[gimp/soc-2011-gimpunitentry: 38/68] GimpUnitEntryTable: add get_table and refactoring



commit 518869f89cef2016f88377b922fd0d1f059d5811
Author: Enrico Schröder <enni schroeder gmail com>
Date:   Fri Jul 8 13:18:38 2011 +0200

    GimpUnitEntryTable: add get_table and refactoring

 libgimpwidgets/gimpunitentrytable.c |    6 +++
 libgimpwidgets/gimpunitentrytable.h |   70 +++++++++++++++++++++--------------
 libgimpwidgets/gimpwidgets.def      |    1 +
 3 files changed, 49 insertions(+), 28 deletions(-)
---
diff --git a/libgimpwidgets/gimpunitentrytable.c b/libgimpwidgets/gimpunitentrytable.c
index 6bf1196..4306ab4 100644
--- a/libgimpwidgets/gimpunitentrytable.c
+++ b/libgimpwidgets/gimpunitentrytable.c
@@ -420,3 +420,9 @@ gimp_unit_entry_table_grab_focus (GimpUnitEntryTable *table)
 {
   gtk_widget_grab_focus (GTK_WIDGET (gimp_unit_entry_table_get_nth_entry (table, 0)));
 }
+
+GtkWidget*      
+gimp_unit_entry_table_get_table  (GimpUnitEntryTable *table)
+{
+  return table->table;
+}
diff --git a/libgimpwidgets/gimpunitentrytable.h b/libgimpwidgets/gimpunitentrytable.h
index 51aec93..cde2d07 100644
--- a/libgimpwidgets/gimpunitentrytable.h
+++ b/libgimpwidgets/gimpunitentrytable.h
@@ -63,34 +63,48 @@ struct _GimpUnitEntryTableClass
   guint sig_changed_id;
 };
 
-GType     gimp_unit_entry_table_get_type (void);
-GObject   *gimp_unit_entry_table_new (void);
-
-/* add UnitEntry */
-GtkWidget* gimp_unit_entry_table_add_entry          (GimpUnitEntryTable *table, const gchar* id, const gchar 
*label, gint x, gint y);
-GtkWidget* gimp_unit_entry_table_add_entry_defaults (GimpUnitEntryTable *table, const gchar* id, const gchar 
*label);
-//void gimp_unit_entry_table_add_entries            ()
-/* add preview label showing the current value of two entries in given unit */
-void gimp_unit_entry_table_add_label                (GimpUnitEntryTable *table, GimpUnit unit, const char* 
id1, const char* id2);
-/* add chain button connecting the two given UnitEntries */
-GtkWidget* gimp_unit_entry_table_add_chainbutton    (GimpUnitEntryTable *table, const char* id1, const 
char*id2);
-/* get UnitEntry by id */
-GimpUnitEntry* gimp_unit_entry_table_get_entry      (GimpUnitEntryTable *table, const gchar* id);
-/* get UnitEntry by index */
-GimpUnitEntry* gimp_unit_entry_table_get_nth_entry  (GimpUnitEntryTable *table, gint index);
-/* get count of attached unit entries */
-gint gimp_unit_entry_table_get_entry_count          (GimpUnitEntryTable *table);
-gdouble gimp_unit_entry_table_get_pixels            (GimpUnitEntryTable *table, const gchar *id);
-gdouble gimp_unit_entry_table_get_value_in_unit     (GimpUnitEntryTable *table, const gchar *id, GimpUnit 
unit);
-/* sets the unit of all entries */
-void gimp_unit_entry_table_set_unit                 (GimpUnitEntryTable *table, GimpUnit unit);
-/* sets the resolution of all entries */
-void gimp_unit_entry_table_set_resolution           (GimpUnitEntryTable *table, gdouble res);
-/* sets resolution mode for all entries */
-void gimp_unit_entry_table_set_res_mode             (GimpUnitEntryTable *table, gboolean enable);
-/* calls gtk_entry_set_activates_default for all UnitEntries */
-void gimp_unit_entry_table_set_activates_default    (GimpUnitEntryTable *table, gboolean setting);
-void gimp_unit_entry_table_grab_focus               (GimpUnitEntryTable *table);
+GType           gimp_unit_entry_table_get_type              (void);
+GObject         *gimp_unit_entry_table_new                  (void);
+
+GtkWidget*      gimp_unit_entry_table_add_entry             (GimpUnitEntryTable *table, 
+                                                             const gchar        *id,
+                                                             const gchar        *label,
+                                                             gint                x, 
+                                                             gint                y);
+GtkWidget*      gimp_unit_entry_table_add_entry_defaults    (GimpUnitEntryTable *table, 
+                                                             const gchar        *id, 
+                                                             const gchar        *label);
+void            gimp_unit_entry_table_add_label             (GimpUnitEntryTable *table, 
+                                                             GimpUnit            unit, 
+                                                             const char         *id1, 
+                                                             const char         *id2);
+GtkWidget*      gimp_unit_entry_table_add_chainbutton       (GimpUnitEntryTable *table,
+                                                             const char         *id1, 
+                                                             const char         *id2);
+
+GimpUnitEntry*  gimp_unit_entry_table_get_entry             (GimpUnitEntryTable *table, 
+                                                             const gchar        *id);
+GimpUnitEntry*  gimp_unit_entry_table_get_nth_entry         (GimpUnitEntryTable *table, 
+                                                             gint                index);
+gint            gimp_unit_entry_table_get_entry_count       (GimpUnitEntryTable *table);
+gdouble         gimp_unit_entry_table_get_pixels            (GimpUnitEntryTable *table, 
+                                                             const gchar        *id);
+GtkWidget*      gimp_unit_entry_table_get_table             (GimpUnitEntryTable *table);                     
                                        
+gdouble         gimp_unit_entry_table_get_value_in_unit     (GimpUnitEntryTable *table,
+                                                             const gchar        *id,
+                                                             GimpUnit            unit);
+
+void            gimp_unit_entry_table_set_unit              (GimpUnitEntryTable *table, 
+                                                             GimpUnit            unit);
+void            gimp_unit_entry_table_set_resolution        (GimpUnitEntryTable *table, 
+                                                             gdouble             res);
+void            gimp_unit_entry_table_set_res_mode          (GimpUnitEntryTable *table, 
+                                                             gboolean            enable);
+void            gimp_unit_entry_table_set_activates_default (GimpUnitEntryTable *table, 
+                                                             gboolean            setting);
+                                                             
+void            gimp_unit_entry_table_grab_focus            (GimpUnitEntryTable *table);
+
 G_END_DECLS
 
 #endif /*__GIMP_UNIT_ENTRY_TABLE_H__*/
diff --git a/libgimpwidgets/gimpwidgets.def b/libgimpwidgets/gimpwidgets.def
index 413c19a..87fc9b3 100644
--- a/libgimpwidgets/gimpwidgets.def
+++ b/libgimpwidgets/gimpwidgets.def
@@ -401,6 +401,7 @@ EXPORTS
        gimp_unit_entry_table_get_entry_count
        gimp_unit_entry_table_get_nth_entry
        gimp_unit_entry_table_get_pixels
+       gimp_unit_entry_table_get_table
        gimp_unit_entry_table_get_type
        gimp_unit_entry_table_get_value_in_unit
        gimp_unit_entry_table_grab_focus


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