Dillo v3.1.1-98-g318d1f14
|
#include <ui.hh>
Public Member Functions | |
UI (int x, int y, int w, int h, const char *label=0, const UI *cur_ui=NULL) | |
User Interface constructor. | |
~UI () | |
UI destructor. | |
int | handle (int event) |
To manage what events to catch and which to let pass. | |
const char * | get_location () |
Get the text from the location input-box. | |
void | set_location (const char *str) |
Set a new URL in the location input-box. | |
void | focus_location () |
Focus location entry. | |
void | focus_main () |
Focus Main area. | |
void | set_status (const char *str) |
Set a new message in the status bar. | |
void | set_page_prog (size_t nbytes, int cmd) |
Set the page progress text. | |
void | set_img_prog (int n_img, int t_img, int cmd) |
Set the image progress text. | |
void | set_bug_prog (int n_bug) |
Set the bug meter progress text. | |
void | set_render_layout (Fl_Group *nw) |
Set 'nw' as the main render area widget. | |
void | customize () |
Customize the UI's panel (show/hide buttons) | |
void | button_set_sens (UIButton btn, int sens) |
Set button sensitivity (Back/Forw/Stop) | |
void | paste_url () |
Paste a middle-click-selection into "Clear" button as URL. | |
int | get_panelsize () |
int | get_smallicons () |
void | change_panel (int new_size, int small_icons) |
On-the-fly panel style change. | |
void | findbar_toggle (bool add) |
Adjust space for the findbar (if necessary) and show or remove it. | |
void | panels_toggle () |
Make panels disappear growing the render area. | |
CustTabs * | tabs () |
void | tabs (CustTabs *tabs) |
bool | temporaryPanels () |
void | temporaryPanels (bool val) |
void | color_change_cb_i () |
void | toggle_cb_i () |
Public Member Functions inherited from CustGroupVertical | |
CustGroupVertical (int x, int y, int w, int h, const char *l=0) | |
void | rearrange () |
Private Member Functions | |
CustButton * | make_button (const char *label, Fl_Image *img, Fl_Image *deimg, int b_n, int start=0) |
Make a generic navigation button. | |
void | make_toolbar (int tw, int th) |
Create the archetipic browser buttons. | |
void | make_location (int ww) |
Create the location box (Clear/Input/Search) | |
void | make_progress_bars (int wide, int thin_up) |
Create the progress bars. | |
void | make_menubar (int x, int y, int w, int h) |
void | make_filemenu_button () |
Create the "File" menu. | |
void | make_panel (int ww) |
Create the control panel. | |
void | make_status_bar (int ww, int wh) |
Create the status panel. | |
Private Attributes | |
CustTabs * | Tabs |
CustGroupVertical * | TopGroup |
CustButton * | Back |
CustButton * | Forw |
CustButton * | Home |
CustButton * | Reload |
CustButton * | Save |
CustButton * | Stop |
CustButton * | Bookmarks |
CustButton * | Tools |
CustButton * | Clear |
CustButton * | Search |
CustButton * | Help |
CustButton * | BugMeter |
CustButton * | FileButton |
CustGroupHorizontal * | LocBar |
CustGroupHorizontal * | NavBar |
CustGroupHorizontal * | StatusBar |
Fl_Input * | Location |
CustProgressBox * | PProg |
CustProgressBox * | IProg |
Fl_Group * | Panel |
Fl_Group * | Main |
Fl_Group * | LocationGroup |
Fl_Output * | StatusOutput |
Findbar * | FindBar |
int | MainIdx |
int | PanelSize |
int | Small_Icons |
int | p_xpos |
int | p_ypos |
int | bw |
int | bh |
int | mh |
int | lh |
int | nh |
int | fh |
int | sh |
int | pw |
int | lbl |
bool | PanelTemporary |
UIPanelmode | Panelmode |
UI::UI | ( | int | x, |
int | y, | ||
int | w, | ||
int | h, | ||
const char * | label = 0 , |
||
const UI * | cur_ui = NULL |
||
) |
User Interface constructor.
Definition at line 652 of file ui.cc.
References customize(), fh, FindBar, DilloPrefs::fullwindow_start, LocBar, Main, MainIdx, make_panel(), make_status_bar(), NavBar, DilloPrefs::panel_size, Panelmode, panels_toggle(), PanelSize, PanelTemporary, prefs, CustGroupVertical::rearrange(), DilloPrefs::small_icons, Small_Icons, StatusBar, Tabs, TopGroup, UI_HIDDEN, and UI_NORMAL.
void UI::button_set_sens | ( | UIButton | btn, |
int | sens | ||
) |
void UI::change_panel | ( | int | new_size, |
int | small_icons | ||
) |
On-the-fly panel style change.
Definition at line 985 of file ui.cc.
References a_UIcmd_get_bw_by_widget(), a_UIcmd_set_buttons_sens(), customize(), dFree(), dStrdup(), Location, LocBar, make_panel(), NavBar, PanelSize, CustGroupVertical::rearrange(), small_icons, Small_Icons, and TopGroup.
Referenced by Menu_panel_change_cb().
void UI::color_change_cb_i | ( | ) |
void UI::customize | ( | ) |
Customize the UI's panel (show/hide buttons)
Definition at line 945 of file ui.cc.
References Back, Bookmarks, Clear, Forw, Help, Home, IProg, Location, LocBar, NavBar, PProg, prefs, CustGroupHorizontal::rearrange(), Reload, Save, Search, DilloPrefs::show_back, DilloPrefs::show_bookmarks, DilloPrefs::show_clear_url, DilloPrefs::show_forw, DilloPrefs::show_help, DilloPrefs::show_home, DilloPrefs::show_progress_box, DilloPrefs::show_reload, DilloPrefs::show_save, DilloPrefs::show_search, DilloPrefs::show_stop, DilloPrefs::show_tools, DilloPrefs::show_url, Stop, and Tools.
Referenced by change_panel(), and UI().
void UI::findbar_toggle | ( | bool | add | ) |
Adjust space for the findbar (if necessary) and show or remove it.
Definition at line 1059 of file ui.cc.
References a_UIcmd_findtext_reset(), a_UIcmd_get_bw_by_widget(), fh, FindBar, focus_main(), CustGroupVertical::rearrange(), Findbar::show(), and TopGroup.
Referenced by handle(), and UIcmd_tab_new().
void UI::focus_location | ( | ) |
Focus location entry.
If it's not visible, show it until the callback is done.
Definition at line 839 of file ui.cc.
References Location, Panelmode, panels_toggle(), temporaryPanels(), and UI_HIDDEN.
Referenced by clear_cb(), and handle().
void UI::focus_main | ( | ) |
Focus Main area.
Definition at line 853 of file ui.cc.
References Main.
Referenced by findbar_toggle().
const char * UI::get_location | ( | ) |
|
inline |
Definition at line 173 of file ui.hh.
References PanelSize.
Referenced by a_Menu_tools_popup(), and Menu_panel_change_cb().
|
inline |
Definition at line 174 of file ui.hh.
References Small_Icons.
Referenced by a_Menu_tools_popup(), and Menu_panel_change_cb().
int UI::handle | ( | int | event | ) |
To manage what events to catch and which to let pass.
FLTK event handler for this window.
Definition at line 717 of file ui.cc.
References _MSG, a_History_get_url(), a_UIcmd_back(), a_UIcmd_book(), a_UIcmd_file_popup(), a_UIcmd_forw(), a_UIcmd_get_bw_by_widget(), a_UIcmd_home(), a_UIcmd_open_file(), a_UIcmd_reload(), a_UIcmd_save(), a_UIcmd_scroll(), a_UIcmd_search_dialog(), a_UIcmd_stop(), a_UIcmd_view_page_source(), a_UIcmd_zoom_in(), a_UIcmd_zoom_out(), a_UIcmd_zoom_reset(), bw, FileButton, FindBar, findbar_toggle(), focus_location(), Keys::getKeyCmd(), KEYS_BACK, KEYS_BOOKMARKS, KEYS_BOTTOM, KEYS_FILE_MENU, KEYS_FIND, KEYS_FORWARD, KEYS_GOTO, KEYS_HIDE_PANELS, KEYS_HOME, KEYS_LEFT, KEYS_LINE_DOWN, KEYS_LINE_UP, KEYS_NOP, KEYS_OPEN, KEYS_RELOAD, KEYS_RIGHT, KEYS_SAVE, KEYS_SCREEN_DOWN, KEYS_SCREEN_LEFT, KEYS_SCREEN_RIGHT, KEYS_SCREEN_UP, KEYS_STOP, KEYS_TOP, KEYS_VIEW_SOURCE, KEYS_WEBSEARCH, KEYS_ZOOM_IN, KEYS_ZOOM_OUT, KEYS_ZOOM_RESET, DilloPrefs::middle_click_drags_page, NAV_TOP_UIDX, panels_toggle(), paste_url(), prefs, and temporaryPanels().
|
private |
|
private |
Create the "File" menu.
Static function for File menu callbacks.
Definition at line 514 of file ui.cc.
References _MSG, bh, bw, FileButton, filemenu_cb(), lh, P_tiny, p_xpos, PanelSize, prefs, TipWinButton::set_tooltip(), and DilloPrefs::show_filemenu.
Referenced by make_panel().
|
private |
Create the location box (Clear/Input/Search)
Definition at line 450 of file ui.cc.
References Clear, clear_cb(), DilloPrefs::font_factor, Help, help_cb(), icons, lh, Location, location_cb(), LocationGroup, p_xpos, prefs, Search, search_cb(), and TipWinButton::set_tooltip().
Referenced by make_panel().
|
private |
|
private |
Create the control panel.
Definition at line 541 of file ui.cc.
References bh, bw, fh, icons, lbl, lh, LocationGroup, LocBar, make_filemenu_button(), make_location(), make_progress_bars(), make_toolbar(), mh, NavBar, nh, P_medium, P_small, P_tiny, p_xpos, p_ypos, PanelSize, pw, CustGroupHorizontal::rearrange(), sh, small_icons, Small_Icons, standard_icons, and TopGroup.
Referenced by change_panel(), and UI().
|
private |
|
private |
Create the status panel.
Definition at line 621 of file ui.cc.
References BugMeter, bugmeter_cb(), icons, CustGroupHorizontal::rearrange(), TipWinButton::set_tooltip(), sh, StatusBar, and StatusOutput.
Referenced by UI().
|
private |
Create the archetipic browser buttons.
Definition at line 411 of file ui.cc.
References Back, Bookmarks, Forw, Home, icons, make_button(), Reload, Save, TipWinButton::set_tooltip(), Stop, Tools, UI_BACK, UI_BOOK, UI_FORW, UI_HOME, UI_RELOAD, UI_SAVE, UI_STOP, and UI_TOOLS.
Referenced by make_panel().
void UI::panels_toggle | ( | ) |
Make panels disappear growing the render area.
WORKAROUND: here we avoid hidden widgets resize by setting their size to (0,0) while hidden. (Already reported to FLTK team)
Definition at line 1090 of file ui.cc.
References lh, LocBar, NavBar, nh, Panelmode, CustGroupHorizontal::rearrange(), CustGroupVertical::rearrange(), sh, StatusBar, TopGroup, UI_HIDDEN, and UI_NORMAL.
Referenced by focus_location(), handle(), location_cb(), and UI().
void UI::paste_url | ( | ) |
Paste a middle-click-selection into "Clear" button as URL.
Definition at line 1051 of file ui.cc.
References Clear.
Referenced by clear_cb(), and handle().
void UI::set_bug_prog | ( | int | n_bug | ) |
void UI::set_img_prog | ( | int | n_img, |
int | t_img, | ||
int | cmd | ||
) |
void UI::set_location | ( | const char * | str | ) |
Set a new URL in the location input-box.
Definition at line 828 of file ui.cc.
References Location.
Referenced by clear_cb().
void UI::set_page_prog | ( | size_t | nbytes, |
int | cmd | ||
) |
void UI::set_render_layout | ( | Fl_Group * | nw | ) |
Set 'nw' as the main render area widget.
Definition at line 1016 of file ui.cc.
References Main, and TopGroup.
Referenced by UIcmd_tab_new().
void UI::set_status | ( | const char * | str | ) |
|
inline |
|
inline |
|
inline |
Definition at line 181 of file ui.hh.
References PanelTemporary.
Referenced by focus_location(), handle(), and location_cb().
|
inline |
Definition at line 182 of file ui.hh.
References PanelTemporary.
void UI::toggle_cb_i | ( | ) |
|
private |
Definition at line 127 of file ui.hh.
Referenced by button_set_sens(), customize(), and make_toolbar().
|
private |
Definition at line 139 of file ui.hh.
Referenced by make_button(), make_filemenu_button(), make_panel(), and make_progress_bars().
|
private |
Definition at line 127 of file ui.hh.
Referenced by customize(), and make_toolbar().
|
private |
Definition at line 128 of file ui.hh.
Referenced by make_status_bar(), and set_bug_prog().
|
private |
Definition at line 139 of file ui.hh.
Referenced by handle(), make_button(), make_filemenu_button(), and make_panel().
|
private |
Definition at line 128 of file ui.hh.
Referenced by customize(), make_location(), and paste_url().
|
private |
Definition at line 139 of file ui.hh.
Referenced by findbar_toggle(), make_panel(), and UI().
|
private |
Definition at line 128 of file ui.hh.
Referenced by handle(), and make_filemenu_button().
|
private |
Definition at line 134 of file ui.hh.
Referenced by findbar_toggle(), handle(), and UI().
|
private |
Definition at line 127 of file ui.hh.
Referenced by button_set_sens(), customize(), and make_toolbar().
|
private |
Definition at line 128 of file ui.hh.
Referenced by customize(), and make_location().
|
private |
Definition at line 127 of file ui.hh.
Referenced by customize(), and make_toolbar().
|
private |
Definition at line 131 of file ui.hh.
Referenced by customize(), make_progress_bars(), and set_img_prog().
|
private |
Definition at line 139 of file ui.hh.
Referenced by make_button(), and make_panel().
|
private |
Definition at line 139 of file ui.hh.
Referenced by make_filemenu_button(), make_location(), make_panel(), and panels_toggle().
|
private |
Definition at line 130 of file ui.hh.
Referenced by change_panel(), customize(), focus_location(), get_location(), make_location(), and set_location().
|
private |
Definition at line 132 of file ui.hh.
Referenced by make_location(), and make_panel().
|
private |
Definition at line 129 of file ui.hh.
Referenced by change_panel(), customize(), make_panel(), panels_toggle(), and UI().
|
private |
Definition at line 132 of file ui.hh.
Referenced by focus_main(), set_render_layout(), and UI().
|
private |
Definition at line 139 of file ui.hh.
Referenced by make_panel().
|
private |
Definition at line 129 of file ui.hh.
Referenced by change_panel(), customize(), make_panel(), panels_toggle(), and UI().
|
private |
Definition at line 139 of file ui.hh.
Referenced by make_panel(), and panels_toggle().
|
private |
Definition at line 139 of file ui.hh.
Referenced by make_button(), make_filemenu_button(), make_location(), make_panel(), and make_progress_bars().
|
private |
Definition at line 139 of file ui.hh.
Referenced by make_panel(), and make_progress_bars().
|
private |
Definition at line 142 of file ui.hh.
Referenced by focus_location(), panels_toggle(), and UI().
|
private |
Definition at line 138 of file ui.hh.
Referenced by change_panel(), get_panelsize(), make_filemenu_button(), make_panel(), set_img_prog(), set_page_prog(), and UI().
|
private |
Definition at line 140 of file ui.hh.
Referenced by temporaryPanels(), temporaryPanels(), and UI().
|
private |
Definition at line 131 of file ui.hh.
Referenced by customize(), make_progress_bars(), and set_page_prog().
|
private |
Definition at line 139 of file ui.hh.
Referenced by make_panel(), and make_progress_bars().
|
private |
Definition at line 127 of file ui.hh.
Referenced by customize(), and make_toolbar().
|
private |
Definition at line 127 of file ui.hh.
Referenced by customize(), and make_toolbar().
|
private |
Definition at line 128 of file ui.hh.
Referenced by customize(), and make_location().
|
private |
Definition at line 139 of file ui.hh.
Referenced by make_panel(), make_status_bar(), and panels_toggle().
|
private |
Definition at line 138 of file ui.hh.
Referenced by change_panel(), get_smallicons(), make_panel(), and UI().
|
private |
Definition at line 129 of file ui.hh.
Referenced by make_status_bar(), panels_toggle(), set_bug_prog(), and UI().
|
private |
Definition at line 133 of file ui.hh.
Referenced by make_status_bar(), and set_status().
|
private |
Definition at line 127 of file ui.hh.
Referenced by button_set_sens(), customize(), and make_toolbar().
|
private |
|
private |
Definition at line 128 of file ui.hh.
Referenced by customize(), and make_toolbar().
|
private |
Definition at line 126 of file ui.hh.
Referenced by change_panel(), findbar_toggle(), make_panel(), panels_toggle(), set_render_layout(), and UI().