handler_button_press Subroutine

private subroutine handler_button_press(self, window, x, y, button)

A mouse button (MOUSE_LEFT, MOUSE_MIDDLE, MOUSE_RIGHT) was pressed at (x, y) (see mouse_motion).

Type Bound

WindowEventHandler

Arguments

Type IntentOptional Attributes Name
class(WindowEventHandler), intent(inout) :: self
class(WindowProxy), intent(inout) :: window

the window of the event

real(kind=wp), intent(in) :: x

-1 to 1 across the window, y up

real(kind=wp), intent(in) :: y

-1 to 1 across the window, y up

integer, intent(in) :: button

MOUSE_LEFT, MOUSE_MIDDLE or MOUSE_RIGHT


Called by

proc~~handler_button_press~~CalledByGraph proc~handler_button_press WindowEventHandler%handler_button_press proc~dispatch_event dispatch_event proc~dispatch_event->proc~handler_button_press proc~dispatch_events dispatch_events proc~dispatch_events->proc~dispatch_event proc~frame WindowProxy%frame proc~frame->proc~dispatch_events proc~resize WindowProxy%resize proc~resize->proc~frame proc~run WindowProxy%run proc~run->proc~frame

Source Code

    subroutine handler_button_press(self, window, x, y, button)
        class(WindowEventHandler), intent(inout) :: self
        class(WindowProxy), intent(inout) :: window         !! the window of the event
        real(wp), intent(in) :: x, y                        !! -1 to 1 across the window, y up
        integer, intent(in) :: button                       !! MOUSE_LEFT, MOUSE_MIDDLE or MOUSE_RIGHT
    end subroutine handler_button_press