annotate src/ui.hh @ 2052:89af8495455f

remove use of Fl_Pack to avoid resizing issues CustGroup is split into CustGroupHorizontal and CustGroupVertical. CustGroupVertical is then used to replace Fl_Pack for TopGroup.
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Thu, 26 May 2011 21:12:33 +0200
parents e816e06ee901
children 8d3f28ad46c4
rev   line source
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
1 #ifndef __UI_HH__
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
2 #define __UI_HH__
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
3
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
4 // UI for dillo --------------------------------------------------------------
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
5
1813
6a203275d317 a bit of src/ui
corvid <corvid@lavabit.com>
parents: 1525
diff changeset
6 #include <FL/Fl_Window.H>
6a203275d317 a bit of src/ui
corvid <corvid@lavabit.com>
parents: 1525
diff changeset
7 #include <FL/Fl_Widget.H>
6a203275d317 a bit of src/ui
corvid <corvid@lavabit.com>
parents: 1525
diff changeset
8 #include <FL/Fl_Button.H>
6a203275d317 a bit of src/ui
corvid <corvid@lavabit.com>
parents: 1525
diff changeset
9 #include <FL/Fl_Input.H>
6a203275d317 a bit of src/ui
corvid <corvid@lavabit.com>
parents: 1525
diff changeset
10 #include <FL/Fl_Output.H>
6a203275d317 a bit of src/ui
corvid <corvid@lavabit.com>
parents: 1525
diff changeset
11 #include <FL/Fl_Image.H>
6a203275d317 a bit of src/ui
corvid <corvid@lavabit.com>
parents: 1525
diff changeset
12 #include <FL/Fl_Tabs.H>
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
13
224
07d1e0d8463c - Replaced the findtext dialog with an in-window widget!
jcid
parents: 217
diff changeset
14 #include "findbar.hh"
07d1e0d8463c - Replaced the findtext dialog with an in-window widget!
jcid
parents: 217
diff changeset
15
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
16 typedef enum {
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
17 UI_BACK = 0,
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
18 UI_FORW,
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
19 UI_HOME,
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
20 UI_RELOAD,
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
21 UI_SAVE,
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
22 UI_STOP,
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
23 UI_BOOK,
827
d513abcd4949 Implemented the tools button with CSS options. Also removed nav.h from html.cc
Jorge Arellano Cid <jcid@dillo.org>
parents: 438
diff changeset
24 UI_TOOLS,
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
25 UI_CLEAR,
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
26 UI_SEARCH
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
27 } UIButton;
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
28
217
a27eafd634d1 - Made CTRL-l focus the location bar instead of popping up a dialog.
jcid
parents: 96
diff changeset
29 typedef enum {
a27eafd634d1 - Made CTRL-l focus the location bar instead of popping up a dialog.
jcid
parents: 96
diff changeset
30 UI_NORMAL = 0, /* make sure it's compatible with bool */
a27eafd634d1 - Made CTRL-l focus the location bar instead of popping up a dialog.
jcid
parents: 96
diff changeset
31 UI_HIDDEN = 1,
a27eafd634d1 - Made CTRL-l focus the location bar instead of popping up a dialog.
jcid
parents: 96
diff changeset
32 UI_TEMPORARILY_SHOW_PANELS
a27eafd634d1 - Made CTRL-l focus the location bar instead of popping up a dialog.
jcid
parents: 96
diff changeset
33 } UIPanelmode;
a27eafd634d1 - Made CTRL-l focus the location bar instead of popping up a dialog.
jcid
parents: 96
diff changeset
34
350
118fe0444e08 - Added the "middle_click_opens_new_tab" option to dillo2rc.
jcid
parents: 341
diff changeset
35 // Private classes
341
215da0caf90b - Implemented tabbed browsing.
jcid
parents: 333
diff changeset
36 class CustProgressBox;
1926
5a0a49770247 Made a brand new CustTabs class (to allow fine control of tabs).
Jorge Arellano Cid <jcid@dillo.org>
parents: 1925
diff changeset
37 class CustTabs;
75
4dfc78307039 Made progress bars resize automatically.
jcid
parents: 72
diff changeset
38
1925
72bfd5e7edcd Added CustGroup class (it repositions child widgets when others are hidden)
Jorge Arellano Cid <jcid@dillo.org>
parents: 1924
diff changeset
39
72bfd5e7edcd Added CustGroup class (it repositions child widgets when others are hidden)
Jorge Arellano Cid <jcid@dillo.org>
parents: 1924
diff changeset
40 // Class definition ----------------------------------------------------------
72bfd5e7edcd Added CustGroup class (it repositions child widgets when others are hidden)
Jorge Arellano Cid <jcid@dillo.org>
parents: 1924
diff changeset
41 /*
2052
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
42 * Used to reposition group's widgets when some of them are hidden.
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
43 * All children get the height of the group but retain their original width.
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
44 * The resizable child get's the remaining space.
1925
72bfd5e7edcd Added CustGroup class (it repositions child widgets when others are hidden)
Jorge Arellano Cid <jcid@dillo.org>
parents: 1924
diff changeset
45 */
2052
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
46 class CustGroupHorizontal : public Fl_Group {
1925
72bfd5e7edcd Added CustGroup class (it repositions child widgets when others are hidden)
Jorge Arellano Cid <jcid@dillo.org>
parents: 1924
diff changeset
47 public:
2052
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
48 CustGroupHorizontal(int x,int y,int w ,int h,const char *l = 0) :
1925
72bfd5e7edcd Added CustGroup class (it repositions child widgets when others are hidden)
Jorge Arellano Cid <jcid@dillo.org>
parents: 1924
diff changeset
49 Fl_Group(x,y,w,h,l) { };
72bfd5e7edcd Added CustGroup class (it repositions child widgets when others are hidden)
Jorge Arellano Cid <jcid@dillo.org>
parents: 1924
diff changeset
50
2052
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
51 void rearrange() {
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
52 Fl_Widget*const* a = array();
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
53 int sum = 0, _x = x();
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
54 int children_ = children();
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
55
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
56 for (int i=0; i < children_; i++)
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
57 if (a[i] != resizable() && a[i]->visible())
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
58 sum += a[i]->w();
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
59
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
60 for (int i=0; i < children_; i++) {
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
61 if (a[i] == resizable()) {
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
62 a[i]->resize(_x, y(), w() - sum, h());
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
63 } else {
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
64 a[i]->resize(_x, y(), a[i]->w(), h());
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
65 }
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
66 if (a[i]->visible())
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
67 _x += a[i]->w();
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
68 }
1925
72bfd5e7edcd Added CustGroup class (it repositions child widgets when others are hidden)
Jorge Arellano Cid <jcid@dillo.org>
parents: 1924
diff changeset
69 init_sizes();
72bfd5e7edcd Added CustGroup class (it repositions child widgets when others are hidden)
Jorge Arellano Cid <jcid@dillo.org>
parents: 1924
diff changeset
70 redraw();
72bfd5e7edcd Added CustGroup class (it repositions child widgets when others are hidden)
Jorge Arellano Cid <jcid@dillo.org>
parents: 1924
diff changeset
71 }
2052
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
72 };
1925
72bfd5e7edcd Added CustGroup class (it repositions child widgets when others are hidden)
Jorge Arellano Cid <jcid@dillo.org>
parents: 1924
diff changeset
73
2052
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
74 class CustGroupVertical : public Fl_Group {
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
75 public:
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
76 CustGroupVertical(int x,int y,int w ,int h,const char *l = 0) :
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
77 Fl_Group(x,y,w,h,l) { };
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
78
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
79 void rearrange() {
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
80 Fl_Widget*const* a = array();
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
81 int sum = 0, _y = y();
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
82 int children_ = children();
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
83
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
84 for (int i=0; i < children_; i++)
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
85 if (a[i] != resizable() && a[i]->visible())
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
86 sum += a[i]->h();
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
87
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
88 for (int i=0; i < children_; i++) {
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
89 if (a[i] == resizable()) {
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
90 a[i]->resize(x(), _y, w(), h() - sum);
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
91 } else {
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
92 a[i]->resize(x(), _y, w(), a[i]->h());
1925
72bfd5e7edcd Added CustGroup class (it repositions child widgets when others are hidden)
Jorge Arellano Cid <jcid@dillo.org>
parents: 1924
diff changeset
93 }
2052
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
94 if (a[i]->visible())
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
95 _y += a[i]->h();
1925
72bfd5e7edcd Added CustGroup class (it repositions child widgets when others are hidden)
Jorge Arellano Cid <jcid@dillo.org>
parents: 1924
diff changeset
96 }
2052
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
97 init_sizes();
1925
72bfd5e7edcd Added CustGroup class (it repositions child widgets when others are hidden)
Jorge Arellano Cid <jcid@dillo.org>
parents: 1924
diff changeset
98 redraw();
72bfd5e7edcd Added CustGroup class (it repositions child widgets when others are hidden)
Jorge Arellano Cid <jcid@dillo.org>
parents: 1924
diff changeset
99 }
72bfd5e7edcd Added CustGroup class (it repositions child widgets when others are hidden)
Jorge Arellano Cid <jcid@dillo.org>
parents: 1924
diff changeset
100 };
72bfd5e7edcd Added CustGroup class (it repositions child widgets when others are hidden)
Jorge Arellano Cid <jcid@dillo.org>
parents: 1924
diff changeset
101
72bfd5e7edcd Added CustGroup class (it repositions child widgets when others are hidden)
Jorge Arellano Cid <jcid@dillo.org>
parents: 1924
diff changeset
102
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
103 //
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
104 // UI class definition -------------------------------------------------------
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
105 //
2052
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
106 class UI : public CustGroupVertical {
1926
5a0a49770247 Made a brand new CustTabs class (to allow fine control of tabs).
Jorge Arellano Cid <jcid@dillo.org>
parents: 1925
diff changeset
107 CustTabs *Tabs;
341
215da0caf90b - Implemented tabbed browsing.
jcid
parents: 333
diff changeset
108 char *TabTooltip;
215da0caf90b - Implemented tabbed browsing.
jcid
parents: 333
diff changeset
109
2052
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
110 CustGroupVertical *TopGroup;
1813
6a203275d317 a bit of src/ui
corvid <corvid@lavabit.com>
parents: 1525
diff changeset
111 Fl_Button *Back, *Forw, *Home, *Reload, *Save, *Stop, *Bookmarks, *Tools,
1525
3c683905dbe3 Added a help button. It tries a local help file then dillo.org's one.
corvid, jcid
parents: 1347
diff changeset
112 *Clear, *Search, *Help, *FullScreen, *BugMeter, *FileButton;
2052
89af8495455f remove use of Fl_Pack to avoid resizing issues
Johannes Hofmann <Johannes.Hofmann@gmx.de>
parents: 1977
diff changeset
113 CustGroupHorizontal *MenuBar, *LocBar, *NavBar, *StatusBar;
1813
6a203275d317 a bit of src/ui
corvid <corvid@lavabit.com>
parents: 1525
diff changeset
114 Fl_Input *Location;
341
215da0caf90b - Implemented tabbed browsing.
jcid
parents: 333
diff changeset
115 CustProgressBox *PProg, *IProg;
1947
821e6262ead9 Keybindings and some variable name normalizations
Jorge Arellano Cid <jcid@dillo.org>
parents: 1945
diff changeset
116 Fl_Group *Panel, *Main;
1822
a0ed332132e1 some more src/ui
corvid <corvid@lavabit.com>
parents: 1813
diff changeset
117 Fl_Output *StatusOutput;
1948
caf71cd30ec8 Made the findbar operative again (it has tricks and workarounds)
Jorge Arellano Cid <jcid@dillo.org>
parents: 1947
diff changeset
118 Findbar *FindBar;
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
119
1948
caf71cd30ec8 Made the findbar operative again (it has tricks and workarounds)
Jorge Arellano Cid <jcid@dillo.org>
parents: 1947
diff changeset
120 int FindBarSpace, MainIdx;
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
121 // Panel customization variables
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
122 int PanelSize, CuteColor, Small_Icons;
1947
821e6262ead9 Keybindings and some variable name normalizations
Jorge Arellano Cid <jcid@dillo.org>
parents: 1945
diff changeset
123 int p_xpos, p_ypos, bw, bh, mh, lh, nh, fh, sh, pw, lbl;
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
124
217
a27eafd634d1 - Made CTRL-l focus the location bar instead of popping up a dialog.
jcid
parents: 96
diff changeset
125 UIPanelmode Panelmode;
438
29c514f5ce00 - Added the "middle_click_drags_page" dillorc option.
jcid
parents: 404
diff changeset
126 int PointerOnLink;
1924
998acefd6a51 Initial changes to make the tiny panel mode work
Jorge Arellano Cid <jcid@dillo.org>
parents: 1823
diff changeset
127 Fl_Button *make_button(const char *label, Fl_Image *img,
998acefd6a51 Initial changes to make the tiny panel mode work
Jorge Arellano Cid <jcid@dillo.org>
parents: 1823
diff changeset
128 Fl_Image*deimg, int b_n, int start = 0);
998acefd6a51 Initial changes to make the tiny panel mode work
Jorge Arellano Cid <jcid@dillo.org>
parents: 1823
diff changeset
129 void make_toolbar(int tw, int th);
998acefd6a51 Initial changes to make the tiny panel mode work
Jorge Arellano Cid <jcid@dillo.org>
parents: 1823
diff changeset
130 void make_location(int ww);
998acefd6a51 Initial changes to make the tiny panel mode work
Jorge Arellano Cid <jcid@dillo.org>
parents: 1823
diff changeset
131 void make_progress_bars(int wide, int thin_up);
314
cf1216d236d4 - Reimplemented the menubar in a more ortodox way.
jcid
parents: 301
diff changeset
132 void make_menubar(int x, int y, int w, int h);
1813
6a203275d317 a bit of src/ui
corvid <corvid@lavabit.com>
parents: 1525
diff changeset
133 Fl_Widget *make_filemenu_button();
1924
998acefd6a51 Initial changes to make the tiny panel mode work
Jorge Arellano Cid <jcid@dillo.org>
parents: 1823
diff changeset
134 void make_panel(int ww);
1947
821e6262ead9 Keybindings and some variable name normalizations
Jorge Arellano Cid <jcid@dillo.org>
parents: 1945
diff changeset
135 void make_status_bar(int ww, int wh);
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
136
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
137 public:
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
138
341
215da0caf90b - Implemented tabbed browsing.
jcid
parents: 333
diff changeset
139 UI(int x,int y,int w,int h, const char* label = 0, const UI *cur_ui=NULL);
301
da2c1fb876c8 - implemented UI's destructor (i.e. UI::~UI())
jcid
parents: 224
diff changeset
140 ~UI();
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
141
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
142 // To manage what events to catch and which to let pass
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
143 int handle(int event);
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
144
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
145 const char *get_location();
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
146 void set_location(const char *str);
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
147 void focus_location();
341
215da0caf90b - Implemented tabbed browsing.
jcid
parents: 333
diff changeset
148 void focus_main();
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
149 void set_status(const char *str);
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
150 void set_page_prog(size_t nbytes, int cmd);
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
151 void set_img_prog(int n_img, int t_img, int cmd);
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
152 void set_bug_prog(int n_bug);
1945
b24a5b73ff10 Made the status bar visible and operative.
Jorge Arellano Cid <jcid@dillo.org>
parents: 1929
diff changeset
153 void set_render_layout(Fl_Group *nw);
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
154 void customize(int flags);
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
155 void button_set_sens(UIButton btn, int sens);
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
156 void paste_url();
217
a27eafd634d1 - Made CTRL-l focus the location bar instead of popping up a dialog.
jcid
parents: 96
diff changeset
157 void set_panelmode(UIPanelmode mode);
a27eafd634d1 - Made CTRL-l focus the location bar instead of popping up a dialog.
jcid
parents: 96
diff changeset
158 UIPanelmode get_panelmode();
1977
e816e06ee901 Added a submenu to control the panel size (Tools)
Jorge Arellano Cid <jcid@dillo.org>
parents: 1967
diff changeset
159 int get_panelsize() { return PanelSize; }
e816e06ee901 Added a submenu to control the panel size (Tools)
Jorge Arellano Cid <jcid@dillo.org>
parents: 1967
diff changeset
160 int get_smallicons() { return Small_Icons; }
e816e06ee901 Added a submenu to control the panel size (Tools)
Jorge Arellano Cid <jcid@dillo.org>
parents: 1967
diff changeset
161 void change_panel(int new_size, int small_icons);
1948
caf71cd30ec8 Made the findbar operative again (it has tricks and workarounds)
Jorge Arellano Cid <jcid@dillo.org>
parents: 1947
diff changeset
162 void findbar_toggle(bool add);
1953
808ca0de6d8f Made fullscreen work again (Ctrl+Space)
Jorge Arellano Cid <jcid@dillo.org>
parents: 1948
diff changeset
163 void fullscreen_toggle();
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
164
1926
5a0a49770247 Made a brand new CustTabs class (to allow fine control of tabs).
Jorge Arellano Cid <jcid@dillo.org>
parents: 1925
diff changeset
165 CustTabs *tabs() { return Tabs; }
5a0a49770247 Made a brand new CustTabs class (to allow fine control of tabs).
Jorge Arellano Cid <jcid@dillo.org>
parents: 1925
diff changeset
166 void tabs(CustTabs *tabs) { Tabs = tabs; }
438
29c514f5ce00 - Added the "middle_click_drags_page" dillorc option.
jcid
parents: 404
diff changeset
167 int pointerOnLink() { return PointerOnLink; }
29c514f5ce00 - Added the "middle_click_drags_page" dillorc option.
jcid
parents: 404
diff changeset
168 void pointerOnLink(int flag) { PointerOnLink = flag; }
341
215da0caf90b - Implemented tabbed browsing.
jcid
parents: 333
diff changeset
169
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
170 // Hooks to method callbacks
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
171 void color_change_cb_i();
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
172 void toggle_cb_i();
217
a27eafd634d1 - Made CTRL-l focus the location bar instead of popping up a dialog.
jcid
parents: 96
diff changeset
173 void panelmode_cb_i();
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
174 };
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
175
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
176 #endif // __UI_HH__