[][src]Module fltk::app

Re-exports

pub use crate::enums::*;

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

Scheme

Set the app scheme

Functions

abi_version

Gets FLTK ABI version

add_handler

Adds a custom handler for unhandled events

add_timeout

Adds a one-shot timeout callback. The timeout duration tm is indicated in seconds

api_version

Gets FLTK API version

awake

Awakens the main UI thread with a callback

belowmouse

Gets the widget that is below the mouse cursor

channel

Creates a channel returning a Sender and Receiver structs

crate_version

Gets FLTK crate version

damage

Returns whether any of the widgets were damaged

delay

Delays the current thread by millis. Because std::thread::sleep isn't accurate on windows! Caution: It's a busy wait!

delete_widget

Deletes widgets and their children.

display

Gets the display global variable, fl_display _XDisplay on X11, HINSTANCE on Windows.

dnd

Initiate dnd action

event

Returns the latest captured event

event_button

Returns the captured button event

event_clicks

Returns the number of clicks

event_coords

Returns the x and y coordinates of the captured event

event_dx

Gets the difference in x axis of the mouse coordinates from the screen to the window

event_dy

Gets the difference in y axis of the mouse coordinates from the screen to the window

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_length

Returns the duration of an 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

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 of loaded fonts

get_font_names

Returns a list of available fonts to the application

get_mouse

Gets the mouse coordinates relative to the screen

graphics_context

Get the graphics context, fl_gc

init_all

Inits all styles available to FLTK

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

own_colormap

Makes FLTK use its own colormap. This may make FLTK display better

paste

Used for widgets implementing the InputExt, pastes content from the clipboard

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 SharedImage

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 tm is indicated in seconds

run

Runs the event loop

scheme

Gets the scheme of the application

screen_size

Returns a pair of the width and height of the screen

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_fonts

Initializes loaded fonts of a certain pattern name

set_raw_callback

Set a widget callback using a C style API, when boxing is not desired

set_scheme

sets the scheme of the application

set_scrollbar_size

Set the application's scrollbar size

set_visual

Sets the visual mode of the application

should_program_quit

Returns whether a quit signal was sent

unlock

Unlocks the main UI thread

unsafe_delete_widget

Deletes widgets and their children recursively deleting their user data

version

Gets FLTK version

wait

Starts waiting for events

wait_for

Waits a maximum of dur seconds or until "something happens".

Type Definitions

AppScheme

Alias Scheme to AppScheme

Display

The display global variable, fl_display _XDisplay on X11, HINSTANCE on Windows.

GraphicsContext

The current graphics context of the app, fl_gc *mut c_void to HDC on Windows, CGContextRef on MacOS, _XGC on X11

WidgetPtr