From 3d9014806563ceb1b2e4921f094f55bad68c1ada Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Mon, 11 Sep 2017 19:06:32 +0000 Subject: 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 --- examples/howto-menu-with-images.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/howto-menu-with-images.cxx b/examples/howto-menu-with-images.cxx index 0a0e83c96..4682dca71 100644 --- a/examples/howto-menu-with-images.cxx +++ b/examples/howto-menu-with-images.cxx @@ -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; -- cgit v1.2.3