Class SubMenu

Superclasses :
gui::MenuComponent
Subclasses :
gui::Menu
Package :
gui

This is the parent class of menu components which popup other submenus to the right of their labels. A submenu need not necessarily contain other MenuComponents; see for example the Palette class.

Source

Class summary
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) set_parent_component(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
cursor_on() display() drag_off() handle_event(e) hide() initially() resize() set_abs_coords(x, y)
Variables defined in this class
x y

Method detail

cursor_on()

Invoked by the parent menu when the right cursor key is pressed.
Source

display()

Display the submenu.
Source

drag_off()

Invoked by the parent menu when the mouse is dragged off the menu whilst it is active.
Source

handle_event(e)

Handle the given event.
Parameters :
e - the Icon event to handle.
Source

hide()

Hide the submenu.
Source

initially()

Overrides initially() in util::Connectable

resize()

Invoked after set_abs_coords() above, this empty method may be implemented so that the submenu may initialize its size.
Source

set_abs_coords(x, y)

Invoked by the parent system to set the top-left position of the menu prior to resize() being invoked
Parameters :
x -

y -

Source

Variable detail

x


y