FLTK logo

STR #3336

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

Return to Bugs & Features | Post Text | Post File | SVN ⇄ GIT | Prev | Next ]

STR #3336

Application:FLTK Library
Status:5 - New
Priority:1 - Request for Enhancement, e.g. asking for a feature
Scope:3 - Applies to all machines and operating systems
Subsystem:Example Programs
Summary:Include some example fluid files
Version:1.4-feature
Created By:greg.ercolano
Assigned To:Unassigned
Fix Version:Unassigned
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:

Post File ]
Name/Time/Date Filename/Size  
 
#1 greg.ercolano
13:19 Oct 01, 2016
simpledialog.fl
2k
 
     

Trouble Report Comments:

Post Text ]
Name/Time/Date Text  
 
#1 greg.ercolano
12:58 Oct 01, 2016
Would be good to include some fluid files that show how to do
things that aren't obvious, such as:

    How to make a simple widget class based on Fl_Group and use it
    (e.g. Key/Values in a dbase form)

    Ditto with an Fl_Window derived class

    A multi-window app, using derived widget classes

    How to make a simple dialog widget

    How to make a complete application using all the above as separate modules

I'll try to supply some, folks feel free to add to this list.
 
 
#2 greg.ercolano
11:36 Oct 17, 2016
Actually, a good way to do this might be to provide the example
.fl files as default fluid templates. (e.g. File -> Save Template)

Fluid templates are saved in the user's $HOME directory, e.g.

    $HOME/.fltk/fltk.org/fluid/templates/<template_name>.fl

Fluid's "templates" seem to be an untapped (and undocumented) resource
that would help people have a starting point when creating new fluid
projects.

I'm not sure how we would package these as defaults; we may need to
provide a fluid/templates directory in the source tree, and the build
instructions for fluid would somehow #include these files as const char*
text strings or some such so that fluid can write them out into the
user's $HOME templates dir (if it doesn't exist).

Either that, or we could package fluid in a .app directory approach
on all platforms (similar to OSX) so that we can have a Resources subdir
that can contain default templates for all users, and just create that
.app directory tree as part of 'make fluid'.
 
 
#3 AlbrechtS
05:01 Apr 03, 2017
Moved to 1.4-feature.

Please see also STR #3370 regarding storage locations of preferences for fluid.
http://www.fltk.org/str.php?L3370
 
 
#4 matt
05:09 Dec 10, 2021
From within Fluid, this is not too much work. I can have some built-in sample code. I could even prepare for new sample code to be downloadable from the fltk webpage.

But, unless we want to frustrate our users, these examples should compile and run right there from within Fluid. The Arduino IDE is a great model: they have 20 or so example projects that come with their IDE that compile out of the box and run on any of their microcontrollers.

External developers can easily add libraries and example code for their hardware, but that's a whole other can of worms ;-)

Any suggestions on how we could get Fluid to build and run the code  that it generates on all of our supported platforms? CMake?
 
 
#5 AlbrechtS
13:29 Jan 16, 2023
FTR: FLTK 1.4.0 changed the default storage location of preferences files which was mentioned above in comment #2. The old storage location is respected and used if preference files exist, but new preferences are created in the new storage location. Please see the docs for more information:

https://www.fltk.org/doc-1.4/classFl__Preferences.html#details
https://www.fltk.org/doc-1.4/classFl__Preferences.html#af8418ff8af933d22dbb70a082525a74e
 
     

Return to Bugs & Features | Post Text | Post File ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.