time_show_state Subroutine

private subroutine time_show_state(self)

The marker's color and size: brighter and larger when hovered, more when dragged.

Type Bound

TimeHandle

Arguments

Type IntentOptional Attributes Name
class(TimeHandle), intent(inout) :: self

Calls

proc~~time_show_state~~CallsGraph proc~time_show_state TimeHandle%time_show_state proc~check_status check_status proc~time_show_state->proc~check_status proc~color~2 ReferenceFrame%color proc~time_show_state->proc~color~2 proc~dragged DragHandle%dragged proc~time_show_state->proc~dragged proc~hovered DragHandle%hovered proc~time_show_state->proc~hovered proc~marker_set_style marker_set_style proc~time_show_state->proc~marker_set_style interface~vkf_line_style vkf_line_style proc~marker_set_style->interface~vkf_line_style interface~vkf_line_style_changed vkf_line_style_changed proc~marker_set_style->interface~vkf_line_style_changed

Called by

proc~~time_show_state~~CalledByGraph proc~time_show_state TimeHandle%time_show_state proc~set_marker_shape TimeHandle%set_marker_shape proc~set_marker_shape->proc~time_show_state proc~set_marker_size TimeHandle%set_marker_size proc~set_marker_size->proc~time_show_state proc~time_build_contents TimeHandle%time_build_contents proc~time_build_contents->proc~time_show_state proc~time_grab TimeHandle%time_grab proc~time_grab->proc~time_show_state proc~time_set_color TimeHandle%time_set_color proc~time_set_color->proc~time_show_state

Source Code

    subroutine time_show_state(self)
        class(TimeHandle), intent(inout) :: self
        real(wp) :: rgba(4), size, light
        if (.not. c_associated(self%marker)) return
        rgba = self%color()
        size = self%size_
        light = 0.0_wp
        if (self%dragged()) then
            light = 0.6_wp
            size = 1.4_wp * size
        else if (self%hovered()) then
            light = 0.35_wp
            size = 1.2_wp * size
        end if
        rgba(1:3) = rgba(1:3) + light * (1.0_wp - rgba(1:3))
        call check_status(marker_set_style(self%marker, real(rgba, c_float), real(size, c_float), self%shape_, &
                                           0.0_c_float))
    end subroutine time_show_state