~ubuntu-branches/ubuntu/vivid/winefish/vivid

« back to all changes in this revision

Viewing changes to src/gtk_easy.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Leidert (dale)
  • Date: 2006-04-14 14:41:11 UTC
  • Revision ID: james.westby@ubuntu.com-20060414144111-wi90w6pr70ifwxtw
Tags: upstream-1.3.3
ImportĀ upstreamĀ versionĀ 1.3.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: gtk_easy.h 1712 2006-01-28 09:59:34Z kyanh $ */
 
2
/* Winefish LaTeX Editor (based on Bluefish HTML Editor)
 
3
 *
 
4
 * Copyright (C) 1999-2004 Olivier Sessink
 
5
 * Modified for Winefish (C) 2005 Ky Anh <kyanh@o2.pl>
 
6
 *
 
7
 * This program is free software; you can redistribute it and/or modify
 
8
 * it under the terms of the GNU General Public License as published by
 
9
 * the Free Software Foundation; either version 2 of the License, or
 
10
 * (at your option) any later version.
 
11
 *
 
12
 * This program is distributed in the hope that it will be useful,
 
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
 * GNU General Public License for more details.
 
16
 *
 
17
 * You should have received a copy of the GNU General Public License
 
18
 * along with this program; if not, write to the Free Software
 
19
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
20
 */
 
21
 
 
22
#ifndef __GTK_EASY_H_
 
23
#define __GTK_EASY_H_
 
24
 
 
25
#define FILE_CHOOSER_USE_VFS(dialog) (g_object_set_data(G_OBJECT(dialog),"GnomeFileSelectorEnableVFS",GINT_TO_POINTER(1)))
 
26
 
 
27
/* GtkWindowPosition can be 
 
28
GTK_WIN_POS_NONE
 
29
GTK_WIN_POS_CENTER
 
30
GTK_WIN_POS_MOUSE */
 
31
 
 
32
typedef enum { none, file, font } Textra_but;
 
33
void flush_queue(void);
 
34
gint widget_get_string_size(GtkWidget *widget, gchar *string);
 
35
void widget_set_visible(GtkWidget *widget, gboolean visible);
 
36
/* Single-button dialogs*/
 
37
void single_button_dialog_backend(GtkWidget *win,gchar * primary, gchar * secondary, gchar * icon);
 
38
void error_dialog(GtkWidget *win,gchar * primary, gchar * secondary);
 
39
void warning_dialog(GtkWidget *win,gchar * primary, gchar * secondary);
 
40
void info_dialog(GtkWidget *win,gchar * primary, gchar * secondary);
 
41
/* Multi-button dialogs */
 
42
gint multi_error_dialog(GtkWidget *win,gchar *primary, gchar *secondary, gint defval, gint cancelval, gchar **buttons);
 
43
gint multi_warning_dialog(GtkWidget *win,gchar *primary, gchar *secondary, gint defval, gint cancelval, gchar **buttons);
 
44
gint multi_query_dialog(GtkWidget *win,gchar *primary, gchar *secondary, gint defval, gint cancelval, gchar **buttons);
 
45
/* Progress bar */
 
46
void progress_set(gpointer gp, guint value);
 
47
gpointer progress_popup(GtkWidget *win,gchar *title, guint maxvalue);
 
48
void progress_destroy(gpointer gp);
 
49
 
 
50
void setup_toggle_item(GtkItemFactory * ifactory, gchar * path, gint state);
 
51
#define setup_toggle_item_from_widget(var1, var2, var3) setup_toggle_item(gtk_item_factory_from_widget(var1), var2, var3)
 
52
#define menuitem_set_sensitive(menubar, path, state) gtk_widget_set_sensitive(gtk_item_factory_get_widget(gtk_item_factory_from_widget(menubar), path), state)
 
53
void string_apply(gchar ** config_var, GtkWidget * entry);
 
54
void integer_apply(gint *config_var, GtkWidget * widget, gboolean is_checkbox);
 
55
void bitwise_apply(guint32 *config_var, GtkWidget * widget, gboolean is_checkbox, guint32 BIT);
 
56
GtkWidget *combo_with_popdown(const gchar * setstring, GList * which_list, gint editable);
 
57
GtkWidget *boxed_combo_with_popdown(const gchar * setstring, GList * which_list, gint editable, GtkWidget *box);
 
58
GtkWidget *combo_with_popdown_sized(const gchar * setstring, GList * which_list, gint editable, gint width);
 
59
GtkWidget *entry_with_text(const gchar * setstring, gint max_lenght);
 
60
GtkWidget *boxed_entry_with_text(const gchar * setstring, gint max_lenght, GtkWidget *box);
 
61
GtkWidget *boxed_full_entry(const gchar * labeltext, gchar * setstring,gint max_lenght, GtkWidget * box);
 
62
GtkWidget *checkbut_with_value(gchar *labeltext, gint which_config_int);
 
