geany  1.38
About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...). F: office T: editor programming GTK+ IDE
  Fossies Dox: geany-1.38.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

ui_utils.h
Go to the documentation of this file.
1/*
2 * ui_utils.h - this file is part of Geany, a fast and lightweight IDE
3 *
4 * Copyright 2006 The Geany contributors
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 */
20
21#ifndef GEANY_UI_UTILS_H
22#define GEANY_UI_UTILS_H 1
23
24#include "geany.h" /* for GEANY_DEPRECATED */
25#include "document.h"
26
27#include "gtkcompat.h"
28
29G_BEGIN_DECLS
30
31/** Sets a name to lookup @a widget from @a owner.
32 * @param owner Usually a window, dialog or popup menu.
33 * @param widget Widget.
34 * @param widget_name Name.
35 * @see ui_lookup_widget().
36 *
37 * @since 0.16
38 **/
39#define ui_hookup_widget(owner, widget, widget_name) \
40 g_object_set_data_full(G_OBJECT(owner), widget_name, \
41 g_object_ref(widget), (GDestroyNotify)g_object_unref);
42
43
44/** Interface preferences */
45typedef struct GeanyInterfacePrefs
46{
47 gboolean sidebar_symbol_visible; /**< whether the symbol sidebar is visible */
48 gboolean sidebar_openfiles_visible; /**< whether the open file list is visible */
49 gchar *editor_font; /**< editor font */
50 gchar *tagbar_font; /**< symbol sidebar font */
51 gchar *msgwin_font; /**< message window font */
52 gboolean show_notebook_tabs; /**< whether editor tabs are visible */
53 gint tab_pos_editor; /**< positions of editor's tabs */
54 gint tab_pos_msgwin; /**< positions of message window's tabs */
55 gint tab_pos_sidebar; /**< positions of sidebar's tabs */
56 gboolean statusbar_visible; /**< whether the status bar is visible */
57 gboolean show_symbol_list_expanders; /**< whether to show expanders in the symbol list */
58 /** whether a double click on notebook tabs hides all other windows */
60 gboolean highlighting_invert_all; /**< whether highlighting colors are inverted */
61 gint sidebar_pos; /**< position of the sidebar (left or right) */
62 gboolean msgwin_status_visible; /**< whether message window's status tab is visible */
63 gboolean msgwin_compiler_visible; /**< whether message window's compiler tab is visible */
64 gboolean msgwin_messages_visible; /**< whether message window's messages tab is visible */
65 gboolean msgwin_scribble_visible; /**< whether message window's scribble tab is visible */
66 /** whether to use native Windows' dialogs (only used on Windows) */
68 /** whether compiler messages window is automatically scrolled to show new messages */
70 gint msgwin_orientation; /**< orientation of the message window */
71 gint symbols_sort_mode; /**< symbol list sorting mode */
72}
74
75
76/** Important widgets in the main window.
77 * Accessed by @c geany->main_widgets. */
78typedef struct GeanyMainWidgets
79{
80 GtkWidget *window; /**< Main window. */
81 GtkWidget *toolbar; /**< Main toolbar. */
82 GtkWidget *sidebar_notebook; /**< Sidebar notebook. */
83 GtkWidget *notebook; /**< Document notebook. */
84 GtkWidget *editor_menu; /**< Popup editor menu. */
85 GtkWidget *tools_menu; /**< Most plugins add menu items to the Tools menu. */
86 /** Progress bar widget in the status bar to show progress of various actions.
87 * See ui_progress_bar_start() for details. */
88 GtkWidget *progressbar;
89 GtkWidget *message_window_notebook; /**< Message Window notebook. */
90 /** Plugins modifying the project can add their items to the Project menu. */
91 GtkWidget *project_menu;
92}
94
95
96#define GEANY_STOCK_SAVE_ALL "geany-save-all"
97#define GEANY_STOCK_CLOSE_ALL "geany-close-all"
98#define GEANY_STOCK_BUILD "geany-build"
99
100
101GtkWidget *ui_dialog_vbox_new(GtkDialog *dialog);
102
103void ui_set_statusbar(gboolean log, const gchar *format, ...) G_GNUC_PRINTF (2, 3);
104
105void ui_table_add_row(GtkTable *table, gint row, ...) G_GNUC_NULL_TERMINATED;
106
107GtkWidget *ui_path_box_new(const gchar *title, GtkFileChooserAction action, GtkEntry *entry);
108
109GtkWidget *ui_button_new_with_image(const gchar *stock_id, const gchar *text);
110
111void ui_add_document_sensitive(GtkWidget *widget);
112
113GtkWidget *ui_image_menu_item_new(const gchar *stock_id, const gchar *label);
114
115GtkWidget *ui_lookup_widget(GtkWidget *widget, const gchar *widget_name);
116
117void ui_progress_bar_start(const gchar *text);
118
119void ui_progress_bar_stop(void);
120
121void ui_entry_add_clear_icon(GtkEntry *entry);
122
123void ui_menu_add_document_items(GtkMenu *menu, GeanyDocument *active, GCallback callback);
124
125void ui_menu_add_document_items_sorted(GtkMenu *menu, GeanyDocument *active,
126 GCallback callback, GCompareFunc sort_func);
127
128void ui_widget_modify_font_from_string(GtkWidget *wid, const gchar *str);
129
130gboolean ui_is_keyval_enter_or_return(guint keyval);
131
132gint ui_get_gtk_settings_integer(const gchar *property_name, gint default_value);
133
134void ui_combo_box_add_to_history(GtkComboBoxText *combo_entry,
135 const gchar *text, gint history_len);
136
137const gchar *ui_lookup_stock_label(const gchar *stock_id);
138
139void ui_tree_view_set_tooltip_text_column(GtkTreeView *tree_view, gint column);
140
141
142#ifndef GEANY_DISABLE_DEPRECATED
143GtkWidget *ui_frame_new_with_alignment(const gchar *label_text, GtkWidget **alignment) GEANY_DEPRECATED;
144
145void ui_widget_set_tooltip_text(GtkWidget *widget, const gchar *text) GEANY_DEPRECATED_FOR(gtk_widget_set_tooltip_text);
146#endif /* GEANY_DISABLE_DEPRECATED */
147
148
149#ifdef GEANY_PRIVATE
150
152
154
155
156/* User Interface settings not shown in the Prefs dialog. */
157typedef struct UIPrefs
158{
159 /* State of the main window when Geany was closed */
160 gint geometry[5]; /* 0:x, 1:y, 2:width, 3:height, flag for maximized state */
161 gboolean fullscreen;
162 gboolean sidebar_visible;
163 gint sidebar_page;
164 gboolean msgwindow_visible;
165 gboolean allow_always_save; /* if set, files can always be saved, even if unchanged */
166 gchar *statusbar_template;
167 gboolean new_document_after_close;
168
169 /* Menu-item related data */
170 GQueue *recent_queue;
171 GQueue *recent_projects_queue;
172 gchar *custom_date_format;
173 gchar **custom_commands;
174 gchar **custom_commands_labels;
175
176 /* Color picker settings */
177 gchar *color_picker_palette;
178}
179UIPrefs;
180
181extern UIPrefs ui_prefs;
182
183
184/* Less commonly used widgets */
185typedef struct UIWidgets
186{
187 /* menu widgets */
188 GtkWidget *toolbar_menu;
189 GtkWidget *recent_files_menuitem;
190 GtkWidget *recent_files_menu_menubar;
191 GtkWidget *print_page_setup;
192 GtkWidget *recent_projects_menuitem;
193 GtkWidget *recent_projects_menu_menubar;
194 GtkWidget *config_files_filetype_menu;
195
196 /* dialogs */
197 GtkWidget *open_colorsel;
198 GtkWidget *open_fontsel;
199 GtkWidget *prefs_dialog;
200
201 /* other widgets not needed in GeanyMainWidgets */
202 GtkWidget *statusbar; /* use ui_set_statusbar() to set */
203}
204UIWidgets;
205
206extern UIWidgets ui_widgets;
207
208
209/* The following block of types & functions are more generic and closely related to
210 * certain GTK+ widgets. */
211
212typedef struct GeanyAutoSeparator
213{
214 GtkWidget *widget; /* e.g. GtkSeparatorToolItem, GtkSeparatorMenuItem */
215 gint show_count; /* visible items, set to zero initially */
216 gint item_count; /* total items, set to zero initially */
217}
218GeanyAutoSeparator;
219
220
221typedef enum
222{
223 GEANY_EDITOR_SHOW_MARKERS_MARGIN,
224 GEANY_EDITOR_SHOW_LINE_NUMBERS,
225 GEANY_EDITOR_SHOW_WHITE_SPACE,
226 GEANY_EDITOR_SHOW_INDENTATION_GUIDES,
227 GEANY_EDITOR_SHOW_LINE_ENDINGS
228}
229GeanyUIEditorFeatures;
230
231
232void ui_widget_show_hide(GtkWidget *widget, gboolean show);
233
234gchar *ui_menu_item_get_text(GtkMenuItem *menu_item);
235
236void ui_dialog_set_primary_button_order(GtkDialog *dialog, gint response, ...);
237
238void ui_hbutton_box_copy_layout(GtkButtonBox *master, GtkButtonBox *copy);
239
240void ui_combo_box_prepend_text_once(GtkComboBoxText *combo, const gchar *text);
241
242void ui_setup_open_button_callback(GtkWidget *open_btn, const gchar *title,
243 GtkFileChooserAction action, GtkEntry *entry);
244
245void ui_auto_separator_add_ref(GeanyAutoSeparator *autosep, GtkWidget *item);
246
247gpointer ui_builder_get_object (const gchar *name);
248
249/* Compatibility functions */
250GtkWidget *create_edit_menu1(void);
251GtkWidget *create_prefs_dialog(void);
252GtkWidget *create_project_dialog(void);
253GtkWidget *create_toolbar_popup_menu1(void);
254GtkWidget *create_window1(void);
255
256void ui_widget_set_sensitive(GtkWidget *widget, gboolean set);
257
259
260void ui_editable_insert_text_callback(GtkEditable *editable, gchar *new_text,
261 gint new_text_len, gint *position, gpointer data);
262
263GtkWidget *ui_label_new_bold(const gchar *text);
264
265void ui_label_set_markup(GtkLabel *label, const gchar *format, ...) G_GNUC_PRINTF(2, 3);
266
267/* End of general widget functions */
268
269void ui_init_builder(void);
270
271void ui_init(void);
272
273void ui_init_prefs(void);
274
275void ui_finalize_builder(void);
276
277void ui_init_toolbar_widgets(void);
278
279void ui_init_stock_items(void);
280
281void ui_add_config_file_menu_item(const gchar *real_path, const gchar *label,
282 GtkContainer *parent);
283
284void ui_update_statusbar(GeanyDocument *doc, gint pos);
285
286
287/* This sets the window title according to the current filename. */
289
290void ui_set_editor_font(const gchar *font_name);
291
292void ui_set_fullscreen(void);
293
294
296
298
299void ui_update_popup_goto_items(gboolean enable);
300
301
302void ui_menu_copy_items_set_sensitive(gboolean sensitive);
303
305
306void ui_update_insert_include_item(GeanyDocument *doc, gint item);
307
308void ui_update_fold_items(void);
309
310
312
314
315
316void ui_save_buttons_toggle(gboolean enable);
317
319
320
321void ui_sidebar_show_hide(void);
322
324
325void ui_set_search_entry_background(GtkWidget *widget, gboolean success);
326
327
328void ui_create_recent_menus(void);
329
331
332void ui_add_recent_project_file(const gchar *utf8_filename);
333
335
336
338
339
340typedef gboolean TVMatchCallback(gboolean);
341
342gboolean ui_tree_view_find_next(GtkTreeView *treeview, TVMatchCallback cb);
343
344gboolean ui_tree_view_find_previous(GtkTreeView *treeview, TVMatchCallback cb);
345
346gboolean ui_tree_model_iter_any_next(GtkTreeModel *model, GtkTreeIter *iter, gboolean down);
347
348void ui_statusbar_showhide(gboolean state);
349
350void ui_toggle_editor_features(GeanyUIEditorFeatures feature);
351
353
354void ui_swap_sidebar_pos(void);
355
356GIcon *ui_get_mime_icon(const gchar *mime_type);
357
359
360GtkWidget *ui_create_encodings_combo_box(gboolean has_detect, gint default_enc);
361
362gint ui_encodings_combo_box_get_active_encoding(GtkComboBox *combo);
363
364gboolean ui_encodings_combo_box_set_active_encoding(GtkComboBox *combo, gint enc);
365
366#endif /* GEANY_PRIVATE */
367
368G_END_DECLS
369
370#endif /* GEANY_UI_UTILS_H */
const gchar * label
Definition: build.c:2676
const gchar * name
Definition: document.c:3219
Document related actions: new, save, open, etc.
gchar * text
Definition: editor.c:83
gboolean set
Definition: editor.c:84
gint pos
Definition: editor.c:87
#define GEANY_DEPRECATED
Definition: geany.h:62
#define GEANY_DEPRECATED_FOR(x)
Definition: geany.h:63
CobolFormat format
Definition: geany_cobol.c:137
GtkWidget * entry
Definition: search.c:118
gint position[2]
Definition: search.c:120
GtkWidget * dialog
Structure for representing an open tab with all its properties.
Definition: document.h:81
Interface preferences.
Definition: ui_utils.h:46
gint tab_pos_editor
positions of editor's tabs
Definition: ui_utils.h:53
gint symbols_sort_mode
symbol list sorting mode
Definition: ui_utils.h:71
gboolean statusbar_visible
whether the status bar is visible
Definition: ui_utils.h:56
gboolean show_symbol_list_expanders
whether to show expanders in the symbol list
Definition: ui_utils.h:57
gint sidebar_pos
position of the sidebar (left or right)
Definition: ui_utils.h:61
gboolean use_native_windows_dialogs
whether to use native Windows' dialogs (only used on Windows)
Definition: ui_utils.h:67
gboolean compiler_tab_autoscroll
whether compiler messages window is automatically scrolled to show new messages
Definition: ui_utils.h:69
gboolean msgwin_status_visible
whether message window's status tab is visible
Definition: ui_utils.h:62
gboolean sidebar_symbol_visible
whether the symbol sidebar is visible
Definition: ui_utils.h:47
gint tab_pos_sidebar
positions of sidebar's tabs
Definition: ui_utils.h:55
gchar * editor_font
editor font
Definition: ui_utils.h:49
gboolean highlighting_invert_all
whether highlighting colors are inverted
Definition: ui_utils.h:60
gboolean sidebar_openfiles_visible
whether the open file list is visible
Definition: ui_utils.h:48
gchar * msgwin_font
message window font
Definition: ui_utils.h:51
gboolean show_notebook_tabs
whether editor tabs are visible
Definition: ui_utils.h:52
gboolean msgwin_compiler_visible
whether message window's compiler tab is visible
Definition: ui_utils.h:63
gint tab_pos_msgwin
positions of message window's tabs
Definition: ui_utils.h:54
gboolean msgwin_scribble_visible
whether message window's scribble tab is visible
Definition: ui_utils.h:65
gint msgwin_orientation
orientation of the message window
Definition: ui_utils.h:70
gboolean msgwin_messages_visible
whether message window's messages tab is visible
Definition: ui_utils.h:64
gboolean notebook_double_click_hides_widgets
whether a double click on notebook tabs hides all other windows
Definition: ui_utils.h:59
gchar * tagbar_font
symbol sidebar font
Definition: ui_utils.h:50
Important widgets in the main window.
Definition: ui_utils.h:79
GtkWidget * window
Main window.
Definition: ui_utils.h:80
GtkWidget * notebook
Document notebook.
Definition: ui_utils.h:83
GtkWidget * message_window_notebook
Message Window notebook.
Definition: ui_utils.h:89
GtkWidget * editor_menu
Popup editor menu.
Definition: ui_utils.h:84
GtkWidget * progressbar
Progress bar widget in the status bar to show progress of various actions.
Definition: ui_utils.h:88
GtkWidget * toolbar
Main toolbar.
Definition: ui_utils.h:81
GtkWidget * project_menu
Plugins modifying the project can add their items to the Project menu.
Definition: ui_utils.h:91
GtkWidget * tools_menu
Most plugins add menu items to the Tools menu.
Definition: ui_utils.h:85
GtkWidget * sidebar_notebook
Sidebar notebook.
Definition: ui_utils.h:82
void ui_init_toolbar_widgets(void)
Definition: ui_utils.c:2232
void ui_update_statusbar(GeanyDocument *doc, gint pos)
Definition: ui_utils.c:324
void ui_set_fullscreen(void)
Definition: ui_utils.c:440
void ui_init_builder(void)
Definition: ui_utils.c:2433
void ui_widget_show_hide(GtkWidget *widget, gboolean show)
Definition: ui_utils.c:987
void ui_create_insert_menu_items(void)
Definition: ui_utils.c:646
void ui_sidebar_show_hide(void)
Definition: ui_utils.c:1000
void ui_update_menu_copy_items(GeanyDocument *doc)
Definition: ui_utils.c:523
void ui_update_popup_goto_items(gboolean enable)
Definition: ui_utils.c:504
GtkWidget * create_toolbar_popup_menu1(void)
Definition: ui_utils.c:2398
void ui_dialog_set_primary_button_order(GtkDialog *dialog, gint response,...)
Definition: ui_utils.c:1523
void ui_statusbar_showhide(gboolean state)
Definition: ui_utils.c:2046
void ui_label_set_markup(GtkLabel *label, const gchar *format,...)
Definition: ui_utils.c:2894
void ui_init(void)
Definition: ui_utils.c:2578
void ui_update_tab_status(GeanyDocument *doc)
Definition: ui_utils.c:1745
void ui_create_recent_menus(void)
Definition: ui_utils.c:1168
GtkWidget * create_edit_menu1(void)
Definition: ui_utils.c:2380
gboolean ui_tree_view_find_next(GtkTreeView *treeview, TVMatchCallback cb)
Definition: ui_utils.c:1812
gpointer ui_builder_get_object(const gchar *name)
Definition: ui_utils.c:2773
gboolean ui_tree_view_find_previous(GtkTreeView *treeview, TVMatchCallback cb)
Definition: ui_utils.c:1819
void ui_set_editor_font(const gchar *font_name)
Definition: ui_utils.c:413
GtkWidget * create_project_dialog(void)
Definition: ui_utils.c:2392
gboolean ui_encodings_combo_box_set_active_encoding(GtkComboBox *combo, gint enc)
Definition: ui_utils.c:3203
void ui_update_popup_copy_items(GeanyDocument *doc)
Definition: ui_utils.c:486
GIcon * ui_get_mime_icon(const gchar *mime_type)
Definition: ui_utils.c:3058
void ui_init_prefs(void)
Definition: ui_utils.c:2332
void ui_save_buttons_toggle(gboolean enable)
Definition: ui_utils.c:830
void ui_add_recent_project_file(const gchar *utf8_filename)
Definition: ui_utils.c:1257
void ui_combo_box_prepend_text_once(GtkComboBoxText *combo, const gchar *text)
Definition: ui_utils.c:1730
GtkWidget * create_prefs_dialog(void)
Definition: ui_utils.c:2386
void ui_set_window_title(GeanyDocument *doc)
Definition: ui_utils.c:366
void ui_swap_sidebar_pos(void)
Definition: ui_utils.c:2241
void ui_hbutton_box_copy_layout(GtkButtonBox *master, GtkButtonBox *copy)
Definition: ui_utils.c:1651
gboolean ui_tree_model_iter_any_next(GtkTreeModel *model, GtkTreeIter *iter, gboolean down)
Definition: ui_utils.c:3130
void ui_entry_add_activate_backward_signal(GtkEntry *entry)
Definition: ui_utils.c:1613
GtkWidget * ui_create_encodings_combo_box(gboolean has_detect, gint default_enc)
Definition: ui_utils.c:3165
gchar * ui_menu_item_get_text(GtkMenuItem *menu_item)
Definition: ui_utils.c:1264
static GtkWidget * prefs_dialog
Definition: ui_utils.c:81
GeanyMainWidgets main_widgets
Definition: ui_utils.c:72
void ui_menu_copy_items_set_sensitive(gboolean sensitive)
Definition: ui_utils.c:513
void ui_auto_separator_add_ref(GeanyAutoSeparator *autosep, GtkWidget *item)
Definition: ui_utils.c:2695
void ui_document_show_hide(GeanyDocument *doc)
Definition: ui_utils.c:1029
void ui_focus_current_document(void)
Definition: ui_utils.c:3100
gint ui_encodings_combo_box_get_active_encoding(GtkComboBox *combo)
Definition: ui_utils.c:3187
void ui_update_view_editor_menu_items(void)
Definition: ui_utils.c:1453
UIPrefs ui_prefs
Definition: ui_utils.c:74
void ui_add_recent_document(GeanyDocument *doc)
Definition: ui_utils.c:1232
void ui_document_buttons_update(void)
Definition: ui_utils.c:946
void ui_update_fold_items(void)
Definition: ui_utils.c:562
void ui_toggle_editor_features(GeanyUIEditorFeatures feature)
Definition: ui_utils.c:1423
GtkWidget * create_window1(void)
Definition: ui_utils.c:2404
void ui_add_config_file_menu_item(const gchar *real_path, const gchar *label, GtkContainer *parent)
Definition: ui_utils.c:2144
void ui_update_recent_project_menu(void)
Definition: ui_utils.c:1296
GtkWidget * ui_label_new_bold(const gchar *text)
Definition: ui_utils.c:2909
void ui_widget_set_sensitive(GtkWidget *widget, gboolean set)
Definition: ui_utils.c:125
void ui_set_search_entry_background(GtkWidget *widget, gboolean success)
Definition: ui_utils.c:1105
void ui_init_stock_items(void)
Definition: ui_utils.c:2218
void ui_finalize_builder(void)
Definition: ui_utils.c:2632
void ui_editable_insert_text_callback(GtkEditable *editable, gchar *new_text, gint new_text_len, gint *position, gpointer data)
Definition: ui_utils.c:3036
void ui_setup_open_button_callback(GtkWidget *open_btn, const gchar *title, GtkFileChooserAction action, GtkEntry *entry)
Definition: ui_utils.c:1950
void ui_update_popup_reundo_items(GeanyDocument *doc)
Definition: ui_utils.c:453
void ui_update_insert_include_item(GeanyDocument *doc, gint item)
Definition: ui_utils.c:547
UIWidgets ui_widgets
Definition: ui_utils.c:75
GeanyInterfacePrefs interface_prefs
Definition: ui_utils.c:71
void ui_create_insert_date_menu_items(void)
Definition: ui_utils.c:784
struct GeanyInterfacePrefs GeanyInterfacePrefs
Interface preferences.
struct GeanyMainWidgets GeanyMainWidgets
Important widgets in the main window.
const gchar * ui_lookup_stock_label(const gchar *stock_id)
Finds the label text associated with stock_id.
Definition: ui_utils.c:3114
void ui_add_document_sensitive(GtkWidget *widget)
Adds a widget to the list of widgets that should be set sensitive/insensitive when some documents are...
Definition: ui_utils.c:976
void ui_progress_bar_start(const gchar *text)
Starts a constantly pulsing progressbar in the right corner of the statusbar (if the statusbar is vis...
Definition: ui_utils.c:2822
void ui_widget_modify_font_from_string(GtkWidget *wid, const gchar *str)
Modifies the font of a widget using gtk_widget_modify_font().
Definition: ui_utils.c:1894
gint ui_get_gtk_settings_integer(const gchar *property_name, gint default_value)
Reads an integer from the GTK default settings registry (see http://library.gnome....
Definition: ui_utils.c:3022
GtkWidget * ui_dialog_vbox_new(GtkDialog *dialog)
Makes a fixed border for dialogs without increasing the button box border.
Definition: ui_utils.c:1499
void ui_menu_add_document_items(GtkMenu *menu, GeanyDocument *active, GCallback callback)
<simplesect kind="geany:skip"></simplesect> Adds a list of document items to menu.
Definition: ui_utils.c:2929
gboolean ui_is_keyval_enter_or_return(guint keyval)
Checks whether the passed keyval is the Enter or Return key.
Definition: ui_utils.c:3009
void ui_menu_add_document_items_sorted(GtkMenu *menu, GeanyDocument *active, GCallback callback, GCompareFunc sort_func)
<simplesect kind="geany:skip"></simplesect> Adds a list of document items to menu.
Definition: ui_utils.c:2952
void ui_widget_set_tooltip_text(GtkWidget *widget, const gchar *text)
Sets text as the contents of the tooltip for widget.
Definition: ui_utils.c:2724
GtkWidget * ui_path_box_new(const gchar *title, GtkFileChooserAction action, GtkEntry *entry)
Creates a GtkHBox with entry packed into it and an open button which runs a file chooser,...
Definition: ui_utils.c:1917
void ui_table_add_row(GtkTable *table, gint row,...) G_GNUC_NULL_TERMINATED
Packs all GtkWidgets passed after the row argument into a table, using one widget per cell.
Definition: ui_utils.c:2066
void ui_entry_add_clear_icon(GtkEntry *entry)
Adds a small clear icon to the right end of the passed entry.
Definition: ui_utils.c:1604
void ui_set_statusbar(gboolean log, const gchar *format,...)
Displays text on the statusbar.
Definition: ui_utils.c:168
void ui_progress_bar_stop(void)
Stops a running progress bar and hides the widget again.
Definition: ui_utils.c:2842
void ui_combo_box_add_to_history(GtkComboBoxText *combo_entry, const gchar *text, gint history_len)
Prepends text to the drop down list, removing a duplicate element in the list if found.
Definition: ui_utils.c:1697
GtkWidget * ui_button_new_with_image(const gchar *stock_id, const gchar *text)
Creates a GtkButton with custom text and a stock image similar to gtk_button_new_from_stock().
Definition: ui_utils.c:1552
GtkWidget * ui_image_menu_item_new(const gchar *stock_id, const gchar *label)
Creates a GtkImageMenuItem with a stock image and a custom label.
Definition: ui_utils.c:1574
GtkWidget * ui_lookup_widget(GtkWidget *widget, const gchar *widget_name)
Returns a widget from a name in a component, usually created by Glade.
Definition: ui_utils.c:2743
void ui_tree_view_set_tooltip_text_column(GtkTreeView *tree_view, gint column)
Adds text tooltips to a tree view.
Definition: ui_utils.c:1876
GtkWidget * ui_frame_new_with_alignment(const gchar *label_text, GtkWidget **alignment)
Creates a GNOME HIG-style frame (with no border and indented child alignment).
Definition: ui_utils.c:1475