summaryrefslogtreecommitdiff
path: root/examples/howto-menu-with-images.cxx
AgeCommit message (Collapse)Author
2023-12-23Improve docs and add two new Fl_Menu_Item methods (#875)Albrecht Schlosser
This addresses some issues pointed out by GitHub Issue #875. Documentation lacked details about Fl_Multi_Label assignment and correct memory handling. The new methods - Fl_Menu_Item::image_label(const Fl_Image *) and - Fl_Menu_Item::multi_label(const Fl_Multi_Label *) provide a cleaner interface to assign images and Fl_Multi_Label's to menu items. examples/howto-menu-with-images.cxx: carify some issues, fix leak, and use new Fl_Menu_Item::multi_label(const Fl_Multi_Label *).
2021-03-21Fix menu-with-images example w/o using exit()Albrecht Schlosser
Use window->hide() in quit callback instead.
2020-07-06Remove $Id$ tags, update URL's, and moreAlbrecht Schlosser
- remove obsolete svn '$Id$' tags from all source files - update .fl files and generated files accordingly - replace 'http://www.fltk.org' URL's with 'https://...' - replace bug report URL 'str.php' with 'bugs.php' - remove trailing whitespace - fix other whitespace errors flagged by Git - add and/or fix missing or wrong standard headers - convert tabs to spaces in all source files The only relevant code changes are in the fluid/ folder where some .fl files and other source files were used to generate the '$Id' headers and footers.
2017-09-12Add divider above Quit menu item. (needed for demo screenshot)Greg Ercolano
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12451 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-11Remove leading underscore from labeltype(s) in new demo.Albrecht Schlosser
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
2017-09-11Simplified the example's menu item callback.Greg Ercolano
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12442 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-11Applied Manolo's recommendation (fltk.coredev), removing unnecessary ↵Greg Ercolano
item->image(*pixmap) call. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12441 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-11Added example code to demonstrate Fl_Multi_Label for STR#3400.Greg Ercolano
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12440 ea41ed52-d2ee-0310-a9c1-e6b18d33e121