/Examples_FLTK

Shows how to use Fltk controls only by programming code (c++17).

Primary LanguageC++MIT LicenseMIT

FLTK Examples

Shows how to use Fltk controls only by programming code (c++17).

fltk

Hello World

Applications

Common Controls

  • Adjuster shows how to create adjusters with Fl_Adjuster valuator.
  • Box shows how to use a text with Fl_Box widget.
  • Box_Picture shows how to use an image with Fl_Box widget.
  • Box_Picture2 shows how to use an image with Fl_Box widget.
  • Browser shows how to create a text list with Fl_Browser widget.
  • Button shows how to create a button with Fl_Button widget.
  • Check_Browser shows how to create a check button list with Fl_Check_Browser widget.
  • Check_Button shows how to create a check button with Fl_Check_Button widget.
  • Clock shows how to use a clock with Fl_Clock widget.
  • Clock_Output shows how to use a static clock with Fl_Clock_Output widget.
  • Color_Chooser shows how to use a color chooser with Fl_Color_Chooser widget.
  • Counter shows how to create counters with Fl_Counter and Fl_Simple_Counter valuators.
  • Dial shows how to create dials with Fl_Dial, Fl_Line_Dial and Fl_Fill_Dial valuators.
  • File_Browser shows how to use a file browser with Fl_File_Browser widget.
  • File_Input shows how to use a file input with Fl_File_Input widget.
  • Float_Input shows how to create a float input text with Fl_Float_Input widget.
  • Input shows how to create a text input with Fl_Input widget.
  • Int_Input shows how to create an int input text with Fl_Int_Input widget.
  • Light_Button shows how to create a light button with Fl_Light_Button widget.
  • Multiline_Input shows how to create a multiline text input text with Fl_Multiline_Input widget.
  • Multiline_Output shows how to create a multiline text output with Fl_Multiline_Output widget.
  • Nice_Slider shows how to create a slider with Fl_Nice_Slider widget.
  • Output shows how to create a text output with Fl_Output widget.
  • Progress shows how to create a progress with Fl_Progress widget.
  • Radio_Light_Button shows how to create a radio light button with Fl_Radio_Light_Button widget.
  • Radio_Round_Button shows how to create a radio round button with Fl_Radio_Round_Button widget.
  • Roller shows how to create rollers (horizontal and vertical) with Fl_Roller valuator.
  • Round_Button shows how to create a round button with Fl_Round_Button widget.
  • Secret_Input shows how to create a secret text input with Fl_Secret_Input widget.
  • Slider shows how to create sliders with Fl_Hor_Slider, Fl_Hor_Fill_Slider, Fl_Hor_Nice_Slider, Fl_Slider, Fl_Fill_Slider and Fl_Nice_Slider valuators.
  • Spinner shows how to create a spinner with Fl_Spinner widget.
  • Table shows how to use a table with Fl_Table widget.
  • Text_Display shows how to use a text display with Fl_Text_Display widget.
  • Text_Editor shows how to use a text display with Fl_Text_Editor widget.
  • Toggle_Button shows how to create a toggle button with Fl_Toggle_Button widget.
  • Tree shows how to use a tree with Fl_Tree widget.
  • Value_Input shows how to create a value input with Fl_Value_Input valuator.
  • Value_Output shows how to create a value output with Fl_Value_Output valuator.
  • Value_Slider shows how to create value sliders with Fl_Hor_Value_Slider and Fl_Value_Slider valuators.

User Controls

  • Check_Box shows how to create a check box with own Fl_Check_Box widget.
  • Combo_Box shows how to create Combo boxes with own Fl_Combo_Box widgets.
  • Progress_Bar shows how to create a progress bar with own Fl_Progress_Bar widget.
  • Radio_Toggle_Button shows how to create a radio button with own Fl_Radio_Toggle_Button widget.

Groups

  • Group shows how to create a group with Fl_Group.
  • Pack shows how to create a pack with Fl_Pack.
  • Scroll shows how to create a scroll with Fl_Scroll.
  • Tabs shows how to create a tabs and pages with Fl_Tabs and Fl_Group.
  • Tile shows how to create a tile with Fl_Tile.
  • Window shows how to create a simple window with Fl_Window.
  • Wizard shows how to create a Wizard and pages with Fl_Wizard and Fl_Group.

Menus and toolbars

  • Menu_Bar shows how to create a menu bar with Fl_Menu_Bar widget.
  • Menu_Button shows how to create a menu button with Fl_Menu_Button widget.
  • Sys_Menu_Bar shows how to create a system menu bar with Fl_Sys_Menu_Bar widget.

Components

  • Cursors shows how to change cursor of a widget with override handle method and use fl_cursor method on FL_ENTER and FL_LEAVE events.
  • Preferences shows how to use preferences with Fl_Preferences component.
  • Schemes shows how to use schemes with fl_scheme methods.
  • Symbols shows how to use symbols with Fl_Box widget.
  • Timer shows how to create a timer with Fl::add_timeout, Fl::remove_timeout and Fl::repeat_timeout methods.
  • Tooltip shows how to create a tooltip with Fl_Tooltip component.

User Components

  • Scheme_Modes shows how to use own scheme modes with own fl_scheme_mode methods.
  • Use_Wait_Cursor shows how to use own Fl_Use_Wait_cursor component or own fl_use_wait_cursor method.

Common Dialogs

  • About shows how to create an about box with fl_message method.
  • Alert shows how to create an alert box with fl_alert method.
  • Beep shows how to create a beep with fl_beep method.
  • Choice shows how to create a choice box with fl_choice method.
  • Color_Chooser_Dialog shows how to use color chooser dialog with Fl_Color_Chooser dialog.
  • File_Chooser_Browse_Directory shows how to use directory chooser dialog with fl_dir_chooser method.
  • File_Chooser_Browse_File shows how to use file chooser dialog with fl_file_chooser method.
  • Input_Dialog shows how to create an input box with fl_input method.
  • Message shows how to create a message box with fl_message method.
  • Native_File_Chooser_Browse_Directory shows how to use a native file chooser to browse directory with Fl_Native_File_Chooser dialog.
  • Native_File_Chooser_Browse_File shows how to use a native file chooser dialog to browse file with Fl_Native_File_Chooser dialog.
  • Native_File_Chooser_Save_File shows how to use a native file chooser dialog to save file with Fl_Native_File_Chooser dialog.
  • Password shows how to create an password box with fl_password method.

User Dialogs

  • Font_Chooser shows how to use a Font chooser dialog with own fl_font_chooser method.
  • Message_Box shows how to use a Message box with own fl_message_box method.

Events

  • Application_Idle shows how to use idle event with Fl::add_idle method.
  • Key_Events demonstrates the use of key events.
  • Mouse_Events demonstrates the use of mouse events.
  • Window_Click shows how to use mouse click event with override handle method and use Fl::event_button, Fl::event_x() and Fl::event_y() methods on FL_RELEASE event.

Tips And Tricks

Others

Download

git clone https://github.com/gammasoft71/Examples_FLTK Examples_FLTK

Build and run

To build this project, open "Terminal" and type following lines:

Windows :

mkdir build && cd build
cmake .. 
start Fltk_Examples.sln

Select any project and type Ctrl+F5 to build and run it.

macOS :

mkdir build && cd build
cmake .. -G "Xcode"
open ./Fltk_Examples.xcodeproj

Select any project and type Cmd+R to build and run it.

Linux :

mkdir build && cd build
cmake .. 
cmake --build . --config Debug
./Any_Project

Remarks

This project run with Fltk 1.3.5 and CMake.