Commit Graph

8 Commits

Author SHA1 Message Date
Albrecht Schlosser 1d73c0195c Improve docs and add two new Fl_Menu_Item methods (#875)
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 *).
2023-12-23 20:08:18 +01:00
Albrecht Schlosser 90dbf0c77d Fix menu-with-images example w/o using exit()
Use window->hide() in quit callback instead.
2021-03-21 01:58:54 +01:00
Albrecht Schlosser f09e17c3c5 Remove $Id$ tags, update URL's, and more
- 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.
2020-07-06 20:28:20 +02:00
Greg Ercolano e2a28fa071 Add divider above Quit menu item. (needed for demo screenshot)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12451 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-12 20:10:25 +00:00
Albrecht Schlosser 3d90148065 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
2017-09-11 19:06:32 +00:00
Greg Ercolano 2670903db9 Simplified the example's menu item callback.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12442 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-11 18:36:35 +00:00
Greg Ercolano 2a41af1fc3 Applied Manolo's recommendation (fltk.coredev), removing unnecessary item->image(*pixmap) call.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12441 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-11 18:12:58 +00:00
Greg Ercolano 88204a5524 Added example code to demonstrate Fl_Multi_Label for STR#3400.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12440 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-11 00:50:06 +00:00