Lomse library. API documentation
0.30.0
|
#include <lomse_events.h>
EventUpdateUI events are generated to inform about actions related to the Document that could require changes on the user application GUI, such as enabling or disabling tools, menu items and buttons.
EventUpdateUI events of type k_selection_set_change are generated when Document objects are selected or deselected. The rationale is that some application tools should be enabled or disabled depending on the kind of selected objects.
EventUpdateUI events of type k_pointed_object_change are generated when the document cursor is updated, as the object pointed by the cursor has changed. Again, the rationale is that some application tools should be enabled or disabled depending on the nature of the pointed object.
EventUpdateUI events are sent directly to the application global handler (the one set by invoking LomseDoorway::set_notify_callback() ). For handling these events you should generate application events, place them in the application events loop and return control to Lomse.
Example
For instance, in an application written using the wxWidgets framework you could handle the EventUpdateUI as follows:
Later, your application event will be processed by the appropriate objects (i.e., a ToolBox object) for synchronizing the state of tools, menu items and buttons:
Public Member Functions | |
EventUpdateUI (EEventType type, WpInteractor wpInteractor, WpDocument wpDoc, SelectionSet *pSelection, DocCursor *pCursor) | |
SelectionSet * | get_selection () |
DocCursor * | get_cursor () |
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 () |
|
inline |
Constructor.
|
inline |
Returns a ptr to current DocCursor object, so that user application can determine where is the cursor pointing.
|
inline |
Returns a ptr to current SelectionSet object, containg the information for currently selected objects.