NetSurf
Functions
status_bar.h File Reference

UTF8 status bar (interface). More...

#include <stdbool.h>
Include dependency graph for status_bar.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

struct status_barro_gui_status_bar_create (wimp_w parent, unsigned int width)
 Create a new status bar. More...
 
void ro_gui_status_bar_destroy (struct status_bar *sb)
 Destroy a status bar and free all associated resources. More...
 
wimp_w ro_gui_status_bar_get_window (struct status_bar *sb)
 Get the handle of the window that represents a status bar. More...
 
unsigned int ro_gui_status_bar_get_width (struct status_bar *sb)
 Get the proportional width the status bar is currently using. More...
 
void ro_gui_status_bar_resize (struct status_bar *sb)
 Resize a status bar following a change in the dimensions of the parent window. More...
 
void ro_gui_status_bar_set_visible (struct status_bar *pb, bool visible)
 Set the visibility status of the status bar. More...
 
bool ro_gui_status_bar_get_visible (struct status_bar *sb)
 Get the visibility status of the status bar. More...
 
void ro_gui_status_bar_set_text (struct status_bar *sb, const char *text)
 Set the text to display in the status bar. More...
 
void ro_gui_status_bar_set_progress_value (struct status_bar *sb, unsigned int value)
 Set the value of the progress bar. More...
 
void ro_gui_status_bar_set_progress_range (struct status_bar *sb, unsigned int range)
 Set the range of the progress bar. More...
 
void ro_gui_status_bar_set_progress_icon (struct status_bar *sb, const char *icon)
 Set the icon for the progress bar. More...
 

Detailed Description

UTF8 status bar (interface).

Definition in file status_bar.h.

Function Documentation

◆ ro_gui_status_bar_create()

struct status_bar * ro_gui_status_bar_create ( wimp_w  parent,
unsigned int  width 
)

Create a new status bar.

Parameters
parentthe window to contain the status bar
widththe proportional width to use (0...10,000)

Definition at line 118 of file status_bar.c.

References NSLOG, parent, status_bar::parent, status_bar::pb, ro_gui_progress_bar_create(), ro_gui_status_bar_click(), ro_gui_status_bar_open(), ro_gui_status_bar_redraw(), ro_gui_status_bar_resize(), ro_gui_wimp_event_register_mouse_click(), ro_gui_wimp_event_register_open_window(), ro_gui_wimp_event_register_redraw_window(), ro_gui_wimp_event_set_help_prefix(), ro_gui_wimp_event_set_user_data(), status_bar::scale, status_bar::visible, status_bar::w, and width.

Referenced by gui_window_create().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_status_bar_destroy()

void ro_gui_status_bar_destroy ( struct status_bar sb)

Destroy a status bar and free all associated resources.

Parameters
sbthe status bar to destroy

Definition at line 161 of file status_bar.c.

References NSLOG, status_bar::pb, riscos_schedule(), ro_gui_progress_bar_destroy(), ro_gui_status_bar_redraw_callback(), ro_gui_wimp_event_finalise(), and status_bar::w.

Referenced by gui_window_destroy().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_status_bar_get_visible()

bool ro_gui_status_bar_get_visible ( struct status_bar sb)

Get the visibility status of the status bar.

Parameters
sbthe status bar to check the visiblity of
Returns
whether the status bar is visible

Definition at line 240 of file status_bar.c.

References status_bar::visible.

◆ ro_gui_status_bar_get_width()

unsigned int ro_gui_status_bar_get_width ( struct status_bar sb)

Get the proportional width the status bar is currently using.

Parameters
sbthe status bar to get the width of
Returns
the status bar's width (0...10,000)

Definition at line 202 of file status_bar.c.

References status_bar::scale.

Referenced by ro_gui_window_default_options().

Here is the caller graph for this function:

◆ ro_gui_status_bar_get_window()

wimp_w ro_gui_status_bar_get_window ( struct status_bar sb)

Get the handle of the window that represents a status bar.

Parameters
sbthe status bar to get the window handle of
Returns
the status bar's window handle

Definition at line 188 of file status_bar.c.

References status_bar::w.

◆ ro_gui_status_bar_resize()

void ro_gui_status_bar_resize ( struct status_bar sb)

Resize a status bar following a change in the dimensions of the parent window.

Parameters
sbthe status bar to resize

Definition at line 346 of file status_bar.c.

References ICON_WIDGET, max, min, NSLOG, status_bar::parent, PTR_WIMP_OPEN, ro_get_hscroll_height(), ro_gui_status_position_progress_bar(), status_bar::scale, status_bar::visible, status_bar::w, WIDGET_WIDTH, and status_bar::width.

Referenced by ro_gui_status_bar_create(), ro_gui_status_bar_open(), ro_gui_status_bar_set_visible(), and ro_gui_window_open().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_status_bar_set_progress_icon()

void ro_gui_status_bar_set_progress_icon ( struct status_bar sb,
const char *  icon 
)

Set the icon for the progress bar.

Parameters
sbthe status bar to set the icon for
iconthe icon to use, or NULL for no icon

Definition at line 301 of file status_bar.c.

References status_bar::pb, and ro_gui_progress_bar_set_icon().

Here is the call graph for this function:

◆ ro_gui_status_bar_set_progress_range()

void ro_gui_status_bar_set_progress_range ( struct status_bar sb,
unsigned int  range 
)

Set the range of the progress bar.

Parameters
sbthe status bar to set the range of
rangethe range of the progress bar

Definition at line 271 of file status_bar.c.

References NSLOG, status_bar::pb, ro_gui_progress_bar_get_range(), ro_gui_progress_bar_get_window(), ro_gui_progress_bar_set_range(), and ro_gui_status_position_progress_bar().

Referenced by ro_gui_status_bar_set_progress_value().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_status_bar_set_progress_value()

void ro_gui_status_bar_set_progress_value ( struct status_bar sb,
unsigned int  value 
)

Set the value of the progress bar.

Parameters
sbthe status bar to set the progress of
valuethe value to use

Definition at line 254 of file status_bar.c.

References max, status_bar::pb, ro_gui_progress_bar_get_range(), ro_gui_progress_bar_set_value(), and ro_gui_status_bar_set_progress_range().

Here is the call graph for this function:

◆ ro_gui_status_bar_set_text()

void ro_gui_status_bar_set_text ( struct status_bar sb,
const char *  text 
)

Set the text to display in the status bar.

Parameters
sbthe status bar to set the text for
textthe UTF8 text to display, or NULL for none

Definition at line 316 of file status_bar.c.

References riscos_schedule(), ro_gui_status_bar_redraw_callback(), status_bar::text, text(), and status_bar::visible.

Referenced by riscos_window_set_status().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_status_bar_set_visible()

void ro_gui_status_bar_set_visible ( struct status_bar sb,
bool  visible 
)

Set the visibility status of the status bar.

Parameters
sbthe status bar to check the visiblity of
visibleif the status bar should be shown or not.
Returns
whether the status bar is visible

Definition at line 217 of file status_bar.c.

References NSLOG, ro_gui_status_bar_resize(), status_bar::visible, and status_bar::w.

Here is the call graph for this function: