|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--sub_arctic.lib.min_interactor
|
+--sub_arctic.lib.base_interactor
|
+--sub_arctic.lib.uni_container
|
+--sub_arctic.contrib.GrowDragContainer
A container class for one object that provides a grow handle. This establishes constraints on its child so that it follows the size of this object as it grows.
| Field Summary | |
protected callback_object |
_callback_obj
_callback_obj is the object we make callbacks to. |
protected loaded_image |
_handle
Image for the grow handle |
static int |
END_MOVE_CALLBACK
Constant for "end" callback (called only at end of move). |
protected boolean |
m_grow_enabled
The m_grow_enabled variable is true if the interactor is to support gorw operations. |
static int |
MOVE_CALLBACK
Constant for "move" callback (called on every move, including last). |
| Fields inherited from class sub_arctic.lib.base_interactor |
_child_index,
_child_list,
_clip_bounds,
_constraint_flags,
_enabled_constraint,
_flags,
_h,
_h_constraint,
_parent,
_part_a_constraint,
_part_b_constraint,
_user_data,
_visible_constraint,
_w,
_w_constraint,
_x,
_x_constraint,
_y,
_y_constraint,
default_child_hint |
| Constructor Summary | |
GrowDragContainer(int x,
int y,
int w,
int h,
loaded_image hnd_img)
Compatability constructor. |
|
GrowDragContainer(int x,
int y,
int w,
int h,
loaded_image hnd_img,
callback_object cbo)
Full constructor. |
|
| Method Summary | |
callback_object |
callback_obj()
Retrieve the object we make callbacks to. |
boolean |
drag_end(event evt,
int x_pos,
int y_pos,
int st_x,
int st_y,
int grab_x,
int grab_y,
java.lang.Object user_info)
Handle input corresponding to the end of a drag for move. |
boolean |
drag_end(event evt,
int cur_w,
int cur_h,
int st_w,
int st_h,
java.lang.Object user_info)
Handle input corresponding to the end of a drag for grow. |
boolean |
drag_feedback(event evt,
int x_pos,
int y_pos,
int st_x,
int st_y,
int grab_x,
int grab_y,
java.lang.Object user_info)
Handle a movement during a drag for move. |
boolean |
drag_feedback(event evt,
int cur_w,
int cur_h,
int st_w,
int st_h,
java.lang.Object user_info)
Handle a movement during a drag for grow. |
boolean |
drag_start(event evt,
int x_pos,
int y_pos,
int grab_x,
int grab_y,
java.lang.Object user_info)
Handle the start of a drag to the object for moves. |
boolean |
drag_start(event evt,
java.lang.Object user_info)
Handle the start of a drag to the object for grows. |
protected void |
draw_self_local(drawable d)
Draw the object's current appearance. |
int |
first_callback_num()
Indicate the first callback number used by this interactor (in this case END_MOVE_CALLBACK). |
boolean |
grow_enabled()
The grow_enabled method indicates the current status of the interactor for grow operations. |
loaded_image |
handle()
Image for the grow handle. |
int |
last_callback_num()
Indicate the last callback number used by this interactor (in this case MOVE_CALLBACK). |
void |
pick(int pt_x,
int pt_y,
pick_collector pick_list)
Determine if this object is "picked" by the the given point. |
boolean |
press(event evt,
java.lang.Object user_info)
Handle mouse button press input to the object. |
boolean |
release(event evt,
java.lang.Object user_info)
Companion to press(). |
interactor |
remove_child(int at_indx)
Override remove_child to drop constraints. |
void |
set_callback_obj(callback_object cbo)
Set the object we make callbacks to. |
void |
set_child(int at_indx,
interactor chld)
Override set_child to establish and/or remove constraints. |
void |
set_grow_enabled(boolean flag)
The set_grow_enabled method sets whether the interactor should support grow operations. |
void |
set_handle(loaded_image himg)
Set the image used for the grow handle. |
| Methods inherited from class sub_arctic.lib.uni_container |
add_child |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
protected callback_object _callback_obj
public static final int MOVE_CALLBACK
public static final int END_MOVE_CALLBACK
protected boolean m_grow_enabled
protected loaded_image _handle
| Constructor Detail |
public GrowDragContainer(int x,
int y,
int w,
int h,
loaded_image hnd_img,
callback_object cbo)
int - x the initial x position of this object.int - y the initial y position of this object.int - w the initial width of this object.int - w the initial height of this object.loaded_image - hnd_img an image for the grow handle.callback_object - cbo the object to receive move callbacks.
public GrowDragContainer(int x,
int y,
int w,
int h,
loaded_image hnd_img)
int - x the initial x position of this object.int - y the initial y position of this object.int - w the initial width of this object.int - w the initial height of this object.loaded_image - hnd_img an image for the grow handle.| Method Detail |
public callback_object callback_obj()
public void set_callback_obj(callback_object cbo)
callback_object - cbo the new callback object.public int first_callback_num()
sub_arctic.lib.input#callback_objectpublic int last_callback_num()
sub_arctic.lib.input#callback_objectpublic boolean grow_enabled()
public void set_grow_enabled(boolean flag)
public loaded_image handle()
public void set_handle(loaded_image himg)
loaded_image - himg the new image for the grow handle.
public void set_child(int at_indx,
interactor chld)
int - at_indx the index to place the child at.interactor - chld the child interactor.public interactor remove_child(int at_indx)
int - at_index index of child to remove.
public boolean press(event evt,
java.lang.Object user_info)
event - evt the press event.Object - user_info information associated with this object at pick
time.
public boolean release(event evt,
java.lang.Object user_info)
event - evt the release event.Object - user_info information associated with this object at pick
time.
public boolean drag_start(event evt,
java.lang.Object user_info)
event - evt the event "causing" the drag.Object - user_info information associated with this object at pick
time.
public boolean drag_start(event evt,
int x_pos,
int y_pos,
int grab_x,
int grab_y,
java.lang.Object user_info)
event - evt the event "causing" the start of the drag.int - x_pos x position of new position (in parent's coords).int - y_pos y position of new position (in parent's coords).int - grab_x x position where we started the drag (in local
coords).int - grab_y y position where we started the drag (in local
coords).Object - user_info information provided when this object requested
focus.
public boolean drag_feedback(event evt,
int cur_w,
int cur_h,
int st_w,
int st_h,
java.lang.Object user_info)
event - evt the event "causing" the drag.int - cur_w new width indicated by drag.int - cur_h new width indicated by drag.int - st_w initial width of this object.int - st_h initial height of this object.Object - user_info information associated with this object at pick
time.
public boolean drag_feedback(event evt,
int x_pos,
int y_pos,
int st_x,
int st_y,
int grab_x,
int grab_y,
java.lang.Object user_info)
event - evt the event "causing" the start of the drag.int - x_pos x position of new position (in parent's coords).int - y_pos y position of new position (in parent's coords).int - start_x x position where we started the drag (in parent's
coords).int - start_y y position where we started the drag (in parent's
coords).int - grab_x x position where we started the grab (in local
coords).int - grab_y y position where we started the grab (in local
coords).Object - user_info information provided when this object requested
focus.
public boolean drag_end(event evt,
int cur_w,
int cur_h,
int st_w,
int st_h,
java.lang.Object user_info)
event - evt the event "causing" the drag.int - cur_w new width indicated by drag.int - cur_h new width indicated by drag.int - st_w initial width of this object.int - st_h initial height of this object.Object - user_info information associated with this object at pick
time.
public boolean drag_end(event evt,
int x_pos,
int y_pos,
int st_x,
int st_y,
int grab_x,
int grab_y,
java.lang.Object user_info)
event - evt the event "causing" the start of the drag.int - x_pos x position of new position (in parent's coords).int - y_pos y position of new position (in parent's coords).int - start_x x position where we started the drag (in parent's
coords).int - start_y y position where we started the drag (in parent's
coords).int - grab_x x position where we started the grab (in local
coords).int - grab_y y position where we started the grab (in local
coords).Object - user_info information provided when this object requested
focus.
public void pick(int pt_x,
int pt_y,
pick_collector pick_list)
int - pt_x the x coordinate of the query point.int - pt_y the y coordinate of the query point.pick_collector - pick_list the result list we add ourselves to if we
are picked.protected void draw_self_local(drawable d)
drawable - d the surface to draw on.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||