Dillo v3.1.1-119-g140d9ebd
|
Functions for menus. More...
#include <FL/Fl.H>
#include <FL/Fl_Menu_Item.H>
#include <unistd.h>
#include <errno.h>
#include "lout/misc.hh"
#include "msg.h"
#include "menu.hh"
#include "actions.h"
#include "uicmd.hh"
#include "history.h"
#include "html.hh"
#include "ui.hh"
#include "keys.hh"
#include "timeout.hh"
Go to the source code of this file.
Functions | |
static void | Menu_nop_cb (Fl_Widget *, void *) |
static void | filemenu_cb (Fl_Widget *, void *data) |
Static function for File menu callbacks. | |
static void | Menu_copy_urlstr_cb (Fl_Widget *, void *user_data) |
static void | Menu_open_url_cb (Fl_Widget *, void *user_data) |
Open URL. | |
static void | Menu_open_url_nw_cb (Fl_Widget *, void *user_data) |
Open URL in new window. | |
static void | Menu_open_url_nt_cb (Fl_Widget *, void *user_data) |
Open URL in new Tab. | |
static void | Menu_add_bookmark_cb (Fl_Widget *, void *user_data) |
Add bookmark. | |
static void | Menu_find_text_cb (Fl_Widget *, void *) |
Find text. | |
static void | Menu_save_link_cb (Fl_Widget *, void *user_data) |
Save link. | |
static void | Menu_save_page_cb (Fl_Widget *, void *) |
Save current page. | |
static void | Menu_view_page_source_cb (Fl_Widget *, void *user_data) |
View current page source. | |
static void | Menu_view_page_bugs_cb (Fl_Widget *, void *) |
View current page's bugs. | |
static void | Menu_load_images_cb (Fl_Widget *, void *user_data) |
Load images on current page that match URL pattern. | |
static void | Menu_form_submit_cb (Fl_Widget *, void *) |
Submit form. | |
static void | Menu_form_reset_cb (Fl_Widget *, void *) |
Reset form. | |
static void | Menu_form_hiddens_cb (Fl_Widget *, void *user_data) |
Toggle display of 'hidden' form controls. | |
static void | Menu_stylesheet_cb (Fl_Widget *, void *vUrl) |
static void | Menu_bugmeter_validate (const char *validator_url) |
static void | Menu_bugmeter_validate_w3c_nu_cb (Fl_Widget *, void *) |
Validate URL with the W3C Nu validator (for HTML 5) | |
static void | Menu_bugmeter_validate_w3c_cb (Fl_Widget *, void *) |
Validate URL with the W3C legacy validator (HTML 4.01 and older) | |
static void | Menu_bugmeter_about_cb (Fl_Widget *, void *) |
Show info page for the bug meter. | |
static void | Menu_history_cb (Fl_Widget *, void *data) |
Navigation History callback. | |
static void | Menu_simple_popup_cb (void *data) |
static void | Menu_popup_cb (void *data) |
void | a_Menu_page_popup (BrowserWindow *bw, const DilloUrl *url, bool_t has_bugs, void *v_cssUrls) |
Page popup menu (construction & popup) | |
static void | Menu_open_url_action_cb (Fl_Widget *, void *user_data) |
Open URL following a custom action. | |
static Fl_Menu_Item * | get_link_menu (void) |
static void | Menu_set_link_menu_user_data (const DilloUrl *url, const DilloUrl *page_url) |
void | a_Menu_link_popup (BrowserWindow *bw, const DilloUrl *url, const DilloUrl *page_url) |
Link popup menu (construction & popup) | |
void | a_Menu_image_popup (BrowserWindow *bw, const DilloUrl *url, bool_t loaded_img, DilloUrl *page_url, DilloUrl *link_url) |
Image popup menu (construction & popup) | |
void | a_Menu_form_popup (BrowserWindow *bw, const DilloUrl *page_url, void *formptr, bool_t hidvis) |
Form popup menu (construction & popup) | |
void | a_Menu_file_popup (BrowserWindow *bw, void *v_wid) |
File popup menu (construction & popup) | |
void | a_Menu_bugmeter_popup (BrowserWindow *bw, const DilloUrl *url) |
Bugmeter popup menu (construction & popup) | |
void | a_Menu_history_popup (BrowserWindow *bw, int x, int y, int direction) |
Navigation History popup menu (construction & popup). | |
static void | Menu_remote_css_cb (Fl_Widget *wid, void *) |
Toggle use of remote stylesheets. | |
static void | Menu_embedded_css_cb (Fl_Widget *wid, void *) |
Toggle use of embedded CSS style. | |
static void | Menu_force_https_cb (Fl_Widget *wid, void *) |
Toggle use of force https mode. | |
static void | Menu_panel_change_cb (Fl_Widget *, void *user_data) |
static void | Menu_imgload_toggle_cb (Fl_Widget *wid, void *) |
Toggle loading of images – and load them if enabling. | |
static void | Menu_bgimg_load_toggle_cb (Fl_Widget *wid, void *) |
Toggle loading of background images. | |
void | a_Menu_tools_popup (BrowserWindow *bw, int x, int y) |
Tools popup menu (construction & popup). | |
Variables | |
static DilloUrl * | popup_url = NULL |
static BrowserWindow * | popup_bw = NULL |
static void * | popup_form = NULL |
static int | popup_x |
static int | popup_y |
static int | history_direction = -1 |
static int * | history_list = NULL |
static Fl_Menu_Item | link_menu_ [] |
Functions for menus.
Definition in file menu.cc.
void a_Menu_bugmeter_popup | ( | BrowserWindow * | bw, |
const DilloUrl * | url | ||
) |
Bugmeter popup menu (construction & popup)
Definition at line 691 of file menu.cc.
References a_Timeout_add(), a_Url_dup(), a_Url_free(), Menu_bugmeter_about_cb(), Menu_bugmeter_validate_w3c_cb(), Menu_bugmeter_validate_w3c_nu_cb(), Menu_simple_popup_cb(), popup_bw, popup_url, popup_x, and popup_y.
Referenced by a_UIcmd_bugmeter_popup().
void a_Menu_file_popup | ( | BrowserWindow * | bw, |
void * | v_wid | ||
) |
File popup menu (construction & popup)
Definition at line 658 of file menu.cc.
References a_Timeout_add(), a_Url_free(), filemenu_cb(), Keys::getShortcut(), KEYS_CLOSE_ALL, KEYS_CLOSE_TAB, KEYS_GOTO, KEYS_NEW_TAB, KEYS_NEW_WINDOW, KEYS_OPEN, Menu_simple_popup_cb(), popup_bw, popup_url, popup_x, and popup_y.
Referenced by a_UIcmd_file_popup().
void a_Menu_form_popup | ( | BrowserWindow * | bw, |
const DilloUrl * | page_url, | ||
void * | formptr, | ||
bool_t | hidvis | ||
) |
Form popup menu (construction & popup)
Definition at line 630 of file menu.cc.
References a_Timeout_add(), a_Url_dup(), a_Url_free(), Menu_form_hiddens_cb(), Menu_form_reset_cb(), Menu_form_submit_cb(), Menu_popup_cb(), popup_bw, popup_form, popup_url, popup_x, and popup_y.
Referenced by a_UIcmd_form_popup().
void a_Menu_history_popup | ( | BrowserWindow * | bw, |
int | x, | ||
int | y, | ||
int | direction | ||
) |
Navigation History popup menu (construction & popup).
direction: {backward = -1, forward = 1}
Definition at line 717 of file menu.cc.
References a_History_get_title(), a_Timeout_add(), a_UIcmd_get_history(), dFree(), history_direction, history_list, INT2VOIDP, Menu_history_cb(), Menu_simple_popup_cb(), popup_bw, popup_x, and popup_y.
Referenced by a_UIcmd_back_popup(), and a_UIcmd_forw_popup().
void a_Menu_image_popup | ( | BrowserWindow * | bw, |
const DilloUrl * | url, | ||
bool_t | loaded_img, | ||
DilloUrl * | page_url, | ||
DilloUrl * | link_url | ||
) |
Image popup menu (construction & popup)
Definition at line 571 of file menu.cc.
References a_Timeout_add(), a_Url_dup(), a_Url_free(), get_link_menu(), Menu_add_bookmark_cb(), Menu_copy_urlstr_cb(), Menu_load_images_cb(), Menu_nop_cb(), Menu_open_url_cb(), Menu_open_url_nt_cb(), Menu_open_url_nw_cb(), Menu_popup_cb(), Menu_save_link_cb(), Menu_set_link_menu_user_data(), popup_bw, popup_url, popup_x, and popup_y.
Referenced by a_UIcmd_image_popup().
void a_Menu_link_popup | ( | BrowserWindow * | bw, |
const DilloUrl * | url, | ||
const DilloUrl * | page_url | ||
) |
Link popup menu (construction & popup)
Definition at line 550 of file menu.cc.
References a_Timeout_add(), a_Url_dup(), a_Url_free(), get_link_menu(), Menu_popup_cb(), Menu_set_link_menu_user_data(), popup_bw, popup_url, popup_x, and popup_y.
Referenced by a_UIcmd_link_popup().
void a_Menu_page_popup | ( | BrowserWindow * | bw, |
const DilloUrl * | url, | ||
bool_t | has_bugs, | ||
void * | v_cssUrls | ||
) |
Page popup menu (construction & popup)
Definition at line 355 of file menu.cc.
References a_Timeout_add(), a_Url_dup(), a_Url_free(), dFree(), dStrAsciiCasecmp(), dStrconcat(), dStrdup(), dStrndup(), lout::misc::SimpleVector< T >::get(), Menu_add_bookmark_cb(), Menu_find_text_cb(), Menu_nop_cb(), Menu_popup_cb(), Menu_save_page_cb(), Menu_stylesheet_cb(), Menu_view_page_bugs_cb(), Menu_view_page_source_cb(), popup_bw, popup_url, popup_x, popup_y, lout::misc::SimpleVector< T >::size(), TRUE, URL_PATH, URL_SCHEME, and URL_STR.
Referenced by a_UIcmd_page_popup().
void a_Menu_tools_popup | ( | BrowserWindow * | bw, |
int | x, | ||
int | y | ||
) |
Tools popup menu (construction & popup).
Definition at line 830 of file menu.cc.
References UI::get_panelsize(), UI::get_smallicons(), DilloPrefs::http_force_https, DilloPrefs::load_background_images, DilloPrefs::load_images, DilloPrefs::load_stylesheets, Menu_bgimg_load_toggle_cb(), Menu_embedded_css_cb(), Menu_force_https_cb(), Menu_imgload_toggle_cb(), Menu_nop_cb(), Menu_panel_change_cb(), Menu_remote_css_cb(), DilloPrefs::parse_embedded_css, popup_bw, prefs, and BrowserWindow::ui.
Referenced by a_UIcmd_tools().
|
static |
Static function for File menu callbacks.
Definition at line 70 of file menu.cc.
References a_Timeout_add(), a_UIcmd_close_all_bw(), a_UIcmd_close_bw(), a_UIcmd_focus_location(), a_UIcmd_open_file(), a_UIcmd_open_url_nt(), a_UIcmd_open_url_nw(), and popup_bw.
Referenced by a_Menu_file_popup(), and UI::make_filemenu_button().
|
static |
Definition at line 490 of file menu.cc.
References a_Actions_link_get(), dList_length(), dList_nth_data(), Action::label, link_menu_, and Menu_open_url_action_cb().
Referenced by a_Menu_image_popup(), a_Menu_link_popup(), and Menu_set_link_menu_user_data().
|
static |
Add bookmark.
Definition at line 130 of file menu.cc.
References a_UIcmd_add_bookmark(), and popup_bw.
Referenced by a_Menu_image_popup(), and a_Menu_page_popup().
|
static |
Toggle loading of background images.
Definition at line 818 of file menu.cc.
References a_UIcmd_repush(), DilloPrefs::load_background_images, popup_bw, and prefs.
Referenced by a_Menu_tools_popup().
|
static |
Show info page for the bug meter.
Definition at line 288 of file menu.cc.
References a_UIcmd_open_urlstr(), and popup_bw.
Referenced by a_Menu_bugmeter_popup().
|
static |
Definition at line 242 of file menu.cc.
References a_UIcmd_open_urlstr(), a_Url_encode_hex_str(), dFree(), dStr_free(), dStr_sized_new(), dStr_sprintf(), dStrAsciiCasecmp(), dStrdup(), dStrndup(), popup_bw, popup_url, Dstr::str, URL_SCHEME, and URL_STR.
Referenced by Menu_bugmeter_validate_w3c_cb(), and Menu_bugmeter_validate_w3c_nu_cb().
|
static |
Validate URL with the W3C legacy validator (HTML 4.01 and older)
Definition at line 276 of file menu.cc.
References Menu_bugmeter_validate().
Referenced by a_Menu_bugmeter_popup().
|
static |
Validate URL with the W3C Nu validator (for HTML 5)
Definition at line 264 of file menu.cc.
References Menu_bugmeter_validate().
Referenced by a_Menu_bugmeter_popup().
|
static |
Definition at line 88 of file menu.cc.
References a_UIcmd_copy_urlstr(), popup_bw, and URL_STR.
Referenced by a_Menu_image_popup().
|
static |
Toggle use of embedded CSS style.
Definition at line 764 of file menu.cc.
References a_UIcmd_repush(), DilloPrefs::parse_embedded_css, popup_bw, and prefs.
Referenced by a_Menu_tools_popup().
|
static |
Find text.
Definition at line 139 of file menu.cc.
References popup_bw, and BrowserWindow::ui.
Referenced by a_Menu_page_popup().
|
static |
Toggle use of force https mode.
Definition at line 777 of file menu.cc.
References a_UIcmd_repush(), DilloPrefs::http_force_https, popup_bw, and prefs.
Referenced by a_Menu_tools_popup().
|
static |
Toggle display of 'hidden' form controls.
Definition at line 215 of file menu.cc.
References a_Bw_get_url_doc(), a_Html_form_display_hiddens(), popup_bw, popup_form, and popup_url.
Referenced by a_Menu_form_popup().
|
static |
Reset form.
Definition at line 204 of file menu.cc.
References a_Bw_get_url_doc(), a_Html_form_reset(), popup_bw, popup_form, and popup_url.
Referenced by a_Menu_form_popup().
|
static |
Submit form.
Definition at line 193 of file menu.cc.
References a_Bw_get_url_doc(), a_Html_form_submit(), popup_bw, popup_form, and popup_url.
Referenced by a_Menu_form_popup().
|
static |
Navigation History callback.
Go to selected URL.
Definition at line 297 of file menu.cc.
References a_History_get_url(), a_UIcmd_nav_jump(), a_UIcmd_open_url_nt(), a_UIcmd_open_url_nw(), DilloPrefs::focus_new_tab, history_direction, history_list, DilloPrefs::middle_click_opens_new_tab, popup_bw, prefs, and VOIDP2INT.
Referenced by a_Menu_history_popup().
|
static |
Toggle loading of images – and load them if enabling.
Definition at line 799 of file menu.cc.
References a_Bw_get_current_doc(), a_Html_load_images(), DilloPrefs::load_images, popup_bw, and prefs.
Referenced by a_Menu_tools_popup().
|
static |
Load images on current page that match URL pattern.
Definition at line 181 of file menu.cc.
References a_Bw_get_url_doc(), a_Html_load_images(), popup_bw, and popup_url.
Referenced by a_Menu_image_popup().
|
static |
Definition at line 63 of file menu.cc.
Referenced by a_Menu_image_popup(), a_Menu_page_popup(), and a_Menu_tools_popup().
|
static |
Open URL following a custom action.
Definition at line 458 of file menu.cc.
References Action::cmd, MSG, and URL_STR.
Referenced by get_link_menu(), and Menu_set_link_menu_user_data().
|
static |
Open URL.
Definition at line 99 of file menu.cc.
References _MSG, a_UIcmd_open_url(), and popup_bw.
Referenced by a_Menu_image_popup().
|
static |
Open URL in new Tab.
Definition at line 119 of file menu.cc.
References a_UIcmd_open_url_nt(), DilloPrefs::focus_new_tab, popup_bw, and prefs.
Referenced by a_Menu_image_popup().
|
static |
Open URL in new window.
Definition at line 109 of file menu.cc.
References _MSG, a_UIcmd_open_url_nw(), and popup_bw.
Referenced by a_Menu_image_popup().
|
static |
Definition at line 786 of file menu.cc.
References UI::change_panel(), UI::get_panelsize(), UI::get_smallicons(), popup_bw, BrowserWindow::ui, and VOIDP2INT.
Referenced by a_Menu_tools_popup().
|
static |
Definition at line 336 of file menu.cc.
References a_Timeout_remove(), popup_bw, popup_x, popup_y, and BrowserWindow::ui.
Referenced by a_Menu_form_popup(), a_Menu_image_popup(), a_Menu_link_popup(), and a_Menu_page_popup().
|
static |
Toggle use of remote stylesheets.
Definition at line 752 of file menu.cc.
References a_UIcmd_repush(), DilloPrefs::load_stylesheets, popup_bw, and prefs.
Referenced by a_Menu_tools_popup().
|
static |
Save link.
Definition at line 147 of file menu.cc.
References a_UIcmd_save_link(), and popup_bw.
Referenced by a_Menu_image_popup().
|
static |
Save current page.
Definition at line 156 of file menu.cc.
References a_UIcmd_save(), and popup_bw.
Referenced by a_Menu_page_popup().
Definition at line 532 of file menu.cc.
References get_link_menu(), and Menu_open_url_action_cb().
Referenced by a_Menu_image_popup(), and a_Menu_link_popup().
|
static |
Definition at line 323 of file menu.cc.
References a_Timeout_remove(), popup_bw, popup_x, popup_y, and BrowserWindow::ui.
Referenced by a_Menu_bugmeter_popup(), a_Menu_file_popup(), and a_Menu_history_popup().
|
static |
Definition at line 224 of file menu.cc.
References a_UIcmd_open_url(), a_UIcmd_open_url_nt(), a_UIcmd_open_url_nw(), DilloPrefs::focus_new_tab, DilloPrefs::middle_click_opens_new_tab, popup_bw, and prefs.
Referenced by a_Menu_page_popup().
|
static |
View current page's bugs.
Definition at line 173 of file menu.cc.
References a_UIcmd_view_page_bugs(), and popup_bw.
Referenced by a_Menu_page_popup().
|
static |
View current page source.
Definition at line 164 of file menu.cc.
References a_UIcmd_view_page_source(), and popup_bw.
Referenced by a_Menu_page_popup().
|
static |
Definition at line 57 of file menu.cc.
Referenced by a_Menu_history_popup(), and Menu_history_cb().
|
static |
Definition at line 59 of file menu.cc.
Referenced by a_Menu_history_popup(), and Menu_history_cb().
|
static |
Definition at line 436 of file menu.cc.
Referenced by get_link_menu().
|
static |
Definition at line 52 of file menu.cc.
Referenced by a_Menu_bugmeter_popup(), a_Menu_file_popup(), a_Menu_form_popup(), a_Menu_history_popup(), a_Menu_image_popup(), a_Menu_link_popup(), a_Menu_page_popup(), a_Menu_tools_popup(), filemenu_cb(), Menu_add_bookmark_cb(), Menu_bgimg_load_toggle_cb(), Menu_bugmeter_about_cb(), Menu_bugmeter_validate(), Menu_copy_urlstr_cb(), Menu_embedded_css_cb(), Menu_find_text_cb(), Menu_force_https_cb(), Menu_form_hiddens_cb(), Menu_form_reset_cb(), Menu_form_submit_cb(), Menu_history_cb(), Menu_imgload_toggle_cb(), Menu_load_images_cb(), Menu_open_url_cb(), Menu_open_url_nt_cb(), Menu_open_url_nw_cb(), Menu_panel_change_cb(), Menu_popup_cb(), Menu_remote_css_cb(), Menu_save_link_cb(), Menu_save_page_cb(), Menu_simple_popup_cb(), Menu_stylesheet_cb(), Menu_view_page_bugs_cb(), and Menu_view_page_source_cb().
|
static |
Definition at line 53 of file menu.cc.
Referenced by a_Menu_form_popup(), Menu_form_hiddens_cb(), Menu_form_reset_cb(), and Menu_form_submit_cb().
|
static |
Definition at line 50 of file menu.cc.
Referenced by a_Menu_bugmeter_popup(), a_Menu_file_popup(), a_Menu_form_popup(), a_Menu_image_popup(), a_Menu_link_popup(), a_Menu_page_popup(), Menu_bugmeter_validate(), Menu_form_hiddens_cb(), Menu_form_reset_cb(), Menu_form_submit_cb(), and Menu_load_images_cb().
|
static |
Definition at line 55 of file menu.cc.
Referenced by a_Menu_bugmeter_popup(), a_Menu_file_popup(), a_Menu_form_popup(), a_Menu_history_popup(), a_Menu_image_popup(), a_Menu_link_popup(), a_Menu_page_popup(), Menu_popup_cb(), and Menu_simple_popup_cb().
|
static |
Definition at line 55 of file menu.cc.
Referenced by a_Menu_bugmeter_popup(), a_Menu_file_popup(), a_Menu_form_popup(), a_Menu_history_popup(), a_Menu_image_popup(), a_Menu_link_popup(), a_Menu_page_popup(), Menu_popup_cb(), and Menu_simple_popup_cb().