fltk/examples
Albrecht Schlosser 8b1ec4c531 Fix Visual Studio (MSVC) compiler warnings 2023-03-09 17:47:51 +01:00
..
.gitignore Fix examples/.gitignore (add missing files) 2023-02-05 19:52:53 +01:00
CMakeLists.txt Animated GIF support (Fl_Anim_GIF_Image class) (#375) 2023-01-21 17:27:58 +01:00
Makefile Animated GIF support (Fl_Anim_GIF_Image class) (#375) 2023-01-21 17:27:58 +01:00
Makefile.FLTK Add Fl_Flex demo "howto-flex-simple" to examples 2022-08-07 18:01:59 +02:00
OpenGL3-glut-test.cxx Use adequate #include for fl_wl_display(). 2022-09-23 08:46:26 +02:00
OpenGL3test.cxx Use `FL_OVERRIDE` for all overridden virtual methods (#611) 2022-12-30 19:14:36 +01:00
README.txt Remove $Id$ tags, update URL's, and more 2020-07-06 20:28:20 +02:00
animgifimage-play.cxx Fix Visual Studio (MSVC) compiler warnings 2023-03-09 17:47:51 +01:00
animgifimage-resize.cxx Fix Visual Studio (MSVC) compiler warnings 2023-03-09 17:47:51 +01:00
animgifimage-simple.cxx Move animated gif images to the test/images folder 2023-02-23 19:28:27 +01:00
animgifimage.cxx Update dependencies and fix whitespace errors 2023-02-02 17:09:14 +01:00
browser-simple.cxx Remove $Id$ tags, update URL's, and more 2020-07-06 20:28:20 +02:00
cairo-draw-x.cxx Make Cairo example compatible with Cairo version < 1.12 (#436) 2022-04-26 15:36:29 +02:00
chart-simple.cxx Improve examples/chart-simple demo program 2023-01-16 00:30:32 +01:00
draggable-group.cxx Use `FL_OVERRIDE` for all overridden virtual methods (#611) 2022-12-30 19:14:36 +01:00
fluid-callback.fl Fix two compiler warnings [-Wunused-variable] 2021-08-30 14:28:35 +02:00
howto-add_fd-and-popen.cxx Fix MSVC 'fileno' warning in example program (#109) 2021-08-31 18:12:41 +02:00
howto-browser-with-icons.cxx Remove $Id$ tags, update URL's, and more 2020-07-06 20:28:20 +02:00
howto-drag-and-drop.cxx Use `FL_OVERRIDE` for all overridden virtual methods (#611) 2022-12-30 19:14:36 +01:00
howto-draw-an-x.cxx Use `FL_OVERRIDE` for all overridden virtual methods (#611) 2022-12-30 19:14:36 +01:00
howto-flex-simple.cxx Rename some Fl_Flex methods for FLTK compliance (#594) 2022-12-15 16:46:40 +01:00
howto-menu-with-images.cxx Fix menu-with-images example w/o using exit() 2021-03-21 01:58:54 +01:00
howto-parse-args.cxx Fix link and comments in example program 2020-08-20 12:42:53 +02:00
howto-remap-numpad-keyboard-keys.cxx Remove $Id$ tags, update URL's, and more 2020-07-06 20:28:20 +02:00
howto-simple-svg.cxx Fix simple SVG example (howto-simple-svg) 2020-08-13 20:25:03 +02:00
howto-text-over-image-button.cxx Remove $Id$ tags, update URL's, and more 2020-07-06 20:28:20 +02:00
menubar-add.cxx Remove $Id$ tags, update URL's, and more 2020-07-06 20:28:20 +02:00
nativefilechooser-simple-app.cxx Remove $Id$ tags, update URL's, and more 2020-07-06 20:28:20 +02:00
nativefilechooser-simple.cxx Remove $Id$ tags, update URL's, and more 2020-07-06 20:28:20 +02:00
progress-simple.cxx Fix remaining VS compiler warnings in example programs 2021-11-16 21:25:54 +01:00
shapedwindow.cxx Use `FL_OVERRIDE` for all overridden virtual methods (#611) 2022-12-30 19:14:36 +01:00
simple-terminal.cxx Remove $Id$ tags, update URL's, and more 2020-07-06 20:28:20 +02:00
table-as-container.cxx Use `FL_OVERRIDE` for all overridden virtual methods (#611) 2022-12-30 19:14:36 +01:00
table-simple.cxx Use `FL_OVERRIDE` for all overridden virtual methods (#611) 2022-12-30 19:14:36 +01:00
table-sort.cxx Use `FL_OVERRIDE` for all overridden virtual methods (#611) 2022-12-30 19:14:36 +01:00
table-spreadsheet-with-keyboard-nav.cxx Fix deprecated warnings in examples/table* demo programs 2023-02-04 19:21:53 +01:00
table-spreadsheet.cxx Fix deprecated warnings in examples/table* demo programs 2023-02-04 19:21:53 +01:00
table-with-keynav.cxx Use `FL_OVERRIDE` for all overridden virtual methods (#611) 2022-12-30 19:14:36 +01:00
table-with-right-column-stretch-fit.cxx Use `FL_OVERRIDE` for all overridden virtual methods (#611) 2022-12-30 19:14:36 +01:00
tabs-simple.cxx Remove $Id$ tags, update URL's, and more 2020-07-06 20:28:20 +02:00
textdisplay-with-colors.cxx Remove $Id$ tags, update URL's, and more 2020-07-06 20:28:20 +02:00
texteditor-simple.cxx Remove $Id$ tags, update URL's, and more 2020-07-06 20:28:20 +02:00
texteditor-with-dynamic-colors.cxx Remove $Id$ tags, update URL's, and more 2020-07-06 20:28:20 +02:00
tree-as-container.cxx Remove $Id$ tags, update URL's, and more 2020-07-06 20:28:20 +02:00
tree-custom-draw-items.cxx Add Fl_Scheme_Choice to examples/tree-custom-draw-items 2023-01-12 19:21:09 +01:00
tree-custom-sort.cxx Fix clang compiler warning 2023-02-07 16:17:54 +01:00
tree-of-tables.cxx Use `FL_OVERRIDE` for all overridden virtual methods (#611) 2022-12-30 19:14:36 +01:00
tree-simple.cxx Remove $Id$ tags, update URL's, and more 2020-07-06 20:28:20 +02:00
wizard-simple.cxx Hide window in quit callback in wizard-simple example 2021-03-21 02:10:19 +01:00

README.txt

FLTK EXAMPLE PROGRAMS
---------------------

    This directory contains example FLTK programs that demonstrate
    recommended programming practices and techniques for FLTK application
    programmers. The "*-simple.cxx" files are a good starting point for
    those new to FLTK.

    The programs in this directory are NOT built automatically
    when you build FLTK; you have to manually build them.

    The goals of these example programs:

      o Show good programming style for app programmers to emulate

      o Show simple examples of how to use widgets to new users of FLTK.

      o Show intermediate or advanced examples of techniques often
        misused or hard to document

      o Demonstrate code that are FAQs on the newsgroup forum.
        (such as how to use threads, callbacks, etc)

      o Example code should be short, but not at the expense of clarity.

      o Where possible, examples should emphasize FLTK's simplicity.


NEW SUBMISSIONS: RECOMMENDED PRACTICES

    These programs must follow FLTK coding style as defined in the FLTK
    "CMP" (Configuration Management Plan/Coding Standards).

    Example code should have the above goals in mind.  The best examples
    are those that are as short and clear as possible; terse, but not
    at the expense of clarity.

    To avoid cluttering up the top level directory with ancillary files
    (such as image files or icons), examples that depend on more than
    just a .cxx/.h file pair should have their own subdirectory.

    Data files common to several examples should be located in the
    examples/data directory.

    Ancillary data files should be as small as possible, to keep the
    distribution tar files small. Avoid high resolution images or
    uncompressed images when possible.

    Examples that need large data sets (HD images, etc) should not
    be part of the FLTK distribution; they can be provided as separate
    packages (eg. as articles or external links).

    Some widgets have multiple capabilities that are best demonstrated
    separately. For instance, the table widget can be used as a
    custom data table, or as a spreadsheet, or as a widget container.
    So separate examples for each would be e.g. "table-custom-data.cxx",
    "table-spreadsheet.cxx", "table-widget-container.cxx", etc.

    Example programs should contain comments that help understand the
    concepts shown, but not so verbose as to dwarf the code or make
    the code hard to read. Within code, it's best to use single line
    comments to emphasize code that might be unclear. Let the code
    speak as much as possible.

    Examples programs may be referred to from the documentation
    as good examples on how to do particular programming techniques.


NAMING CONVENTIONS

    Example programs that demonstrate a particular widget should start
    with that widget's name in lowercase, eg. "table.cxx" for Fl_Table.

    Demonstrations of a particular technique should start with
    "howto-xxx.cxx" to avoid naming conflicts with future widgets
    of the same name.

      xxx-simple.cxx          -- Simplest possible example of widget xxx
                                 eg. "table-simple.cxx"

      xxx-<technique>.cxx     -- A particular "technique" using widget xxx
                                 eg. "table-spreadsheet.cxx"

      howto-<technique>.cxx   -- Demonstrate a particular technique,
                                 eg. "howto-threading.cxx"

    Some example programs may depend on multiple files. To avoid
    cluttering up the top level examples directory, such examples will
    have their own subdirectory with the files they depend on localized
    to that directory.

    Example programs should be as small as possible, to keep the
    distribution tar files small.

    Very large examples, or examples that depend on large data sets
    should be submitted as separate articles on the FLTK site, or as
    external links on the FLTK site's 'links' page.


HISTORY

    Previous to FLTK 1.3.0, the fltk/test directory served the dual
    purpose of containing test suites as well as example code.

    But the fltk/test programs started becoming necessarily complex,
    testing for obscure problems, and not necessarily good demos for
    applications programmers.

    The fltk/examples directory was created in FLTK 1.3.0 to separate
    'good programming examples' from the test suite code.


DISCLAIMER

    The examples in this directory are provided 'as-is', without any express
    or implied warranty.  In no event will the authors be held liable for
    any damages arising from the use of this software.


BUGS

    If you find a bug, please report it to the FLTK team. For more
    information on how to do this see this page:

      https://www.fltk.org/bugs.php