Module fltk::app [−][src]
Expand description
Application related methods and functions
Structs
App | Basic Application struct, used to instatiate, set the scheme and run the event loop |
Receiver | Creates a receiver struct |
Sender | Creates a sender struct |
Enums
MouseButton | Defines Mouse buttons |
MouseWheel | Event direction with Mousewheel event |
Scheme | Set the app scheme |
Functions
abi_version | Gets FLTK ABI version |
add_handler | Adds a custom handler for unhandled events |
add_idle | Add an idle callback to run within the event loop.
Calls to |
add_timeout | Adds a one-shot timeout callback. The timeout duration |
api_version | Gets FLTK API version |
awake | Trigger event loop handling in the main thread |
awake_callback | Registers a function that will be called by the main thread during the next message handling cycle |
awake_msg⚠ | Sends a custom message |
background | Set the background color |
background2 | Set the background color for input and text widgets |
belowmouse | Gets the widget that is below the mouse cursor.
This returns an Option |
channel | Creates a channel returning a Sender and Receiver structs (mpsc) |
close_display⚠ | Close the current display |
crate_version | Gets FLTK crate version |
damage | Returns whether any of the widgets were damaged |
delete_widget | Deletes widgets and their children. |
display | Gets the display global variable, |
dnd | Initiate dnd action |
event | Returns the latest captured event |
event_button | Returns the captured button event. 1 for left key, 2 for middle, 3 for right |
event_clicks | Returns the number of clicks |
event_coords | Returns the x and y coordinates of the captured event |
event_dx | Returns the current horizontal mouse scrolling associated with the Mousewheel event.
Returns |
event_dy | Returns the current horizontal mouse scrolling associated with the Mousewheel event.
Returns |
event_inside | Returns whether an event occured within a region |
event_inside_widget | Returns whether an event occured within a widget |
event_is_click | Determines whether an event was a click |
event_key | Returns the presed key |
event_key_down | Returns whether the key is pressed or held down during the last event |
event_length | Returns the duration of an event |
event_mouse_button | Returns the captured button event |
event_state | Returns the state of the event |
event_text | Returns a textual representation of the latest event |
event_x | Gets the x coordinate of the mouse in the window |
event_x_root | Gets the x coordinate of the mouse in the screen |
event_y | Gets the y coordinate of the mouse in the window |
event_y_root | Gets the y coordinate of the mouse in the screen |
first_window | Returns the first window of the application |
flush | Flush the main window |
focus | Gets the widget which has focus |
font_count | Gets the number of loaded fonts |
font_index | Finds the index of a font through its name |
font_name | Gets the name of a font through its index |
fonts | Gets a Vector |
foreground | Set the foreground color |
frame_type | Get the app’s frame type |
get_font | Get the font’s name |
get_font_names | Returns a list of available fonts to the application |
get_mouse | Gets the mouse coordinates relative to the screen |
get_system_colors | Gets the system colors |
grab | Get the grabbed window |
graphics_context | Get the graphics context, |
handle | Send a signal to a window. Integral values from 0 to 30 are reserved. Returns Ok(true) if the event was handled. Returns Ok(false) if the event was not handled. Returns Err on error or in use of one of the reserved values. |
handle_main | Send a signal to a window. Integral values from 0 to 30 are reserved. Returns Ok(true) if the event was handled. Returns Ok(false) if the event was not handled. |
has_idle | Checks whether an idle function is installed |
has_timeout | Check whether a timeout is installed |
init_all | Inits all styles, fonts and images available to FLTK. Also initializes global locking |
is_event_alt | Returns whether the event is a alt key press |
is_event_command | Returns whether the event is a command key press |
is_event_ctrl | Returns whether the event is a control key press |
is_event_shift | Returns whether the event is a shift press |
lock | Locks the main UI thread |
next_window | Returns the next window in order |
open_display⚠ | Open the current display |
own_colormap | Makes FLTK use its own colormap. This may make FLTK display better |
paste | Used for widgets implementing the |
program_should_quit | Determines whether a program should quit |
pushed | Gets the widget which was pushed |
quit | Quit the app |
redraw | Redraws everything |
register_images | Registers all images supported by |
remove_idle | Remove an idle function |
remove_timeout | Removes a timeout callback |
repeat_timeout | Repeats a timeout callback from the expiration of the previous timeout.
You may only call this method inside a timeout callback.
The timeout duration |
run | Runs the event loop |
scheme | Gets the scheme of the application |
screen_coords | Returns a pair of the x & y coords of the screen |
screen_count | Get the screen count |
screen_dpi | Get a screen’s dpi resolution |
screen_num | Get the screen number based on its coordinates |
screen_scale | Get the screen scale |
screen_scaling_supported | Return whether scaling the screen is supported |
screen_size | Returns a pair of the width and height of the screen |
screen_work_area | Get a screen’s working area |
screen_xywh | Get a screen’s xywh |
scrollbar_size | Get the app’s scrollbar size |
set_callback | Sets the callback of a widget |
set_damage | Sets the damage to true or false, illiciting a redraw by the application |
set_focus | Sets the widget which has focus |
set_font | Set the app’s font |
set_font_size | Set the app’s font size |
set_fonts | Initializes loaded fonts of a certain pattern |
set_frame_type | Set the app’s default frame type |
set_grab | Set the current grab |
set_inactive_color | Sets the app’s default selection color |
set_raw_callback⚠ | Set a widget callback using a C style API |
set_scheme | sets the scheme of the application |
set_screen_scale | Set the screen scale |
set_scrollbar_size | Set the application’s scrollbar size |
set_selection_color | Sets the app’s default selection color |
set_visible_focus | Show focus around widgets |
set_visual | Sets the visual mode of the application |
should_program_quit | Returns whether a quit signal was sent |
sleep | Put the thread to sleep for |
swap_frame_type | Swap the default frame type with a new frame type |
thread_msg⚠ | Receives a custom message |
unlock | Unlocks the main UI thread |
version | Gets FLTK version |
visible_focus | Return whether visible focus is shown |
wait | Starts waiting for events. Calls to redraw within wait require an explicit sleep |
wait_for | Waits a maximum of |
windows | Returns the apps windows. |
Type Definitions
AppScheme | Alias Scheme to |
Display | The display global variable, |
GraphicsContext | The current graphics context of the app, |
WidgetPtr | Alias Widget ptr |