63
GtkWidget *boxed_checkbut_with_value(gchar *labeltext, gint which_config_int, GtkWidget * box);
 
64
GtkWidget *radiobut_with_value(gchar *labeltext, gint enabled, GtkRadioButton *prevbut);
 
65
GtkWidget *boxed_radiobut_with_value(gchar *labeltext, gint enabled, GtkRadioButton *prevbut, GtkWidget *box);
 
66
GtkWidget *spinbut_with_value(gchar *value, gfloat lower, gfloat upper, gfloat step_increment, gfloat page_increment);
 
67
GtkWidget *optionmenu_with_value(gchar **options, gint curval);
 
68
GtkWidget *boxed_optionmenu_with_value(const gchar *labeltext, gint curval, GtkWidget *box, gchar **options);
 
69
GtkWidget *window_with_title(const gchar * title, GtkWindowPosition position, gint borderwidth);
 
70
 
 
71
#define window_full(title,position,borderwidth,close_func,close_data,delete_on_escape) window_full2(title,position,borderwidth,close_func,close_data,delete_on_escape,NULL)
 
72
 
 
73
GtkWidget *window_full2(const gchar * title, GtkWindowPosition position, gint borderwidth, GCallback close_func,
 
74
                                           gpointer close_data, gboolean delete_on_escape, GtkWidget *transientforparent);
 
75
 
 
76
GtkWidget *textview_buffer_in_scrolwin(GtkWidget **textview, gint width, gint height, const gchar *contents, GtkWrapMode wrapmode);
 
77
void window_destroy(GtkWidget * windowname);
 
78
void window_close_by_widget_cb(GtkWidget * widget, gpointer data);
 
79
void window_close_by_data_cb(GtkWidget * widget, gpointer data);
 
80
GtkWidget *apply_font_style(GtkWidget * this_widget, gchar * fontstring);
 
81
 
 
82
GtkWidget *hbox_with_pix_and_text(const gchar *label, gint bf_pixmaptype, gboolean w_mnemonic);
 
83
 
 
84
GtkWidget *bf_allbuttons_backend(const gchar *label, gboolean w_mnemonic, gint bf_pixmaptype
 
85
                , GCallback func, gpointer func_data );
 
86
#define bf_generic_button_with_image(label,pixmap_type,func,func_data) bf_allbuttons_backend(label,FALSE,pixmap_type,func,func_data)
 
87
#define bf_generic_mnemonic_button(label,func,func_data) bf_allbuttons_backend(label,TRUE,-1,func,func_data)
 
88
 
 
89
GtkWidget *bf_gtkstock_button(const gchar * stock_id, GCallback func, gpointer func_data);
 
90
#define bf_stock_ok_button(func, data) bf_gtkstock_button(GTK_STOCK_OK, func, data)
 
91
#define bf_stock_cancel_button(func, data) bf_gtkstock_button(GTK_STOCK_CANCEL, func, data)
 
92
 
 
93
GtkWidget *bf_generic_frame_new(const gchar *label, GtkShadowType shadowtype, gint borderwidth);
 
94
void bf_mnemonic_label_tad_with_alignment(const gchar *labeltext, GtkWidget *m_widget, gfloat xalign, gfloat yalign, 
 
95
                                                GtkWidget *table, guint left_attach, guint right_attach, guint top_attach, guint bottom_attach);
 
96
GtkWidget *bf_label_with_markup(const gchar *labeltext);
 
97
void bf_label_tad_with_markup(const gchar *labeltext, gfloat xalign, gfloat yalign,
 
98
                                                                GtkWidget *table, guint left_attach, guint right_attach, guint top_attach, guint bottom_attach);                                                
 
99
GtkWidget *file_but_new(GtkWidget * which_entry, gint full_pathname, Tbfwin *bfwin);
 
100
#ifdef HAVE_ATLEAST_GTK_2_4
 
101
GtkWidget * file_chooser_dialog(Tbfwin *bfwin, gchar *title, GtkFileChooserAction action, 
 
102
                                                                                        gchar *set, gboolean localonly, gboolean multiple, const gchar *filter);
 
103
#else
 
104
void close_modal_window_lcb(GtkWidget * widget, gpointer window);
 
105
gchar *return_file_w_title(gchar * setfile, gchar *title);
 
106
gchar *return_file(gchar * setfile);
 
107
GList *return_files_w_title(gchar * setfile, gchar *title);
 
108
GList *return_files(gchar * setfile);
 
109
gchar *return_dir(gchar *setdir, gchar *title);
 
110
#endif
 
111
void destroy_disposable_menu_cb(GtkWidget *widget, GtkWidget *menu);
 
112
 
 
113
#ifndef HAVE_ATLEAST_GTK_2_2
 
114
void gtktreepath_expand_to_root(GtkWidget *tree, const GtkTreePath *this_path);
 
115
#endif
 
116
#endif