Dillo v3.1.1-46-g8a360e32
Loading...
Searching...
No Matches
UI Class Reference

#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

CustButtonmake_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
 
CustGroupVerticalTopGroup
 
CustButtonBack
 
CustButtonForw
 
CustButtonHome
 
CustButtonReload
 
CustButtonSave
 
CustButtonStop
 
CustButtonBookmarks
 
CustButtonTools
 
CustButtonClear
 
CustButtonSearch
 
CustButtonHelp
 
CustButtonBugMeter
 
CustButtonFileButton
 
CustGroupHorizontalLocBar
 
CustGroupHorizontalNavBar
 
CustGroupHorizontalStatusBar
 
Fl_Input * Location
 
CustProgressBox * PProg
 
CustProgressBox * IProg
 
Fl_Group * Panel
 
Fl_Group * Main
 
Fl_Group * LocationGroup
 
Fl_Output * StatusOutput
 
FindbarFindBar
 
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
 

Detailed Description

Definition at line 123 of file ui.hh.

Constructor & Destructor Documentation

◆ UI()

UI::UI ( int  x,
int  y,
int  w,
int  h,
const char *  label = 0,
const UI cur_ui = NULL 
)

◆ ~UI()

UI::~UI ( )

UI destructor.

Definition at line 709 of file ui.cc.

References _MSG.

Member Function Documentation

◆ button_set_sens()

void UI::button_set_sens ( UIButton  btn,
int  sens 
)

Set button sensitivity (Back/Forw/Stop)

Definition at line 1031 of file ui.cc.

References Back, Forw, Stop, UI_BACK, UI_FORW, and UI_STOP.

◆ change_panel()

void UI::change_panel ( int  new_size,
int  small_icons 
)

◆ color_change_cb_i()

void UI::color_change_cb_i ( )

◆ customize()

◆ findbar_toggle()

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().

◆ focus_location()

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().

◆ focus_main()

void UI::focus_main ( )

Focus Main area.

Definition at line 853 of file ui.cc.

References Main.

Referenced by findbar_toggle().

◆ get_location()

const char * UI::get_location ( )

Get the text from the location input-box.

Definition at line 820 of file ui.cc.

References Location.

◆ get_panelsize()

int UI::get_panelsize ( )
inline

Definition at line 173 of file ui.hh.

References PanelSize.

Referenced by a_Menu_tools_popup(), and Menu_panel_change_cb().

◆ get_smallicons()

int UI::get_smallicons ( )
inline

Definition at line 174 of file ui.hh.

References Small_Icons.

Referenced by a_Menu_tools_popup(), and Menu_panel_change_cb().

◆ handle()

◆ make_button()

CustButton * UI::make_button ( const char *  label,
Fl_Image *  img,
Fl_Image *  deimg,
int  b_n,
int  start = 0 
)
private

Make a generic navigation button.

Definition at line 388 of file ui.cc.

References b1_cb(), bh, bw, INT2VOIDP, lbl, and p_xpos.

Referenced by make_toolbar().

◆ make_filemenu_button()

void UI::make_filemenu_button ( )
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().

◆ make_location()

void UI::make_location ( int  ww)
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().

◆ make_menubar()

void UI::make_menubar ( int  x,
int  y,
int  w,
int  h 
)
private

◆ make_panel()

void UI::make_panel ( int  ww)
private

◆ make_progress_bars()

void UI::make_progress_bars ( int  wide,
int  thin_up 
)
private

Create the progress bars.

Definition at line 495 of file ui.cc.

References bh, IProg, p_xpos, p_ypos, PProg, and pw.

Referenced by make_panel().

◆ make_status_bar()

void UI::make_status_bar ( int  ww,
int  wh 
)
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().

◆ make_toolbar()

void UI::make_toolbar ( int  tw,
int  th 
)
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().

◆ panels_toggle()

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().

◆ paste_url()

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().

◆ set_bug_prog()

void UI::set_bug_prog ( int  n_bug)

Set the bug meter progress text.

