├── src ├── Tests │ ├── README.md │ ├── CMakeLists.txt │ └── Test_Gui │ │ ├── Test_Gui.cpp │ │ ├── README.md │ │ └── CMakeLists.txt ├── Controls │ ├── Box_Picture2 │ │ └── Resources │ │ │ └── Logo.png │ ├── Output │ │ ├── Output.cpp │ │ ├── README.md │ │ └── CMakeLists.txt │ ├── Multiline_Output │ │ ├── Multiline_Output.cpp │ │ └── CMakeLists.txt │ ├── Box_Picture │ │ ├── Box_Picture.cpp │ │ ├── CMakeLists.txt │ │ └── README.md │ ├── Clock │ │ ├── Clock.cpp │ │ ├── README.md │ │ └── CMakeLists.txt │ ├── Box │ │ ├── README.md │ │ └── CMakeLists.txt │ ├── Tree │ │ ├── README.md │ │ └── CMakeLists.txt │ ├── Table │ │ ├── README.md │ │ └── CMakeLists.txt │ ├── Clock_Output │ │ ├── Clock_Output.cpp │ │ ├── CMakeLists.txt │ │ └── README.md │ ├── Input │ │ ├── README.md │ │ └── CMakeLists.txt │ ├── Int_Input │ │ ├── README.md │ │ └── CMakeLists.txt │ ├── Button │ │ ├── README.md │ │ └── CMakeLists.txt │ ├── Roller │ │ ├── CMakeLists.txt │ │ └── README.md │ ├── Browser │ │ ├── README.md │ │ └── CMakeLists.txt │ ├── Spinner │ │ ├── README.md │ │ └── CMakeLists.txt │ ├── Dial │ │ └── CMakeLists.txt │ ├── Text_Display │ │ ├── README.md │ │ └── CMakeLists.txt │ ├── Secret_Input │ │ ├── Secret_Input.cpp │ │ ├── CMakeLists.txt │ │ └── README.md │ ├── Slider │ │ └── CMakeLists.txt │ ├── Adjuster │ │ ├── CMakeLists.txt │ │ └── README.md │ ├── Counter │ │ └── CMakeLists.txt │ ├── Progress │ │ ├── CMakeLists.txt │ │ └── README.md │ ├── File_Input │ │ ├── CMakeLists.txt │ │ └── README.md │ ├── Float_Input │ │ ├── CMakeLists.txt │ │ └── README.md │ ├── Nice_Slider │ │ ├── CMakeLists.txt │ │ └── README.md │ ├── Text_Editor │ │ ├── CMakeLists.txt │ │ └── README.md │ ├── Value_Input │ │ ├── CMakeLists.txt │ │ └── README.md │ ├── Check_Browser │ │ └── CMakeLists.txt │ ├── Check_Button │ │ ├── CMakeLists.txt │ │ └── README.md │ ├── Color_Chooser │ │ ├── CMakeLists.txt │ │ └── README.md │ ├── File_Browser │ │ ├── CMakeLists.txt │ │ └── README.md │ ├── Light_Button │ │ ├── CMakeLists.txt │ │ └── README.md │ ├── Round_Button │ │ ├── CMakeLists.txt │ │ └── README.md │ ├── Toggle_Button │ │ ├── CMakeLists.txt │ │ └── README.md │ ├── Value_Output │ │ ├── CMakeLists.txt │ │ └── README.md │ ├── Value_Slider │ │ └── CMakeLists.txt │ ├── Multiline_Input │ │ └── CMakeLists.txt │ ├── Radio_Light_Button │ │ └── CMakeLists.txt │ └── Radio_Round_Button │ │ └── CMakeLists.txt ├── Windows │ ├── CMakeLists.txt │ ├── README.md │ └── Window │ │ ├── README.md │ │ └── CMakeLists.txt ├── Hello_Worlds │ ├── Hello_World_Message2 │ │ ├── Hello_World_Message2.cpp │ │ └── CMakeLists.txt │ ├── CMakeLists.txt │ ├── Hello_World_Fltk │ │ ├── Hello_World_Fltk.cpp │ │ ├── CMakeLists.txt │ │ └── README.md │ ├── Hello_World_Message │ │ ├── Hello_World_Message.cpp │ │ └── CMakeLists.txt │ ├── Hello_World_Emoticons │ │ ├── Hello_World_Emoticons.cpp │ │ └── CMakeLists.txt │ ├── Hello_World_Box │ │ ├── Hello_World_Box.cpp │ │ └── CMakeLists.txt │ ├── Hello_World_Say │ │ ├── README.md │ │ └── CMakeLists.txt │ └── Hello_World_Drawing │ │ └── CMakeLists.txt ├── User_Controls │ ├── Combo_Box │ │ ├── Fl_Combo_Box_Style.h │ │ └── CMakeLists.txt │ ├── CMakeLists.txt │ ├── README.md │ └── Check_Box │ │ └── README.md ├── User_Dialogs │ ├── CMakeLists.txt │ ├── Message_Box │ │ ├── Message_Box_Buttons.h │ │ ├── Dialog_Result.h │ │ └── Message_Box_Icon.h │ ├── README.md │ └── Font_Chooser │ │ └── CMakeLists.txt ├── User_Components │ ├── CMakeLists.txt │ ├── Scheme_Modes │ │ ├── Fl_Scheme_Mode.h │ │ └── CMakeLists.txt │ ├── Use_Wait_Cursor │ │ ├── Fl_Use_Wait_Cursor.h │ │ └── Fl_Use_Wait_Cursor.cpp │ └── README.md ├── Applications │ ├── Application │ │ ├── Application.cpp │ │ ├── README.md │ │ └── CMakeLists.txt │ ├── CMakeLists.txt │ ├── README.md │ └── Application_Enable_Dark_Mode │ │ └── CMakeLists.txt ├── Menus_And_Toolbars │ ├── CMakeLists.txt │ ├── README.md │ ├── Menu_Bar │ │ ├── README.md │ │ └── CMakeLists.txt │ ├── Menu_Button │ │ ├── CMakeLists.txt │ │ └── README.md │ └── Sys_Menu_Bar │ │ ├── CMakeLists.txt │ │ └── README.md ├── Events │ ├── CMakeLists.txt │ ├── Window_Click │ │ ├── Window_Click.cpp │ │ └── CMakeLists.txt │ ├── Application_Idle │ │ └── CMakeLists.txt │ ├── Key_Events │ │ ├── CMakeLists.txt │ │ └── README.md │ ├── Mouse_Events │ │ └── CMakeLists.txt │ └── README.md ├── Containers │ ├── CMakeLists.txt │ ├── Scroll │ │ ├── Scroll.cpp │ │ ├── README.md │ │ └── CMakeLists.txt │ ├── Tabs │ │ ├── Tabs.cpp │ │ ├── CMakeLists.txt │ │ └── README.md │ ├── Group │ │ ├── Group.cpp │ │ ├── README.md │ │ └── CMakeLists.txt │ ├── README.md │ ├── Pack │ │ ├── README.md │ │ └── CMakeLists.txt │ ├── Tile │ │ ├── README.md │ │ └── CMakeLists.txt │ └── Wizard │ │ ├── CMakeLists.txt │ │ └── README.md ├── Tips_And_Tricks │ ├── CMakeLists.txt │ ├── Prevent_Hitting_Escape_Key_Closes_Windows │ │ └── Prevent_Hitting_Escape_Key_Closes_Windows.cpp │ ├── Widget_Wrapper │ │ ├── Widget_Wrapper.cpp │ │ ├── Fl_Widget_Wrapper.h │ │ └── CMakeLists.txt │ ├── Disable_Symbols │ │ ├── README.md │ │ └── CMakeLists.txt │ └── Functional │ │ └── CMakeLists.txt ├── Components │ ├── CMakeLists.txt │ ├── Cursors │ │ ├── Fl_Test_Cursor.h │ │ └── CMakeLists.txt │ ├── Symbols │ │ ├── README.md │ │ └── CMakeLists.txt │ ├── Tooltip │ │ ├── README.md │ │ └── CMakeLists.txt │ ├── Timer │ │ └── CMakeLists.txt │ ├── Schemes │ │ ├── CMakeLists.txt │ │ └── README.md │ └── Preferences │ │ ├── CMakeLists.txt │ │ └── README.md ├── Others │ ├── CMakeLists.txt │ ├── Colored_Tabs │ │ └── CMakeLists.txt │ ├── Colored_Browser │ │ └── CMakeLists.txt │ ├── Colored_Windows │ │ ├── CMakeLists.txt │ │ └── README.md │ ├── Box_And_Unicode_Text │ │ └── CMakeLists.txt │ ├── Colored_Text_Display │ │ └── CMakeLists.txt │ ├── Group_And_Check_Button │ │ └── CMakeLists.txt │ └── Group_And_Radio_Round_Button │ │ └── CMakeLists.txt ├── CMakeLists.txt └── Dialogs │ ├── CMakeLists.txt │ ├── Alert │ ├── Alert.cpp │ ├── CMakeLists.txt │ └── README.md │ ├── Message │ ├── Message.cpp │ ├── CMakeLists.txt │ └── README.md │ ├── Beep │ ├── README.md │ └── CMakeLists.txt │ ├── About │ ├── CMakeLists.txt │ └── README.md │ ├── Choice │ ├── CMakeLists.txt │ └── README.md │ ├── Password │ ├── CMakeLists.txt │ └── README.md │ ├── Input_Dialog │ └── CMakeLists.txt │ └── Color_Chooser_Dialog │ ├── CMakeLists.txt │ └── Color_Chooser_Dialog.cpp ├── docs └── Pictures │ ├── Fltk.png │ ├── Logo.png │ ├── Examples │ ├── Beep.png │ ├── Box.png │ ├── Dial.png │ ├── Pack.png │ ├── Tabs.png │ ├── Tile.png │ ├── Tree.png │ ├── About.png │ ├── Alert.png │ ├── Button.png │ ├── Choice.png │ ├── Clock.png │ ├── Group.png │ ├── Input.png │ ├── Output.png │ ├── Roller.png │ ├── Scroll.png │ ├── Slider.png │ ├── Table.png │ ├── Timer.png │ ├── Window.png │ ├── Wizard.png │ ├── Adjuster.png │ ├── Browser.png │ ├── Check_Box.png │ ├── Combo_Box.png │ ├── Counter.png │ ├── Cursors.png │ ├── Int_Input.png │ ├── Menu_Bar.png │ ├── Message.png │ ├── Password.png │ ├── Progress.png │ ├── Schemes.png │ ├── Spinner.png │ ├── Symbols.png │ ├── Tooltip.png │ ├── Application.png │ ├── Box_Picture.png │ ├── File_Input.png │ ├── Float_Input.png │ ├── Functional.png │ ├── Key_Events.png │ ├── Menu_Button.png │ ├── Message_Box.png │ ├── Nice_Slider.png │ ├── Preferences.png │ ├── Text_Editor.png │ ├── Value_Input.png │ ├── Box_Picture2.png │ ├── Check_Browser.png │ ├── Check_Button.png │ ├── Clock_Output.png │ ├── Color_Chooser.png │ ├── Colored_Tabs.png │ ├── Font_Chooser.png │ ├── Input_Dialog.png │ ├── Light_Button.png │ ├── Mouse_Events.png │ ├── Progress_Bar.png │ ├── Round_Button.png │ ├── Scheme_Modes.png │ ├── Secret_Input.png │ ├── Sys_Menu_Bar.png │ ├── Text_Display.png │ ├── Toggle_Button.png │ ├── Value_Output.png │ ├── Value_Slider.png │ ├── Widget_Wrapper.png │ ├── Window_Click.png │ ├── Application_Idle.png │ ├── Colored_Browser.png │ ├── Colored_Windows.png │ ├── Disable_Symbols.png │ ├── Hello_World_Box.png │ ├── Hello_World_Fltk.png │ ├── Hello_World_Say.png │ ├── Multiline_Input.png │ ├── Multiline_Output.png │ ├── Use_Wait_Cursor.png │ ├── Hello_World_Drawing.png │ ├── Hello_World_Message.png │ ├── Radio_Light_Button.png │ ├── Radio_Round_button.png │ ├── Radio_Toggle_Button.png │ ├── Box_And_Unicode_Text.png │ ├── Color_Chooser_Dialog.png │ ├── Colored_Text_Display.png │ ├── Hello_World_Emoticons.png │ ├── Hello_World_Message2.png │ ├── Group_And_Check_Button.png │ ├── Application_And_Exception.png │ ├── Application_Enable_Dark_Mode.png │ ├── Application_Enable_Light_Mode.png │ ├── Group_And_Radio_Round_Button.png │ ├── Native_File_Chooser_Save_File.png │ ├── Native_File_Chooser_Browse_File.png │ ├── Native_File_Chooser_Browse_Directory.png │ └── Prevent_Hitting_Escape_Key_Closes_Windows.png │ └── fltk_header.png └── CMakeLists.txt /src/Tests/README.md: -------------------------------------------------------------------------------- 1 | # Others 2 | 3 | * [Test_Gui](Test_Gui/README.md) is used to experiment test. 4 | -------------------------------------------------------------------------------- /docs/Pictures/Fltk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Fltk.png -------------------------------------------------------------------------------- /docs/Pictures/Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Logo.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Beep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Beep.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Box.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Dial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Dial.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Pack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Pack.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Tabs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Tabs.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Tile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Tile.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Tree.png -------------------------------------------------------------------------------- /docs/Pictures/fltk_header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/fltk_header.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/About.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/About.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Alert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Alert.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Button.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Choice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Choice.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Clock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Clock.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Group.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Input.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Input.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Output.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Roller.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Roller.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Scroll.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Scroll.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Slider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Slider.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Table.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Timer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Timer.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Window.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Wizard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Wizard.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Adjuster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Adjuster.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Browser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Browser.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Check_Box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Check_Box.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Combo_Box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Combo_Box.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Counter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Counter.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Cursors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Cursors.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Int_Input.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Int_Input.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Menu_Bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Menu_Bar.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Message.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Message.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Password.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Password.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Progress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Progress.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Schemes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Schemes.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Spinner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Spinner.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Symbols.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Symbols.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Tooltip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Tooltip.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Application.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Application.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Box_Picture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Box_Picture.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/File_Input.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/File_Input.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Float_Input.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Float_Input.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Functional.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Functional.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Key_Events.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Key_Events.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Menu_Button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Menu_Button.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Message_Box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Message_Box.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Nice_Slider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Nice_Slider.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Preferences.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Preferences.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Text_Editor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Text_Editor.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Value_Input.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Value_Input.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Box_Picture2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Box_Picture2.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Check_Browser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Check_Browser.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Check_Button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Check_Button.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Clock_Output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Clock_Output.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Color_Chooser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Color_Chooser.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Colored_Tabs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Colored_Tabs.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Font_Chooser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Font_Chooser.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Input_Dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Input_Dialog.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Light_Button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Light_Button.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Mouse_Events.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Mouse_Events.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Progress_Bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Progress_Bar.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Round_Button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Round_Button.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Scheme_Modes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Scheme_Modes.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Secret_Input.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Secret_Input.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Sys_Menu_Bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Sys_Menu_Bar.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Text_Display.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Text_Display.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Toggle_Button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Toggle_Button.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Value_Output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Value_Output.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Value_Slider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Value_Slider.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Widget_Wrapper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Widget_Wrapper.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Window_Click.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Window_Click.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Application_Idle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Application_Idle.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Colored_Browser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Colored_Browser.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Colored_Windows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Colored_Windows.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Disable_Symbols.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Disable_Symbols.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Hello_World_Box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Hello_World_Box.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Hello_World_Fltk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Hello_World_Fltk.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Hello_World_Say.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Hello_World_Say.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Multiline_Input.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Multiline_Input.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Multiline_Output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Multiline_Output.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Use_Wait_Cursor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Use_Wait_Cursor.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Hello_World_Drawing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Hello_World_Drawing.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Hello_World_Message.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Hello_World_Message.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Radio_Light_Button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Radio_Light_Button.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Radio_Round_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Radio_Round_button.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Radio_Toggle_Button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Radio_Toggle_Button.png -------------------------------------------------------------------------------- /src/Controls/Box_Picture2/Resources/Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/src/Controls/Box_Picture2/Resources/Logo.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Box_And_Unicode_Text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Box_And_Unicode_Text.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Color_Chooser_Dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Color_Chooser_Dialog.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Colored_Text_Display.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Colored_Text_Display.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Hello_World_Emoticons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Hello_World_Emoticons.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Hello_World_Message2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Hello_World_Message2.png -------------------------------------------------------------------------------- /src/Tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Tests) 5 | 6 | # Projects 7 | add_subdirectory(Test_Gui) 8 | -------------------------------------------------------------------------------- /src/Windows/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Windows) 5 | 6 | # Projects 7 | add_subdirectory(Window) 8 | -------------------------------------------------------------------------------- /docs/Pictures/Examples/Group_And_Check_Button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Group_And_Check_Button.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Application_And_Exception.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Application_And_Exception.png -------------------------------------------------------------------------------- /src/Hello_Worlds/Hello_World_Message2/Hello_World_Message2.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | auto main() -> int { 4 | fl_message("Hello, World!"); 5 | } 6 | -------------------------------------------------------------------------------- /src/User_Controls/Combo_Box/Fl_Combo_Box_Style.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | enum class Fl_Combo_Box_Style { 4 | simple, 5 | drop_down, 6 | drop_down_list 7 | }; 8 | -------------------------------------------------------------------------------- /docs/Pictures/Examples/Application_Enable_Dark_Mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Application_Enable_Dark_Mode.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Application_Enable_Light_Mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Application_Enable_Light_Mode.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Group_And_Radio_Round_Button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Group_And_Radio_Round_Button.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Native_File_Chooser_Save_File.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Native_File_Chooser_Save_File.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Native_File_Chooser_Browse_File.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Native_File_Chooser_Browse_File.png -------------------------------------------------------------------------------- /src/Windows/README.md: -------------------------------------------------------------------------------- 1 | # Windows 2 | 3 | * [Window](Window/README.md) shows how to create a simple window with [Fl_Window](https://www.fltk.org/doc-1.3/classFl__Window.html). 4 | -------------------------------------------------------------------------------- /docs/Pictures/Examples/Native_File_Chooser_Browse_Directory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Native_File_Chooser_Browse_Directory.png -------------------------------------------------------------------------------- /docs/Pictures/Examples/Prevent_Hitting_Escape_Key_Closes_Windows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gammasoft71/Examples_FLTK/HEAD/docs/Pictures/Examples/Prevent_Hitting_Escape_Key_Closes_Windows.png -------------------------------------------------------------------------------- /src/User_Dialogs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(User_Dialogs) 5 | 6 | # Projects 7 | add_subdirectory(Font_Chooser) 8 | add_subdirectory(Message_Box) 9 | -------------------------------------------------------------------------------- /src/User_Components/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(User_Components) 5 | 6 | # Projects 7 | add_subdirectory(Scheme_Modes) 8 | add_subdirectory(Use_Wait_Cursor) 9 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Fltk_Examples) 5 | 6 | # Options 7 | set_property(GLOBAL PROPERTY USE_FOLDERS ON) 8 | 9 | # Projects 10 | add_subdirectory(src) 11 | -------------------------------------------------------------------------------- /src/Applications/Application/Application.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | auto main(int argc, char *argv[]) -> int { 5 | auto window = Fl_Window {300, 300}; 6 | window.show(argc, argv); 7 | return Fl::run(); 8 | } 9 | -------------------------------------------------------------------------------- /src/User_Dialogs/Message_Box/Message_Box_Buttons.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | enum class Message_Box_Buttons { 4 | Ok = 0, 5 | Ok_Cancel = 1, 6 | Abort_Retry_Ignore = 2, 7 | Yes_No_Cancel = 3, 8 | Yes_No = 4, 9 | Retry_Cancel = 5 10 | }; 11 | -------------------------------------------------------------------------------- /src/Menus_And_Toolbars/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Menus_And_Toolbars) 5 | 6 | # Projects 7 | add_subdirectory(Menu_Button) 8 | add_subdirectory(Menu_Bar) 9 | add_subdirectory(Sys_Menu_Bar) 10 | -------------------------------------------------------------------------------- /src/Events/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Events) 5 | 6 | # Projects 7 | add_subdirectory(Application_Idle) 8 | add_subdirectory(Key_Events) 9 | add_subdirectory(Mouse_Events) 10 | add_subdirectory(Window_Click) 11 | -------------------------------------------------------------------------------- /src/User_Dialogs/Message_Box/Dialog_Result.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | enum class Dialog_Result { 6 | None = 0, 7 | Ok = 1, 8 | Cancel = 2, 9 | Abort = 3, 10 | Retry = 4, 11 | Ignore = 5, 12 | Yes = 6, 13 | No = 7 14 | }; 15 | -------------------------------------------------------------------------------- /src/User_Controls/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(User_Controls) 5 | 6 | # Projects 7 | add_subdirectory(Check_Box) 8 | add_subdirectory(Combo_Box) 9 | add_subdirectory(Progress_Bar) 10 | add_subdirectory(Radio_Toggle_Button) 11 | -------------------------------------------------------------------------------- /src/Containers/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Containers) 5 | 6 | # Projects 7 | add_subdirectory(Group) 8 | add_subdirectory(Pack) 9 | add_subdirectory(Scroll) 10 | add_subdirectory(Tabs) 11 | add_subdirectory(Tile) 12 | add_subdirectory(Wizard) 13 | -------------------------------------------------------------------------------- /src/Tips_And_Tricks/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Tips_And_Tricks) 5 | 6 | # Projects 7 | add_subdirectory(Disable_Symbols) 8 | add_subdirectory(Functional) 9 | add_subdirectory(Prevent_Hitting_Escape_Key_Closes_Windows) 10 | add_subdirectory(Widget_Wrapper) 11 | -------------------------------------------------------------------------------- /src/User_Components/Scheme_Modes/Fl_Scheme_Mode.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | enum class Fl_Scheme_Mode { 4 | default_mode, 5 | light, 6 | dark, 7 | white, 8 | black, 9 | red, 10 | green, 11 | blue, 12 | }; 13 | 14 | void fl_scheme_mode(Fl_Scheme_Mode scheme_mode); 15 | Fl_Scheme_Mode fl_scheme_mode(); 16 | -------------------------------------------------------------------------------- /src/Components/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Components) 5 | 6 | # Projects 7 | add_subdirectory(Cursors) 8 | add_subdirectory(Schemes) 9 | add_subdirectory(Preferences) 10 | add_subdirectory(Symbols) 11 | add_subdirectory(Timer) 12 | add_subdirectory(Tooltip) 13 | -------------------------------------------------------------------------------- /src/Applications/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Applications) 5 | 6 | # Projects 7 | add_subdirectory(Application) 8 | add_subdirectory(Application_And_Exception) 9 | add_subdirectory(Application_Enable_Dark_Mode) 10 | add_subdirectory(Application_Enable_Light_Mode) 11 | -------------------------------------------------------------------------------- /src/User_Components/Use_Wait_Cursor/Fl_Use_Wait_Cursor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | bool fl_use_wait_cursor(); 4 | void fl_use_wait_cursor(bool use_wait_cursor); 5 | 6 | class Fl_Use_Wait_Cursor { 7 | public: 8 | Fl_Use_Wait_Cursor() {fl_use_wait_cursor(true);} 9 | ~Fl_Use_Wait_Cursor() {fl_use_wait_cursor(false);} 10 | }; 11 | -------------------------------------------------------------------------------- /src/User_Dialogs/README.md: -------------------------------------------------------------------------------- 1 | # User Dialogs 2 | 3 | * [Font_Chooser](Font_Chooser/README.md) shows how to use a Font chooser dialog with own [fl_font_chooser](Font_Chooser/fl_font_chooser.h) method. 4 | * [Message_Box](Message_Box/README.md) shows how to use a Message box with own [fl_message_box](Message_Box/fl_message_box.h) method. 5 | -------------------------------------------------------------------------------- /src/User_Dialogs/Message_Box/Message_Box_Icon.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | enum class Message_Box_Icon { 4 | None = 0, 5 | Error = 0x00000010L, 6 | Question = 0x00000020L, 7 | Warning = 0x00000030L, 8 | Information = 0x00000040L, 9 | Hand = Error, 10 | Stop = Error, 11 | Exclamation = Warning, 12 | Asterisk = Information, 13 | }; 14 | -------------------------------------------------------------------------------- /src/User_Components/README.md: -------------------------------------------------------------------------------- 1 | # User Components 2 | 3 | * [Scheme_Modes](Scheme_Modes/README.md) shows how to use own scheme modes with own [fl_scheme_mode](Scheme_Modes/Fl_Scheme_Mode.h) methods. 4 | * [Use_Wait_Cursor](Use_Wait_Cursor/README.md) shows how to use own Fl_Use_Wait_cursor component or own [fl_use_wait_cursor](Use_Wait_Cursor/Fl_Use_Wait_Cursor.h) method. 5 | -------------------------------------------------------------------------------- /src/Others/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Others) 5 | 6 | # Projects 7 | add_subdirectory(Box_And_Unicode_Text) 8 | add_subdirectory(Colored_Browser) 9 | add_subdirectory(Colored_Tabs) 10 | add_subdirectory(Colored_Text_Display) 11 | add_subdirectory(Colored_Windows) 12 | add_subdirectory(Group_And_Check_Button) 13 | add_subdirectory(Group_And_Radio_Round_Button) 14 | -------------------------------------------------------------------------------- /src/Hello_Worlds/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Hello_Worlds) 5 | 6 | # Projects 7 | add_subdirectory(Hello_World_Box) 8 | add_subdirectory(Hello_World_Drawing) 9 | add_subdirectory(Hello_World_Emoticons) 10 | add_subdirectory(Hello_World_Fltk) 11 | add_subdirectory(Hello_World_Message) 12 | add_subdirectory(Hello_World_Message2) 13 | add_subdirectory(Hello_World_Say) 14 | -------------------------------------------------------------------------------- /src/Tests/Test_Gui/Test_Gui.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | namespace Examples { 5 | class Main_Window : public Fl_Window { 6 | public: 7 | Main_Window() : Fl_Window {200, 100, 300, 300, "Test gui"} { 8 | } 9 | }; 10 | } 11 | 12 | auto main(int argc, char* argv[]) -> int { 13 | auto window = Examples::Main_Window {}; 14 | window.show(argc, argv); 15 | Fl::run(); 16 | } 17 | -------------------------------------------------------------------------------- /src/Hello_Worlds/Hello_World_Fltk/Hello_World_Fltk.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | auto main(int argc, char *argv[]) -> int { 6 | auto window = Fl_Window {340, 180}; 7 | auto box = Fl_Box {20, 40, 300, 100, "Hello, World!"}; 8 | box.box(FL_UP_BOX); 9 | box.labelfont(FL_BOLD + FL_ITALIC); 10 | box.labelsize(36); 11 | box.labeltype(FL_SHADOW_LABEL); 12 | window.show(argc, argv); 13 | return Fl::run(); 14 | } 15 | -------------------------------------------------------------------------------- /src/Menus_And_Toolbars/README.md: -------------------------------------------------------------------------------- 1 | # Menus and toolbars 2 | 3 | * [Menu_Bar](Menu_Bar/README.md) shows how to create a menu bar with [Fl_Menu_Bar](https://www.fltk.org/doc-1.3/classFl__Menu__Bar.html) widget. 4 | * [Menu_Button](Menu_Button/README.md) shows how to create a menu button with [Fl_Menu_Button](https://www.fltk.org/doc-1.3/classFl__Menu__Button.html) widget. 5 | * [Sys_Menu_Bar](Sys_Menu_Bar/README.md) shows how to create a system menu bar with [Fl_Sys_Menu_Bar](https://www.fltk.org/doc-1.3/classFl__Sys__Menu__Bar.html) widget. 6 | -------------------------------------------------------------------------------- /src/Hello_Worlds/Hello_World_Message/Hello_World_Message.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | auto main(int argc, char *argv[]) -> int { 7 | auto window = Fl_Window {200, 100, 300, 300, "Hello world (message)"}; 8 | 9 | auto button = Fl_Button {10, 10, 75, 25, "Click me"}; 10 | button.callback([](Fl_Widget* sender, void* window) { 11 | fl_message("Hello, World!"); 12 | }); 13 | 14 | window.show(argc, argv); 15 | return Fl::run(); 16 | } 17 | -------------------------------------------------------------------------------- /src/Controls/Output/Output.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | namespace Examples { 6 | class Main_Window : public Fl_Window { 7 | public: 8 | Main_Window() : Fl_Window {200, 100, 300, 300, "Output example"} { 9 | output1.value("Output text"); 10 | } 11 | 12 | private: 13 | Fl_Output output1 {10, 10, 100, 25}; 14 | }; 15 | } 16 | 17 | auto main(int argc, char *argv[]) -> int { 18 | auto window = Examples::Main_Window {}; 19 | window.show(argc, argv); 20 | return Fl::run(); 21 | } 22 | -------------------------------------------------------------------------------- /src/User_Components/Use_Wait_Cursor/Fl_Use_Wait_Cursor.cpp: -------------------------------------------------------------------------------- 1 | #include "Fl_Use_Wait_Cursor.h" 2 | #include 3 | #include 4 | 5 | namespace { 6 | bool use_wait_cursor = false; 7 | } 8 | 9 | bool fl_use_wait_cursor() { 10 | return use_wait_cursor; 11 | } 12 | 13 | void fl_use_wait_cursor(bool use_wait_cursor) { 14 | if (::use_wait_cursor == use_wait_cursor) return; 15 | ::use_wait_cursor = use_wait_cursor; 16 | for (auto window = Fl::first_window(); window; window = Fl::next_window(window)) 17 | window->cursor(use_wait_cursor ? FL_CURSOR_WAIT : FL_CURSOR_DEFAULT); 18 | } 19 | -------------------------------------------------------------------------------- /src/User_Controls/README.md: -------------------------------------------------------------------------------- 1 | # User Controls 2 | 3 | * [Check_Box](Check_Box/README.md) shows how to create a check box with own [Fl_Check_Box](Check_Box/Fl_Check_Box.h) widget. 4 | * [Combo_Box](Combo_Box/README.md) shows how to create Combo boxes with own [Fl_Combo_Box](Combo_Box/Fl_Combo_Box) widgets. 5 | * [Progress_Bar](Progress_Bar/README.md) shows how to create a progress bar with own [Fl_Progress_Bar](Progress_Bar/Fl_Progress_Bar.h) widget. 6 | * [Radio_Toggle_Button](Radio_Toggle_Button/README.md) shows how to create a radio button with own [Fl_Radio_Toggle_Button](Radio_Toggle_Button/Fl_Radio_Toggle_Button.h) widget. 7 | -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(src) 5 | 6 | # Projects 7 | add_subdirectory(Hello_Worlds) 8 | add_subdirectory(Applications) 9 | add_subdirectory(Dialogs) 10 | add_subdirectory(Windows) 11 | add_subdirectory(Menus_And_Toolbars) 12 | add_subdirectory(Containers) 13 | add_subdirectory(Controls) 14 | add_subdirectory(Components) 15 | add_subdirectory(Events) 16 | add_subdirectory(Tips_And_Tricks) 17 | add_subdirectory(User_Controls) 18 | add_subdirectory(User_Components) 19 | add_subdirectory(User_Dialogs) 20 | add_subdirectory(Others) 21 | add_subdirectory(Tests) 22 | -------------------------------------------------------------------------------- /src/Components/Cursors/Fl_Test_Cursor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | 6 | class Fl_Test_Cursor : public Fl_Scroll { 7 | public: 8 | Fl_Test_Cursor(int x, int y, int w ,int h) : Fl_Scroll(x, y, w, h) {} 9 | 10 | void cursor(Fl_Cursor cursor) {cursor_ = cursor;} 11 | 12 | auto handle(int event) -> int override { 13 | if (event == FL_ENTER) fl_cursor(cursor_); 14 | if (event == FL_LEAVE) fl_cursor(FL_CURSOR_DEFAULT); 15 | return Fl_Scroll::handle(event); 16 | } 17 | 18 | private: 19 | Fl_Cursor cursor_ = FL_CURSOR_DEFAULT; 20 | }; 21 | -------------------------------------------------------------------------------- /src/Controls/Multiline_Output/Multiline_Output.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | namespace Examples { 6 | class Main_Window : public Fl_Window { 7 | public: 8 | Main_Window() : Fl_Window {200, 100, 300, 300, "Multiline output example"} { 9 | output1.value("Line 1\nLine 2\nLine 3\n..."); 10 | } 11 | 12 | private: 13 | Fl_Multiline_Output output1 {10, 10, 280, 280}; 14 | }; 15 | } 16 | 17 | auto main(int argc, char *argv[]) -> int { 18 | auto window = Examples::Main_Window {}; 19 | window.show(argc, argv); 20 | return Fl::run(); 21 | } 22 | -------------------------------------------------------------------------------- /src/Dialogs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Dialogs) 5 | 6 | # Projects 7 | add_subdirectory(About) 8 | add_subdirectory(Alert) 9 | add_subdirectory(Beep) 10 | add_subdirectory(Choice) 11 | add_subdirectory(Color_Chooser_Dialog) 12 | add_subdirectory(File_Chooser_Browse_Directory) 13 | add_subdirectory(File_Chooser_Browse_File) 14 | add_subdirectory(Input_Dialog) 15 | add_subdirectory(Message) 16 | add_subdirectory(Native_File_Chooser_Browse_Directory) 17 | add_subdirectory(Native_File_Chooser_Browse_File) 18 | add_subdirectory(Native_File_Chooser_Save_File) 19 | add_subdirectory(Password) 20 | -------------------------------------------------------------------------------- /src/Applications/README.md: -------------------------------------------------------------------------------- 1 | # Applications 2 | 3 | * [Application](Application/README.md) shows how to create a simple [FLTK](https://www.fltk.org) application. 4 | * [Application_And_Exception](Application_And_Exception/README.md) shows how to create a simple [FLTK](https://www.fltk.org) application and how to manage exception. 5 | * [Application_Enable_Dark_Mode](Application_Enable_Dark_Mode/README.md) shows how to create a simple [FLTK](https://www.fltk.org) application with dark mode. 6 | * [Application_Enable_Light_Mode](Application_Enable_Light_Mode/README.md) shows how to create a simple [FLTK](https://www.fltk.org) application with light mode. 7 | 8 | -------------------------------------------------------------------------------- /src/Containers/Scroll/Scroll.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | namespace Examples { 6 | class Main_Window : public Fl_Window { 7 | public: 8 | Main_Window() : Fl_Window {200, 100, 640, 480, "Scroll example"} { 9 | scroll1.box(FL_BORDER_BOX); 10 | scroll2.box(FL_DOWN_BOX); 11 | } 12 | 13 | private: 14 | Fl_Scroll scroll1 {10, 10, 305, 460}; 15 | Fl_End end_scroll1; 16 | Fl_Scroll scroll2 {325, 10, 305, 460}; 17 | Fl_End end_scroll2; 18 | }; 19 | } 20 | 21 | auto main(int argc, char *argv[]) -> int { 22 | auto window = Examples::Main_Window {}; 23 | window.show(argc, argv); 24 | return Fl::run(); 25 | } 26 | -------------------------------------------------------------------------------- /src/Containers/Tabs/Tabs.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | namespace Examples { 6 | class Main_Window : public Fl_Window { 7 | public: 8 | Main_Window() : Fl_Window {200, 100, 390, 270, "Tabs example"} {} 9 | 10 | private: 11 | Fl_Tabs tabs {10, 10, 370, 250}; 12 | Fl_Group page1 {10, 30, 370, 230, "Page1"}; 13 | Fl_End end_page1; 14 | Fl_Group page2 {10, 30, 370, 230, "Page2"}; 15 | Fl_End end_page2; 16 | Fl_Group page3 {10, 30, 370, 230, "Page3"}; 17 | Fl_End end_page3; 18 | Fl_End end_tabs; 19 | }; 20 | } 21 | 22 | auto main(int argc, char *argv[]) -> int { 23 | auto window = Examples::Main_Window {}; 24 | window.show(argc, argv); 25 | return Fl::run(); 26 | } 27 | -------------------------------------------------------------------------------- /src/Tips_And_Tricks/Prevent_Hitting_Escape_Key_Closes_Windows/Prevent_Hitting_Escape_Key_Closes_Windows.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | namespace Examples { 8 | class Main_Window : public Fl_Window { 9 | public: 10 | Main_Window() : Fl_Window(200, 100, 800, 450, "Prevent hitting 'Escape' key closes windows") {} 11 | }; 12 | } 13 | 14 | int main(int argc, char* argv[]) { 15 | // The following line prevent hitting the 'Escape' key closes windows... 16 | Fl::add_handler([](int event)->int {return event == FL_SHORTCUT && Fl::event_key() == FL_Escape;}); 17 | 18 | Examples::Main_Window window; 19 | window.show(argc, argv); 20 | Fl::run(); 21 | } 22 | -------------------------------------------------------------------------------- /src/Controls/Box_Picture/Box_Picture.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include "logo.xpm" 6 | 7 | namespace Examples { 8 | class Main_Window : public Fl_Window { 9 | public: 10 | Main_Window() : Fl_Window {200, 100, 300, 300, "Box with picture example"} { 11 | resizable(box1); 12 | 13 | box1.align(FL_ALIGN_INSIDE | FL_ALIGN_CLIP); 14 | box1.box(FL_GTK_DOWN_BOX); 15 | box1.image(&picture); 16 | } 17 | 18 | private: 19 | Fl_Box box1 {20, 20, 260, 260}; 20 | Fl_Pixmap picture {logo_xpm}; 21 | }; 22 | } 23 | 24 | auto main(int argc, char *argv[]) -> int { 25 | auto window = Examples::Main_Window {}; 26 | window.show(argc, argv); 27 | return Fl::run(); 28 | } 29 | -------------------------------------------------------------------------------- /src/Tips_And_Tricks/Widget_Wrapper/Widget_Wrapper.cpp: -------------------------------------------------------------------------------- 1 | #include "Fl_Widget_Wrapper.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | namespace Examples { 8 | class Main_Window : public Fl_Window { 9 | public: 10 | Main_Window() : Fl_Window {200, 100, 300, 300, "Widget wrapper example"} { 11 | button.callback([&](Fl_Widget& sender, std::any arg) { 12 | fl_message("Clicked %d times", ++count); 13 | }); 14 | } 15 | 16 | private: 17 | Fl_Widget_Wrapper button {10, 10, 75, 25, "Click me"}; 18 | int count = 0; 19 | }; 20 | } 21 | 22 | auto main(int argc, char* argv[]) -> int { 23 | auto window = Examples::Main_Window {}; 24 | window.show(argc, argv); 25 | Fl::run(); 26 | } 27 | -------------------------------------------------------------------------------- /src/Tests/Test_Gui/README.md: -------------------------------------------------------------------------------- 1 | # Test_Gui 2 | 3 | is used to experiment test 4 | 5 | ## Source 6 | 7 | [Test_Gui.cpp](Test_Gui.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Generate and build 12 | 13 | To build this project, open "Terminal" and type following lines: 14 | 15 | ### Windows : 16 | 17 | ``` shell 18 | mkdir build && cd build 19 | cmake .. 20 | start Test_Gui.sln 21 | ``` 22 | 23 | Select Test_Gui project and type Ctrl+F5 to build and run it. 24 | 25 | ### macOS : 26 | 27 | ``` shell 28 | mkdir build && cd build 29 | cmake .. -G "Xcode" 30 | open ./Test_Gui.xcodeproj 31 | ``` 32 | 33 | Select Test_Gui project and type Cmd+R to build and run it. 34 | 35 | ### Linux : 36 | 37 | ``` shell 38 | mkdir build && cd build 39 | cmake .. 40 | cmake --build . --config Debug 41 | ./Test_Gui 42 | ``` 43 | -------------------------------------------------------------------------------- /src/Containers/Group/Group.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | namespace Examples { 6 | class Main_Window : public Fl_Window { 7 | public: 8 | Main_Window() : Fl_Window {200, 100, 640, 480, "Group example"} { 9 | group1.align(FL_ALIGN_TOP | FL_ALIGN_LEFT); 10 | group1.box(FL_GTK_DOWN_BOX); 11 | 12 | group2.align(FL_ALIGN_TOP | FL_ALIGN_LEFT); 13 | group2.box(FL_GTK_DOWN_BOX); 14 | } 15 | 16 | private: 17 | Fl_Group group1 {10, 25, 305, 445, "Group 1"}; 18 | Fl_End end_group1; 19 | Fl_Group group2 {325, 25, 305, 445}; 20 | Fl_End end_group2; 21 | }; 22 | } 23 | 24 | auto main(int argc, char *argv[]) -> int { 25 | auto window = Examples::Main_Window {}; 26 | window.show(argc, argv); 27 | return Fl::run(); 28 | } 29 | -------------------------------------------------------------------------------- /src/Dialogs/Alert/Alert.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | namespace Examples { 9 | class Main_Window : public Fl_Window { 10 | public: 11 | Main_Window() : Fl_Window {200, 100, 300, 300, "Alert example"} { 12 | end(); 13 | button_show_message.callback([](Fl_Widget* sender, void* data) { 14 | fl_message_title("Alert"); 15 | fl_alert("This is a warning description."); 16 | }, this); 17 | } 18 | 19 | private: 20 | Fl_Button button_show_message {10, 10, 100, 25, "Alert"}; 21 | }; 22 | } 23 | 24 | auto main(int argc, char *argv[]) -> int { 25 | auto window = Examples::Main_Window {}; 26 | window.show(argc, argv); 27 | return Fl::run(); 28 | } 29 | -------------------------------------------------------------------------------- /src/Dialogs/Message/Message.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | namespace Examples { 9 | class Main_Window : public Fl_Window { 10 | public: 11 | Main_Window() : Fl_Window {200, 100, 300, 300, "Message example"} { 12 | end(); 13 | button_show_message.callback([](Fl_Widget* sender, void* data) { 14 | fl_message_title("Message"); 15 | fl_message("This is a message description."); 16 | }, nullptr); 17 | } 18 | 19 | private: 20 | Fl_Button button_show_message {10, 10, 100, 25, "Message"}; 21 | }; 22 | } 23 | 24 | auto main(int argc, char *argv[]) -> int { 25 | auto window = Examples::Main_Window {}; 26 | window.show(argc, argv); 27 | return Fl::run(); 28 | } 29 | -------------------------------------------------------------------------------- /src/Controls/Clock/Clock.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | namespace Examples { 6 | class Main_Window : public Fl_Window { 7 | public: 8 | Main_Window() : Fl_Window {200, 100, 300, 300, "Clock example"} { 9 | clock1.box(Fl_Boxtype::FL_FLAT_BOX); 10 | } 11 | 12 | private: 13 | auto handle(int event) ->int override { 14 | if (event == FL_RELEASE) { 15 | clock1.type(clock1.type() == FL_SQUARE_CLOCK ? FL_ROUND_CLOCK : FL_SQUARE_CLOCK); 16 | clock1.redraw(); 17 | } 18 | return Fl_Window::handle(event); 19 | } 20 | 21 | Fl_Clock clock1 {10, 10, 280, 280}; 22 | }; 23 | } 24 | 25 | auto main(int argc, char *argv[]) -> int { 26 | auto window = Examples::Main_Window {}; 27 | window.show(argc, argv); 28 | return Fl::run(); 29 | } 30 | -------------------------------------------------------------------------------- /src/Events/Window_Click/Window_Click.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | namespace Examples { 6 | class Main_Window : public Fl_Window { 7 | public: 8 | Main_Window() : Fl_Window {200, 100, 300, 300, "Click anywhere on the window"} {} 9 | 10 | auto handle(int event) noexcept -> int override { 11 | if (event == FL_RELEASE && Fl::event_button() == FL_LEFT_MOUSE) { 12 | fl_message_hotspot(false); 13 | fl_message_title("Main_Window_Click"); 14 | fl_message("The window is clicked at {x=%d, y=%d}", Fl::event_x(), Fl::event_y()); 15 | } 16 | return Fl_Window::handle(event); 17 | } 18 | }; 19 | } 20 | 21 | auto main(int argc, char *argv[]) -> int { 22 | auto window = Examples::Main_Window {}; 23 | window.show(argc, argv); 24 | return Fl::run(); 25 | } 26 | -------------------------------------------------------------------------------- /src/Containers/README.md: -------------------------------------------------------------------------------- 1 | # Containers 2 | 3 | * [Group](Group/README.md) shows how to create a group with [Fl_Group](https://www.fltk.org/doc-1.3/classFl__Group.html). 4 | * [Pack](Pack/README.md) shows how to create a pack with [Fl_Pack](https://www.fltk.org/doc-1.3/classFl__Pack.html). 5 | * [Scroll](Scroll/README.md) shows how to create a scroll with [Fl_Scroll](https://www.fltk.org/doc-1.3/classFl__Scroll.html). 6 | * [Tabs](Tabs/README.md) shows how to create a tabs and pages with [Fl_Tabs](https://www.fltk.org/doc-1.3/classFl__Tabs.html) and [Fl_Group](https://www.fltk.org/doc-1.3/classFl__Group.html). 7 | * [Tile](Tile/README.md) shows how to create a tile with [Fl_Tile](https://www.fltk.org/doc-1.3/classFl__Tile.html). 8 | * [Wizard](Wizard/README.md) shows how to create a Wizard and pages with [Fl_Wizard](https://www.fltk.org/doc-1.3/classFl__Wizard.html) and [Fl_Group](https://www.fltk.org/doc-1.3/classFl__Group.html). 9 | -------------------------------------------------------------------------------- /src/Hello_Worlds/Hello_World_Emoticons/Hello_World_Emoticons.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | namespace Examples { 7 | class Main_Window : public Fl_Window { 8 | public: 9 | Main_Window() : Fl_Window {200, 100, 300, 300, "Hello world (emoticons)"} { 10 | box1.labelsize(72); 11 | auto text_width = 0; 12 | auto text_height = 0; 13 | fl_font(box1.labelfont(), box1.labelsize()); 14 | fl_measure(box1.label(), text_width, text_height); 15 | box1.size(text_width, text_height); 16 | size(text_width, text_height); 17 | } 18 | 19 | private: 20 | Fl_Box box1 {0, 0, 300, 300, u8"\U0001F44B, \U0001F30E\U00002757"}; 21 | }; 22 | } 23 | 24 | auto main(int argc, char *argv[]) -> int { 25 | auto window = Examples::Main_Window {}; 26 | window.show(argc, argv); 27 | return Fl::run(); 28 | } 29 | -------------------------------------------------------------------------------- /src/Controls/Box/README.md: -------------------------------------------------------------------------------- 1 | # Box 2 | 3 | Shows how to use a text with [Fl_Box](https://www.fltk.org/doc-1.3/classFl__Box.html) widget. 4 | 5 | ## Source 6 | 7 | [Box.cpp](Box.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Box.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Box.sln 25 | ``` 26 | 27 | Select Box project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Box.xcodeproj 35 | ``` 36 | 37 | Select Box project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Box 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Hello_Worlds/Hello_World_Box/Hello_World_Box.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | namespace Examples { 6 | class Main_Window : public Fl_Window { 7 | public: 8 | Main_Window() : Fl_Window {200, 100, 300, 300, "Hello world (box)"} { 9 | box1.align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE | FL_ALIGN_CLIP | FL_ALIGN_WRAP); 10 | box1.labelfont(box1.labelfont() | FL_BOLD | FL_ITALIC); 11 | box1.labelsize(36); 12 | box1.labelcolor(fl_rgb_color(0x00, 0x80, 0x00)); 13 | box1.labeltype(FL_SHADOW_LABEL); 14 | 15 | resizable(this); 16 | position((Fl::w() - w())/2, (Fl::h() - h())/2); 17 | } 18 | 19 | private: 20 | Fl_Box box1 {0, 0, 300, 300, "Hello, World!"}; 21 | }; 22 | } 23 | 24 | auto main(int argc, char *argv[]) -> int { 25 | auto window = Examples::Main_Window {}; 26 | window.show(argc, argv); 27 | return Fl::run(); 28 | } 29 | -------------------------------------------------------------------------------- /src/Containers/Pack/README.md: -------------------------------------------------------------------------------- 1 | # Pack 2 | 3 | Shows how to create a pack with [Fl_Pack](https://www.fltk.org/doc-1.3/classFl__Pack.html). 4 | 5 | ## Source 6 | 7 | [Pack.cpp](Pack.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Pack.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Pack.sln 25 | ``` 26 | 27 | Select Pack project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Pack.xcodeproj 35 | ``` 36 | 37 | Select Pack project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Pack 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Containers/Tile/README.md: -------------------------------------------------------------------------------- 1 | # Tile 2 | 3 | Shows how to create a tile with [Fl_Tile](https://www.fltk.org/doc-1.3/classFl__Tile.html). 4 | 5 | ## Source 6 | 7 | [Tile.cpp](Tile.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Tile.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Tile.sln 25 | ``` 26 | 27 | Select Tile project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Tile.xcodeproj 35 | ``` 36 | 37 | Select Tile project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Tile 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Controls/Tree/README.md: -------------------------------------------------------------------------------- 1 | # Tree 2 | 3 | Shows how to create a tree with [Fl_Tree](https://www.fltk.org/doc-1.3/classFl__Tree.html) widget. 4 | 5 | ## Source 6 | 7 | [Tree.cpp](Tree.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Tree.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Tree.sln 25 | ``` 26 | 27 | Select Tree project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Tree.xcodeproj 35 | ``` 36 | 37 | Select Tree project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Tree 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Containers/Group/README.md: -------------------------------------------------------------------------------- 1 | # Group 2 | 3 | Shows how to create a group with [Fl_Group](https://www.fltk.org/doc-1.3/classFl__Group.html). 4 | 5 | ## Source 6 | 7 | [Group.cpp](Group.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Group.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Group.sln 25 | ``` 26 | 27 | Select Group project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Group.xcodeproj 35 | ``` 36 | 37 | Select Group project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Group 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Controls/Table/README.md: -------------------------------------------------------------------------------- 1 | # Table 2 | 3 | Shows how to usea table with [Fl_Table](https://www.fltk.org/doc-1.3/classFl__Table.html) widget. 4 | 5 | ## Source 6 | 7 | [Table.cpp](Table.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Table.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Table.sln 25 | ``` 26 | 27 | Select Table project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Table.xcodeproj 35 | ``` 36 | 37 | Select Table project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Table 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Controls/Clock/README.md: -------------------------------------------------------------------------------- 1 | # Clock 2 | 3 | Shows how to create a clock with [Fl_Clock](https://www.fltk.org/doc-1.3/classFl__Clock.html) widget. 4 | 5 | ## Source 6 | 7 | [Clock.cpp](Clock.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Clock.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Clock.sln 25 | ``` 26 | 27 | Select Clock project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Clock.xcodeproj 35 | ``` 36 | 37 | Select Clock project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Clock 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Controls/Clock_Output/Clock_Output.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | namespace Examples { 6 | class Main_Window : public Fl_Window { 7 | public: 8 | Main_Window() : Fl_Window {200, 100, 300, 300, "Clock output example"} { 9 | clock_output1.box(Fl_Boxtype::FL_FLAT_BOX); 10 | clock_output1.value(10, 10, 30); 11 | } 12 | 13 | private: 14 | auto handle(int event) -> int override { 15 | if (event == FL_RELEASE) { 16 | clock_output1.type(clock_output1.type() == FL_SQUARE_CLOCK ? FL_ROUND_CLOCK : FL_SQUARE_CLOCK); 17 | clock_output1.redraw(); 18 | } 19 | return Fl_Window::handle(event); 20 | } 21 | 22 | Fl_Clock_Output clock_output1 {10, 10, 280, 280}; 23 | }; 24 | } 25 | 26 | auto main(int argc, char *argv[]) -> int { 27 | auto window = Examples::Main_Window {}; 28 | window.show(argc, argv); 29 | return Fl::run(); 30 | } 31 | -------------------------------------------------------------------------------- /src/Controls/Input/README.md: -------------------------------------------------------------------------------- 1 | # Input 2 | 3 | Shows how to create a text input with [Fl_Input](https://www.fltk.org/doc-1.3/classFl__Input.html) widget. 4 | 5 | ## Source 6 | 7 | [Input.cpp](Input.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Input.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Input.sln 25 | ``` 26 | 27 | Select Input project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Input.xcodeproj 35 | ``` 36 | 37 | Select Input project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Input 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Containers/Scroll/README.md: -------------------------------------------------------------------------------- 1 | # Scroll 2 | 3 | Shows how to create a scroll with [Fl_Scroll](https://www.fltk.org/doc-1.3/classFl__Scroll.html). 4 | 5 | ## Source 6 | 7 | [Scroll.cpp](Scroll.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Scroll.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Scroll.sln 25 | ``` 26 | 27 | Select Scroll project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Scroll.xcodeproj 35 | ``` 36 | 37 | Select Scroll project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Scroll 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Controls/Int_Input/README.md: -------------------------------------------------------------------------------- 1 | # Int_Input 2 | 3 | Shows how to create int input with [Fl_Int_Input](https://www.fltk.org/doc-1.3/classFl__Int__Input.html) widget. 4 | 5 | ## Source 6 | 7 | [Box.cpp](Box.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Int_Input.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Box.sln 25 | ``` 26 | 27 | Select Box project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Box.xcodeproj 35 | ``` 36 | 37 | Select Box project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Box 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Components/Symbols/README.md: -------------------------------------------------------------------------------- 1 | # Symbols 2 | 3 | Shows how to use symbols with [Fl_Box](https://www.fltk.org/doc-1.3/classFl__Box.html) widget. 4 | 5 | ## Source 6 | 7 | [Symbols.cpp](Symbols.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Symbols.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Symbols.sln 25 | ``` 26 | 27 | Select Symbols project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Symbols.xcodeproj 35 | ``` 36 | 37 | Select Symbols project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Symbols 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Controls/Button/README.md: -------------------------------------------------------------------------------- 1 | # Button 2 | 3 | Shows how to create a button with [Fl_Button](https://www.fltk.org/doc-1.3/classFl__Button.html) widget. 4 | 5 | ## Source 6 | 7 | [Button.cpp](Button.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Button.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Button.sln 25 | ``` 26 | 27 | Select Button project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Button.xcodeproj 35 | ``` 36 | 37 | Select Button project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Button 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Controls/Clock/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Clock) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Clock.cpp) 15 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 16 | if (APPLE) 17 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 18 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 19 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 20 | endif() 21 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 22 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 23 | -------------------------------------------------------------------------------- /src/Windows/Window/README.md: -------------------------------------------------------------------------------- 1 | # Window 2 | 3 | Shows how to create a simple window with [Fl_Window](https://www.fltk.org/doc-1.3/classFl__Window.html). 4 | 5 | ## Source 6 | 7 | [Window.cpp](Window.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Window.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Window.sln 25 | ``` 26 | 27 | Select Window project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Window.xcodeproj 35 | ``` 36 | 37 | Select Window project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Window 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Controls/Output/README.md: -------------------------------------------------------------------------------- 1 | # Output 2 | 3 | Shows how to create a text output with [Fl_Output](https://www.fltk.org/doc-1.3/classFl__Output.html) widget. 4 | 5 | ## Source 6 | 7 | [Output.cpp](Output.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Output.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Output.sln 25 | ``` 26 | 27 | Select Output project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Output.xcodeproj 35 | ``` 36 | 37 | Select Output project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Output 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Controls/Roller/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Roller) 5 | find_package(FLTK REQUIRED) 6 | 7 | if (MSVC) 8 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 9 | endif () 10 | set(CMAKE_CXX_STANDARD 17) 11 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 12 | 13 | # Application 14 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Roller.cpp) 15 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 16 | if (APPLE) 17 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 18 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 19 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 20 | endif() 21 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 22 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 23 | -------------------------------------------------------------------------------- /src/Controls/Box/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Box) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Box.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Controls/Browser/README.md: -------------------------------------------------------------------------------- 1 | # Browser 2 | 3 | Shows how to create text list with [Fl_Browser](https://www.fltk.org/doc-1.3/classFl__Browser.html) widget. 4 | 5 | ## Source 6 | 7 | [Browser.cpp](Browser.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Browser.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Browser.sln 25 | ``` 26 | 27 | Select Browser project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Browser.xcodeproj 35 | ``` 36 | 37 | Select Browser project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Browser 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Controls/Button/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Button) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(Button WIN32 MACOSX_BUNDLE Button.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Controls/Spinner/README.md: -------------------------------------------------------------------------------- 1 | # Spinner 2 | 3 | Shows how to create a spinner with [Fl_Spinner](https://www.fltk.org/doc-1.3/classFl__Spinner.html) widget. 4 | 5 | ## Source 6 | 7 | [Spinner.cpp](Spinner.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Spinner.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Spinner.sln 25 | ``` 26 | 27 | Select Spinner project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Spinner.xcodeproj 35 | ``` 36 | 37 | Select Spinner project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Spinner 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Dialogs/Beep/README.md: -------------------------------------------------------------------------------- 1 | # Beep 2 | 3 | Shows how to use a beep with [fl_beep](https://www.fltk.org/doc-1.3/group__group__comdlg.html#ga7df367b297d2b2d1af087e1adbf3c265) method. 4 | 5 | ## Source 6 | 7 | [Beep.cpp](Beep.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Beep.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Beep.sln 25 | ``` 26 | 27 | Select Beep project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Beep.xcodeproj 35 | ``` 36 | 37 | Select Beep project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Beep 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Components/Tooltip/README.md: -------------------------------------------------------------------------------- 1 | # Tooltip 2 | 3 | Shows how to create a tooltip with [Fl_Tooltip](https://www.fltk.org/doc-1.3/classFl__Tooltip.html) component. 4 | 5 | ## Source 6 | 7 | [Tooltip.cpp](Tooltip.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Tooltip.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Tooltip.sln 25 | ``` 26 | 27 | Select Tooltip project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Tooltip.xcodeproj 35 | ``` 36 | 37 | Select Tooltip project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Tooltip 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Containers/Tabs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Tabs) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Project 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Tabs.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Containers") 24 | -------------------------------------------------------------------------------- /src/Controls/Dial/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Dial) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Dial.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Controls/Text_Display/README.md: -------------------------------------------------------------------------------- 1 | # Text_Display 2 | 3 | Shows how to use a text display with Fl_Text_Display widget. 4 | 5 | ## Source 6 | 7 | [Text_Display.cpp](Text_Display.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Text_Display.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Text_Display.sln 25 | ``` 26 | 27 | Select Text_Display project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Text_Display.xcodeproj 35 | ``` 36 | 37 | Select Text_Display project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Text_Display 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Controls/Tree/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Tree) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Tree.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Dialogs/About/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(About) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE About.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Dialogs") 24 | -------------------------------------------------------------------------------- /src/Dialogs/Alert/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Alert) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Alert.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Dialogs") 24 | -------------------------------------------------------------------------------- /src/Dialogs/Beep/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Beep) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Beep.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Dialogs") 24 | -------------------------------------------------------------------------------- /src/Applications/Application/README.md: -------------------------------------------------------------------------------- 1 | # Application 2 | 3 | Shows how to create a simple [FLTK](https://www.fltk.org) application. 4 | 5 | ## Source 6 | 7 | [Application.cpp](Application.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Application.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Application.sln 25 | ``` 26 | 27 | Select Application project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Application.xcodeproj 35 | ``` 36 | 37 | Select Application project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Application 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Components/Timer/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Timer) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Timer.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Components") 24 | -------------------------------------------------------------------------------- /src/Containers/Group/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Group) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Group.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Containers") 24 | -------------------------------------------------------------------------------- /src/Containers/Pack/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Pack) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Pack.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Containers") 24 | -------------------------------------------------------------------------------- /src/Containers/Scroll/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Scroll) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Project 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Scroll.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Containers") 24 | -------------------------------------------------------------------------------- /src/Containers/Tile/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Tile) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Tile.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Containers") 24 | -------------------------------------------------------------------------------- /src/Controls/Input/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Input) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Input.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Controls/Output/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Output) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Output.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Controls/Secret_Input/Secret_Input.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | namespace Examples { 7 | class Main_Window : public Fl_Window { 8 | public: 9 | Main_Window() : Fl_Window {200, 100, 300, 300, "Secret input example"} { 10 | input1.value("123456"); 11 | input1.when(FL_WHEN_CHANGED); 12 | input1.callback([](Fl_Widget* sender, void* window) { 13 | reinterpret_cast(window)->box1.label(reinterpret_cast(window)->input1.value()); 14 | }, this); 15 | 16 | box1.align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE | FL_ALIGN_CLIP); 17 | } 18 | 19 | private: 20 | Fl_Secret_Input input1 {10, 10, 100, 25}; 21 | Fl_Box box1 {10, 50, 100, 25, "123456"}; 22 | }; 23 | } 24 | 25 | auto main(int argc, char *argv[]) -> int { 26 | auto window = Examples::Main_Window {}; 27 | window.show(argc, argv); 28 | return Fl::run(); 29 | } 30 | -------------------------------------------------------------------------------- /src/Controls/Slider/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Slider) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Slider.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Controls/Table/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Table) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Table.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Dialogs/Choice/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Project 4 | project(Choice) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Choice.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Dialogs") 24 | -------------------------------------------------------------------------------- /src/Dialogs/Message/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Message) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Message.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Dialogs") 24 | -------------------------------------------------------------------------------- /src/Tests/Test_Gui/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Test_Gui) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Test_Gui.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Tests") 24 | -------------------------------------------------------------------------------- /src/Windows/Window/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Window) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Window.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Windows") 24 | -------------------------------------------------------------------------------- /src/Containers/Wizard/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Wizard) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | Add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Wizard.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Containers") 24 | -------------------------------------------------------------------------------- /src/Controls/Adjuster/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Adjuster) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Adjuster.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Controls/Adjuster/README.md: -------------------------------------------------------------------------------- 1 | # Adjuster 2 | 3 | Shows how to create adjusters with [Fl_Adjuster](https://www.fltk.org/doc-1.3/classFl__Adjuster.html) valuator. 4 | 5 | ## Source 6 | 7 | [Adjuster.cpp](Adjuster.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Adjuster.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Adjuster.sln 25 | ``` 26 | 27 | Select Adjuster project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Adjuster.xcodeproj 35 | ``` 36 | 37 | Select Adjuster project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Adjuster 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Controls/Browser/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Browser) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Browser.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Controls/Counter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Counter) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Counter.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Controls/Progress/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Progress) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Progress.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Controls/Progress/README.md: -------------------------------------------------------------------------------- 1 | # Progress 2 | 3 | Shows how to create a progress with [Fl_Progress](https://www.fltk.org/doc-1.3/classFl__Progress.html) widget. 4 | 5 | ## Source 6 | 7 | [Progress.cpp](Progress.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Progress.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Progress.sln 25 | ``` 26 | 27 | Select Progress project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Progress.xcodeproj 35 | ``` 36 | 37 | Select Progress project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Progress 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Controls/Roller/README.md: -------------------------------------------------------------------------------- 1 | # Roller 2 | 3 | Shows how to create rollers (horizontal and vertical) with [Fl_Roller](https://www.fltk.org/doc-1.3/classFl__Roller.html) valuator. 4 | 5 | ## Source 6 | 7 | [Roller.cpp](Roller.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Roller.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Roller.sln 25 | ``` 26 | 27 | Select Roller project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Roller.xcodeproj 35 | ``` 36 | 37 | Select Roller project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Roller 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Controls/Spinner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Spinner) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Spinner.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Dialogs/Alert/README.md: -------------------------------------------------------------------------------- 1 | # Alert 2 | 3 | Shows how to use alert box with [fl_alert](https://www.fltk.org/doc-1.3/group__group__comdlg.html#gae998e9cd38954bfde24bd20e550e9b8a) method. 4 | 5 | ## Source 6 | 7 | [Alert.cpp](Alert.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Alert.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Alert.sln 25 | ``` 26 | 27 | Select Alert project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Alert.xcodeproj 35 | ``` 36 | 37 | Select Alert project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Alert 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Dialogs/Password/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Password) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Password.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Dialogs") 24 | -------------------------------------------------------------------------------- /src/Tips_And_Tricks/Widget_Wrapper/Fl_Widget_Wrapper.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | 6 | template 7 | class Fl_Widget_Wrapper : public widget_t { 8 | public: 9 | template 10 | Fl_Widget_Wrapper(args_type&& ...args) : widget_t(args...) { 11 | widget_t::callback(on_callback); 12 | } 13 | 14 | template 15 | void callback(callback_t&& callback) { 16 | callback_ = callback; 17 | } 18 | 19 | template 20 | void callback(callback_t&& callback, std::any arg) { 21 | callback_ = callback; 22 | arg_ = arg; 23 | } 24 | 25 | private: 26 | static void on_callback(Fl_Widget* sender, void* data) { 27 | auto widget = dynamic_cast*>(sender); 28 | widget->callback_(*sender, widget->arg_); 29 | } 30 | 31 | std::function callback_; 32 | std::any arg_; 33 | }; 34 | -------------------------------------------------------------------------------- /src/Components/Schemes/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Schemes) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Opttions 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Schemes.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Components") 24 | -------------------------------------------------------------------------------- /src/Components/Symbols/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Symbols) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Symbols.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Components") 24 | -------------------------------------------------------------------------------- /src/Components/Tooltip/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Tooltip) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Tooltip.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Components") 24 | -------------------------------------------------------------------------------- /src/Controls/Int_Input/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Int_Input) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Int_Input.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Dialogs/About/README.md: -------------------------------------------------------------------------------- 1 | # About 2 | 3 | Shows how to use message box with [fl_message](https://www.fltk.org/doc-1.3/group__group__comdlg.html#ga570c50cf7641b7d85f949b6d61f51c43) method. 4 | 5 | ## Source 6 | 7 | [About.cpp](About.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/About.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start About.sln 25 | ``` 26 | 27 | Select About project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./About.xcodeproj 35 | ``` 36 | 37 | Select About project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./About 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Components/Schemes/README.md: -------------------------------------------------------------------------------- 1 | # Schemes 2 | 3 | Shows how to use schemes with [Fl::scheme](https://www.fltk.org/doc-1.3/classFl.html#a9d070bb1d5a24c28beab53a70af095a4) methods. 4 | 5 | ## Source 6 | 7 | [Schemes.cpp](Schemes.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Schemes.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Schemes.sln 25 | ``` 26 | 27 | Select Schemes project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Schemes.xcodeproj 35 | ``` 36 | 37 | Select Schemes project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Schemes 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Controls/File_Input/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(File_Input) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE File_Input.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Controls/Float_Input/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Float_Input) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Float_Input.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Controls/Nice_Slider/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Nice_Slider) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Nice_Slider.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Controls/Text_Editor/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Text_Editor) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Text_Editor.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Controls/Value_Input/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Value_Input) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Value_Input.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Dialogs/Choice/README.md: -------------------------------------------------------------------------------- 1 | # Choice 2 | 3 | Shows how to use choice box with [fl_choice](https://www.fltk.org/doc-1.3/group__group__comdlg.html#ga36c19b29fcd5c261f3eafdf9f7126b16) method. 4 | 5 | ## Source 6 | 7 | [Choice.cpp](Choice.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Choice.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Choice.sln 25 | ``` 26 | 27 | Select Choice project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Choice.xcodeproj 35 | ``` 36 | 37 | Select Choice project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Choice 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Dialogs/Input_Dialog/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Input_Dialog) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Input_Dialog.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Dialogs") 24 | -------------------------------------------------------------------------------- /src/Events/Window_Click/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Window_Click) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Window_Click.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Events") 24 | -------------------------------------------------------------------------------- /src/Menus_And_Toolbars/Menu_Bar/README.md: -------------------------------------------------------------------------------- 1 | # Menu_Bar 2 | 3 | Shows how to create a menu bar with [Fl_Menu_Bar](https://www.fltk.org/doc-1.3/classFl__Menu__Bar.html) widget. 4 | 5 | ## Source 6 | 7 | [Menu_Bar.cpp](Menu_Bar.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Menu_Bar.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Menu_Bar.sln 25 | ``` 26 | 27 | Select Menu_Bar project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Menu_Bar.xcodeproj 35 | ``` 36 | 37 | Select Menu_Bar project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Menu_Bar 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Others/Colored_Tabs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Colored_Tabs) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Applicattion 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Colored_Tabs.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Others") 24 | -------------------------------------------------------------------------------- /src/Tips_And_Tricks/Disable_Symbols/README.md: -------------------------------------------------------------------------------- 1 | # Disable_Symbols 2 | 3 | Shows how to disable / enable label symbols. 4 | 5 | ## Source 6 | 7 | [Disable_Symbols.cpp](Disable_Symbols.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Disable_Symbols.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Disable_Symbols.sln 25 | ``` 26 | 27 | Select Disable_Symbols project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Disable_Symbols.xcodeproj 35 | ``` 36 | 37 | Select Disable_Symbols project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Disable_Symbols 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Components/Preferences/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Preferences) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Preferences.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Components") 24 | -------------------------------------------------------------------------------- /src/Controls/Check_Browser/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Check_Browser) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Check_Browser.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Controls/Check_Button/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Check_Button) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Check_Button.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Controls/Clock_Output/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Clock_Output) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Clock_Output.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Controls/Color_Chooser/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Color_Chooser) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Color_Chooser.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Controls/File_Browser/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(File_Browser) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE File_Browser.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Controls/Light_Button/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Light_Button) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Light_Button.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Controls/Round_Button/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Round_Button) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Round_Button.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Controls/Secret_Input/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Secret_Input) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Secret_Input.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Controls/Text_Display/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Text_Display) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Text_Display.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Controls/Toggle_Button/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Toggle_Button) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Toggle_Button.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Controls/Value_Output/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Value_Output) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Value_Output.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Controls/Value_Slider/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Value_Slider) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Value_Slider.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Hello_Worlds/Hello_World_Say/README.md: -------------------------------------------------------------------------------- 1 | # Hello_World_Say 2 | 3 | The classic first application "Hello World" with say. 4 | 5 | ## Source 6 | 7 | [Hello_World_Say.cpp](Hello_World_Say.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Hello_World_Say.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Hello_World_Say.sln 25 | ``` 26 | 27 | Select Hello_World_Say project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Hello_World_Say.xcodeproj 35 | ``` 36 | 37 | Select Hello_World_Say project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Hello_World_Say 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Applications/Application/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Project 4 | project(Application) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Application.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Applications") 24 | -------------------------------------------------------------------------------- /src/Components/Cursors/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Cursors) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Cursors.cpp Fl_Test_Cursor.h) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Components") 24 | -------------------------------------------------------------------------------- /src/Containers/Tabs/README.md: -------------------------------------------------------------------------------- 1 | # Tabs 2 | 3 | Shows how to create a tabs and pages with [Fl_Tabs](https://www.fltk.org/doc-1.3/classFl__Tabs.html) and [Fl_Group](https://www.fltk.org/doc-1.3/classFl__Group.html). 4 | 5 | ## Source 6 | 7 | [Tabs.cpp](Tabs.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Tabs.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Tabs.sln 25 | ``` 26 | 27 | Select Tabs project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Tabs.xcodeproj 35 | ``` 36 | 37 | Select Tabs project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Tabs 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Controls/Box_Picture/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Box_Picture) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Box_Picture.cpp logo.xpm) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Events/Application_Idle/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Application_Idle) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Application_Idle.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Events") 24 | -------------------------------------------------------------------------------- /src/Events/Key_Events/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Key_Events) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Key_Events.cpp Fl_Trace_Window.h) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Events") 24 | -------------------------------------------------------------------------------- /src/Menus_And_Toolbars/Menu_Bar/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Menu_Bar) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Menu_Bar.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Menus_And_Toolbars") 24 | -------------------------------------------------------------------------------- /src/Others/Colored_Browser/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Colored_Browser) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Colored_Browser.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Others") 24 | -------------------------------------------------------------------------------- /src/Others/Colored_Windows/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Colored_Windows) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Colored_Windows.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Others") 24 | -------------------------------------------------------------------------------- /src/Controls/File_Input/README.md: -------------------------------------------------------------------------------- 1 | # File_Input 2 | 3 | Shows how to create a file input with [Fl_File_Input](https://www.fltk.org/doc-1.3/classFl__File__Input.html) widget. 4 | 5 | ## Source 6 | 7 | [File_Input.cpp](File_Input.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/File_Input.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start File_Input.sln 25 | ``` 26 | 27 | Select File_Input project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./File_Input.xcodeproj 35 | ``` 36 | 37 | Select File_Input project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./File_Input 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Controls/Multiline_Input/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Multiline_Input) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Multiline_Input.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Controls/Multiline_Output/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Multiline_Output) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Multiline_Output.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Dialogs/Message/README.md: -------------------------------------------------------------------------------- 1 | # Message 2 | 3 | Shows how to use message box with [fl_message](https://www.fltk.org/doc-1.3/group__group__comdlg.html#ga570c50cf7641b7d85f949b6d61f51c43) method. 4 | 5 | ## Source 6 | 7 | [Message.cpp](Message.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Message.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Message.sln 25 | ``` 26 | 27 | Select Message project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Message.xcodeproj 35 | ``` 36 | 37 | Select Message project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Message 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Hello_Worlds/Hello_World_Message/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Project 4 | project(Hello_World_Message) 5 | find_package(FLTK REQUIRED) 6 | 7 | if (MSVC) 8 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 9 | endif () 10 | set(CMAKE_CXX_STANDARD 17) 11 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 12 | 13 | # Application 14 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Hello_World_Message.cpp) 15 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 16 | if (APPLE) 17 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 18 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 19 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 20 | endif() 21 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 22 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Hello_Worlds") 23 | -------------------------------------------------------------------------------- /src/Controls/Radio_Light_Button/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Radio_Light_Button) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Radio_Light_Button.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Controls/Radio_Round_Button/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Radio_Round_Button) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Radio_Round_Button.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Controls") 24 | -------------------------------------------------------------------------------- /src/Events/Mouse_Events/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Mouse_Events) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Mouse_Events.cpp Fl_Trace_Window.h) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Events") 24 | -------------------------------------------------------------------------------- /src/Hello_Worlds/Hello_World_Box/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Project 4 | project(Hello_World_Box) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Hello_World_Box.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Hello_Worlds") 24 | -------------------------------------------------------------------------------- /src/Hello_Worlds/Hello_World_Say/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Project 4 | project(Hello_World_Say) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Hello_World_Say.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Hello_Worlds") 24 | -------------------------------------------------------------------------------- /src/Menus_And_Toolbars/Menu_Button/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Menu_Button) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Menu_Button.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Menus_And_Toolbars") 24 | -------------------------------------------------------------------------------- /src/User_Controls/Check_Box/README.md: -------------------------------------------------------------------------------- 1 | # Check_Box 2 | 3 | Shows how to create a check box with own [Fl_Check_Box](Fl_Check_Box.h) widget. 4 | 5 | ## Source 6 | 7 | [Check_Box.cpp](Check_Box.cpp) 8 | 9 | [Fl_Check_Box.h](Fl_Check_Box.h) 10 | 11 | [CMakeLists.txt](CMakeLists.txt) 12 | 13 | ## Output 14 | 15 | ![output](../../../docs/Pictures/Examples/Check_Box.png) 16 | 17 | ## Generate and build 18 | 19 | To build this project, open "Terminal" and type following lines: 20 | 21 | ### Windows : 22 | 23 | ``` shell 24 | mkdir build && cd build 25 | cmake .. 26 | start Check_Box.sln 27 | ``` 28 | 29 | Select Check_Box project and type Ctrl+F5 to build and run it. 30 | 31 | ### macOS : 32 | 33 | ``` shell 34 | mkdir build && cd build 35 | cmake .. -G "Xcode" 36 | open ./Check_Box.xcodeproj 37 | ``` 38 | 39 | Select Check_Box project and type Cmd+R to build and run it. 40 | 41 | ### Linux : 42 | 43 | ``` shell 44 | mkdir build && cd build 45 | cmake .. 46 | cmake --build . --config Debug 47 | ./Check_Box 48 | ``` 49 | -------------------------------------------------------------------------------- /src/Controls/Nice_Slider/README.md: -------------------------------------------------------------------------------- 1 | # Nice_Slider 2 | 3 | Shows how to create a slider with [Fl_Nice_Slider](https://www.fltk.org/doc-1.3/classFl__Nice__Slider.html) widget. 4 | 5 | ## Source 6 | 7 | [Nice_Slider.cpp](Nice_Slider.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Nice_Slider.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Nice_Slider.sln 25 | ``` 26 | 27 | Select Nice_Slider project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Nice_Slider.xcodeproj 35 | ``` 36 | 37 | Select Nice_Slider project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Nice_Slider 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Controls/Text_Editor/README.md: -------------------------------------------------------------------------------- 1 | # Text_Editor 2 | 3 | Shows how to use a text editor with [Fl_Text_Editor](https://www.fltk.org/doc-1.3/classFl__Text__Editor.html) widget. 4 | 5 | ## Source 6 | 7 | [Text_Editor.cpp](Text_Editor.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Text_Editor.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Text_Editor.sln 25 | ``` 26 | 27 | Select Text_Editor project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Text_Editor.xcodeproj 35 | ``` 36 | 37 | Select Text_Editor project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Text_Editor 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Dialogs/Color_Chooser_Dialog/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Soluttion 4 | project(Color_Chooser_Dialog) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Color_Chooser_Dialog.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Dialogs") 24 | -------------------------------------------------------------------------------- /src/Dialogs/Password/README.md: -------------------------------------------------------------------------------- 1 | # Password 2 | 3 | Shows how to use password box with [fl_password](https://www.fltk.org/doc-1.3/group__group__comdlg.html#ga46a734743667b14b086f72b3e5c3a858) method. 4 | 5 | ## Source 6 | 7 | [Password.cpp](Password.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Password.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Password.sln 25 | ``` 26 | 27 | Select Password project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Password.xcodeproj 35 | ``` 36 | 37 | Select Password project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Password 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Hello_Worlds/Hello_World_Fltk/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Project 4 | project(Hello_World_Fltk) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Hello_World_Fltk.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Hello_Worlds") 24 | -------------------------------------------------------------------------------- /src/Menus_And_Toolbars/Sys_Menu_Bar/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Soluttion 4 | project(Sys_Menu_Bar) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Sys_Menu_Bar.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Menus_And_Toolbars") 24 | -------------------------------------------------------------------------------- /src/Others/Box_And_Unicode_Text/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Box_And_Unicode_Text) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Box_And_Unicode_Text.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Others") 24 | -------------------------------------------------------------------------------- /src/Others/Colored_Text_Display/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Colored_Text_Display) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Colored_Text_Display.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Others") 24 | -------------------------------------------------------------------------------- /src/Tips_And_Tricks/Disable_Symbols/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Disable_Symbols) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Disable_Symbols.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Tips_And_Tricks") 24 | -------------------------------------------------------------------------------- /src/Components/Preferences/README.md: -------------------------------------------------------------------------------- 1 | # Preferences 2 | 3 | Shows how to use preferences with [Fl_Preferences](https://www.fltk.org/doc-1.3/classFl__Preferences.html) component. 4 | 5 | ## Source 6 | 7 | [Preferences.cpp](Preferences.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Preferences.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Preferences.sln 25 | ``` 26 | 27 | Select Preferences project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Preferences.xcodeproj 35 | ``` 36 | 37 | Select Preferences project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Preferences 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Controls/Float_Input/README.md: -------------------------------------------------------------------------------- 1 | # Float_Input 2 | 3 | Shows how to create a float input with [Fl_Float_Input](https://www.fltk.org/doc-1.3/classFl__Float__Input.html) widget. 4 | 5 | ## Source 6 | 7 | [Float_Input.cpp](Float_Input.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Float_Input.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Float_Input.sln 25 | ``` 26 | 27 | Select Float_Input project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Float_Input.xcodeproj 35 | ``` 36 | 37 | Select Float_Input project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Float_Input 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Controls/Value_Input/README.md: -------------------------------------------------------------------------------- 1 | # Value_Input 2 | 3 | Shows how to create a value input with [Fl_Value_Input](https://www.fltk.org/doc-1.3/classFl__Value__Input.html) valuator. 4 | 5 | ## Source 6 | 7 | [Value_Input.cpp](Value_Input.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Value_Input.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Value_Input.sln 25 | ``` 26 | 27 | Select Value_Input project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Value_Input.xcodeproj 35 | ``` 36 | 37 | Select Value_Input project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Value_Input 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Hello_Worlds/Hello_World_Drawing/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Project 4 | project(Hello_World_Drawing) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Hello_World_Drawing.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Hello_Worlds") 24 | -------------------------------------------------------------------------------- /src/Others/Group_And_Check_Button/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Group_And_Check_Button) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Group_And_Check_Button.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Others") 24 | -------------------------------------------------------------------------------- /src/Tips_And_Tricks/Functional/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Functional) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Functional.cpp fl_functional.h) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Tips_And_Tricks") 24 | -------------------------------------------------------------------------------- /src/User_Dialogs/Font_Chooser/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Font_Chooser) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Font_Chooser.cpp fl_font_chooser.h) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "User_Dialogs") 24 | -------------------------------------------------------------------------------- /src/Containers/Wizard/README.md: -------------------------------------------------------------------------------- 1 | # Wizard 2 | 3 | Shows how to create a wizard and pages with [Fl_Wizard](https://www.fltk.org/doc-1.3/classFl__Wizard.html) and [Fl_Group](https://www.fltk.org/doc-1.3/classFl__Group.html). 4 | 5 | ## Source 6 | 7 | [Wizard.cpp](Wizard.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Wizard.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Wizard.sln 25 | ``` 26 | 27 | Select Wizard project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Wizard.xcodeproj 35 | ``` 36 | 37 | Select Wizard project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Wizard 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Controls/Box_Picture/README.md: -------------------------------------------------------------------------------- 1 | # Box_Picture 2 | 3 | Shows how to use an image with [Fl_Box](https://www.fltk.org/doc-1.3/classFl__Box.html) widget. 4 | 5 | ## Source 6 | 7 | [Box_Picture.cpp](Box_Picture.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | [logo.xpm](logo.xpm) 12 | 13 | ## Output 14 | 15 | ![output](../../../docs/Pictures/Examples/Box_Picture.png) 16 | 17 | ## Generate and build 18 | 19 | To build this project, open "Terminal" and type following lines: 20 | 21 | ### Windows : 22 | 23 | ``` shell 24 | mkdir build && cd build 25 | cmake .. 26 | start Box_Picture.sln 27 | ``` 28 | 29 | Select Box_Picture project and type Ctrl+F5 to build and run it. 30 | 31 | ### macOS : 32 | 33 | ``` shell 34 | mkdir build && cd build 35 | cmake .. -G "Xcode" 36 | open ./Box_Picture.xcodeproj 37 | ``` 38 | 39 | Select Box_Picture project and type Cmd+R to build and run it. 40 | 41 | ### Linux : 42 | 43 | ``` shell 44 | mkdir build && cd build 45 | cmake .. 46 | cmake --build . --config Debug 47 | ./Box_Picture 48 | ``` 49 | -------------------------------------------------------------------------------- /src/Hello_Worlds/Hello_World_Message2/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Project 4 | project(Hello_World_Message2) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Hello_World_Message2.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Hello_Worlds") 24 | -------------------------------------------------------------------------------- /src/Hello_Worlds/Hello_World_Emoticons/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Project 4 | project(Hello_World_Emoticons) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Hello_World_Emoticons.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Hello_Worlds") 24 | -------------------------------------------------------------------------------- /src/Hello_Worlds/Hello_World_Fltk/README.md: -------------------------------------------------------------------------------- 1 | # Hello_World_Fltk 2 | 3 | The classic first application "Hello World" by [FLTK](https://www.fltk.org). 4 | 5 | ## Source 6 | 7 | [Hello_World_Fltk.cpp](Hello_World_Fltk.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Hello_World_Fltk.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Hello_World_Fltk.sln 25 | ``` 26 | 27 | Select Hello_World_Fltk project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Hello_World_Fltk.xcodeproj 35 | ``` 36 | 37 | Select Hello_World_Fltk project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Hello_World_Fltk 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Menus_And_Toolbars/Menu_Button/README.md: -------------------------------------------------------------------------------- 1 | # Menu_Button 2 | 3 | Shows how to create a menu button with [Fl_Menu_Button](https://www.fltk.org/doc-1.3/classFl__Menu__Button.html) widget. 4 | 5 | ## Source 6 | 7 | [Menu_Button.cpp](Menu_Button.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Menu_Button.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Menu_Button.sln 25 | ``` 26 | 27 | Select Menu_Button project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Menu_Button.xcodeproj 35 | ``` 36 | 37 | Select Menu_Button project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Menu_Button 46 | ``` 47 | -------------------------------------------------------------------------------- /src/User_Controls/Combo_Box/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Combo_Box) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Combo_Box.cpp Fl_Combo_Box.h Fl_Combo_Box_Style.h) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "User_Controls") 24 | -------------------------------------------------------------------------------- /src/Controls/Check_Button/README.md: -------------------------------------------------------------------------------- 1 | # Check_Button 2 | 3 | Shows how to create a check button with [Fl_Check_Button](https://www.fltk.org/doc-1.3/classFl__Check__Button.html) widget. 4 | 5 | ## Source 6 | 7 | [Check_Button.cpp](Check_Button.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Check_Button.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Check_Button.sln 25 | ``` 26 | 27 | Select Check_Button project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Check_Button.xcodeproj 35 | ``` 36 | 37 | Select Check_Button project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Check_Button 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Controls/Clock_Output/README.md: -------------------------------------------------------------------------------- 1 | # Clock_Output 2 | 3 | Shows how to create a static clock with [Fl_Clock_Output](https://www.fltk.org/doc-1.3/classFl__Clock__Output.html) widget. 4 | 5 | ## Source 6 | 7 | [Clock_Output.cpp](Clock_Output.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Clock_Output.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Clock_Output.sln 25 | ``` 26 | 27 | Select Clock_Output project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Clock_Output.xcodeproj 35 | ``` 36 | 37 | Select Clock_Output project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Clock_Output 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Controls/File_Browser/README.md: -------------------------------------------------------------------------------- 1 | # File_Browser 2 | 3 | Shows how to create a file browser with [Fl_File_Browser](https://www.fltk.org/doc-1.3/classFl__File__Browser.html) widget. 4 | 5 | ## Source 6 | 7 | [File_Browser.cpp](File_Browser.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/File_Browser.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start File_Browser.sln 25 | ``` 26 | 27 | Select File_Browser project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./File_Browser.xcodeproj 35 | ``` 36 | 37 | Select File_Browser project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./File_Browser 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Controls/Toggle_Button/README.md: -------------------------------------------------------------------------------- 1 | # Toggle_Button 2 | 3 | Shows how to create a toggle button with [Fl_Toggle_Button](https://www.fltk.org/doc-1.3/classFl__Toggle__Button.html) widget. 4 | 5 | ## Source 6 | 7 | [Toggle_Button.cpp](Toggle_Button.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Toggle_Button.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Toggle_Button.sln 25 | ``` 26 | 27 | Select Toggle_Button project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Toggle_Button.xcodeproj 35 | ``` 36 | 37 | Select Box project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Toggle_Button 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Controls/Value_Output/README.md: -------------------------------------------------------------------------------- 1 | # Value_Output 2 | 3 | Shows how to create a value output with [Fl_Value_Output](https://www.fltk.org/doc-1.3/classFl__Value__Output.html) valuator. 4 | 5 | ## Source 6 | 7 | [Value_Output.cpp](Value_Output.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Value_Output.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Value_Output.sln 25 | ``` 26 | 27 | Select Value_Output project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Value_Output.xcodeproj 35 | ``` 36 | 37 | Select Value_Output project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Value_Output 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Dialogs/Color_Chooser_Dialog/Color_Chooser_Dialog.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | namespace Examples { 7 | class Main_Window : public Fl_Window { 8 | public: 9 | Main_Window() : Fl_Window {200, 100, 300, 300, "Color chooser example"} { 10 | buttonShowMessage.callback([](Fl_Widget* sender, void* window) { 11 | uchar r = 0, g = 0, b = 0; 12 | Fl::get_color(reinterpret_cast(window)->color(), r, g, b); 13 | if (fl_color_chooser("Color", r, g, b) == 0) return; 14 | reinterpret_cast(window)->color(fl_rgb_color(r, g, b)); 15 | reinterpret_cast(window)->redraw(); 16 | }, this); 17 | } 18 | 19 | private: 20 | Fl_Button buttonShowMessage {10, 10, 75, 25, "Color..."}; 21 | }; 22 | } 23 | 24 | auto main(int argc, char *argv[]) -> int { 25 | auto window = Examples::Main_Window {}; 26 | window.show(argc, argv); 27 | return Fl::run(); 28 | } 29 | -------------------------------------------------------------------------------- /src/Tips_And_Tricks/Widget_Wrapper/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Widget_Wrapper) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Widget_Wrapper.cpp Fl_Widget_Wrapper.h) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Tips_And_Tricks") 24 | -------------------------------------------------------------------------------- /src/Controls/Light_Button/README.md: -------------------------------------------------------------------------------- 1 | # Light_Button 2 | 3 | Shows how to create a radio light button with [Fl_Light_Button](https://www.fltk.org/doc-1.3/classFl__Light__Button.html) widget. 4 | 5 | ## Source 6 | 7 | [Light_Button.cpp](Light_Button.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Light_Button.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Light_Button.sln 25 | ``` 26 | 27 | Select Light_Button project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Light_Button.xcodeproj 35 | ``` 36 | 37 | Select Light_Button project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Light_Button 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Controls/Round_Button/README.md: -------------------------------------------------------------------------------- 1 | # Round_Button 2 | 3 | Shows how to create a radio round button with [Fl_Round_Button](https://www.fltk.org/doc-1.3/classFl__Round__Button.html) widget. 4 | 5 | ## Source 6 | 7 | [Round_Button.cpp](Round_Button.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Round_Button.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Round_Button.sln 25 | ``` 26 | 27 | Select Round_Button project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Round_Button.xcodeproj 35 | ``` 36 | 37 | Select Round_Button project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Round_Button 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Controls/Secret_Input/README.md: -------------------------------------------------------------------------------- 1 | # Secret_Input 2 | 3 | Shows how to create a secret text input with [Fl_Secret_Input](https://www.fltk.org/doc-1.3/classFl__Secret__Input.html) widget. 4 | 5 | ## Source 6 | 7 | [Secret_Input.cpp](Secret_Input.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Secret_Input.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Secret_Input.sln 25 | ``` 26 | 27 | Select Secret_Input project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Secret_Input.xcodeproj 35 | ``` 36 | 37 | Select Secret_Input project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Secret_Input 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Events/Key_Events/README.md: -------------------------------------------------------------------------------- 1 | # Key_Events 2 | 3 | Demonstrates the use of [keyboard events](https://www.fltk.org/doc-1.3/events.html#events_keyboard). 4 | 5 | ## Source 6 | 7 | [Key_Events.cpp](Key_Events.cpp) 8 | 9 | [Fl_Trace_Window.h](Fl_Trace_Window.h) 10 | 11 | [CMakeLists.txt](CMakeLists.txt) 12 | 13 | ## Output 14 | 15 | ![output](../../../docs/Pictures/Examples/Key_Events.png) 16 | 17 | ## Generate and build 18 | 19 | To build this project, open "Terminal" and type following lines: 20 | 21 | ### Windows : 22 | 23 | ``` shell 24 | mkdir build && cd build 25 | cmake .. 26 | start Key_Events.sln 27 | ``` 28 | 29 | Select Key_Events project and type Ctrl+F5 to build and run it. 30 | 31 | ### macOS : 32 | 33 | ``` shell 34 | mkdir build && cd build 35 | cmake .. -G "Xcode" 36 | open ./Key_Events.xcodeproj 37 | ``` 38 | 39 | Select Key_Events project and type Cmd+R to build and run it. 40 | 41 | ### Linux : 42 | 43 | ``` shell 44 | mkdir build && cd build 45 | cmake .. 46 | cmake --build . --config Debug 47 | ./Key_Events 48 | ``` 49 | -------------------------------------------------------------------------------- /src/Events/README.md: -------------------------------------------------------------------------------- 1 | # Events 2 | 3 | * [Application_Idle](Application_Idle/README.md) shows how to use idle event with [Fl::add_idle](https://www.fltk.org/doc-1.3/classFl.html#a4e7a1b5d18c2f073238a8466a62a3e7a) method. 4 | * [Key_Events](Key_Events/README.md) demonstrates the use of [keyboard events](https://www.fltk.org/doc-1.3/events.html#events_keyboard). 5 | * [Mouse_Events](Mouse_Events/README.md) demonstrates the use of [mouse events](https://www.fltk.org/doc-1.3/events.html#events_mouse). 6 | * [Window_Click](Window_Click/README.md) shows how to use [mouse click event](https://www.fltk.org/doc-1.3/events.html#events_mouse) with override handle method and use [Fl::event_button](https://www.fltk.org/doc-1.3/group__fl__events.html#ga7ae6d99ceb1a2afb8a1dc4455ac941cd), [Fl::event_x](https://www.fltk.org/doc-1.3/group__fl__events.html#ga91585fcbaa1e79f7452fd2d16a82136e) and [Fl::event_y](https://www.fltk.org/doc-1.3/group__fl__events.html#ga192a0c5a37f33b9d117a69f20977c2a1) methods on [FL_RELEASE](https://www.fltk.org/doc-1.3/events.html#events_fl_release) event. 7 | -------------------------------------------------------------------------------- /src/Others/Group_And_Radio_Round_Button/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Group_And_Radio_Round_Button) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Group_And_Radio_Round_Button.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Others") 24 | -------------------------------------------------------------------------------- /src/Controls/Color_Chooser/README.md: -------------------------------------------------------------------------------- 1 | # Color_Chooser 2 | 3 | Shows how to create a color chooser with [Fl_Color_Chooser](https://www.fltk.org/doc-1.3/classFl__Color__Chooser.html) widget. 4 | 5 | ## Source 6 | 7 | [Color_Chooser.cpp](Color_Chooser.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Color_Chooser.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Color_Chooser.sln 25 | ``` 26 | 27 | Select Color_Chooser project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Color_Chooser.xcodeproj 35 | ``` 36 | 37 | Select Color_Chooser project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Color_Chooser 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Menus_And_Toolbars/Sys_Menu_Bar/README.md: -------------------------------------------------------------------------------- 1 | # Sys_Menu_Bar 2 | 3 | Shows how to create a system menu bar with [Fl_Sys_Menu_Bar](https://www.fltk.org/doc-1.3/classFl__Sys__Menu__Bar.html) widget. 4 | 5 | ## Source 6 | 7 | [Sys_Menu_Bar.cpp](Sys_Menu_Bar.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Sys_Menu_Bar.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Sys_Menu_Bar.sln 25 | ``` 26 | 27 | Select Sys_Menu_Bar project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Sys_Menu_Bar.xcodeproj 35 | ``` 36 | 37 | Select Sys_Menu_Bar project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Sys_Menu_Bar 46 | ``` 47 | -------------------------------------------------------------------------------- /src/Others/Colored_Windows/README.md: -------------------------------------------------------------------------------- 1 | # Colored_Windows 2 | 3 | Shows how to create a colored windows with [Fl_Window](https://www.fltk.org/doc-1.3/classFl__Window.html). 4 | 5 | ## Source 6 | 7 | [Colored_Windows.cpp](Colored_Windows.cpp) 8 | 9 | [CMakeLists.txt](CMakeLists.txt) 10 | 11 | ## Output 12 | 13 | ![output](../../../docs/Pictures/Examples/Colored_Windows.png) 14 | 15 | ## Generate and build 16 | 17 | To build this project, open "Terminal" and type following lines: 18 | 19 | ### Windows : 20 | 21 | ``` shell 22 | mkdir build && cd build 23 | cmake .. 24 | start Colored_Windows.sln 25 | ``` 26 | 27 | Select Colored_Windows project and type Ctrl+F5 to build and run it. 28 | 29 | ### macOS : 30 | 31 | ``` shell 32 | mkdir build && cd build 33 | cmake .. -G "Xcode" 34 | open ./Colored_Windows.xcodeproj 35 | ``` 36 | 37 | Select Colored_Windows project and type Cmd+R to build and run it. 38 | 39 | ### Linux : 40 | 41 | ``` shell 42 | mkdir build && cd build 43 | cmake .. 44 | cmake --build . --config Debug 45 | ./Colored_Windows 46 | ``` 47 | -------------------------------------------------------------------------------- /src/User_Components/Scheme_Modes/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Solution 4 | project(Scheme_Modes) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Scheme_Modes.cpp Fl_Scheme_Mode.h Fl_Scheme_Mode.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "User_Components") 24 | -------------------------------------------------------------------------------- /src/Applications/Application_Enable_Dark_Mode/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # Project 4 | project(Application_Enable_Dark_Mode) 5 | find_package(FLTK REQUIRED) 6 | 7 | # Options 8 | if (MSVC) 9 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup") 10 | endif () 11 | set(CMAKE_CXX_STANDARD 17) 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 13 | 14 | # Application 15 | add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE Application_Enable_Dark_Mode.cpp) 16 | target_include_directories(${PROJECT_NAME} PRIVATE ${FLTK_INCLUDE_DIR}) 17 | if (APPLE) 18 | # Workaround: fltk.framework does not exist, so we have to replace it by libfltk.dylib 19 | string(REPLACE "libfltk_images" "libfltk" FLTK_LIBRARY_NAME "${FLTK_IMAGES_LIBRARY_RELEASE}") 20 | string(REPLACE "/usr/local/fltk.framework" "${FLTK_LIBRARY_NAME}" FLTK_LIBRARIES "${FLTK_LIBRARIES}") 21 | endif() 22 | target_link_libraries(${PROJECT_NAME} ${FLTK_LIBRARIES}) 23 | set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "Applications") 24 | --------------------------------------------------------------------------------