Class MenuComponent
- Superclasses :
-
util::SetFields
util::Connectable
lang::Object
- Subclasses :
-
gui::CheckBoxMenuItem
gui::MenuSeparator
gui::SubMenu
gui::TextMenuItem
- Package :
- gui
This is the superclass of all the objects that make up the
menu system (other than the top level Components of course).
It encapsulates the basic labels and images to display a menu
item. The functionality of an actual menu is in the subclass,
SubMenu.
- Source
Methods inherited from util::SetFields |
as_attrib(attr, val)
attrib(a[])
cset_val(attr, val)
field_error(s)
int_val(attr, val)
int_vals(attr, val, n)
numeric_val(attr, val)
numeric_vals(attr, val, n)
set_fields(l)
string_val(attr, val)
string_vals(attr, val, n)
test_flag(attr, val)
|
Variables inherited from util::Connectable |
listeners
|
clear_is_shaded()
-
Set the shaded status of the component to not shaded.
- Source
close_all(discard)
-
Close the menu system, possibly discarding the current event.
- Source
display_label(lw, mw, rw)
-
Display the label at its position using the given widths for the left, middle
and right elements.
- Source
fatal(s)
-
- Source
get_accel()
-
Get the mnemonic key.
- Source
get_label()
-
Get the label.
- Source
initially()
- Overrides initially() in util::Connectable
-
is_shaded()
-
Succeed iff the component is shaded
- Source
is_sub_menu()
-
- Source
possibly_invalidate()
-
Invalidate the parent Component if this is the root of the menu hierarchy.
- Source
set_accel(k)
-
Set the mnemonic key, which will be used with the Alt key to provide keyboard
shortcuts.
- Source
set_img_left(x)
-
Set the optional left image to the given Icon image.
- Source
set_img_right(x)
-
Set the optional right image to the given Icon image.
- Source
set_is_shaded()
-
Set the shaded status of the component to shaded.
- Source
set_label(x)
-
Set the centre label to the given string.
- Source
set_label_left(x)
-
Set the optional left label to the given string.
- Source
set_label_pos(x, y)
-
Invoked by the menu system to set the component's label position.
- Source
set_label_right(x)
-
Set the optional right label to the given string.
- Source
set_one(attr, val)
- Overrides set_one(attr, val) in util::SetFields
-
- Source
set_parent(x)
-
- Source
set_parent_component(x)
-
- Source
size_label()
-
Compute the size fields.
- Source
succeed(ev)
-
Called when the menu component is selected
- Source
toggle_is_shaded()
-
Toggle whether or not the item is shaded. If it is, it is
displayed in a filtered way and will not accept input.
- Source
accel
-
img_left
-
img_left_h
-
img_left_w
-
img_right
-
img_right_h
-
img_right_w
-
is_shaded_flag
-
is_sub_menu_flag
-
label
-
label_h
-
label_left
-
label_left_w
-
label_mid_w
-
label_right
-
label_right_w
-
label_x
-
label_y
-
parent
-
parent_component
-