fltk/examples
Greg Ercolano 8d0647732f Fix time drawing color (was not being set)
The items showing the current time looked ugly on linux
when selected, since they were drawing in the leftover
blue color used for drawing the R-G-B box pattern.
2019-04-16 10:56:33 -07:00
..
Makefile Update examples: minor changes, rename, update .gitignore 2018-12-10 15:00:45 +01:00
Makefile.FLTK Update examples: minor changes, rename, update .gitignore 2018-12-10 15:00:45 +01:00
OpenGL3-glut-test.cxx MacOS ≥ 10.10: Fl_Window::fullscreen() and fullscreen_off() no longer call Fl_Window::hide() + Fl_Window::show() 2018-09-12 12:46:09 +00:00
OpenGL3test.cxx Update procedure for OpenGL3 support. 2019-04-04 18:42:45 +02:00
README.txt Update examples: minor changes, rename, update .gitignore 2018-12-10 15:00:45 +01:00
SVG_File_Surface.cxx Simpler implementation of class SVG_Graphics_Driver is enough. 2018-12-04 12:31:55 +01:00
clipboard.cxx Remove unnecessary platform-specific #if / #endif clauses. 2018-11-29 09:20:08 +00:00
draggable-group.cxx Add tooltips to new draggable-group example program. 2017-08-12 14:53:39 +00:00
fltk-versions.cxx Add missing #include in fltk-versions example program. 2017-07-12 21:49:19 +00:00
howto-add_fd-and-popen.cxx Replace "WIN32" with "_WIN32" or "Windows". 2018-02-09 14:39:42 +00:00
howto-browser-with-icons.cxx Adding an example to demonstrate how to create an Fl_Browser with icons on the items. 2013-03-23 18:40:53 +00:00
howto-drag-and-drop.cxx Enhance howto-drag-and-drop example program. 2017-09-08 15:02:04 +00:00
howto-menu-with-images.cxx Add divider above Quit menu item. (needed for demo screenshot) 2017-09-12 20:10:25 +00:00
howto-parse-args.cxx Modifications to all LGPL headers for STR #2685. 2011-07-19 04:49:30 +00:00
howto-simple-svg.cxx Fix for STR#3421: Fl_SVG_Image crashes if passed an svg file that is a static const char* string 2017-10-31 16:56:23 +00:00
howto-text-over-image-button.cxx Modifications to all LGPL headers for STR #2685. 2011-07-19 04:49:30 +00:00
menubar-add.cxx Modifications to all LGPL headers for STR #2685. 2011-07-19 04:49:30 +00:00
nativefilechooser-simple-app.cxx Replace remaining calls to getenv() with fl_getenv(). 2017-10-13 14:58:30 +00:00
nativefilechooser-simple.cxx Some compilers probably need string.h for strcmp().. 2017-07-17 01:20:00 +00:00
progress-simple.cxx Replace "WIN32" with "_WIN32" or "Windows". 2018-02-09 14:39:42 +00:00
shapedwindow.cxx Add static void Fl_Surface_Device::push_current(Fl_Surface_Device *new_current) and pop_current() to set/unset the current drawing surface. 2016-12-07 15:09:52 +00:00
simple-terminal.cxx Added Fl_Simple_Terminal widget, and mods to test+example programs (STR #3411). 2017-10-17 00:28:56 +00:00
table-as-container.cxx Solves STR#2889, increases reusability of SetSize() in example. 2012-11-20 18:32:59 +00:00
table-simple.cxx Limit columns to 26 to ensure column labels are only A-Z. 2011-09-29 21:10:59 +00:00
table-sort.cxx Replace "WIN32" with "_WIN32" or "Windows". 2018-02-09 14:39:42 +00:00
table-spreadsheet-with-keyboard-nav.cxx Added Fl::option() setting to allow arrow keys to navigate table. 2013-03-18 20:00:04 +00:00
table-spreadsheet.cxx Remove FLTK_ABI_VERSION from all but *tree*.* and documentation. 2016-03-26 02:55:14 +00:00
table-with-keynav.cxx o Fixed tab navigation problem with this demo 2013-03-25 23:20:29 +00:00
tabs-simple.cxx Modifications to all LGPL headers for STR #2685. 2011-07-19 04:49:30 +00:00
textdisplay-with-colors.cxx Modifications to all LGPL headers for STR #2685. 2011-07-19 04:49:30 +00:00
texteditor-simple.cxx Modifications to all LGPL headers for STR #2685. 2011-07-19 04:49:30 +00:00
texteditor-with-dynamic-colors.cxx Added example of dynamically setting style buffer with text editor. 2018-08-29 19:54:10 +00:00
tree-as-container.cxx Fixes STR #2964. 2013-05-22 18:27:05 +00:00
tree-custom-draw-items.cxx Fix time drawing color (was not being set) 2019-04-16 10:56:33 -07:00
tree-custom-sort.cxx Fix one compiler warning and one error on Windows 64-bit. 2016-08-11 12:41:17 +00:00
tree-of-tables.cxx Finally remove FLTK_ABI_VERSION preprocessor macro from code. 2016-11-19 01:20:53 +00:00
tree-simple.cxx Finally remove FLTK_ABI_VERSION preprocessor macro from code. 2016-11-19 01:20:53 +00:00
wizard-simple.cxx Modifications to all LGPL headers for STR #2685. 2011-07-19 04:49:30 +00: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 through the fltk STR form at
    https://www.fltk.org/str.php