// Some constants
int const MENU_LABEL_SIZE = FL_NORMAL_SIZE;
+int const MENU_LABEL_STYLE = FL_NORMAL_STYLE;
int const mheight = 30;
int const mbheight= 22;
// where to place the menubar?
inline
int string_width(string const & str)
{
- return fl_get_string_widthTAB(FL_NORMAL_STYLE, MENU_LABEL_SIZE,
+ return fl_get_string_widthTAB(MENU_LABEL_STYLE, MENU_LABEL_SIZE,
str.c_str(),
static_cast<int>(str.length()));
}
fl_set_object_boxtype(obj, FL_FLAT_BOX);
fl_set_object_color(obj, FL_MCOL, FL_MCOL);
fl_set_object_lsize(obj, MENU_LABEL_SIZE);
- fl_set_object_lstyle(obj, FL_NORMAL_STYLE);
+ fl_set_object_lstyle(obj, MENU_LABEL_STYLE);
fl_set_object_resize(obj, FL_RESIZE_ALL);
fl_set_object_gravity(obj, NorthWestGravity,
NorthWestGravity);
if (i->kind() == MenuItem::Separator)
*last = "%l";
else if (!i->optional() ||
- !(view->getLyXFunc()->getStatus(i->action())
- & func_status::Disabled))
+ !(view->getLyXFunc()->getStatus(i->action()).disabled()))
last = it;
it = extra_labels.begin();
switch (item.kind()) {
case MenuItem::Command: {
- func_status::value_type flag =
+ FuncStatus flag =
view->getLyXFunc()->getStatus(item.action());
// handle optional entries.
if (item.optional()
- && (flag & func_status::Disabled)) {
+ && (flag.disabled())) {
lyxerr[Debug::GUI]
<< "Skipping optional item "
<< item.label() << endl;
// Modify the entry using the function status
string pupmode;
- if (flag & (func_status::Disabled
- | func_status::Unknown))
+ if (flag.disabled() || flag.unknown())
pupmode += "%i";
- if (flag & func_status::ToggleOn)
+ if (flag.onoff(true))
pupmode += "%B";
- if (flag & func_status::ToggleOff)
+ if (flag.onoff(false))
pupmode += "%b";
label += pupmode;
// If the action value is too low, then it is not a
// valid action, but something else.
if (choice >= action_offset + 1) {
- view->getLyXFunc()->dispatch(choice - action_offset);
+ view->getLyXFunc()->verboseDispatch(choice - action_offset, true);
} else {
lyxerr[Debug::GUI]
<< "MenuCallback: ignoring bogus action "