sub_arctic.input
Interface menu_focusable

All Known Implementing Classes:
menu

public abstract interface menu_focusable
extends focusable, interactor

This interface is used by interactors which are menus or subclasses of menu. It informs you when:

Be aware: There is are multiple focuses for menus. The trick is that the menu_focus_agent enforces an ordering on the interactors in its set. If an event occurs on a member of the focus set A which was added before another member of the set B, B is removed from the focus set. Thus, if you override focus_set_enter and focus_set_exit you can detect what it is doing.


Fields inherited from class sub_arctic.lib.interactor_consts
DAMAGED, ENABLED, ENABLED_HAS_EXT_NOTIFY, ENABLED_IN_PROCESS, ENABLED_IS_HORIZONTAL, ENABLED_OOD, FEATURE_BOTTOM_LEFT, FEATURE_BOTTOM_RIGHT, FEATURE_CENTER, FEATURE_NONE, FEATURE_TOP_LEFT, FEATURE_TOP_RIGHT, FIRST_FREE_FEATURE, FIRST_FREE_FLAG, FIXED_CHILDREN, H, H_HAS_EXT_NOTIFY, H_IN_PROCESS, H_OOD, IS_ENABLED, IS_VISIBLE, OOD_BITS, PART_A, PART_A_HAS_EXT_NOTIFY, PART_A_IN_PROCESS, PART_A_IS_HORIZONTAL, PART_A_OOD, PART_B, PART_B_HAS_EXT_NOTIFY, PART_B_IN_PROCESS, PART_B_IS_HORIZONTAL, PART_B_OOD, STYLE_LOCKED, SUPPORTS_CHILDREN, TRAV_DRAW, TRAV_PICK, TRAV_POST, TRAV_PRE, VISIBLE, VISIBLE_HAS_EXT_NOTIFY, VISIBLE_IN_PROCESS, VISIBLE_IS_HORIZONTAL, VISIBLE_OOD, W, W_HAS_EXT_NOTIFY, W_IN_PROCESS, W_OOD, X, X_HAS_EXT_NOTIFY, X_IN_PROCESS, X_OOD, Y, Y_HAS_EXT_NOTIFY, Y_IN_PROCESS, Y_OOD
 
Fields inherited from class sub_arctic.constraints.std_constraint_consts
FIRST_CHILD, LAST_CHILD, MAX_CHILD, MIN_CHILD, NEXT_SIBLING, NO_CONSTRAINT, OTHER, PARENT, PREV_SIBLING, SELF, ZERO
 
Method Summary
 boolean menu_exit(event evt, java.lang.Object user_info)
          This function is called to tell you your menu has been exited (the pointer is outside your space).
 boolean menu_feedback(event evt, java.lang.Object user_info)
          This function gets called during the process of the user dragging around on the menu.
 menu menu_generates_submenu(int local_x, int local_y)
          This function gets called to ask a menu if a point generates a menu, an if so which one.
 boolean menu_release(event evt, java.lang.Object user_info)
          This function gets called to inform you that the mouse button was released over your menu.
 
Methods inherited from interface sub_arctic.input.focusable
focus_set_enter, focus_set_exit
 
Methods inherited from interface sub_arctic.lib.interactor
active_constraints, add_child, add_user_datum, attach_dependent, bound, child_index, child, configure, constraint_flag_is_set, constraint_on, custom_fun1, custom_fun2, damage_from_child, damage_self, damage_self, damage_self, damage_self, damage_self, detach_dependent, do_action, do_action, drag_feature_point, draw_self, enabled_constraint, enabled, eval_enabled, eval_h, eval_part_a, eval_part_b, eval_visible, eval_w, eval_x, eval_y, eval, feature_point_enabled, feature_point, find_child, fixed_children, flag_is_set, get_awt_component, get_external_constraint, get_part, get_top_level, get_value, global_to_local, global_to_local, h_constraint, h, handle_cycle, inform_ood, insert_child, inside_bounds, into_local, into_local, into_parent, into_parent, intrinsic_constraints, is_constrained, local_to_global, local_to_global, mark_all_ood, mark_enabled_ood, mark_h_ood, mark_ood, mark_part_a_ood, mark_part_b_ood, mark_reparented_ood, mark_visible_ood, mark_w_ood, mark_x_ood, mark_y_ood, marked_ood, move_child_downward, move_child_downward, move_child_to_bottom, move_child_to_bottom, move_child_to_top, move_child_to_top, move_child_upward, move_child_upward, move_downward, move_to_bottom, move_to_top, move_upward, next_sibling, num_actions, num_children, num_feature_points, parent, part_a_constraint, part_a, part_b_constraint, part_b, pick, picked_by, pos, prev_sibling, remove_child, remove_child, remove_user_datum, restyle, set_child_index, set_child, set_constraint, set_constraint, set_enabled_constraint, set_enabled_constraint, set_enabled_constraint, set_enabled, set_h_constraint, set_h_constraint, set_h_constraint, set_h, set_parent, set_part_a_constraint, set_part_a_constraint, set_part_a_constraint, set_part_a, set_part_b_constraint, set_part_b_constraint, set_part_b_constraint, set_part_b, set_pos, set_pos, set_size, set_style_lock, set_user_info, set_visible_constraint, set_visible_constraint, set_visible_constraint, set_visible, set_w_constraint, set_w_constraint, set_w_constraint, set_w, set_x_constraint, set_x_constraint, set_x_constraint, set_x, set_y_constraint, set_y_constraint, set_y_constraint, set_y, size, style_change, supports_children, tag_str, toString, traverse_and_collect, trivial_reject, user_data, user_info, value_ood, visible_constraint, visible, w_constraint, w, x_constraint, x_into_local, x_into_parent, x, y_constraint, y_into_local, y_into_parent, y
 

Method Detail

menu_feedback

public boolean menu_feedback(event evt,
                             java.lang.Object user_info)
This function gets called during the process of the user dragging around on the menu. The menu should probably use pick() to figure out who to highlight based on this event. Like other focus based agents, its hands you back the object you gave it when you put yourself in the focus set.
Parameters:
event - evt event "causing" this action
Object - user_info uninterpreted object that was given at the time focus was established.
Returns:
boolean true if you handled this event

menu_release

public boolean menu_release(event evt,
                            java.lang.Object user_info)
This function gets called to inform you that the mouse button was released over your menu. Again, we hand you the object you gave use when you added yourself to the focus.
Parameters:
event - evt event "causing" this action
Object - user_info uninterpreted object that was given at the time focus was established.
Returns:
boolean true if you handled this event

menu_exit

public boolean menu_exit(event evt,
                         java.lang.Object user_info)
This function is called to tell you your menu has been exited (the pointer is outside your space). Note you may get this without being removed the focus set... the user might come back! Also, you are not guaranteed to get this call; you only get if the user leaves your menu.
Parameters:
event - evt event "causing" this action
Object - user_info uninterpreted object that was given at the time focus was established.
Returns:
boolean true if you handled this event

menu_generates_submenu

public menu menu_generates_submenu(int local_x,
                                   int local_y)
This function gets called to ask a menu if a point generates a menu, an if so which one. This is useful when dealing with events on a menu, so the agent will know if it needs to pop a menu down. If you get this call it will *only* be called when you have a currently displayed menu as a child. Thus, this is effectively is a check to see if the currently displayed child is the product of this location. The x and y coordinates are transformed to your coordinate system.
Parameters:
int - local_x x coordinate of the point in question.
int - local_y y coordinate of the point in question.