Class Menu

Superclasses :
gui::SubMenu
Package :
gui

This class encapsulates a drop down menu, or a sub-menu.

The left, centre and right labels/images of the elements within it are formatted within the menu automatically.

Source

Class summary
Methods inherited from gui::SubMenu
set_abs_coords(x, y)
Variables inherited from gui::SubMenu
x y
Methods inherited from gui::MenuComponent
clear_is_shaded() close_all(discard) display_label(lw, mw, rw) fatal(s) get_accel() get_label() is_shaded() is_sub_menu() possibly_invalidate() set_accel(k) set_img_left(x) set_img_right(x) set_is_shaded() set_label(x) set_label_left(x) set_label_pos(x, y) set_label_right(x) set_one(attr, val) set_parent(x) size_label() succeed(ev) toggle_is_shaded()
Variables inherited from gui::MenuComponent
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
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) set_one(attr, val) string_val(attr, val) string_vals(attr, val, n) test_flag(attr, val)
Methods inherited from util::Connectable
connect(obj, meth, type) disconnect(l) fire(type, param) fire_event(e)
Variables inherited from util::Connectable
listeners
Methods inherited from lang::Object
clone(seen) equals(other, seen) get_class() get_class_name() get_id() hash_code(depth, seen) is_instance(name) to_string(depth, seen)
Methods defined in this class
add(c, i) cursor_on() display() drag_off() find_key(k) get_which_open() handle_default(e) handle_drag(e) handle_event(e) handle_key_down(e) handle_key_escape(e) handle_key_left(e) handle_key_return(e) handle_key_right(e) handle_key_up(e) handle_press(e) handle_release(e) hide() in_button_region() initially() resize() set_parent_component(x) set_which_highlight(x) set_which_open(x) which_item()
Variables defined in this class
children h max_label_left_w max_label_mid_w max_label_right_w temp_win w which_highlight which_open

Method detail

add(c, i)

Add the given component to the Menu.
Parameters :
c - The Component to add.
i - The index to add at; if omitted then the new component is appended to the end.
Source

cursor_on()

Overrides cursor_on() in gui::SubMenu
Go to the first non-shaded item.
Source

display()

Overrides display() in gui::SubMenu
Source

drag_off()

Overrides drag_off() in gui::SubMenu
Private method, not intended for client invocation

find_key(k)

Source

get_which_open()

Source

handle_default(e)

Source

handle_drag(e)

Source

handle_event(e)

Overrides handle_event(e) in gui::SubMenu
Source

handle_key_down(e)

Source

handle_key_escape(e)

Source

handle_key_left(e)

Source

handle_key_return(e)

Source

handle_key_right(e)

Source

handle_key_up(e)

Source

handle_press(e)

Source

handle_release(e)

Source

hide()

Overrides hide() in gui::SubMenu
Private method, not intended for client invocation

in_button_region()

Private method, not intended for client invocation

initially()

Overrides initially() in util::Connectable

resize()

Overrides resize() in gui::SubMenu
Source

set_parent_component(x)

Overrides set_parent_component(x) in gui::MenuComponent
Source

set_which_highlight(x)

Private method, not intended for client invocation

set_which_open(x)

Private method, not intended for client invocation

which_item()

Private method, not intended for client invocation

Variable detail

children


h


max_label_left_w


max_label_mid_w


max_label_right_w


temp_win


w


which_highlight


which_open