29#include "oslib/hourglass.h"
30#include "oslib/wimp.h"
45#define RECENT_SEARCHES 8
54 { { NULL },
false, NULL };
58#define DEFAULT_FLAGS (wimp_ICON_TEXT | wimp_ICON_FILLED | \
59 (wimp_COLOUR_BLACK << wimp_ICON_FG_COLOUR_SHIFT) | \
60 (wimp_COLOUR_WHITE << wimp_ICON_BG_COLOUR_SHIFT))
66 wimp_pointer *pointer);
145 wimp_pointer *pointer)
160 switch (pointer->i) {
163 flags = ~SEARCH_FLAG_FORWARDS &
182 pointer->w, pointer->i) ?
210 if ((search == NULL) || (search[0] ==
'\0'))
224 tmp = strdup(search);
248 if (suggestions == 0)
251 for (i = 0; i < suggestions; i++) {
352 flags = ~SEARCH_FLAG_FORWARDS &
379 (key->c >= 0x20 && key->c <= 0x7f)) {
Browser window creation and manipulation interface.
struct hlcache_handle * browser_window_get_content(struct browser_window *bw)
Get a cache handle for the content within a browser window.
@ CONTENT_HTML
content is HTML
@ CONTENT_TEXTPLAIN
content is plain text
void browser_window_search(struct browser_window *bw, void *context, search_flags_t flags, const char *string)
Starts or continues an existing search.
void browser_window_search_clear(struct browser_window *bw)
Clear up a search.
Browseing window text search interface.
@ SEARCH_FLAG_CASE_SENSITIVE
wimp_w ro_gui_dialog_create(const char *template_name)
Create a window from a template.
static struct gui_search_table search_table
bool ro_gui_search_next(wimp_w w)
Wrapper for the pressing of an OK button for wimp_event.
void ro_gui_search_add_recent(const char *search, void *p)
add search string to recent searches list
bool ro_gui_search_click(wimp_pointer *pointer)
void ro_gui_search_set_status(bool found, void *p)
Change the displayed search status.
bool ro_gui_search_prepare_menu(void)
static wimp_MENU(RECENT_SEARCHES)
void ro_gui_search_end(wimp_w w)
Ends the search.
static bool ro_gui_search_bw_searchable(struct browser_window *bw)
Determine of the browser window is searchable.
void ro_gui_search_set_hourglass(bool active, void *p)
display hourglass while searching
void ro_gui_search_set_back_state(bool active, void *p)
activate search forwards button in gui
static struct search_static_data search_data
bool ro_gui_search_keypress(wimp_key *key)
Handle keypresses in the search dialog.
struct gui_search_table * riscos_search_table
void ro_gui_search_set_forward_state(bool active, void *p)
activate search forwards button in gui
search_flags_t ro_gui_search_update_flags(void)
retrieve state of 'case sensitive', 'show all' checks in gui
void ro_gui_search_prepare(struct browser_window *bw)
Open the search dialog.
bool ro_gui_search_menu_prepare(wimp_w w, wimp_i i, wimp_menu *menu, wimp_pointer *pointer)
Callback to prepare menus in the Search dialog.
void ro_gui_search_init(void)
Public content interface.
content_type content_get_type(struct hlcache_handle *h)
Retrieve computed type of content.
Interface to platform-specific search operations.
const char * messages_get(const char *key)
Fast lookup of a message by key from the standard Messages hash.
Localised message support (interface).
nserror ro_warn_user(const char *warning, const char *detail)
Display a warning for a serious problem (eg memory exhaustion).
#define ICON_SEARCH_FIND_NEXT
#define ICON_SEARCH_CANCEL
#define ICON_SEARCH_FIND_PREV
#define ICON_SEARCH_CASE_SENSITIVE
#define ICON_SEARCH_STATUS
wimp_menu * recent_search_menu
#define ICON_SEARCH_SHOW_ALL
Interface to utility string handling.
function table for page text search.
struct browser_window * search_window
char * recent_searches[RECENT_SEARCHES]
void ro_gui_set_icon_string(wimp_w w, wimp_i i, const char *text, bool is_utf8)
Set the contents of a text or sprite icon to a string.
void ro_gui_set_icon_shaded_state(wimp_w w, wimp_i i, bool state)
Set the shaded state of an icon.
const char * ro_gui_get_icon_string(wimp_w w, wimp_i i)
Read the contents of a text or sprite icon.
void ro_gui_set_icon_selected_state(wimp_w w, wimp_i i, bool state)
Set the selected state of an icon.
bool ro_gui_get_icon_selected_state(wimp_w w, wimp_i i)
Gets the selected state of an icon.
General RISC OS WIMP/OS library functions (interface).
bool ro_gui_wimp_event_register_text_field(wimp_w w, wimp_i i)
Register a text field to be automatically handled.
bool ro_gui_wimp_event_register_keypress(wimp_w w, bool(*callback)(wimp_key *key))
Register a function to be called for all keypresses within a particular window.
bool ro_gui_wimp_event_set_help_prefix(wimp_w w, const char *help_prefix)
Set the associated help prefix for a given window.
bool ro_gui_wimp_event_register_menu_gright(wimp_w w, wimp_i i, wimp_i gright, wimp_menu *menu)
Register an icon menu to be automatically handled.
bool ro_gui_wimp_event_register_cancel(wimp_w w, wimp_i i)
Register a function to be called for the Cancel action on a window.
bool ro_gui_wimp_event_memorise(wimp_w w)
Memorises the current state of any registered components in a window.
bool ro_gui_wimp_event_register_mouse_click(wimp_w w, bool(*callback)(wimp_pointer *pointer))
Register a function to be called for all mouse-clicks to icons in a window that don't have registered...
bool ro_gui_wimp_event_register_checkbox(wimp_w w, wimp_i i)
Register a checkbox to be automatically handled.
bool ro_gui_wimp_event_register_menu_prepare(wimp_w w, bool(*callback)(wimp_w w, wimp_i i, wimp_menu *m, wimp_pointer *p))
Register a function to be called before a menu is (re-)opened.
bool ro_gui_wimp_event_register_ok(wimp_w w, wimp_i i, bool(*callback)(wimp_w w))
Register a function to be called for the OK action on a window.
bool ro_gui_wimp_event_register_close_window(wimp_w w, void(*callback)(wimp_w w))
Register a function to be called after the window has been closed.
Automated RISC OS WIMP event handling (interface).