checkbox Function

private function checkbox(self, label, value) result(changed)

A checkbox showing value: true (and value changed) after the user changed it.

Type Bound

Gui

Arguments

Type IntentOptional Attributes Name
class(Gui), intent(inout) :: self
character(len=*), intent(in) :: label

the text next to it

logical, intent(inout) :: value

checked or not (changed by the user)

Return Value logical


Calls

proc~~checkbox~~CallsGraph proc~checkbox Gui%checkbox interface~vkf_gui_checkbox vkf_gui_checkbox proc~checkbox->interface~vkf_gui_checkbox

Source Code

    logical function checkbox(self, label, value) result(changed)
        class(Gui), intent(inout) :: self
        character(len=*), intent(in) :: label           !! the text next to it
        logical, intent(inout) :: value                 !! checked or not (changed by the user)
        integer(c_int) :: v
        v = merge(1_c_int, 0_c_int, value)
        changed = vkf_gui_checkbox(self%handle, label, len(label, kind=c_int), v) /= 0
        value = v /= 0
    end function checkbox