Lomse library. API documentation
0.30.0
|
#include <lomse_events.h>
EventControlPointMoved event is generated when a mouse action has been interpreted by Lomse as a command for moving an object control point (handler).
Operating system raw mouse events can be passed to Lomse to be processed by the currently selected Task object (see Task objects). Once done, Lomse will generate relevant events of different types (normally EventMouse, EventControlPointMoved and EventUpdateUI events) with relevant information about affected Document objects or other.
In particular, an EventControlPointMoved event is generated when TaskMoveHandler is selected and the user releases the mouse button. For having a full view of the event generation process, imagine that your application has selected TaskSelection behavior; this is the default task when no specific task is assigned. This task is oriented to initiate actions related to selecting objects: drawing a section rectangle, displaying a contextual menu, generating on-click events, and initiating a 'move object' action. In this situation a mouse left click down generates an EventMouse of type k_on_click_event
. Your application receives this event and having determined that the pointed object is a handle, decides to select the clicked object and switch to TaskMoveObject. Now, Lomse will take care of moving the handle while the mouse moves, and when the mouse button is released, Lomse will generate the EventControlPointMoved to inform your application about the event and the final destination point of the handle.
For processing this event, probably your application will issue an edition command for changing the object owning the moved handle. All relevant information for this is provided by the event. For example:
Public Member Functions | |
EventControlPointMoved (EEventType type, WpInteractor wpInteractor, GmoObj *pGmo, int iHandler, UPoint uShift, WpDocument wpDoc) | |
int | get_handler_index () |
ShapeId | get_shape_index () |
UPoint | get_shift () |
int | get_gmo_type () |
Public Member Functions inherited from EventAction | |
virtual | ~EventAction () |
WpInteractor | get_interactor () |
WpDocument | get_document () |
bool | is_still_valid () |
Public Member Functions inherited from EventInfo | |
virtual | ~EventInfo () |
virtual Observable * | get_source () |
EEventType | get_event_type () |
bool | is_doc_modified_event () |
bool | is_update_window_event () |
bool | is_mouse_in_event () |
bool | is_mouse_out_event () |
bool | is_on_click_event () |
bool | is_link_clicked_event () |
bool | is_show_contextual_menu_event () |
bool | is_control_point_moved_event () |
bool | is_selection_set_change () |
bool | is_pointed_object_change () |
bool | is_do_play_score_event () |
bool | is_pause_score_event () |
bool | is_stop_playback_event () |
bool | is_tracking_event () |
bool | is_update_viewport_event () |
bool | is_end_of_playback_event () |
EventControlPointMoved::EventControlPointMoved | ( | EEventType | type, |
WpInteractor | wpInteractor, | ||
GmoObj * | pGmo, | ||
int | iHandler, | ||
UPoint | uShift, | ||
WpDocument | wpDoc | ||
) |
Constructor.
|
inline |
Returns the type of graphic object owning the handler.
|
inline |
Returns the handler number (0...n-1) for the moved handler.
|
inline |
Returns the shape ID of the object owning the handler or -1 if it is a box.
|
inline |
Returns the shift (in logical units) to apply to the object.