On 2009-06-18, MacArthur, Ian (SELEX GALILEO, UK) 
<[email protected]> wrote:
>
>> > I take it that a simple cast isn't going to be enough to fix it?
>> 
>> a cast will fix it, but do you want your users to edit the 
>> code generated by fluid? nah... ")
>> 
>> >
>> > In the meantime, can you post a minimal compilable example 
>> that manifests
>> > the fault, that I can use for my testing?
>> 
>> add a spinner in fluid, set the textcolor to any color but 
>> the default so that textcolor is called on it, export, 
>> compile. :}
>
>
> I just tried this (albeit with gcc 3.4.2), with a view to looking at the
> fluid output.
> I take this fluid file:
>
> -------
> # data file for the Fltk User Interface Designer (fluid)
> version 1.0109 
> header_name {.h} 
> code_name {.cxx}
> Function {} {open
> } {
>   Fl_Window {} {open
>     xywh {458 353 301 267} type Double visible
>   } {
>     Fl_Spinner {} {
>       label {spinner:} selected
>       xywh {100 46 85 38} box FLAT_BOX color 2 selection_color 5
> labelcolor 14 textcolor 1
>     }
>   }
> } 
> -------
>
> And I get this C++ output:
>
> -------
> // generated by Fast Light User Interface Designer (fluid) version
> 1.0109
>
> #include "spin-tst.h"
>
> int main(int argc, char **argv) {
>   Fl_Double_Window* w;
>   { Fl_Double_Window* o = new Fl_Double_Window(301, 267);
>     w = o;
>     { Fl_Spinner* o = new Fl_Spinner(100, 46, 85, 38, "spinner:");
>       o->box(FL_FLAT_BOX);
>       o->color((Fl_Color)2);
>       o->selection_color((Fl_Color)5);
>       o->labelcolor((Fl_Color)14);
>       o->textcolor((Fl_Color)1);
>     } // Fl_Spinner* o
>     o->end();
>   } // Fl_Double_Window* o
>   w->show(argc, argv);
>   return Fl::run();
> }
> -------
>
> Which seems to have explicitly cast all the int colours to the Fl_Color
> type for me...
>
> Is this not what you see?
> Or is this wrong in some way?
>


no, its fine, the problem is when i you choose a defined 
color like FL_BACKGROUND2_COLOR as the color:


    { device_id = new Fl_Spinner(63, 86, 58, 25);
      device_id->tooltip("Set a unique device ID for each 
of your proteus devices (even if they are not\
 on the same MIDI bus!).  127 is a broadcast ID and will 
work if you use proda\
tum with only one device.");
      device_id->labeltype(FL_NO_LABEL);
      device_id->labelfont(2);
      device_id->labelcolor(FL_BACKGROUND2_COLOR);
      device_id->minimum(0);
      device_id->maximum(127);
      device_id->value(127);
      device_id->textcolor(49);
      device_id->callback((Fl_Callback*)cb_device_id);
      device_id->align(FL_ALIGN_CENTER);
    } // Fl_Spinner* device_id


which is not casted.
sorry for not investigating this correctly in the first 
place.

thank you, i will file it, i have not tried this with any 
other version.

JanE
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to