Definition at line 923 of file ui.cc.

References BugMeter, icons, CustGroupHorizontal::rearrange(), and StatusBar.

◆ set_img_prog()

void UI::set_img_prog ( int  n_img,
int  t_img,
int  cmd 
)

Set the image progress text.

cmd: 0 Deactivate, 1 Update, 2 Clear

Definition at line 902 of file ui.cc.

References IProg, and PanelSize.

◆ set_location()

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().

◆ set_page_prog()

void UI::set_page_prog ( size_t  nbytes,
int  cmd 
)

Set the page progress text.

cmd: 0 Deactivate, 1 Update, 2 Clear

Definition at line 870 of file ui.cc.

References PanelSize, and PProg.

◆ set_render_layout()

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().

◆ set_status()

void UI::set_status ( const char *  str)

Set a new message in the status bar.

Definition at line 861 of file ui.cc.

References StatusOutput.

◆ tabs() [1/2]

CustTabs * UI::tabs ( )
inline

Definition at line 179 of file ui.hh.

References Tabs.

Referenced by a_UIcmd_close_bw().

◆ tabs() [2/2]

void UI::tabs ( CustTabs *  tabs)
inline

Definition at line 180 of file ui.hh.

References Tabs, and tabs().

Referenced by tabs().

◆ temporaryPanels() [1/2]

bool UI::temporaryPanels ( )
inline

Definition at line 181 of file ui.hh.

References PanelTemporary.

Referenced by focus_location(), handle(), and location_cb().

◆ temporaryPanels() [2/2]

void UI::temporaryPanels ( bool  val)
inline

Definition at line 182 of file ui.hh.

References PanelTemporary.

◆ toggle_cb_i()

void UI::toggle_cb_i ( )

Member Data Documentation

◆ Back

CustButton* UI::Back
private

Definition at line 127 of file ui.hh.

Referenced by button_set_sens(), customize(), and make_toolbar().

◆ bh

int UI::bh
private

Definition at line 139 of file ui.hh.

Referenced by make_button(), make_filemenu_button(), make_panel(), and make_progress_bars().

◆ Bookmarks

CustButton * UI::Bookmarks
private

Definition at line 127 of file ui.hh.

Referenced by customize(), and make_toolbar().

◆ BugMeter

CustButton * UI::BugMeter
private

Definition at line 128 of file ui.hh.

Referenced by make_status_bar(), and set_bug_prog().

◆ bw

int UI::bw
private

Definition at line 139 of file ui.hh.

Referenced by handle(), make_button(), make_filemenu_button(), and make_panel().

◆ Clear

CustButton * UI::Clear
private

Definition at line 128 of file ui.hh.

Referenced by customize(), make_location(), and paste_url().

◆ fh

int UI::fh
private

Definition at line 139 of file ui.hh.

Referenced by findbar_toggle(), make_panel(), and UI().

◆ FileButton

CustButton * UI::FileButton
private

Definition at line 128 of file ui.hh.

Referenced by handle(), and make_filemenu_button().

◆ FindBar

Findbar* UI::FindBar
private

Definition at line 134 of file ui.hh.

Referenced by findbar_toggle(), handle(), and UI().

◆ Forw

CustButton * UI::Forw
private

Definition at line 127 of file ui.hh.

Referenced by button_set_sens(), customize(), and make_toolbar().

◆ Help

CustButton * UI::Help
private

Definition at line 128 of file ui.hh.

Referenced by customize(), and make_location().

◆ Home

CustButton * UI::Home
private

Definition at line 127 of file ui.hh.

Referenced by customize(), and make_toolbar().

◆ IProg

CustProgressBox * UI::IProg
private

Definition at line 131 of file ui.hh.

Referenced by customize(), make_progress_bars(), and set_img_prog().

◆ lbl

int UI::lbl
private

Definition at line 139 of file ui.hh.

Referenced by make_button(), and make_panel().

◆ lh

int UI::lh
private

Definition at line 139 of file ui.hh.

Referenced by make_filemenu_button(), make_location(), make_panel(), and panels_toggle().

