~ubuntu-branches/ubuntu/raring/geany/raring-proposed

« back to all changes in this revision

Viewing changes to src/ui_utils.h

  • Committer: Bazaar Package Importer
  • Author(s): Damián Viano
  • Date: 2008-05-02 11:37:45 UTC
  • mfrom: (1.2.1 upstream) (9 hardy)
  • mto: (3.2.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 12.
  • Revision ID: james.westby@ubuntu.com-20080502113745-xzp4g6dmovrpoj17
Tags: 0.14-1
New upstream release (Closes: #478126)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 *      ui_utils.h - this file is part of Geany, a fast and lightweight IDE
3
3
 *
4
 
 *      Copyright 2006 Enrico Troeger <enrico.troeger@uvena.de>
5
 
 *      Copyright 2006 Nick Treleaven <nick.treleaven@btinternet.com>
 
4
 *      Copyright 2006-2008 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
 
5
 *      Copyright 2006-2008 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
6
6
 *
7
7
 *      This program is free software; you can redistribute it and/or modify
8
8
 *      it under the terms of the GNU General Public License as published by
18
18
 *      along with this program; if not, write to the Free Software
19
19
 *      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
20
 *
21
 
 * $Id: ui_utils.h 817 2006-09-15 14:25:42Z ntrel $
 
21
 * $Id: ui_utils.h 2287 2008-02-27 13:17:29Z eht16 $
22
22
 */
23
23
 
24
24
#ifndef GEANY_UI_UTILS_H
25
25
#define GEANY_UI_UTILS_H 1
26
26
 
27
 
/* allow_override is TRUE if text can be ignored when another message has been set
28
 
 * that didn't use allow_override and has not timed out. */
29
 
void ui_set_statusbar(const gchar *text, gboolean allow_override);
 
27
/* User Interface settings not shown in the Prefs dialog. */
 
28
typedef struct UIPrefs
 
29
{
 
30
        /* State of the main window when Geany was closed */
 
31
        gint            geometry[5];    /* 0:x, 1:y, 2:width, 3:height, flag for maximized state */
 
32
        gboolean        fullscreen;
 
33
        gboolean        sidebar_visible;
 
34
        gboolean        msgwindow_visible;
 
35
 
 
36
        /* Menu-item related data */
 
37
        GQueue          *recent_queue;
 
38
        gchar           *custom_date_format;
 
39
        gchar           **custom_commands;
 
40
}
 
41
UIPrefs;
 
42
 
 
43
extern UIPrefs ui_prefs;
 
44
 
 
45
 
 
46
/* Less commonly used widgets */
 
47
typedef struct UIWidgets
 
48
{
 
49
        /* menu widgets */
 
50
        GtkWidget       *toolbar_menu;
 
51
        GtkWidget       *new_file_menu;
 
52
        GtkWidget       *recent_files_menuitem;
 
53
        GtkWidget       *recent_files_menubar;
 
54
        GtkWidget       *recent_files_toolbar;
 
55
        GtkWidget       *print_page_setup;
 
56
        GtkWidget       *menu_insert_include_items[2];
 
57
        GtkWidget       *popup_goto_items[3];
 
58
        GtkWidget       *popup_copy_items[3];
 
59
        GtkWidget       *menu_copy_items[3];
 
60
        GtkWidget       *redo_items[3];
 
61
        GtkWidget       *undo_items[3];
 
62
        GtkWidget       *save_buttons[4];
 
63
 
 
64
        /* dialogs */
 
65
        GtkWidget       *open_colorsel;
 
66
        GtkWidget       *open_fontsel;
 
67
        GtkWidget       *open_filesel;
 
68
        GtkWidget       *save_filesel;
 
69
        GtkWidget       *prefs_dialog;
 
70
}
 
71
UIWidgets;
 
72
 
 
73
extern UIWidgets ui_widgets;
 
74
 
 
75
 
 
76
/* The following block of functions are more generic functions and closely related to
 
77
 * certain GTK+ widgets. */
 
78
 
 
79
void ui_widget_show_hide(GtkWidget *widget, gboolean show);
 
80
 
 
81
void ui_widget_modify_font_from_string(GtkWidget *wid, const gchar *str);
 
82
 
 
83
GtkWidget *ui_frame_new_with_alignment(const gchar *label_text, GtkWidget **alignment);
 
84
 
 
85
GtkWidget *ui_dialog_vbox_new(GtkDialog *dialog);
 
86
 
 
87
GtkWidget *ui_button_new_with_image(const gchar *stock_id, const gchar *text);
 
88
 
 
89
void ui_hbutton_box_copy_layout(GtkButtonBox *master, GtkButtonBox *copy);
 
90
 
 
91
void ui_combo_box_add_to_history(GtkComboBox *combo, const gchar *text);
 
92
 
 
93
GtkWidget *ui_path_box_new(const gchar *title, GtkFileChooserAction action, GtkEntry *entry);
 
94
 
 
95
void ui_setup_open_button_callback(GtkWidget *open_btn, const gchar *title,
 
96
                GtkFileChooserAction action, GtkEntry *entry);
 
97
 
 
98
void ui_table_add_row(GtkTable *table, gint row, ...) G_GNUC_NULL_TERMINATED;
 
99
 
 
100
/* End of 'generic' functions */
 
101
 
 
102
 
 
103
void ui_init(void);
 
104
 
 
105
 
 
106
void ui_set_statusbar(gboolean log, const gchar *format, ...) G_GNUC_PRINTF (2, 3);
30
107
 
31
108
void ui_update_statusbar(gint idx, gint pos);
32
109
 
36
113
 
37
114
void ui_set_editor_font(const gchar *font_name);
38
115
 
39
 
void ui_set_fullscreen();
40
 
 
41
 
 
42
 
void ui_update_tag_list(gint idx, gboolean update);
 
116
void ui_set_fullscreen(void);
43
117
 
44
118
 
45
119
void ui_update_popup_reundo_items(gint idx);
53
127
 
54
128
void ui_update_insert_include_item(gint idx, gint item);
55
129
 
56
 
void ui_update_fold_items();
57
 
 
58
 
 
59
 
void ui_create_insert_menu_items();
60
 
 
61
 
void ui_create_insert_date_menu_items();
 
130
void ui_update_fold_items(void);
 
131
 
 
132
 
 
133
void ui_create_insert_menu_items(void);
 
134
 
 
135
void ui_create_insert_date_menu_items(void);
62
136
 
63
137
 
64
138
void ui_save_buttons_toggle(gboolean enable);
65
139
 
66
 
void ui_close_buttons_toggle();
67
 
 
68
 
 
69
 
void ui_widget_show_hide(GtkWidget *widget, gboolean show);
70
 
 
71
 
void ui_build_show_hide(gint);
72
 
 
73
 
void ui_treeviews_show_hide(gboolean force);
 
140
void ui_document_buttons_update(void);
 
141
 
 
142
 
 
143
void ui_sidebar_show_hide(void);
74
144
 
75
145
void ui_document_show_hide(gint idx);
76
146
 
77
147
 
78
148
void ui_update_toolbar_icons(GtkIconSize size);
79
149
 
80
 
void ui_update_toolbar_items();
 
150
void ui_update_toolbar_items(void);
81
151
 
82
152
 
83
153
GdkPixbuf *ui_new_pixbuf_from_inline(gint img, gboolean small_img);
85
155
GtkWidget *ui_new_image_from_inline(gint img, gboolean small_img);
86
156
 
87
157
 
88
 
void ui_create_recent_menu();
 
158
void ui_create_recent_menu(void);
89
159
 
90
160
void ui_add_recent_file(const gchar *utf8_filename);
91
161
 
92
162
 
93
 
void ui_show_markers_margin();
94
 
 
95
 
void ui_show_linenumber_margin();
96
 
 
97
 
 
98
 
GtkContainer *ui_frame_new(GtkContainer *parent, const gchar *label_text);
 
163
void ui_show_markers_margin(void);
 
164
 
 
165
void ui_show_linenumber_margin(void);
 
166
 
 
167
 
 
168
void ui_update_tab_status(gint idx);
 
169
 
 
170
 
 
171
typedef gboolean TVMatchCallback(void);
 
172
 
 
173
gboolean ui_tree_view_find_next(GtkTreeView *treeview, TVMatchCallback cb);
 
174
 
 
175
 
 
176
void ui_statusbar_showhide(gboolean state);
99
177
 
100
178
#endif