A panel titled title, with the widgets up to end_panel. A title
starting with ## (e.g. '##callout') gives a panel with no title bar,
e.g. a callout next to an object: what follows ## still names the
panel (Dear ImGui tells panels apart and keeps their state by it), but
isn't shown. position ([x, y], 0 to 1 across the window, y up; default:
where ImGui puts it) is where its point pivot is ([0, 0], the default:
its top left; [0.5, 1]: the middle of its bottom); with follow, every
frame (and it can't be moved), else at first.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Gui), | intent(inout) | :: | self | |||
| character(len=*), | intent(in) | :: | title |
the title ('##' then a name: no title bar) |
||
| real(kind=wp), | intent(in), | optional | :: | position(2) |
[x, y] (0 to 1 across the window, y up) |
|
| real(kind=wp), | intent(in), | optional | :: | pivot(2) |
the panel's point at |
|
| logical, | intent(in), | optional | :: | follow |
place it every frame (default false: at first) |
subroutine begin_panel(self, title, position, pivot, follow) class(Gui), intent(inout) :: self character(len=*), intent(in) :: title !! the title ('##' then a name: no title bar) real(wp), intent(in), optional :: position(2) !! [x, y] (0 to 1 across the window, y up) real(wp), intent(in), optional :: pivot(2) !! the panel's point at `position` (0 to 1, from its top left) logical, intent(in), optional :: follow !! place it every frame (default false: at first) real(wp) :: p(2), q(2) integer(c_int) :: f p = -1.0_wp q = 0.0_wp f = 0 if (present(position)) p = position if (present(pivot)) q = pivot if (present(follow)) f = merge(1_c_int, 0_c_int, follow) call vkf_gui_begin(self%handle, title, len(title, kind=c_int), real(p(1), c_double), real(p(2), c_double), & real(q(1), c_double), real(q(2), c_double), f) end subroutine begin_panel