On 21.06.2011, at 11:07, MacArthur, Ian (SELEX GALILEO, UK) wrote: > >> BTW: I included preferences.cxx/.h because FLTK3 Fluid at the >> moment would write a mishmashed FLTK3 cxx/h pair. In an >> effort to generate the FLTK3 FileChooser UI from the .fl >> file, I forgot that an FLTK1 .fl file should still generate >> FLTK1 code, and an F3 .fl file should generate F3 code. >> Optionally, an F1 .fl file should be saved (exported) as an >> F3 .fl file, which will of course fail for user generated code. > > Oh, that's a point - it had not occurred to me that we will need a > "super-fluid" that can create fltk1 and/or fltk3 (or even fltk2) source > as its output. > > That's quite tricky.
Yes. Currently, Fluid is the FLTK 1 version with a few modifications to output FLTK 3 code. Quite a while ago, I already added code to read FLTK 2 Fluid files, which I can now extend to read all three formats. The formats are quite similar though. > How do we even represent that? Does the fluid file specify what > output-style it should be, or does the user click a check-box when > generating the code, or...? The second line of every Fluid file contains the version of the Fluid app that generated it. So when reading, I can branch out accordingly. This is also the clue for writing. I already committed some minor additions to set the file format version. >> But I will get to that when everything else works. > > Indeed... A welcome distraction while I am stuck getting test1/colbrowser to compile ;-) - Matthias _______________________________________________ fltk-dev mailing list fltk-dev@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-dev