◆ Location

Fl_Input* UI::Location
private

◆ LocationGroup

Fl_Group * UI::LocationGroup
private

Definition at line 132 of file ui.hh.

Referenced by make_location(), and make_panel().

◆ LocBar

CustGroupHorizontal* UI::LocBar
private

Definition at line 129 of file ui.hh.

Referenced by change_panel(), customize(), make_panel(), panels_toggle(), and UI().

◆ Main

Fl_Group * UI::Main
private

Definition at line 132 of file ui.hh.

Referenced by focus_main(), set_render_layout(), and UI().

◆ MainIdx

int UI::MainIdx
private

Definition at line 136 of file ui.hh.

Referenced by UI().

◆ mh

int UI::mh
private

Definition at line 139 of file ui.hh.

Referenced by make_panel().

◆ NavBar

CustGroupHorizontal * UI::NavBar
private

Definition at line 129 of file ui.hh.

Referenced by change_panel(), customize(), make_panel(), panels_toggle(), and UI().

◆ nh

int UI::nh
private

Definition at line 139 of file ui.hh.

Referenced by make_panel(), and panels_toggle().

◆ p_xpos

int UI::p_xpos
private

◆ p_ypos

int UI::p_ypos
private

Definition at line 139 of file ui.hh.

Referenced by make_panel(), and make_progress_bars().

◆ Panel

Fl_Group* UI::Panel
private

Definition at line 132 of file ui.hh.

◆ Panelmode

UIPanelmode UI::Panelmode
private

Definition at line 142 of file ui.hh.

Referenced by focus_location(), panels_toggle(), and UI().

◆ PanelSize

int UI::PanelSize
private

◆ PanelTemporary

bool UI::PanelTemporary
private

Definition at line 140 of file ui.hh.

Referenced by temporaryPanels(), temporaryPanels(), and UI().

◆ PProg

CustProgressBox* UI::PProg
private

Definition at line 131 of file ui.hh.

Referenced by customize(), make_progress_bars(), and set_page_prog().

◆ pw

int UI::pw
private

Definition at line 139 of file ui.hh.

Referenced by make_panel(), and make_progress_bars().

◆ Reload

CustButton * UI::Reload
private

Definition at line 127 of file ui.hh.

Referenced by customize(), and make_toolbar().

◆ Save

CustButton * UI::Save
private

Definition at line 127 of file ui.hh.

Referenced by customize(), and make_toolbar().

◆ Search

CustButton * UI::Search
private

Definition at line 128 of file ui.hh.

Referenced by customize(), and make_location().

◆ sh

int UI::sh
private

Definition at line 139 of file ui.hh.

Referenced by make_panel(), make_status_bar(), and panels_toggle().

◆ Small_Icons

int UI::Small_Icons
private

Definition at line 138 of file ui.hh.

Referenced by change_panel(), get_smallicons(), make_panel(), and UI().

◆ StatusBar

CustGroupHorizontal * UI::StatusBar
private

Definition at line 129 of file ui.hh.

Referenced by make_status_bar(), panels_toggle(), set_bug_prog(), and UI().

◆ StatusOutput

Fl_Output* UI::StatusOutput
private

Definition at line 133 of file ui.hh.

Referenced by make_status_bar(), and set_status().

◆ Stop

CustButton * UI::Stop
private

Definition at line 127 of file ui.hh.

Referenced by button_set_sens(), customize(), and make_toolbar().

◆ Tabs

CustTabs* UI::Tabs
private

Definition at line 124 of file ui.hh.

Referenced by tabs(), tabs(), and UI().

◆ Tools

CustButton * UI::Tools
private

Definition at line 128 of file ui.hh.

Referenced by customize(), and make_toolbar().

◆ TopGroup

CustGroupVertical* UI::TopGroup
private

Definition at line 126 of file ui.hh.

Referenced by change_panel(), findbar_toggle(), make_panel(), panels_toggle(), set_render_layout(), and UI().


The documentation for this class was generated from the following files: