Skip to content

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 ​

Variables ​

NameTypeAttributesDescription
K_I32type(number_kind)parameterint32.
K_I64type(number_kind)parameterint64.
K_R32type(number_kind)parameterreal32.
K_R64type(number_kind)parameterreal64.
HALF_I32integer(kind=c_int)parameterint32.
HALF_I64integer(kind=c_long_long)parameterint64.
HALF_R32real(kind=c_float)parameterreal32.
HALF_R64real(kind=c_double)parameterreal64.
CONVERSION_MAXinteger(kind=int32)parameterLongest conversion of a format (Dear ImGui copies it into 32 bytes, 'll' included, and asserts beyond).
PIreal(kind=real64)parameterpi.
FAST_I32integer(kind=int32)parameterLargest int32 step whose 10 steps fit.
FAST_I64integer(kind=int64)parameterLargest 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

NameTypeAttributesDescription
dtypeinteger(kind=c_int)ImGuiDataType_*.
familyinteger(kind=int32)FORMAT_INTEGER or FORMAT_REAL.
widelogical64-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

fortran
function ig_radio(label, current, value, stat) result(clicked)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel (also the id; '##id' hides it).
currentinteger(kind=int32)inoutThe option chosen in the group.
valueinteger(kind=int32)inThis button's option.
statinteger(kind=int32)outoptionalStatus.

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

