Since any object can be added to a menu, this module is automatically
applied to all objects added to menus. It applies color and font consistent
with the Lmenu class, if fact, the Lmenu class includes this module. It also provides
several methods needed by menus.
box_pos,
can_have_focus?,
default_bg,
default_fg,
deselect_menu,
ipadx,
ipady,
next_focus,
on_alt_key,
on_down_key,
on_enter,
on_enter_key,
on_escape_key,
on_exit,
on_key_press,
on_left_key,
on_mouse_ldbl,
on_mouse_ldn,
on_mouse_lup,
on_mouse_out,
on_mouse_over,
on_right_key,
on_up_key,
paint_focus,
paint_focus?,
paint_focus_remove,
prev_focus,
select_menu,
set_focus,
skip_object_theme,
sticky,
sub_menu,
toggle_highlight,
Returns :sys_menu_fg because menu objects don’t inherit color from
parent objects.
Returns :sys_menu_bg because menus don’t inherit color from parent
objects.
Returns true because objects placed inside menus don’t pull from the
:object portion of the any theme.
When adding radiobox and checkbox objects to a menu, the default position
of the checkbox is to the right. Returns :right if the :box_pos attribute has not been
specified for the object.
Adds a little padding so the items in menus don’t hug the left and
right borders. The default is 6.
Adds a little padding so the items in menus don’t hug the top and
bottom borders. The default is 1.
Calls toggle_highlight to select or
change the colors on the this item so it appears highlighted. Any other
selected menu item sibling is automatically unselected first.
This deselects or un-highlights the item. It calls toggle_highlight to remove the
highlighted colors.
Calls toggle_highlight_color because highlighting for menu items is done by
toggling the color between the highlighted colors (fg_highlight and
bg_highlight) and normal colors (fg and bg). This makes sure that
highlighting is consistent for all objects in the menu.
Returns false because menu items don’t get the keyboard focus in the
same was as other Locana objects. The focus is
managed internally by this module rather than letting Locana manage the focus as with other Locana objects.
Returns false to disable the normal focus Locana
objects places in a menu. The focus indicator is handled by toggle_highlight which calls
toggle_highlight_color.
Items in a menu don’t paint a focus because the focus indicator is
handled by toggle_highlight which
calls toggle_highlight_color. This does nothing.
Items in a menu don’t paint a focus because the focus indicator is
handled by toggle_highlight which
calls toggle_highlight_color. This does nothing.
If this object is a popup style menu, the focus is forwarded to the first
child in the popup menu, otherwise this objects gets the focus.
Disabled when this object is in a menu. Managing the focus for objects in
menus are handled differently from other Locana
objects.
Disabled when this object is in a menu. Managing the focus for objects in
menus are handled differently from other Locana
objects.
Triggers the on_mouse_ldn so
multiple clicks don’t appear to get lost.
Deselects or un-highlights the menu.
Selects or highlights the menu.
Closes any open menus and exits the menubar. The normal on_alt_key event for objects not in a
menu will activate a menubar. Basically, the on_alt_key toggles between activating
the menubar and deactivating the menubar.
Closes any open menus and exit the menubar.
The following steps are taken depending on the circumstances:
- If the object is in a menubar then the previous menu item in the menubar is
selected or activated.
- If the object is in a sub-menu and the parent of the sub-menu is a menubar
then the previous sub-menu of the menubar is selected or activated.
- If the object is in a sub-menu and the parent of the sub-menu is not a
menubar then the focus is moved from the sub-menu back to the parent.
The following steps are taken depending on the circumstances:
- If the object is in a menubar then the next menu item in the menu bar is
selected or activated.
- If the object is in a sub-menu and this menu item has a sub-menu then the
sub-menu is activated or selected.
- If the object is in a sub-menu and this menu item does not have a sub-menu
and the parent of the sub-menu is a menubar then the next sub-menu of the
menubar is selected or activated.
The following steps are taken depending on the circumstances:
- If object is in a menubar, then do nothing.
- If the object is the top item in a sub-menu and the parent of the sub-menu
is a menubar then the menubar is selected or activated.
- Otherwise the previous item in the sub-menu is activated or selected.
The following steps are taken depending on the circumstances:
- If object is in a menubar and the object has a sub-menu, then the sub-menu
is activated or selected.
- If the object is the bottom item in a sub-menu, then do nothing.
- Otherwise the next item in the sub-menu is activated or selected.
If object has a sub-menu then the sub-menu is activated or selected.
Otherwise triggers the on_click event.
Checks for an accelerator in the parent menu. If an accelerator is found,
the menu with the accelerator is selected or activated.
Returns the sub-menu if one exists.
If this object has an explicit :sticky attribute defined, it is returned.
Otherwise, returns :new when this object is in a popup style menu.
Thank you for taking the time to visit this web page. I trust you found the information contained in this page useful.
Please email any questions, concerns, or issues with this web site to webmaster@sevasoftware.com.
Please remember Seva Software when your company would benefit from an experienced database architect and software engineer.