FLTK logo

[fltk/fltk] Small improvement to Fl_Menu_ : add a way to specify a divider drawn above a menu item vs. below it (Issue #479)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.issues  ]
 
Previous Message ]New Message | Reply ]Next Message ]

[fltk/fltk] Small improvement to Fl_Menu_ : add a way to specify a divider drawn above a menu item vs. below it (Issue #479) "Paul D. Hahn" Aug 12, 2022  
 

Presently specifying FL_MENU_DIVIDER for an item draws the divider below the item. In my work, there are not uncommon situations where it would be more convenient to specify a divider drawn above the associated menu item rather than below it.

Therefore please implement something like a new FL_MENU_DIVIDER_ABOVE to augment the existing FL_MENU__DIVIDER.

In addition, in the Fl_Menu_::add() methods, implement some new special prefix in labels as the way to specify FL_MENU_DIVIDER_ABOVE, vs. "_" which specifies FL_MENU_DIVIDER. Admittedly this poses a risk to existing user code that may already be employing such a prefix with the expectation that it is NOT special. Notwithstanding the risk, I suggest implementation of the double-underscore "__" as a special prefix to specify FL_MENU_DIVIDER_ABOVE. User code already employing "__" to specify FL_MENU_DIVIDER below a label whose text begins with an underscore would have to be modified to use an escape character "_\_".


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <fltk/fltk/issues/479@github.com>

Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.