Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
doyousketch2 edited this page Sep 14, 2019 · 7 revisions

Additional module functions:

  • fl.run() ==> int exit_status

    ( 0 on successful exit )
    ( supposedly non-zero on errors, but FLTK calls exit directly instead )

  • fl.wait( *int seconds ) ==> bool visible_windows
  • fl.check() ==> bool visible_windows

    same as fl.wait(0) calling during a big calculation will keep screen updated

  • fl.args( table )

    parse command line switches

  • fl.get_system_colors()

    read user preference colors from system and use them
    to call Fl::foreground(), Fl::background(), and Fl::background2()

  • fl.scheme() ==> *str mode get

    fl.scheme( *str mode ) set
    select mode:

    • "none" default, resembles Win (95/98/Me/NT/2000) and old GTK/KDE
    • "base" same as "none"
    • "plastic" inspired by Aqua on Mac OS X
    • "gtk+" inspired by Red Hat Bluecurve theme
    • "gleam" inspired by Clearlooks Glossy scheme
  • fl.redraw()

    redraw all widgets

  • fl.option( str which_option ) ==> bool enabled get Fl_Option

    fl.option( str which_option, bool enabled ) set

    • "OPTION_ARROW_FOCUS"
    • "OPTION_VISIBLE_FOCUS"
    • "OPTION_DND_TEXT"
    • "OPTION_SHOW_TOOLTIPS"
    • "OPTION_FNFC_USES_GTK"
    • "OPTION_LAST"
  • fl.open_uri( str uri ) ==> bool success

    opens specified Uniform Resource Identifier (URI)

  • fl.inactive( int|userdata image ) ==> userdata greyed_image

    produce copy of image that appears grayed out

  • fl.contrast( int|userdata fg_color, int|userdata bg_color ) ==> userdata color

    returns Fl_Color that contrasts with background.
    fg_color if sufficient contrast,
    otherwise, FL_WHITE or FL_BLACK depending on best contrast

  • fl.color_average( int|userdata color, int|userdata color ) ==> userdata color
  • fl.lighter( int|userdata color ) ==> userdata color

    return lighter version of specified color

  • fl.darker( int|userdata color ) == userdata color

    return darker version of specified color

  • fl.rgb_color( int grey ) ==> userdata color

    returns 24-bit greyscale value closest to g, g, g

  • fl.rgb_color( int red, int green, int blue ) ==> userdata color

    returns 24-bit color value closest to r, g, b

  • fl.get_color( int|userdata color ) ==> int red, int green, int blue
  • fl.set_color( int|userdata color, int red, int green, int blue )

    Sets an entry in fl_color index table

  • fl.cursor( str cursor, int|userdata color, int|userdata color )

    Fl_Cursor

    • "FL_CURSOR_DEFAULT"
    • "FL_CURSOR_ARROW"
    • "FL_CURSOR_CROSS"
    • "FL_CURSOR_WAIT"
    • "FL_CURSOR_INSERT"
    • "FL_CURSOR_HAND"
    • "FL_CURSOR_HELP"
    • "FL_CURSOR_MOVE"
    • "FL_CURSOR_NS"
    • "FL_CURSOR_WE"
    • "FL_CURSOR_NWSE"
    • "FL_CURSOR_NESW"
    • "FL_CURSOR_N"
    • "FL_CURSOR_NE"
    • "FL_CURSOR_E"
    • "FL_CURSOR_SE"
    • "FL_CURSOR_S"
    • "FL_CURSOR_SW"
    • "FL_CURSOR_W"
    • "FL_CURSOR_NW"
    • "FL_CURSOR_NONE"
  • fl.shortcut_label( int|str|userdata shortcut ) ==> str human-readable

    human-readable string from a keyboard shortcut

  • fl.alert( str message )

    shows an alert message dialog box

  • fl.beep( *str mode )

    Fl_Beep

    • "FL_BEEP_DEFAULT"
    • "FL_BEEP_MESSAGE"
    • "FL_BEEP_ERROR"
    • "FL_BEEP_QUESTION"
    • "FL_BEEP_PASSWORD"
    • "FL_BEEP_NOTIFICATION"
  • fl.choice( str message, *str button_0, *str button_1, *str button_2 ) ==> *str selected

    dialog w/ printf style message
    up to 3 customizable buttons

  • fl.color_chooser( *str name, *int red, *int green, *int blue, *int mode ) ==> *userdata color

    select mode:

    • 0 rgb
    • 1 byte
    • 2 hex
    • 3 hsv
  • fl.dir_chooser( str title, str dirname, bool relative_path ) == *str dir

    0 for absolute path return, otherwise relative

  • fl.file_chooser( str title, str pattern_filter, str filename, bool relative_path ) == *str file
  • fl.input( str formatted_msg, *str default ) ==> *str text

    standard sprintf formatting

  • fl.message( str formatted_msg )

    shows an info box, standard sprintf formatting

  • fl.password( str formatted_msg, *str default ) ==> *str pswd

    standard sprintf formatting

  • fl.message_hotspot() ==> bool follow_mouse get

    fl.message_hotspot( bool follow_mouse ) set
    when true, messages pop up where the mouse is

  • fl.add_fd( int descriptor, callback function, *userdata )

    Adds file descriptor to listen to
    then calls specified callback function

  • fl.remove_fd( int descriptor, *userdata when )

    removes file descriptor handler

Clone this wiki locally
Morty Proxy This is a proxified and sanitized view of the page, visit original site.