fltk/examples
Greg Ercolano f58cd169c0 Various mods for Fl_Tree
o Fix STR#2828 (E): {Vertical|Widget} Gap
    o Moved Fabien's reselected methods to Fl_Tree_Prefs,
      return method made const, doxygen, removed underbars from methods
      (to follow general API)
    o Widgets can now appear to the right of labels.
      This can be controlled with item_draw_mode(FL_TREE_ITEM_DRAW_LABEL_AND_WIDGET)
    o Cleaned up Fl_Tree_Item::draw(), Fl_Tree::draw()
    o New methods:
            marginbottom()       -- [ABI feature] extra space below last tree element when scrolling
            widgetmarginleft()   -- [ABI feature] space to left of widget
            usericonmarginleft() -- space to left of usericon
            labelmarginleft()    -- space to left of label
            item_draw_mode()     -- control how items, widget() are drawn
    o Updated Fl_Tree docs, tree-elements.png
    o test/tree: added sliders to test the above new features,
      added "open all" and "close all" buttons
    o Probably other stuff..


TODO: Fix "scroll-beyond-bottom" (STR#2796)
TODO: Fix other items in STR#2828



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9377 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-22 13:40:02 +00:00
..
Makefile Optimizations for when Fl_Tree is a container of FLTK widgets. 2012-04-18 15:20:20 +00:00
Makefile.FLTK Mods to examples Makefile for windows mingw/msys builds. 2011-02-01 19:10:13 +00:00
README.examples Small README mods 2010-08-26 13:52:02 +00:00
howto-add_fd-and-popen.cxx Modifications to all LGPL headers for STR #2685. 2011-07-19 04:49:30 +00:00
howto-drag-and-drop.cxx Modifications to all LGPL headers for STR #2685. 2011-07-19 04:49:30 +00:00
howto-parse-args.cxx Modifications to all LGPL headers for STR #2685. 2011-07-19 04:49:30 +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 Modifications to all LGPL headers for STR #2685. 2011-07-19 04:49:30 +00:00
progress-simple.cxx Small #ifdef mod for windows builds. 2012-02-29 05:42:12 +00:00
table-as-container.cxx Modifications to all LGPL headers for STR #2685. 2011-07-19 04:49:30 +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 Modifications to all LGPL headers for STR #2685. 2011-07-19 04:49:30 +00:00
table-spreadsheet-with-keyboard-nav.cxx Modifications to all LGPL headers for STR #2685. 2011-07-19 04:49:30 +00:00
table-spreadsheet.cxx Modifications to all LGPL headers for STR #2685. 2011-07-19 04:49:30 +00:00
table-with-keynav.cxx Added table-with-keynav.cxx to emphasize keyboard/mouse selection 2012-04-14 19:45:50 +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
tree-as-container.cxx Various mods for Fl_Tree 2012-04-22 13:40:02 +00:00
tree-simple.cxx Modifications to all LGPL headers for STR #2685. 2011-07-19 04:49:30 +00:00
wizard-simple.cxx Modifications to all LGPL headers for STR #2685. 2011-07-19 04:49:30 +00:00

README.examples

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
    http://fltk.org/str.php