![]() |
![]() |
![]() |
Glade User Interface Designer Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
enum GladeUtilFileDialogType; enum GladeUIMessageType;GType glade_util_get_type_from_name (constgchar *name,gboolean have_func);GParamSpec * glade_utils_get_pspec_from_funcname (constgchar *funcname);gboolean glade_util_ui_message (GtkWidget *parent, GladeUIMessageType type,GtkWidget *widget, constgchar *format, ...);void glade_util_flash_message (GtkWidget *statusbar,guint context_id,gchar *format, ...);gint glade_util_compare_stock_labels (gconstpointer a,gconstpointer b);void glade_util_hide_window (GtkWindow *window);gchar * glade_util_gtk_combo_func (gpointer data);gpointer glade_util_gtk_combo_find (GtkCombo *combo);GtkWidget * glade_util_file_dialog_new (constgchar *title, GladeProject *project,GtkWindow *parent, GladeUtilFileDialogType action);void glade_util_replace (gchar *str,gchar a,gchar b);gchar * glade_util_read_prop_name (constgchar *str);gchar * glade_util_duplicate_underscores (constgchar *name);void glade_util_add_selection (GtkWidget *widget);void glade_util_remove_selection (GtkWidget *widget);gboolean glade_util_has_selection (GtkWidget *widget);void glade_util_clear_selection (void);GList * glade_util_get_selection (void);GList * glade_util_container_get_all_children (GtkContainer *container);gint glade_util_count_placeholders (GladeWidget *parent);GtkTreeIter * glade_util_find_iter_by_widget (GtkTreeModel *model, GladeWidget *findme,gint column);gboolean glade_util_basenames_match (constgchar *path1, constgchar *path2);GList * glade_util_purify_list (GList *list);GList * glade_util_added_in_list (GList *old_list,GList *new_list);GList * glade_util_removed_from_list (GList *old_list,GList *new_list);gchar * glade_util_canonical_path (constgchar *path);gboolean glade_util_copy_file (constgchar *src_path, constgchar *dest_path);gboolean glade_util_class_implements_interface (GType class_type,GType iface_type);GModule * glade_util_load_library (constgchar *library_name);gboolean glade_util_file_is_writeable (constgchar *path);gboolean glade_util_have_devhelp (void);GtkWidget * glade_util_get_devhelp_icon (GtkIconSize size);void glade_util_search_devhelp (constgchar *book, constgchar *page, constgchar *search);GtkWidget * glade_util_get_placeholder_from_pointer (GtkContainer *container);gboolean glade_util_object_is_loading (GObject *object);gboolean glade_util_url_show (constgchar *url);time_t glade_util_get_file_mtime (constgchar *filename,GError **error);void glade_util_draw_selection_nodes (GdkWindow *expose_win);
typedef enum _GladeUtilFileDialogType { GLADE_FILE_DIALOG_ACTION_OPEN, GLADE_FILE_DIALOG_ACTION_SAVE } GladeUtilFileDialogType;
typedef enum { GLADE_UI_INFO, GLADE_UI_WARN, GLADE_UI_ERROR, GLADE_UI_ARE_YOU_SURE, GLADE_UI_YES_OR_NO } GladeUIMessageType;
GType glade_util_get_type_from_name (constgchar *name,gboolean have_func);
Returns the type using the "get type" function name based on name
.
If the have_func
flag is true,name
is used directly, otherwise the get-type
function is contrived from name
then used.
|
the name of the |
|
function-name flag -- true if the name is a "get-type" function. |
Returns : |
the new |
GParamSpec * glade_utils_get_pspec_from_funcname (constgchar *funcname);
|
the symbol name of a function to generate a |
Returns : |
A funcname
|
gboolean glade_util_ui_message (GtkWidget *parent, GladeUIMessageType type,GtkWidget *widget, constgchar *format, ...);
Creates a new warning dialog window as a child of parent
containing
the text of format
, runs it, then destroys it on close. Depending
on type
, a cancel button may apear or the icon may change.
|
a |
|
a GladeUIMessageType |
|
a |
|
a printf style format string |
|
args for the format. |
Returns : |
True if the type was GLADE_UI_ARE_YOU_SURE and the user
selected "OK", True if the type was GLADE_UI_YES_OR_NO and
the user selected "YES"; False otherwise.
|
void glade_util_flash_message (GtkWidget *statusbar,guint context_id,gchar *format, ...);
gint glade_util_compare_stock_labels (gconstpointer a,gconstpointer b);
This is a
|
a |
|
a |
Returns : |
negative value if a < b ; zero if a = b ;
positive value if a > b
|
void glade_util_hide_window (GtkWindow *window);
If you use this function to handle the delete_event of a window, when it will be shown again it will appear in the position where it was before beeing hidden.
|
a |
gchar * glade_util_gtk_combo_func (gpointer data);
TODO: write me
|
|
Returns : |
gpointer glade_util_gtk_combo_find (GtkCombo *combo);
TODO: write me
|
|
Returns : |
GtkWidget * glade_util_file_dialog_new (constgchar *title, GladeProject *project,GtkWindow *parent, GladeUtilFileDialogType action);
|
dialog title |
|
a GladeProject used when saving |
|
a parent |
|
a GladeUtilFileDialogType to say if the dialog will open or save |
Returns : |
a "glade file" file chooser dialog. The caller is responsible for showing the dialog |
void glade_util_replace (gchar *str,gchar a,gchar b);
Replaces each occurance of the character a
in str
to b
.
|
a string |
|
a |
|
a |
gchar * glade_util_read_prop_name (constgchar *str);
Return a usable version of a property identifier as found
in a freshly parserd
|
a string |
gchar * glade_util_duplicate_underscores (constgchar *name);
Duplicates name
, but the copy has two underscores in place of any single
underscore in the original.
|
a string |
Returns : |
a newly allocated string |
void glade_util_add_selection (GtkWidget *widget);
Add visual selection to this GtkWidget
|
a |
void glade_util_remove_selection (GtkWidget *widget);
Remove visual selection from this GtkWidget
|
a |
gboolean glade_util_has_selection (GtkWidget *widget);
|
a |
Returns : |
TRUE widget has visual selection, FALSE |
GList * glade_util_container_get_all_children (GtkContainer *container);
Use this to itterate over all children in a GtkContainer,
as it used _forall()
_foreach()
Note that glade_widget_class_get_children()
|
a |
Returns : |
a container
|
gint glade_util_count_placeholders (GladeWidget *parent);
|
a GladeWidget |
Returns : |
the amount of parent
|
GtkTreeIter * glade_util_find_iter_by_widget (GtkTreeModel *model, GladeWidget *findme,gint column);
Looks through model
for the findme
under column
.
|
a |
|
a GladeWidget |
|
a |
Returns : |
a newly allocated model corresponding
to findme which should be freed with gtk_tree_iter_free() |
gboolean glade_util_basenames_match (constgchar *path1, constgchar *path2);
GList * glade_util_purify_list (GList *list);
|
A |
Returns : |
A newly allocated version of list with no
duplicate data entries
|
GList * glade_util_added_in_list (GList *old_list,GList *new_list);
|
the old |
|
the new |
Returns : |
A newly allocated new but not in old
|
GList * glade_util_removed_from_list (GList *old_list,GList *new_list);
|
the old |
|
the new |
Returns : |
A newly allocated old no longer in new
|
gchar * glade_util_canonical_path (constgchar *path);
|
any path that may contain ".." or "." components |
Returns : |
an absolute path to the specified file or directory
that contains no ".." or "." components (this does
not call readlink like realpath() realpath() |
gboolean glade_util_copy_file (constgchar *src_path, constgchar *dest_path);
Copies a file from src
to dest
, queries the user
if it involves overwriting the target and displays an
error message upon failure.
|
the path to the source file |
|
the path to the destination file to create or overwrite. |
Returns : |
True if the copy was successfull. |
gboolean glade_util_class_implements_interface (GType class_type,GType iface_type);
|
A |
|
A |
Returns : |
whether class_type implements the iface_type interface
|
GModule * glade_util_load_library (constgchar *library_name);
Loads the named library from the Glade modules directory, or failing that from the standard platform specific directories.
The library_name
should not include any platform specifix prefix or suffix,
those are automatically added, if needed, by g_module_build_path()
|
name of the library |
Returns : |
a NULL |
gboolean glade_util_file_is_writeable (constgchar *path);
Checks whether the file at path
is writeable
|
the path to the file |
Returns : |
TRUE if file is writeable |
gboolean glade_util_have_devhelp (void);
Returns : |
whether the devhelp module is loaded |
GtkWidget * glade_util_get_devhelp_icon (GtkIconSize size);
Creates an image displaying the devhelp icon.
|
the preferred icon size |
Returns : |
a |
void glade_util_search_devhelp (constgchar *book, constgchar *page, constgchar *search);
GtkWidget * glade_util_get_placeholder_from_pointer (GtkContainer *container);
gboolean glade_util_object_is_loading (GObject *object);
|
A |
Returns : |
Whether the object's project is being loaded or not. |
gboolean glade_util_url_show (constgchar *url);
Portable function for showing an URL url
in a web browser.
|
An URL to display |
Returns : |
TRUE if a web browser was successfully launched, or FALSE |
time_t glade_util_get_file_mtime (constgchar *filename,GError **error);
Gets the UTC modification time of file filename
.
|
A filename |
|
return location for errors |
Returns : |
The mtime of the file, or 0 |