MacArthur, Ian (SELEX GALILEO, UK) wrote:
 >
 > Your patch seems to be against svn -r 6218, which is current now. Did
 > you update the patch already?

yes, I did - after I have posted here

> 
>> I have more-less complete highlighting for fltk-1.3
>>
>>
>> If you are impatient and trust my executable (and the wires 
>> in-between) 
>> you can try a MingW compiled scheme.exe at
>>
>>     http://phy19.phy.tcd.ie/fltk/highlighting/
> 
> 
> I haven't looked at the patch, or the implementation, but the demo looks
> really nice - I like it. 
> 
> Observations on running the demo exe:
> 
> - For me the "highlight by label" toolbar icon doesn't seem to do
> anything when I hover over it, all the other toolbar buttons do,


It should change the color to the "FL_SELECTION_COLOR" (that is what 
color function for this custom labeltype does) so it depends what is is 
your setting - it might not be visible enough on your machine.

Labels can change:
- color
- font
- type
- size
or combination of above and can be of course switched on/off on 
per-widget (and per-feature) basis. However to enable that, particular 
highlighting should be set within (preferably custom) labeltype - 
standard labels do not have set label highlighting possibilities by default.


> including "bold" effect on the label, which is what I assume the
> "highlight by label" item should do.
> 
> - The focus box draws outside the bounds of the "custom shape" button,
> and does not get erased correctly.

True, I have to assure that the focus is drawn the same. Anyway the 
standard focus for fltk round button is ugly. I was thinking that the 
boxtype function might know better how to draw the focus. To be backward 
compatible, we could add some global flag for the focus which would be 
"eaten" if boxtype would draw the focus itself and signalise in that way 
back to the widget that focus was already drawn. Normal box functions, 
which do not know any better, would not touch this flag:

void Fl_Foo_Class::draw(){
   ...
   if(Fl::focus()==this)
     Fl::draw_focus(1); // sets the flag
   draw_box(); // might draw focus too...
   if(Fl::draw_focus()) //focus was not drawn, drawing standard one
     draw_focus(...);
   Fl::draw_focus(0) // resetting back the flag
   ...
}

and within some boxtype function

void fl_draw_foo_bar(int x, int y, int w, int h, Fl_Color c){
  ... // do the box drawing
  if(Fl::draw_focus()){
    draw_nicer_focus_tm()
    Fl::draw_focus(0) // signalizing that the focus was already drawn
  }

}



> 
> Also, it would be nice if the custom shape button highlighted blue when

Yes that is the idea, the implementation is there but I did not finish 
this particular example. Custom shape button will also have fifferent 
schape for different schemes - round for plastic, rectangular otherwise 
- as you said that is what "isolated" buttons use on OSX.

R.

_______________________________________________
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to