A checkbox showing value: true (and value changed) after the user
changed it.
| Type | Intent | Optional | 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) |
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