fortran
function ig_list_box(label, current, items, height, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel (also the id; '##id' hides it).
currentinteger(kind=int32)inoutIndex of the chosen item.
itemscharacter(len=*)inItems.
heightreal(kind=real64)inoptionalHeight [pixels]; 0 (default): up to 7 items; < 0: the height left in the window minus |height|.
statinteger(kind=int32)outoptionalStatus.

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

fortran
function ig_slider_angle_r32(label, radians, deg_min, deg_max, format, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel (also the id; '##id' hides it).
radiansreal(kind=real32)inoutAngle [radians].
deg_minreal(kind=real32)inoptionalLeft end [degrees] (default -360).
deg_maxreal(kind=real32)inoptionalRight end [degrees] (default 360).
formatcharacter(len=*)inoptionalprintf format of the degrees, a real (default '%.0f deg').
statinteger(kind=int32)outoptionalStatus.

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

fortran
function ig_slider_angle_r64(label, radians, deg_min, deg_max, format, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel (also the id; '##id' hides it).
radiansreal(kind=real64)inoutAngle [radians].
deg_minreal(kind=real64)inoptionalLeft end [degrees] (default -360).
deg_maxreal(kind=real64)inoptionalRight end [degrees] (default 360).
formatcharacter(len=*)inoptionalprintf format of the degrees, a real (default '%.0f deg').
statinteger(kind=int32)outoptionalStatus.

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

fortran
function ig_input_i32(label, value, step, format, enter_returns, read_only, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel (also the id; '##id' hides it).
valueinteger(kind=int32)inoutValue.
stepinteger(kind=int32)inoptionalStep of the - and + buttons, > 0 (default: no buttons).
formatcharacter(len=*)inoptionalprintf format of an integer (checked; default '%d').
enter_returnslogicalinoptionalTrue only on the frame enter is pressed.
read_onlylogicalinoptionalShown, not editable (default false).
statinteger(kind=int32)outoptionalStatus.

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

fortran
function ig_drag_i32(label, value, speed, vmin, vmax, format, scale, clamp, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel (also the id; '##id' hides it).
valueinteger(kind=int32)inoutValue.
speedreal(kind=real64)inoptionalChange per pixel dragged [value/pixel], > 0 (default 1).
vmininteger(kind=int32)inoptionalLowest value a drag reaches (default: none).
vmaxinteger(kind=int32)inoptionalHighest value a drag reaches (default: none).
formatcharacter(len=*)inoptionalprintf format of an integer (checked).
scalecharacter(len=*)inoptional'linear' (default) or 'log' (with vmin and vmax).
clamplogicalinoptionalTyped values clamped too (default false).
statinteger(kind=int32)outoptionalStatus.

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

fortran
function ig_slider_i32(label, value, vmin, vmax, format, scale, clamp, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel (also the id; '##id' hides it).
valueinteger(kind=int32)inoutValue.
vmininteger(kind=int32)inValue at the left end.
vmaxinteger(kind=int32)inValue at the right end.
formatcharacter(len=*)inoptionalprintf format of an integer (checked).
scalecharacter(len=*)inoptional'linear' (default) or 'log'.
clamplogicalinoptionalTyped values clamped too (default false).
statinteger(kind=int32)outoptionalStatus.

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

fortran
function ig_input_i32_v(label, value, step, format, enter_returns, read_only, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel (also the id; '##id' hides it).
valueinteger(kind=int32)inoutValue.
stepinteger(kind=int32)inoptionalStep of the - and + buttons, > 0 (default: no buttons).
formatcharacter(len=*)inoptionalprintf format of an integer (checked; default '%d').
enter_returnslogicalinoptionalTrue only on the frame enter is pressed.
read_onlylogicalinoptionalShown, not editable (default false).
statinteger(kind=int32)outoptionalStatus.

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

fortran
function ig_drag_i32_v(label, value, speed, vmin, vmax, format, scale, clamp, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel (also the id; '##id' hides it).
valueinteger(kind=int32)inoutValue.
speedreal(kind=real64)inoptionalChange per pixel dragged [value/pixel], > 0 (default 1).
vmininteger(kind=int32)inoptionalLowest value a drag reaches (default: none).
vmaxinteger(kind=int32)inoptionalHighest value a drag reaches (default: none).
formatcharacter(len=*)inoptionalprintf format of an integer (checked).
scalecharacter(len=*)inoptional'linear' (default) or 'log' (with vmin and vmax).
clamplogicalinoptionalTyped values clamped too (default false).
statinteger(kind=int32)outoptionalStatus.

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

fortran
function ig_slider_i32_v(label, value, vmin, vmax, format, scale, clamp, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel (also the id; '##id' hides it).
valueinteger(kind=int32)inoutValue.
vmininteger(kind=int32)inValue at the left end.
vmaxinteger(kind=int32)inValue at the right end.
formatcharacter(len=*)inoptionalprintf format of an integer (checked).
scalecharacter(len=*)inoptional'linear' (default) or 'log'.
clamplogicalinoptionalTyped values clamped too (default false).
statinteger(kind=int32)outoptionalStatus.

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

fortran
function ig_drag_range_i32(label, lo, hi, speed, vmin, vmax, format, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel (also the id; '##id' hides it).
lointeger(kind=int32)inoutLower end of the range.
hiinteger(kind=int32)inoutUpper end of the range.
speedreal(kind=real64)inoptionalChange per pixel dragged [value/pixel], > 0 (default 1).
vmininteger(kind=int32)inoptionalLowest value of lo (default: none).
vmaxinteger(kind=int32)inoptionalHighest value of hi (default: none).
formatcharacter(len=*)inoptionalprintf format of an integer (checked).
statinteger(kind=int32)outoptionalStatus.

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

fortran
function ig_input_i64(label, value, step, format, enter_returns, read_only, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel (also the id; '##id' hides it).
valueinteger(kind=int64)inoutValue.
stepinteger(kind=int64)inoptionalStep of the - and + buttons, > 0 (default: no buttons).
formatcharacter(len=*)inoptionalprintf format of an integer (checked; default '%d').
enter_returnslogicalinoptionalTrue only on the frame enter is pressed.
read_onlylogicalinoptionalShown, not editable (default false).
statinteger(kind=int32)outoptionalStatus.

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

fortran
function ig_drag_i64(label, value, speed, vmin, vmax, format, scale, clamp, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel (also the id; '##id' hides it).
valueinteger(kind=int64)inoutValue.
speedreal(kind=real64)inoptionalChange per pixel dragged [value/pixel], > 0 (default 1).
vmininteger(kind=int64)inoptionalLowest value a drag reaches (default: none).
vmaxinteger(kind=int64)inoptionalHighest value a drag reaches (default: none).
formatcharacter(len=*)inoptionalprintf format of an integer (checked).
scalecharacter(len=*)inoptional'linear' (default) or 'log' (with vmin and vmax).
clamplogicalinoptionalTyped values clamped too (default false).
statinteger(kind=int32)outoptionalStatus.

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

fortran
function ig_slider_i64(label, value, vmin, vmax, format, scale, clamp, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel (also the id; '##id' hides it).
valueinteger(kind=int64)inoutValue.
vmininteger(kind=int64)inValue at the left end.
vmaxinteger(kind=int64)inValue at the right end.
formatcharacter(len=*)inoptionalprintf format of an integer (checked).
scalecharacter(len=*)inoptional'linear' (default) or 'log'.
clamplogicalinoptionalTyped values clamped too (default false).
statinteger(kind=int32)outoptionalStatus.

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

fortran
function ig_input_i64_v(label, value, step, format, enter_returns, read_only, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel (also the id; '##id' hides it).
valueinteger(kind=int64)inoutValue.
stepinteger(kind=int64)inoptionalStep of the - and + buttons, > 0 (default: no buttons).
formatcharacter(len=*)inoptionalprintf format of an integer (checked; default '%d').
enter_returnslogicalinoptionalTrue only on the frame enter is pressed.
read_onlylogicalinoptionalShown, not editable (default false).
statinteger(kind=int32)outoptionalStatus.

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

fortran
function ig_drag_i64_v(label, value, speed, vmin, vmax, format, scale, clamp, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel (also the id; '##id' hides it).
valueinteger(kind=int64)inoutValue.
speedreal(kind=real64)inoptionalChange per pixel dragged [value/pixel], > 0 (default 1).
vmininteger(kind=int64)inoptionalLowest value a drag reaches (default: none).
vmaxinteger(kind=int64)inoptionalHighest value a drag reaches (default: none).
formatcharacter(len=*)inoptionalprintf format of an integer (checked).
scalecharacter(len=*)inoptional'linear' (default) or 'log' (with vmin and vmax).
clamplogicalinoptionalTyped values clamped too (default false).
statinteger(kind=int32)outoptionalStatus.

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

fortran
function ig_slider_i64_v(label, value, vmin, vmax, format, scale, clamp, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel (also the id; '##id' hides it).
valueinteger(kind=int64)inoutValue.
vmininteger(kind=int64)inValue at the left end.
vmaxinteger(kind=int64)inValue at the right end.
formatcharacter(len=*)inoptionalprintf format of an integer (checked).
scalecharacter(len=*)inoptional'linear' (default) or 'log'.
clamplogicalinoptionalTyped values clamped too (default false).
statinteger(kind=int32)outoptionalStatus.

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

fortran
function ig_drag_range_i64(label, lo, hi, speed, vmin, vmax, format, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel (also the id; '##id' hides it).
lointeger(kind=int64)inoutLower end of the range.
hiinteger(kind=int64)inoutUpper end of the range.
speedreal(kind=real64)inoptionalChange per pixel dragged [value/pixel], > 0 (default 1).
vmininteger(kind=int64)inoptionalLowest value of lo (default: none).
vmaxinteger(kind=int64)inoptionalHighest value of hi (default: none).
formatcharacter(len=*)inoptionalprintf format of an integer (checked).
statinteger(kind=int32)outoptionalStatus.

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

fortran
function ig_input_r32(label, value, step, format, enter_returns, read_only, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel (also the id; '##id' hides it).
valuereal(kind=real32)inoutValue.
stepreal(kind=real32)inoptionalStep of the - and + buttons, > 0 (default: no buttons).
formatcharacter(len=*)inoptionalprintf format of a real (checked; default '%.6g').
enter_returnslogicalinoptionalTrue only on the frame enter is pressed.
read_onlylogicalinoptionalShown, not editable (default false).
statinteger(kind=int32)outoptionalStatus.

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

fortran
function ig_drag_r32(label, value, speed, vmin, vmax, format, scale, clamp, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel (also the id; '##id' hides it).
valuereal(kind=real32)inoutValue.
speedreal(kind=real64)inoptionalChange per pixel dragged [value/pixel], > 0 (default 1).
vminreal(kind=real32)inoptionalLowest value a drag reaches (default: none).
vmaxreal(kind=real32)inoptionalHighest value a drag reaches (default: none).
formatcharacter(len=*)inoptionalprintf format of a real (checked).
scalecharacter(len=*)inoptional'linear' (default) or 'log' (with vmin and vmax).
clamplogicalinoptionalTyped values clamped too (default false).
statinteger(kind=int32)outoptionalStatus.

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

fortran
function ig_slider_r32(label, value, vmin, vmax, format, scale, clamp, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel (also the id; '##id' hides it).
valuereal(kind=real32)inoutValue.
vminreal(kind=real32)inValue at the left end.
vmaxreal(kind=real32)inValue at the right end.
formatcharacter(len=*)inoptionalprintf format of a real (checked).
scalecharacter(len=*)inoptional'linear' (default) or 'log'.
clamplogicalinoptionalTyped values clamped too (default false).
statinteger(kind=int32)outoptionalStatus.

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

fortran
function ig_input_r32_v(label, value, step, format, enter_returns, read_only, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel (also the id; '##id' hides it).
valuereal(kind=real32)inoutValue.
stepreal(kind=real32)inoptionalStep of the - and + buttons, > 0 (default: no buttons).
formatcharacter(len=*)inoptionalprintf format of a real (checked; default '%.6g').
enter_returnslogicalinoptionalTrue only on the frame enter is pressed.
read_onlylogicalinoptionalShown, not editable (default false).
statinteger(kind=int32)outoptionalStatus.

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

fortran
function ig_drag_r32_v(label, value, speed, vmin, vmax, format, scale, clamp, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel (also the id; '##id' hides it).
valuereal(kind=real32)inoutValue.
speedreal(kind=real64)inoptionalChange per pixel dragged [value/pixel], > 0 (default 1).
vminreal(kind=real32)inoptionalLowest value a drag reaches (default: none).
vmaxreal(kind=real32)inoptionalHighest value a drag reaches (default: none).
formatcharacter(len=*)inoptionalprintf format of a real (checked).
scalecharacter(len=*)inoptional'linear' (default) or 'log' (with vmin and vmax).
clamplogicalinoptionalTyped values clamped too (default false).
statinteger(kind=int32)outoptionalStatus.

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

fortran
function ig_slider_r32_v(label, value, vmin, vmax, format, scale, clamp, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel (also the id; '##id' hides it).
valuereal(kind=real32)inoutValue.
vminreal(kind=real32)inValue at the left end.
vmaxreal(kind=real32)inValue at the right end.
formatcharacter(len=*)inoptionalprintf format of a real (checked).
scalecharacter(len=*)inoptional'linear' (default) or 'log'.
clamplogicalinoptionalTyped values clamped too (default false).
statinteger(kind=int32)outoptionalStatus.

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

fortran
function ig_drag_range_r32(label, lo, hi, speed, vmin, vmax, format, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel (also the id; '##id' hides it).
loreal(kind=real32)inoutLower end of the range.
hireal(kind=real32)inoutUpper end of the range.
speedreal(kind=real64)inoptionalChange per pixel dragged [value/pixel], > 0 (default 1).
vminreal(kind=real32)inoptionalLowest value of lo (default: none).
vmaxreal(kind=real32)inoptionalHighest value of hi (default: none).
formatcharacter(len=*)inoptionalprintf format of a real (checked).
statinteger(kind=int32)outoptionalStatus.

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

fortran
function ig_input_r64(label, value, step, format, enter_returns, read_only, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel (also the id; '##id' hides it).
valuereal(kind=real64)inoutValue.
stepreal(kind=real64)inoptionalStep of the - and + buttons, > 0 (default: no buttons).
formatcharacter(len=*)inoptionalprintf format of a real (checked; default '%.6g').
enter_returnslogicalinoptionalTrue only on the frame enter is pressed.
read_onlylogicalinoptionalShown, not editable (default false).
statinteger(kind=int32)outoptionalStatus.

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

fortran
function ig_drag_r64(label, value, speed, vmin, vmax, format, scale, clamp, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel (also the id; '##id' hides it).
valuereal(kind=real64)inoutValue.
speedreal(kind=real64)inoptionalChange per pixel dragged [value/pixel], > 0 (default 1).
vminreal(kind=real64)inoptionalLowest value a drag reaches (default: none).
vmaxreal(kind=real64)inoptionalHighest value a drag reaches (default: none).
formatcharacter(len=*)inoptionalprintf format of a real (checked).
scalecharacter(len=*)inoptional'linear' (default) or 'log' (with vmin and vmax).
clamplogicalinoptionalTyped values clamped too (default false).
statinteger(kind=int32)outoptionalStatus.

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

fortran
function ig_slider_r64(label, value, vmin, vmax, format, scale, clamp, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel (also the id; '##id' hides it).
valuereal(kind=real64)inoutValue.
vminreal(kind=real64)inValue at the left end.
vmaxreal(kind=real64)inValue at the right end.
formatcharacter(len=*)inoptionalprintf format of a real (checked).
scalecharacter(len=*)inoptional'linear' (default) or 'log'.
clamplogicalinoptionalTyped values clamped too (default false).
statinteger(kind=int32)outoptionalStatus.

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

fortran
function ig_input_r64_v(label, value, step, format, enter_returns, read_only, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel (also the id; '##id' hides it).
valuereal(kind=real64)inoutValue.
stepreal(kind=real64)inoptionalStep of the - and + buttons, > 0 (default: no buttons).
formatcharacter(len=*)inoptionalprintf format of a real (checked; default '%.6g').
enter_returnslogicalinoptionalTrue only on the frame enter is pressed.
read_onlylogicalinoptionalShown, not editable (default false).
statinteger(kind=int32)outoptionalStatus.

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

fortran
function ig_drag_r64_v(label, value, speed, vmin, vmax, format, scale, clamp, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel (also the id; '##id' hides it).
valuereal(kind=real64)inoutValue.
speedreal(kind=real64)inoptionalChange per pixel dragged [value/pixel], > 0 (default 1).
vminreal(kind=real64)inoptionalLowest value a drag reaches (default: none).
vmaxreal(kind=real64)inoptionalHighest value a drag reaches (default: none).
formatcharacter(len=*)inoptionalprintf format of a real (checked).
scalecharacter(len=*)inoptional'linear' (default) or 'log' (with vmin and vmax).
clamplogicalinoptionalTyped values clamped too (default false).
statinteger(kind=int32)outoptionalStatus.

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

fortran
function ig_slider_r64_v(label, value, vmin, vmax, format, scale, clamp, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel (also the id; '##id' hides it).
valuereal(kind=real64)inoutValue.
vminreal(kind=real64)inValue at the left end.
vmaxreal(kind=real64)inValue at the right end.
formatcharacter(len=*)inoptionalprintf format of a real (checked).
scalecharacter(len=*)inoptional'linear' (default) or 'log'.
clamplogicalinoptionalTyped values clamped too (default false).
statinteger(kind=int32)outoptionalStatus.

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

fortran
function ig_drag_range_r64(label, lo, hi, speed, vmin, vmax, format, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel (also the id; '##id' hides it).
loreal(kind=real64)inoutLower end of the range.
hireal(kind=real64)inoutUpper end of the range.
speedreal(kind=real64)inoptionalChange per pixel dragged [value/pixel], > 0 (default 1).
vminreal(kind=real64)inoptionalLowest value of lo (default: none).
vmaxreal(kind=real64)inoptionalHighest value of hi (default: none).
formatcharacter(len=*)inoptionalprintf format of a real (checked).
statinteger(kind=int32)outoptionalStatus.

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

fortran
function input_core(label, k, p, n, scalar, pstep, pfast, format, enter_returns, read_only, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel.
ktype(number_kind)inKind of the values.
ptype(c_ptr)inThe values.
ninteger(kind=int32)inHow many.
scalarlogicalinOne value: InputScalar.
psteptype(c_ptr)inStep (null: no buttons).
pfasttype(c_ptr)inFast step (ctrl).
formatcharacter(len=*)inoptionalprintf format.
enter_returnslogicalinoptionalTrue only when enter is pressed.
read_onlylogicalinoptionalNot editable.
statinteger(kind=int32)outoptionalStatus.

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

fortran
function drag_core(label, k, p, n, scalar, speed, plo, phi, bounded, format, scale, clamp, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel.
ktype(number_kind)inKind of the values.
ptype(c_ptr)inThe values.
ninteger(kind=int32)inHow many.
scalarlogicalinOne value: DragScalar.
speedreal(kind=real64)inoptionalChange per pixel.
plotype(c_ptr)inLower bound.
phitype(c_ptr)inUpper bound.
boundedlogicalinBoth bounds given by the program.
formatcharacter(len=*)inoptionalprintf format.
scalecharacter(len=*)inoptional'linear' or 'log'.
clamplogicalinoptionalTyped values clamped.
statinteger(kind=int32)outoptionalStatus.

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

fortran
function slider_core(label, k, p, n, scalar, plo, phi, format, scale, clamp, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel.
ktype(number_kind)inKind of the values.
ptype(c_ptr)inThe values.
ninteger(kind=int32)inHow many.
scalarlogicalinOne value: SliderScalar.
plotype(c_ptr)inLeft end.
phitype(c_ptr)inRight end.
formatcharacter(len=*)inoptionalprintf format.
scalecharacter(len=*)inoptional'linear' or 'log'.
clamplogicalinoptionalTyped values clamped.
statinteger(kind=int32)outoptionalStatus.

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

fortran
function range_core(label, k, plo, phi, speed, pvmin, pvmax, format, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel.
ktype(number_kind)inKind of the values.
plotype(c_ptr)inLower end.
phitype(c_ptr)inUpper end.
speedreal(kind=real64)inoptionalChange per pixel.
pvmintype(c_ptr)inLowest value of the lower end.
pvmaxtype(c_ptr)inHighest value of the upper end.
formatcharacter(len=*)inoptionalprintf format.
statinteger(kind=int32)outoptionalStatus.

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

fortran
function angle_core(label, radians, v, d, format, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
labelcharacter(len=*)inLabel.
radiansreal(kind=real64)inThe angle as the program has it [radians].
vreal(kind=c_float)inouttargetIts single-precision copy [radians].
dreal(kind=real64)inThe ends [degrees].
formatcharacter(len=*)inoptionalprintf format of the degrees.
statinteger(kind=int32)outoptionalStatus.

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

fortran
function c_format(name, k, format, fmt, stat) result(ok)

Arguments

NameTypeIntentAttributesDescription
namecharacter(len=*)inThe procedure.
ktype(number_kind)inKind of the value.
formatcharacter(len=*)inoptionalThe format.
fmtcharacter(kind=c_char, len=:)outallocatableThe C format.
statinteger(kind=int32)outoptionalStatus, 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

fortran
function speed_ok(name, speed, s, stat) result(ok)

Arguments

NameTypeIntentAttributesDescription
namecharacter(len=*)inThe procedure.
speedreal(kind=real64)inoptionalSpeed [value/pixel].
sreal(kind=c_float)outIts single-precision copy.
statinteger(kind=int32)outoptionalStatus, 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

fortran
function scale_flags(name, scale, clamp, flags, stat) result(ok)

Arguments

NameTypeIntentAttributesDescription
namecharacter(len=*)inThe procedure.
scalecharacter(len=*)inoptional'linear' or 'log'.
clamplogicalinoptionalTyped values clamped.
flagsinteger(kind=c_int)outImGuiSliderFlags.
statinteger(kind=int32)outoptionalStatus, on a refusal.

Call graph

no_components ​

True, with FIG_ERR_ARGUMENT, for a vector of no components.

Attributes: recursive

Returns: logical

fortran
function no_components(name, n, stat) result(refused)

Arguments

NameTypeIntentAttributesDescription
namecharacter(len=*)inThe procedure.
ninteger(kind=int32)inComponents.
statinteger(kind=int32)outoptionalStatus, 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

fortran
function int_range(name, lo, hi, has_lo, has_hi, half, ordered, stat, lo_name, hi_name) result(ok)

Arguments

NameTypeIntentAttributesDescription
namecharacter(len=*)inThe procedure.
lointeger(kind=int64)inLower bound.
hiinteger(kind=int64)inUpper bound.
has_lologicalinlo given by the program.
has_hilogicalinhi given by the program.
halfinteger(kind=int64)inLargest magnitude.
orderedlogicalinlo <= hi required.
statinteger(kind=int32)outoptionalStatus, on a refusal.
lo_namecharacter(len=*)inoptionalName of lo (default 'vmin').
hi_namecharacter(len=*)inoptionalName 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

fortran
function real_range(name, lo, hi, has_lo, has_hi, half, ordered, stat, lo_name, hi_name) result(ok)

Arguments

NameTypeIntentAttributesDescription
namecharacter(len=*)inThe procedure.
loreal(kind=real64)inLower bound.
hireal(kind=real64)inUpper bound.
has_lologicalinlo given by the program.
has_hilogicalinhi given by the program.
halfreal(kind=real64)inLargest magnitude.
orderedlogicalinlo <= hi required.
statinteger(kind=int32)outoptionalStatus, on a refusal.
lo_namecharacter(len=*)inoptionalName of lo (default 'vmin').
hi_namecharacter(len=*)inoptionalName of hi (default 'vmax').

Call graph

int_text ​

An integer, written.

Attributes: pure

Returns: character(len=:)

fortran
function int_text(i) result(text)

Arguments

NameTypeIntentAttributesDescription
iinteger(kind=int64)inThe integer.

Call graph

real_text ​

A real, written with 6 significant digits ('NaN' for a NaN).

Attributes: pure

Returns: character(len=:)

fortran
function real_text(x) result(text)

Arguments

NameTypeIntentAttributesDescription
xreal(kind=real64)inThe real.

Call graph

Released under the MIT licence.