Lomse library. API documentation
0.30.0
|
#include <lomse_events.h>
An event to inform user application about the need to change the viewport during score playback, so that current played notes are visible.
During playback Lomse could generate this event when auto-scroll mode is on. The event is generated when Lomse detects that the viewport has to be changed for ensuring that the notes being played are visible in the viewport. The event provides information about the new proposed viewport origin.
For processing this event the user application should create an application "viewport
update" event, place it on the application events loop, and return control to Lomse. Later, when the application event is processed, the user application should invoke method Interactor.new_viewport(xPos, yPos)
and, if necessary, update any GUI objects, such as scrollbars or other.
Example
For instance, in an application written using the wxWidgets framework you could have a global method for receiving all Lomse events, convert them in application events, and return control to Lomse:
Later, your application should just process the application event as convenient. The recommended action is to use the Interactor for requesting to change the viewport to the new origin provided by the Lomse event. This will generate later an EventPaint for updating the View. In addition your application should to update scrollbars and other information or widgets used by the application. For instance:
Public Member Functions | |
EventUpdateViewport (WpInteractor wpInteractor, Pixels x, Pixels y) | |
virtual | ~EventUpdateViewport () |
Pixels | get_new_viewport_x () |
Pixels | get_new_viewport_y () |
void | get_new_viewport (Pixels *x, Pixels *y) |
Public Member Functions inherited from EventPlayback | |
virtual | ~EventPlayback () |
WpInteractor | get_interactor () |
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.
|
inlinevirtual |
Destructor.
|
inline |
Updates parameters x, y with the values for the new viewport origin.
|
inline |
Returns the x coordinate (pixels) for the new viewport origin.
|
inline |
Returns the y coordinate (pixels) for the new viewport origin.