This allows icons to be defined for items in Fl_Browser.
In addition to the OP's patch:
o Added doxygen docs
o Fixed redraw handling of icons larger than the items
o Some methods made const
o Conformed indent to FLTK standards
See the STR for a test program that verifies the modifications.
Mods tested on linux,osx,windows.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6850 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
char*e=0;// pointer to end of field or null if none
@ -502,6 +513,15 @@ void Fl_Browser::item_draw(void* item, int X, int Y, int W, int H) const {
@@ -502,6 +513,15 @@ void Fl_Browser::item_draw(void* item, int X, int Y, int W, int H) const {
@ -521,7 +541,7 @@ void Fl_Browser::item_draw(void* item, int X, int Y, int W, int H) const {
@@ -521,7 +541,7 @@ void Fl_Browser::item_draw(void* item, int X, int Y, int W, int H) const {
case'c':talign=FL_ALIGN_CENTER;break;
case'r':talign=FL_ALIGN_RIGHT;break;
case'B':
if(!(((FL_BLINE*)item)->flags&SELECTED)){
if(!(l->flags&SELECTED)){
fl_color((Fl_Color)strtol(str,&str,10));
fl_rectf(X,Y,w1,H);
}elsestrtol(str,&str,10);
@ -557,7 +577,7 @@ void Fl_Browser::item_draw(void* item, int X, int Y, int W, int H) const {
@@ -557,7 +577,7 @@ void Fl_Browser::item_draw(void* item, int X, int Y, int W, int H) const {
}
BREAK:
fl_font(font,tsize);
if(((FL_BLINE*)item)->flags&SELECTED)
if(l->flags&SELECTED)
lcol=fl_contrast(lcol,selection_color());
if(!active_r())lcol=fl_inactive(lcol);
fl_color(lcol);
@ -835,6 +855,64 @@ void Fl_Browser::swap(int a, int b) {
@@ -835,6 +855,64 @@ void Fl_Browser::swap(int a, int b) {