figure_numbers
figure_numbers, numbers and choices: fields, drag boxes and sliders for integers and reals, scalar or vector; angles; ranges; radio buttons and list boxes.
The number widgets are generic over the kind of the value, int32, int64, real32 or real64, scalar or rank 1 (a vector: one field, drag box or slider per component, side by side, sharing the bounds). Bounds and steps have the kind of the value; speed is real64 whatever the kind. Each returns .true. on the frame the user changed the value, which it writes back in place. A format is a C printf format of one value of the kind's family (integer: %d, %i, %u; real: %f, %e, %g, %a), checked by format_ok before Dear ImGui sees it (FIG_ERR_ARGUMENT otherwise); an int64's format is given as an int32's ('%d') and FIGURE adds the length modifier C needs.
Every procedure refuses a call from a task or with no frame open (FIG_ERR_STATE, as every drawing call), and arguments Dear ImGui would assert on (FIG_ERR_ARGUMENT); stat is optional: absent, a failure stops with error stop and the message (usage errors: reported by the next app%next_frame). None opens a scope: the list box's begin and end are inside ig_list_box. widgets.md, "Numbers" and "Choices".
Source: src/lib/figure_numbers.F90
Dependencies
Contents
- number_kind
- ig_input
- ig_drag
- ig_slider
- ig_slider_angle
- ig_drag_range
- ig_radio
- ig_list_box
- ig_slider_angle_r32
- ig_slider_angle_r64
- ig_input_i32
- ig_drag_i32
- ig_slider_i32
- ig_input_i32_v
- ig_drag_i32_v
- ig_slider_i32_v
- ig_drag_range_i32
- ig_input_i64
- ig_drag_i64
- ig_slider_i64
- ig_input_i64_v
- ig_drag_i64_v
- ig_slider_i64_v
- ig_drag_range_i64
- ig_input_r32
- ig_drag_r32
- ig_slider_r32
- ig_input_r32_v
- ig_drag_r32_v
- ig_slider_r32_v
- ig_drag_range_r32
- ig_input_r64
- ig_drag_r64
- ig_slider_r64
- ig_input_r64_v
- ig_drag_r64_v
- ig_slider_r64_v
- ig_drag_range_r64
- input_core
- drag_core
- slider_core
- range_core
- angle_core
- c_format
- speed_ok
- scale_flags
- no_components
- int_range
- real_range
- int_text
- real_text
Variables
| Name | Type | Attributes | Description |
|---|---|---|---|
K_I32 | type(number_kind) | parameter | int32. |
K_I64 | type(number_kind) | parameter | int64. |
K_R32 | type(number_kind) | parameter | real32. |
K_R64 | type(number_kind) | parameter | real64. |
HALF_I32 | integer(kind=c_int) | parameter | int32. |
HALF_I64 | integer(kind=c_long_long) | parameter | int64. |
HALF_R32 | real(kind=c_float) | parameter | real32. |
HALF_R64 | real(kind=c_double) | parameter | real64. |
CONVERSION_MAX | integer(kind=int32) | parameter | Longest conversion of a format (Dear ImGui copies it into 32 bytes, 'll' included, and asserts beyond). |
PI | real(kind=real64) | parameter | pi. |
FAST_I32 | integer(kind=int32) | parameter | Largest int32 step whose 10 steps fit. |
FAST_I64 | integer(kind=int64) | parameter | Largest int64 step whose 10 steps fit. |
Derived Types
number_kind
What a widget needs to know of a kind: Dear ImGui's data type, the format family, the C length modifier.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
dtype | integer(kind=c_int) | ImGuiDataType_*. | |
family | integer(kind=int32) | FORMAT_INTEGER or FORMAT_REAL. | |
wide | logical | 64-bit integer: 'll' before the conversion of a format. |
Interfaces
ig_input
A field for a number or a vector of numbers, typed: ig_input(label, value [, step] [, format] [, enter_returns] [, read_only] [, stat]) → logical. value int32, int64, real32 or real64, scalar or rank 1 (one field per component). step (> 0, the kind of value) adds - and + buttons (ctrl: 10 steps). format default: '%d' for integers, '%.6g' for reals. True on the frame the user changes the value: when the field is left (enter, tab, a click elsewhere) after an edit, or a button is pressed; with enter_returns=.true., only on the frame enter is pressed. read_only=.true.: shown, selectable, not editable.
Module procedures: ig_input_i32, ig_input_i64, ig_input_r32, ig_input_r64, ig_input_i32_v, ig_input_i64_v, ig_input_r32_v, ig_input_r64_v
ig_drag
A drag box for a number or a vector: ig_drag(label, value [, speed] [, vmin] [, vmax] [, format] [, scale] [, clamp] [, stat]) → logical. Dragged sideways, value changes by speed per pixel (default 1; shift: 10 times, alt: a hundredth); a double click or ctrl-click types a value. vmin, vmax (the kind of value) stop the drag; clamp=.true. clamps a typed value too. scale='log' (with vmin and vmax): equal drags multiply the value by equal factors. Reals are rounded to the precision format shows.
Module procedures: ig_drag_i32, ig_drag_i64, ig_drag_r32, ig_drag_r64, ig_drag_i32_v, ig_drag_i64_v, ig_drag_r32_v, ig_drag_r64_v
ig_slider
A slider for a number or a vector: ig_slider(label, value, vmin, vmax [, format] [, scale] [, clamp] [, stat]) → logical. A click or a drag sets value in [vmin, vmax] (vmin > vmax: a reversed slider); ctrl-click types one (clamp=.true.: clamped too). scale='log': the middle of the slider is the geometric mean of positive ends. vmin, vmax within half the range of the kind. Reals are rounded to the precision format shows.
Module procedures: ig_slider_i32, ig_slider_i64, ig_slider_r32, ig_slider_r64, ig_slider_i32_v, ig_slider_i64_v, ig_slider_r32_v, ig_slider_r64_v
ig_slider_angle
A slider for an angle kept in radians and shown in degrees: ig_slider_angle(label, radians [, deg_min] [, deg_max] [, format] [, stat]) → logical (SliderAngle), real32 or real64; bounds in degrees (default -360 and 360), format of the degrees (default '%.0f deg'). Edited in single precision: radians is written only on the frames it changes.
Module procedures: ig_slider_angle_r32, ig_slider_angle_r64
ig_drag_range
Two drag boxes for the ends of a range [lo, hi] and one label: ig_drag_range(label, lo, hi [, speed] [, vmin] [, vmax] [, format] [, stat]) → logical (DragFloatRange2, DragIntRange2 for any kind). lo stays in [vmin, hi] and hi in [lo, vmax], typed values too.
Module procedures: ig_drag_range_i32, ig_drag_range_i64, ig_drag_range_r32, ig_drag_range_r64
Functions
ig_radio
A radio button of a group sharing current: drawn chosen when current == value; a click sets current = value and returns true (on that frame; also when it was chosen already). One call per option, each with its own value (RadioButton).
Attributes: recursive
Returns: logical
function ig_radio(label, current, value, stat) result(clicked)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label (also the id; '##id' hides it). | |
current | integer(kind=int32) | inout | The option chosen in the group. | |
value | integer(kind=int32) | in | This button's option. | |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
ig_list_box
A list of items shown at once, in a box that scrolls; current is the index of the one chosen (1 to size(items); any other value shows none chosen). True on the frame the user picks an item (current is then its index); a pick is reported as an edit by ig_last_item. Only the rows in view are drawn. Trailing blanks of the items are not shown; items may repeat a text (they are told apart by their index).
Attributes: recursive
Returns: logical
function ig_list_box(label, current, items, height, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label (also the id; '##id' hides it). | |
current | integer(kind=int32) | inout | Index of the chosen item. | |
items | character(len=*) | in | Items. | |
height | real(kind=real64) | in | optional | Height [pixels]; 0 (default): up to 7 items; < 0: the height left in the window minus |height|. |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
ig_slider_angle_r32
A slider for a real32 angle in radians, shown in degrees: see ig_slider_angle.
Attributes: recursive
Returns: logical
function ig_slider_angle_r32(label, radians, deg_min, deg_max, format, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label (also the id; '##id' hides it). | |
radians | real(kind=real32) | inout | Angle [radians]. | |
deg_min | real(kind=real32) | in | optional | Left end [degrees] (default -360). |
deg_max | real(kind=real32) | in | optional | Right end [degrees] (default 360). |
format | character(len=*) | in | optional | printf format of the degrees, a real (default '%.0f deg'). |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
ig_slider_angle_r64
A slider for a real64 angle in radians, shown in degrees: see ig_slider_angle.
Attributes: recursive
Returns: logical
function ig_slider_angle_r64(label, radians, deg_min, deg_max, format, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label (also the id; '##id' hides it). | |
radians | real(kind=real64) | inout | Angle [radians]. | |
deg_min | real(kind=real64) | in | optional | Left end [degrees] (default -360). |
deg_max | real(kind=real64) | in | optional | Right end [degrees] (default 360). |
format | character(len=*) | in | optional | printf format of the degrees, a real (default '%.0f deg'). |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
ig_input_i32
A field for an int32 value (InputScalar); true when the user changed the value: see ig_input.
Attributes: recursive
Returns: logical
function ig_input_i32(label, value, step, format, enter_returns, read_only, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label (also the id; '##id' hides it). | |
value | integer(kind=int32) | inout | Value. | |
step | integer(kind=int32) | in | optional | Step of the - and + buttons, > 0 (default: no buttons). |
format | character(len=*) | in | optional | printf format of an integer (checked; default '%d'). |
enter_returns | logical | in | optional | True only on the frame enter is pressed. |
read_only | logical | in | optional | Shown, not editable (default false). |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
ig_drag_i32
A drag box for an int32 value (DragScalar); true when the user changed the value: see ig_drag.
Attributes: recursive
Returns: logical
function ig_drag_i32(label, value, speed, vmin, vmax, format, scale, clamp, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label (also the id; '##id' hides it). | |
value | integer(kind=int32) | inout | Value. | |
speed | real(kind=real64) | in | optional | Change per pixel dragged [value/pixel], > 0 (default 1). |
vmin | integer(kind=int32) | in | optional | Lowest value a drag reaches (default: none). |
vmax | integer(kind=int32) | in | optional | Highest value a drag reaches (default: none). |
format | character(len=*) | in | optional | printf format of an integer (checked). |
scale | character(len=*) | in | optional | 'linear' (default) or 'log' (with vmin and vmax). |
clamp | logical | in | optional | Typed values clamped too (default false). |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
ig_slider_i32
A slider for an int32 value (SliderScalar); true when the user changed the value: see ig_slider.
Attributes: recursive
Returns: logical
function ig_slider_i32(label, value, vmin, vmax, format, scale, clamp, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label (also the id; '##id' hides it). | |
value | integer(kind=int32) | inout | Value. | |
vmin | integer(kind=int32) | in | Value at the left end. | |
vmax | integer(kind=int32) | in | Value at the right end. | |
format | character(len=*) | in | optional | printf format of an integer (checked). |
scale | character(len=*) | in | optional | 'linear' (default) or 'log'. |
clamp | logical | in | optional | Typed values clamped too (default false). |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
ig_input_i32_v
A field for a vector of int32 values, one field per component (InputScalarN); true when the user changed the value: see ig_input.
Attributes: recursive
Returns: logical
function ig_input_i32_v(label, value, step, format, enter_returns, read_only, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label (also the id; '##id' hides it). | |
value | integer(kind=int32) | inout | Value. | |
step | integer(kind=int32) | in | optional | Step of the - and + buttons, > 0 (default: no buttons). |
format | character(len=*) | in | optional | printf format of an integer (checked; default '%d'). |
enter_returns | logical | in | optional | True only on the frame enter is pressed. |
read_only | logical | in | optional | Shown, not editable (default false). |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
ig_drag_i32_v
A drag box for a vector of int32 values, one field per component (DragScalarN); true when the user changed the value: see ig_drag.
Attributes: recursive
Returns: logical
function ig_drag_i32_v(label, value, speed, vmin, vmax, format, scale, clamp, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label (also the id; '##id' hides it). | |
value | integer(kind=int32) | inout | Value. | |
speed | real(kind=real64) | in | optional | Change per pixel dragged [value/pixel], > 0 (default 1). |
vmin | integer(kind=int32) | in | optional | Lowest value a drag reaches (default: none). |
vmax | integer(kind=int32) | in | optional | Highest value a drag reaches (default: none). |
format | character(len=*) | in | optional | printf format of an integer (checked). |
scale | character(len=*) | in | optional | 'linear' (default) or 'log' (with vmin and vmax). |
clamp | logical | in | optional | Typed values clamped too (default false). |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
ig_slider_i32_v
A slider for a vector of int32 values, one field per component (SliderScalarN); true when the user changed the value: see ig_slider.
Attributes: recursive
Returns: logical
function ig_slider_i32_v(label, value, vmin, vmax, format, scale, clamp, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label (also the id; '##id' hides it). | |
value | integer(kind=int32) | inout | Value. | |
vmin | integer(kind=int32) | in | Value at the left end. | |
vmax | integer(kind=int32) | in | Value at the right end. | |
format | character(len=*) | in | optional | printf format of an integer (checked). |
scale | character(len=*) | in | optional | 'linear' (default) or 'log'. |
clamp | logical | in | optional | Typed values clamped too (default false). |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
ig_drag_range_i32
Two drag boxes for the ends of a range of int32 values; true when the user changed either: see ig_drag_range.
Attributes: recursive
Returns: logical
function ig_drag_range_i32(label, lo, hi, speed, vmin, vmax, format, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label (also the id; '##id' hides it). | |
lo | integer(kind=int32) | inout | Lower end of the range. | |
hi | integer(kind=int32) | inout | Upper end of the range. | |
speed | real(kind=real64) | in | optional | Change per pixel dragged [value/pixel], > 0 (default 1). |
vmin | integer(kind=int32) | in | optional | Lowest value of lo (default: none). |
vmax | integer(kind=int32) | in | optional | Highest value of hi (default: none). |
format | character(len=*) | in | optional | printf format of an integer (checked). |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
ig_input_i64
A field for an int64 value (InputScalar); true when the user changed the value: see ig_input.
Attributes: recursive
Returns: logical
function ig_input_i64(label, value, step, format, enter_returns, read_only, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label (also the id; '##id' hides it). | |
value | integer(kind=int64) | inout | Value. | |
step | integer(kind=int64) | in | optional | Step of the - and + buttons, > 0 (default: no buttons). |
format | character(len=*) | in | optional | printf format of an integer (checked; default '%d'). |
enter_returns | logical | in | optional | True only on the frame enter is pressed. |
read_only | logical | in | optional | Shown, not editable (default false). |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
ig_drag_i64
A drag box for an int64 value (DragScalar); true when the user changed the value: see ig_drag.
Attributes: recursive
Returns: logical
function ig_drag_i64(label, value, speed, vmin, vmax, format, scale, clamp, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label (also the id; '##id' hides it). | |
value | integer(kind=int64) | inout | Value. | |
speed | real(kind=real64) | in | optional | Change per pixel dragged [value/pixel], > 0 (default 1). |
vmin | integer(kind=int64) | in | optional | Lowest value a drag reaches (default: none). |
vmax | integer(kind=int64) | in | optional | Highest value a drag reaches (default: none). |
format | character(len=*) | in | optional | printf format of an integer (checked). |
scale | character(len=*) | in | optional | 'linear' (default) or 'log' (with vmin and vmax). |
clamp | logical | in | optional | Typed values clamped too (default false). |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
ig_slider_i64
A slider for an int64 value (SliderScalar); true when the user changed the value: see ig_slider.
Attributes: recursive
Returns: logical
function ig_slider_i64(label, value, vmin, vmax, format, scale, clamp, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label (also the id; '##id' hides it). | |
value | integer(kind=int64) | inout | Value. | |
vmin | integer(kind=int64) | in | Value at the left end. | |
vmax | integer(kind=int64) | in | Value at the right end. | |
format | character(len=*) | in | optional | printf format of an integer (checked). |
scale | character(len=*) | in | optional | 'linear' (default) or 'log'. |
clamp | logical | in | optional | Typed values clamped too (default false). |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
ig_input_i64_v
A field for a vector of int64 values, one field per component (InputScalarN); true when the user changed the value: see ig_input.
Attributes: recursive
Returns: logical
function ig_input_i64_v(label, value, step, format, enter_returns, read_only, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label (also the id; '##id' hides it). | |
value | integer(kind=int64) | inout | Value. | |
step | integer(kind=int64) | in | optional | Step of the - and + buttons, > 0 (default: no buttons). |
format | character(len=*) | in | optional | printf format of an integer (checked; default '%d'). |
enter_returns | logical | in | optional | True only on the frame enter is pressed. |
read_only | logical | in | optional | Shown, not editable (default false). |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
ig_drag_i64_v
A drag box for a vector of int64 values, one field per component (DragScalarN); true when the user changed the value: see ig_drag.
Attributes: recursive
Returns: logical
function ig_drag_i64_v(label, value, speed, vmin, vmax, format, scale, clamp, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label (also the id; '##id' hides it). | |
value | integer(kind=int64) | inout | Value. | |
speed | real(kind=real64) | in | optional | Change per pixel dragged [value/pixel], > 0 (default 1). |
vmin | integer(kind=int64) | in | optional | Lowest value a drag reaches (default: none). |
vmax | integer(kind=int64) | in | optional | Highest value a drag reaches (default: none). |
format | character(len=*) | in | optional | printf format of an integer (checked). |
scale | character(len=*) | in | optional | 'linear' (default) or 'log' (with vmin and vmax). |
clamp | logical | in | optional | Typed values clamped too (default false). |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
ig_slider_i64_v
A slider for a vector of int64 values, one field per component (SliderScalarN); true when the user changed the value: see ig_slider.
Attributes: recursive
Returns: logical
function ig_slider_i64_v(label, value, vmin, vmax, format, scale, clamp, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label (also the id; '##id' hides it). | |
value | integer(kind=int64) | inout | Value. | |
vmin | integer(kind=int64) | in | Value at the left end. | |
vmax | integer(kind=int64) | in | Value at the right end. | |
format | character(len=*) | in | optional | printf format of an integer (checked). |
scale | character(len=*) | in | optional | 'linear' (default) or 'log'. |
clamp | logical | in | optional | Typed values clamped too (default false). |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
ig_drag_range_i64
Two drag boxes for the ends of a range of int64 values; true when the user changed either: see ig_drag_range.
Attributes: recursive
Returns: logical
function ig_drag_range_i64(label, lo, hi, speed, vmin, vmax, format, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label (also the id; '##id' hides it). | |
lo | integer(kind=int64) | inout | Lower end of the range. | |
hi | integer(kind=int64) | inout | Upper end of the range. | |
speed | real(kind=real64) | in | optional | Change per pixel dragged [value/pixel], > 0 (default 1). |
vmin | integer(kind=int64) | in | optional | Lowest value of lo (default: none). |
vmax | integer(kind=int64) | in | optional | Highest value of hi (default: none). |
format | character(len=*) | in | optional | printf format of an integer (checked). |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
ig_input_r32
A field for a real32 value (InputScalar); true when the user changed the value: see ig_input.
Attributes: recursive
Returns: logical
function ig_input_r32(label, value, step, format, enter_returns, read_only, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label (also the id; '##id' hides it). | |
value | real(kind=real32) | inout | Value. | |
step | real(kind=real32) | in | optional | Step of the - and + buttons, > 0 (default: no buttons). |
format | character(len=*) | in | optional | printf format of a real (checked; default '%.6g'). |
enter_returns | logical | in | optional | True only on the frame enter is pressed. |
read_only | logical | in | optional | Shown, not editable (default false). |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
ig_drag_r32
A drag box for a real32 value (DragScalar); true when the user changed the value: see ig_drag.
Attributes: recursive
Returns: logical
function ig_drag_r32(label, value, speed, vmin, vmax, format, scale, clamp, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label (also the id; '##id' hides it). | |
value | real(kind=real32) | inout | Value. | |
speed | real(kind=real64) | in | optional | Change per pixel dragged [value/pixel], > 0 (default 1). |
vmin | real(kind=real32) | in | optional | Lowest value a drag reaches (default: none). |
vmax | real(kind=real32) | in | optional | Highest value a drag reaches (default: none). |
format | character(len=*) | in | optional | printf format of a real (checked). |
scale | character(len=*) | in | optional | 'linear' (default) or 'log' (with vmin and vmax). |
clamp | logical | in | optional | Typed values clamped too (default false). |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
ig_slider_r32
A slider for a real32 value (SliderScalar); true when the user changed the value: see ig_slider.
Attributes: recursive
Returns: logical
function ig_slider_r32(label, value, vmin, vmax, format, scale, clamp, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label (also the id; '##id' hides it). | |
value | real(kind=real32) | inout | Value. | |
vmin | real(kind=real32) | in | Value at the left end. | |
vmax | real(kind=real32) | in | Value at the right end. | |
format | character(len=*) | in | optional | printf format of a real (checked). |
scale | character(len=*) | in | optional | 'linear' (default) or 'log'. |
clamp | logical | in | optional | Typed values clamped too (default false). |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
ig_input_r32_v
A field for a vector of real32 values, one field per component (InputScalarN); true when the user changed the value: see ig_input.
Attributes: recursive
Returns: logical
function ig_input_r32_v(label, value, step, format, enter_returns, read_only, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label (also the id; '##id' hides it). | |
value | real(kind=real32) | inout | Value. | |
step | real(kind=real32) | in | optional | Step of the - and + buttons, > 0 (default: no buttons). |
format | character(len=*) | in | optional | printf format of a real (checked; default '%.6g'). |
enter_returns | logical | in | optional | True only on the frame enter is pressed. |
read_only | logical | in | optional | Shown, not editable (default false). |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
ig_drag_r32_v
A drag box for a vector of real32 values, one field per component (DragScalarN); true when the user changed the value: see ig_drag.
Attributes: recursive
Returns: logical
function ig_drag_r32_v(label, value, speed, vmin, vmax, format, scale, clamp, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label (also the id; '##id' hides it). | |
value | real(kind=real32) | inout | Value. | |
speed | real(kind=real64) | in | optional | Change per pixel dragged [value/pixel], > 0 (default 1). |
vmin | real(kind=real32) | in | optional | Lowest value a drag reaches (default: none). |
vmax | real(kind=real32) | in | optional | Highest value a drag reaches (default: none). |
format | character(len=*) | in | optional | printf format of a real (checked). |
scale | character(len=*) | in | optional | 'linear' (default) or 'log' (with vmin and vmax). |
clamp | logical | in | optional | Typed values clamped too (default false). |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
ig_slider_r32_v
A slider for a vector of real32 values, one field per component (SliderScalarN); true when the user changed the value: see ig_slider.
Attributes: recursive
Returns: logical
function ig_slider_r32_v(label, value, vmin, vmax, format, scale, clamp, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label (also the id; '##id' hides it). | |
value | real(kind=real32) | inout | Value. | |
vmin | real(kind=real32) | in | Value at the left end. | |
vmax | real(kind=real32) | in | Value at the right end. | |
format | character(len=*) | in | optional | printf format of a real (checked). |
scale | character(len=*) | in | optional | 'linear' (default) or 'log'. |
clamp | logical | in | optional | Typed values clamped too (default false). |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
ig_drag_range_r32
Two drag boxes for the ends of a range of real32 values; true when the user changed either: see ig_drag_range.
Attributes: recursive
Returns: logical
function ig_drag_range_r32(label, lo, hi, speed, vmin, vmax, format, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label (also the id; '##id' hides it). | |
lo | real(kind=real32) | inout | Lower end of the range. | |
hi | real(kind=real32) | inout | Upper end of the range. | |
speed | real(kind=real64) | in | optional | Change per pixel dragged [value/pixel], > 0 (default 1). |
vmin | real(kind=real32) | in | optional | Lowest value of lo (default: none). |
vmax | real(kind=real32) | in | optional | Highest value of hi (default: none). |
format | character(len=*) | in | optional | printf format of a real (checked). |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
ig_input_r64
A field for a real64 value (InputScalar); true when the user changed the value: see ig_input.
Attributes: recursive
Returns: logical
function ig_input_r64(label, value, step, format, enter_returns, read_only, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label (also the id; '##id' hides it). | |
value | real(kind=real64) | inout | Value. | |
step | real(kind=real64) | in | optional | Step of the - and + buttons, > 0 (default: no buttons). |
format | character(len=*) | in | optional | printf format of a real (checked; default '%.6g'). |
enter_returns | logical | in | optional | True only on the frame enter is pressed. |
read_only | logical | in | optional | Shown, not editable (default false). |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
ig_drag_r64
A drag box for a real64 value (DragScalar); true when the user changed the value: see ig_drag.
Attributes: recursive
Returns: logical
function ig_drag_r64(label, value, speed, vmin, vmax, format, scale, clamp, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label (also the id; '##id' hides it). | |
value | real(kind=real64) | inout | Value. | |
speed | real(kind=real64) | in | optional | Change per pixel dragged [value/pixel], > 0 (default 1). |
vmin | real(kind=real64) | in | optional | Lowest value a drag reaches (default: none). |
vmax | real(kind=real64) | in | optional | Highest value a drag reaches (default: none). |
format | character(len=*) | in | optional | printf format of a real (checked). |
scale | character(len=*) | in | optional | 'linear' (default) or 'log' (with vmin and vmax). |
clamp | logical | in | optional | Typed values clamped too (default false). |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
ig_slider_r64
A slider for a real64 value (SliderScalar); true when the user changed the value: see ig_slider.
Attributes: recursive
Returns: logical
function ig_slider_r64(label, value, vmin, vmax, format, scale, clamp, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label (also the id; '##id' hides it). | |
value | real(kind=real64) | inout | Value. | |
vmin | real(kind=real64) | in | Value at the left end. | |
vmax | real(kind=real64) | in | Value at the right end. | |
format | character(len=*) | in | optional | printf format of a real (checked). |
scale | character(len=*) | in | optional | 'linear' (default) or 'log'. |
clamp | logical | in | optional | Typed values clamped too (default false). |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
ig_input_r64_v
A field for a vector of real64 values, one field per component (InputScalarN); true when the user changed the value: see ig_input.
Attributes: recursive
Returns: logical
function ig_input_r64_v(label, value, step, format, enter_returns, read_only, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label (also the id; '##id' hides it). | |
value | real(kind=real64) | inout | Value. | |
step | real(kind=real64) | in | optional | Step of the - and + buttons, > 0 (default: no buttons). |
format | character(len=*) | in | optional | printf format of a real (checked; default '%.6g'). |
enter_returns | logical | in | optional | True only on the frame enter is pressed. |
read_only | logical | in | optional | Shown, not editable (default false). |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
ig_drag_r64_v
A drag box for a vector of real64 values, one field per component (DragScalarN); true when the user changed the value: see ig_drag.
Attributes: recursive
Returns: logical
function ig_drag_r64_v(label, value, speed, vmin, vmax, format, scale, clamp, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label (also the id; '##id' hides it). | |
value | real(kind=real64) | inout | Value. | |
speed | real(kind=real64) | in | optional | Change per pixel dragged [value/pixel], > 0 (default 1). |
vmin | real(kind=real64) | in | optional | Lowest value a drag reaches (default: none). |
vmax | real(kind=real64) | in | optional | Highest value a drag reaches (default: none). |
format | character(len=*) | in | optional | printf format of a real (checked). |
scale | character(len=*) | in | optional | 'linear' (default) or 'log' (with vmin and vmax). |
clamp | logical | in | optional | Typed values clamped too (default false). |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
ig_slider_r64_v
A slider for a vector of real64 values, one field per component (SliderScalarN); true when the user changed the value: see ig_slider.
Attributes: recursive
Returns: logical
function ig_slider_r64_v(label, value, vmin, vmax, format, scale, clamp, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label (also the id; '##id' hides it). | |
value | real(kind=real64) | inout | Value. | |
vmin | real(kind=real64) | in | Value at the left end. | |
vmax | real(kind=real64) | in | Value at the right end. | |
format | character(len=*) | in | optional | printf format of a real (checked). |
scale | character(len=*) | in | optional | 'linear' (default) or 'log'. |
clamp | logical | in | optional | Typed values clamped too (default false). |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
ig_drag_range_r64
Two drag boxes for the ends of a range of real64 values; true when the user changed either: see ig_drag_range.
Attributes: recursive
Returns: logical
function ig_drag_range_r64(label, lo, hi, speed, vmin, vmax, format, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label (also the id; '##id' hides it). | |
lo | real(kind=real64) | inout | Lower end of the range. | |
hi | real(kind=real64) | inout | Upper end of the range. | |
speed | real(kind=real64) | in | optional | Change per pixel dragged [value/pixel], > 0 (default 1). |
vmin | real(kind=real64) | in | optional | Lowest value of lo (default: none). |
vmax | real(kind=real64) | in | optional | Highest value of hi (default: none). |
format | character(len=*) | in | optional | printf format of a real (checked). |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
input_core
A field of n values of kind k at p (InputScalar, or InputScalarN unless scalar), after its checks.
Attributes: recursive
Returns: logical
function input_core(label, k, p, n, scalar, pstep, pfast, format, enter_returns, read_only, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label. | |
k | type(number_kind) | in | Kind of the values. | |
p | type(c_ptr) | in | The values. | |
n | integer(kind=int32) | in | How many. | |
scalar | logical | in | One value: InputScalar. | |
pstep | type(c_ptr) | in | Step (null: no buttons). | |
pfast | type(c_ptr) | in | Fast step (ctrl). | |
format | character(len=*) | in | optional | printf format. |
enter_returns | logical | in | optional | True only when enter is pressed. |
read_only | logical | in | optional | Not editable. |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
drag_core
A drag box of n values of kind k at p (DragScalar, or DragScalarN unless scalar), after its checks.
Attributes: recursive
Returns: logical
function drag_core(label, k, p, n, scalar, speed, plo, phi, bounded, format, scale, clamp, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label. | |
k | type(number_kind) | in | Kind of the values. | |
p | type(c_ptr) | in | The values. | |
n | integer(kind=int32) | in | How many. | |
scalar | logical | in | One value: DragScalar. | |
speed | real(kind=real64) | in | optional | Change per pixel. |
plo | type(c_ptr) | in | Lower bound. | |
phi | type(c_ptr) | in | Upper bound. | |
bounded | logical | in | Both bounds given by the program. | |
format | character(len=*) | in | optional | printf format. |
scale | character(len=*) | in | optional | 'linear' or 'log'. |
clamp | logical | in | optional | Typed values clamped. |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
slider_core
A slider of n values of kind k at p (SliderScalar, or SliderScalarN unless scalar), after its checks.
Attributes: recursive
Returns: logical
function slider_core(label, k, p, n, scalar, plo, phi, format, scale, clamp, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label. | |
k | type(number_kind) | in | Kind of the values. | |
p | type(c_ptr) | in | The values. | |
n | integer(kind=int32) | in | How many. | |
scalar | logical | in | One value: SliderScalar. | |
plo | type(c_ptr) | in | Left end. | |
phi | type(c_ptr) | in | Right end. | |
format | character(len=*) | in | optional | printf format. |
scale | character(len=*) | in | optional | 'linear' or 'log'. |
clamp | logical | in | optional | Typed values clamped. |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
range_core
The two drag boxes of a range of kind k (native fig_drag_range), after its checks.
Attributes: recursive
Returns: logical
function range_core(label, k, plo, phi, speed, pvmin, pvmax, format, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label. | |
k | type(number_kind) | in | Kind of the values. | |
plo | type(c_ptr) | in | Lower end. | |
phi | type(c_ptr) | in | Upper end. | |
speed | real(kind=real64) | in | optional | Change per pixel. |
pvmin | type(c_ptr) | in | Lowest value of the lower end. | |
pvmax | type(c_ptr) | in | Highest value of the upper end. | |
format | character(len=*) | in | optional | printf format. |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
angle_core
The slider of an angle (SliderAngle), after the checks of the angle, its ends and its format.
Attributes: recursive
Returns: logical
function angle_core(label, radians, v, d, format, stat) result(changed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
label | character(len=*) | in | Label. | |
radians | real(kind=real64) | in | The angle as the program has it [radians]. | |
v | real(kind=c_float) | inout | target | Its single-precision copy [radians]. |
d | real(kind=real64) | in | The ends [degrees]. | |
format | character(len=*) | in | optional | printf format of the degrees. |
stat | integer(kind=int32) | out | optional | Status. |
Call graph
c_format
format checked (format_refused, and a conversion of at most CONVERSION_MAX characters) and turned into a C string, with 'll' before the conversion of a 64-bit integer; not allocated when format is absent.
Attributes: recursive
Returns: logical
function c_format(name, k, format, fmt, stat) result(ok)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
name | character(len=*) | in | The procedure. | |
k | type(number_kind) | in | Kind of the value. | |
format | character(len=*) | in | optional | The format. |
fmt | character(kind=c_char, len=:) | out | allocatable | The C format. |
stat | integer(kind=int32) | out | optional | Status, on a refusal. |
Call graph
speed_ok
The speed of a drag, checked: above 0 and within single precision (default 1).
Attributes: recursive
Returns: logical
function speed_ok(name, speed, s, stat) result(ok)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
name | character(len=*) | in | The procedure. | |
speed | real(kind=real64) | in | optional | Speed [value/pixel]. |
s | real(kind=c_float) | out | Its single-precision copy. | |
stat | integer(kind=int32) | out | optional | Status, on a refusal. |
Call graph
scale_flags
The slider flags of scale and clamp, or false with FIG_ERR_ARGUMENT for an unknown scale.
Attributes: recursive
Returns: logical
function scale_flags(name, scale, clamp, flags, stat) result(ok)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
name | character(len=*) | in | The procedure. | |
scale | character(len=*) | in | optional | 'linear' or 'log'. |
clamp | logical | in | optional | Typed values clamped. |
flags | integer(kind=c_int) | out | ImGuiSliderFlags. | |
stat | integer(kind=int32) | out | optional | Status, on a refusal. |
Call graph
no_components
True, with FIG_ERR_ARGUMENT, for a vector of no components.
Attributes: recursive
Returns: logical
function no_components(name, n, stat) result(refused)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
name | character(len=*) | in | The procedure. | |
n | integer(kind=int32) | in | Components. | |
stat | integer(kind=int32) | out | optional | Status, on a refusal. |
Call graph
int_range
Integer bounds checked: each one given within [-half, half]; with ordered, lo <= hi when both are given.
Attributes: recursive
Returns: logical
function int_range(name, lo, hi, has_lo, has_hi, half, ordered, stat, lo_name, hi_name) result(ok)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
name | character(len=*) | in | The procedure. | |
lo | integer(kind=int64) | in | Lower bound. | |
hi | integer(kind=int64) | in | Upper bound. | |
has_lo | logical | in | lo given by the program. | |
has_hi | logical | in | hi given by the program. | |
half | integer(kind=int64) | in | Largest magnitude. | |
ordered | logical | in | lo <= hi required. | |
stat | integer(kind=int32) | out | optional | Status, on a refusal. |
lo_name | character(len=*) | in | optional | Name of lo (default 'vmin'). |
hi_name | character(len=*) | in | optional | Name of hi (default 'vmax'). |
Call graph
real_range
Real bounds checked: each one given not NaN and within [-half, half]; with ordered, lo <= hi when both are given.
Attributes: recursive
Returns: logical
function real_range(name, lo, hi, has_lo, has_hi, half, ordered, stat, lo_name, hi_name) result(ok)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
name | character(len=*) | in | The procedure. | |
lo | real(kind=real64) | in | Lower bound. | |
hi | real(kind=real64) | in | Upper bound. | |
has_lo | logical | in | lo given by the program. | |
has_hi | logical | in | hi given by the program. | |
half | real(kind=real64) | in | Largest magnitude. | |
ordered | logical | in | lo <= hi required. | |
stat | integer(kind=int32) | out | optional | Status, on a refusal. |
lo_name | character(len=*) | in | optional | Name of lo (default 'vmin'). |
hi_name | character(len=*) | in | optional | Name of hi (default 'vmax'). |
Call graph
int_text
An integer, written.
Attributes: pure
Returns: character(len=:)
function int_text(i) result(text)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
i | integer(kind=int64) | in | The integer. |
Call graph
real_text
A real, written with 6 significant digits ('NaN' for a NaN).
Attributes: pure
Returns: character(len=:)
function real_text(x) result(text)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
x | real(kind=real64) | in | The real. |
Call graph