Remove leading underscore from labeltype(s) in new demo.

Since svn r12443 we can use all labeltypes (including FL_IMAGE_LABEL and
FL_MULTI_LABEL) w/o leading underscore. We can also use both documented
variants to assign an FL_MULTI_LABEL to an Fl_Menu_Item.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12444 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Albrecht Schlosser
2017-09-11 19:06:32 +00:00
parent 322208b855
commit 3d90148065
+6 -2
View File
@@ -113,14 +113,18 @@ int AddItemToMenu(Fl_Menu_ *menu, // menu to add item to
Fl_Multi_Label *ml = new Fl_Multi_Label;
// Left side of label is image
ml->typea = _FL_IMAGE_LABEL;
ml->typea = FL_IMAGE_LABEL;
ml->labela = (const char*)pixmap;
// Right side of label is text
ml->typeb = FL_NORMAL_LABEL;
ml->labelb = item->label();
// Assign multilabel to item
// Assign multilabel to item.
// Note: There are two documented ways to achieve this. Both of them
// are supported, but one of them is commented out intentionally.
// item->label(FL_MULTI_LABEL, (const char *)ml);
ml->label(item);
return i;