summaryrefslogtreecommitdiff
path: root/examples
AgeCommit message (Collapse)Author
2015-10-27Added support for OpenGL V3 and higher.Manolo Gouy
On the X11/MSWindows platforms, this requires external installation of the GLEW library. This fixes STR#3198 and STR#3257. Added two new examples programs. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10876 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-19Small mod to enable highlighting in total cells.Greg Ercolano
This way someone hitting 'End' can see where the "cursor" is. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10835 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-12Add "deprecated" warning to examples/fltk-versions.cxx.Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10785 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-04-21Add FLTK version test program examples/fltk-versions.cxx.Albrecht Schlosser
This program can be used to verify that the FLTK runtime system (ABI version) is binary compatible with the compiled and linked program. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10712 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-14Move RGB image scaling algorithm methods in base class Fl_Image.Albrecht Schlosser
See also discussion in fltk.coredev of Sept 07, 2014 and later with subject "Fixing the nearest-neighbour scaling". git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10377 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-09-21STR#3093 continued: deleted the Fl_Shaped_Window class. Instead, added new ↵Manolo Gouy
member function Fl_Window::shape(Fl_Image*) that gives a non-rectangular shape to a standard window. The benefit is that it works with Fl_Double_Window and Fl_Menu_Window as well. It also works for free with Fl_Gl_Window on the X11 platform only. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10325 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-09-17Removed leftover item variable (now unused)Greg Ercolano
as noted by Albrecht on fltk.coredev today; was giving warnings with Windows/MinGW builds. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10319 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-09-17Improve clipboard example program, fix compilation warnings.Albrecht Schlosser
Use show(argc,argv) to enable command line arguments and colors, fix indentation, Windows compilation warnings, and change tab selection color, which was too dark on my Win7 system (low contrast with tab labels). I also added #define TAB_COLOR to make changing the tab selection colors easier, if needed. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10318 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-09-02Fixed header/footer linesManolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10262 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-08-28Add Manolo's new shapedwindow demo to the MakefileIan MacArthur
for the examples folder. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10258 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-08-27Added the Fl_Shaped_Window class to support windows of arbitrary shapes.Manolo Gouy
The new class is fully Doxygen-documented. Added an example program (example/shapedwindow.cxx) that exercises the new class. Modified all IDE-supporting files accordingly. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10255 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-05-24Reset file header and footer.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10173 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-05-23Added copy/paste from/to FLTK applications of graphical data.Manolo Gouy
Added Fl_Image_Surface class to draw into an Fl_Image object. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10159 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-01-27Fix STR#3005; input field wasn't scrolling with table.Greg Ercolano
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10087 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-01-20o Added draw_item_content() to Fl_Tree_Item,Greg Ercolano
a volatile method that can be overridden by subclasses to take drawing control of tree item's content. This replaces the old "item_draw_callback()" technique added a few months ago as an ABI feature; turned out the new technique is a better way to go. o The examples/tree-custom-draw-items.cxx demo adjusted accordingly. o Added missing docs for some methods that had none, including label_[xywh](). o Added related methods needed to implement this, including: Fl_Tree_Item_Array::replace() Fl_Tree_Item::replace() Fl_Tree::root(item) Fl_Tree::add() variations Fl_Tree_Item::drawbgcolor()/drawfgcolor() o Carefully worked the FLTK_ABI_VERSION macros so as to be ABI compatible with 1.3.0. o Verified 1.3.0 ABI compatibility with ABI Compliance Checker 1.99.8.5: http://ispras.linuxbase.org/index.php/ABI_compliance_checker git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10071 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-01-01Fixes errors:Greg Ercolano
warning: deprecated conversion from string constant to 'char*' git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10040 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-12-16Added Fl_Tree sort example.Greg Ercolano
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10035 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-11-10o Added Fl_Tree::item_draw_callback(), letting one define a custom draw ↵Greg Ercolano
function for Fl_Tree_Item's. o Added examples/tree-custom-draw-items.cxx to demonstrate its use. o Fixed small doc error for recent Fl_Tree::get_selected_items() git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10018 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-11-06Fix problem with Fl_Tree::select_only() invoking select callbacksGreg Ercolano
before all other items have first been deselected. Also: added some related demo code to tree-simple to demonstrate 'reselect' callbacks, where a callback can be invoked when an item that's selected already is 're-selected'. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10015 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-10-22Replaced fopen() by fl_fopen() calls so the app works correctly under ↵Manolo Gouy
MSWindows with non ASCII filenames. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10005 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-05-22Fixes STR #2964.Greg Ercolano
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9926 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-03-25o Fixed tab navigation problem with this demoGreg Ercolano
o Prevent Fl_Output from erasing if value unchanged (allows text selection and keyboard nav of the Fl_Output widget..) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9848 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-03-23Adding an example to demonstrate how to create an Fl_Browser with icons on ↵Greg Ercolano
the items. Based on an example I'd added to STR#1739 to demo someone's patch. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9845 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-03-23o Modified example to take advantage of new Fl_Table::tab_cell_nav() methodGreg Ercolano
o Changed behavior of example to be more predictable o Enter key can be used to toggle edit mode o User can navigate table cells with arrow keys or tab/shift-tab without slipping into cell edit mode o Fixed other issues with Alt, Shift, multicell selection.. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9842 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-03-19o Simplified example to take advantage of Fl_Table's existing features.Greg Ercolano
o Replaced hard coded row/col counts. o Enabled arrow keyboard navigation (setting Fl::OPTION_ARROW_FOCUS) o Fixed small bug in handle() that was calling Fl_Table::handle() instead of Fl_Table_Row::handle() that was preventing Fl_Table_Row's row selection from working.. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9840 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-03-19Small fixes to keyboard navigation and 'current cell' coloring.Greg Ercolano
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9839 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-03-18Added Fl::option() setting to allow arrow keys to navigate table.Greg Ercolano
This example was written before 1.3, and was dependent on the 'old' FLTK behavior where arrow keys could be used to navigate widget focus (in addition to Tab). The 'new' FLTK behavior (1.3 and up) disables arrow key focus nav by default, which is bad for this program, so we enable the old FLTK behavior with Fl::option(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9838 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-03-17Small fix to column max width calculation: take into account width of header.Greg Ercolano
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9837 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-11-20Solves STR#2889, increases reusability of SetSize() in example.Greg Ercolano
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9728 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-11-06Replaced 10302 with 10301 for FLTK_ABI_VERSIONMatthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9706 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-06-12Removed unused argument..Greg Ercolano
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9590 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-27Added a new example to demonstrate complex widgets as childrenGreg Ercolano
of a tree with custom resizing behavior, selectable contents, etc. Also demonstrates the need for the new FL_TREE_ITEM_HEIGHT_FROM_WIDGET feature. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9405 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-22Various mods for Fl_TreeGreg Ercolano
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-18Optimizations for when Fl_Tree is a container of FLTK widgets.Greg Ercolano
o Don't draw FLTK widgets outside tree's viewport. o Added tree-as-container.cxx example program, demos tree w/50k tree items each with 6 widgets (300k total) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9356 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-14Added table-with-keynav.cxx to emphasize keyboard/mouse selectionGreg Ercolano
(as per a question on the newsgroup about how to do this..) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9344 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-02-29Small #ifdef mod for windows builds.Greg Ercolano
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9256 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-02-29Added progress bar widget demo.Greg Ercolano
Nabbed from Greg's cheat sheet, with his permission. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9255 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-29Limit columns to 26 to ensure column labels are only A-Z.Greg Ercolano
(previous value of 30 was creating non-alpha label names..) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9086 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-19Modifications to all LGPL headers for STR #2685.Greg Ercolano
(to clarify static exception LGPL by changing license references) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8864 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-06Modified tree-simple to demonstrate specifying front+back slashes in tree.Greg Ercolano
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8635 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-04Fl_Tree mods for handling escaped item menu names.Greg Ercolano
Docs clarified. Also, tree-simple example's callback handler brought up to date. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8632 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-01Mods to examples Makefile for windows mingw/msys builds.Greg Ercolano
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8356 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-28Makefile modified to demonstrate use of fltk-config.Greg Ercolano
FLTK settings defined in a separate Makefile.FLTK which users can nab for their own use. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8324 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-28Removed unncessary calls to set_value_hide() which wasGreg Ercolano
causing a crash on windows. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8321 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-10Added dnd example to Makefile.Greg Ercolano
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8249 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-08Added a drag and drop example.Greg Ercolano
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8221 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-08Example was missing end() in ctor.Greg Ercolano
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8220 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-05Changed remaining _WIN32 to WIN32.Albrecht Schlosser
Added 'all' target to Makefile. Do we need the 'default' target? git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8194 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-05Indenting mods for platform macro/includes.Greg Ercolano
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8193 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-04Clarify platform ifdef's with indenting and grouping.Greg Ercolano
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8185 ea41ed52-d2ee-0310-a9c1-e6b18d33e121