forked from enlightenment/efl
Spinner: migrate docs.
This commit is contained in:
parent
c6b0b53afd
commit
de3682a7d0
|
@ -3,338 +3,204 @@ class Elm.Spinner (Elm.Layout, Elm_Interface_Atspi_Value, Elm_Interface_Atspi_Wi
|
|||
eo_prefix: elm_obj_spinner;
|
||||
methods {
|
||||
@property min_max {
|
||||
[[Control the minimum and maximum values for the spinner.
|
||||
|
||||
Define the allowed range of values to be selected by the user.
|
||||
|
||||
If actual value is less than $min, it will be updated to $min. If it
|
||||
is bigger then $max, will be updated to $max. Actual value can be
|
||||
get with @.value.get.
|
||||
|
||||
By default, min is equal to 0, and max is equal to 100.
|
||||
|
||||
Warning: Maximum must be greater than minimum.]]
|
||||
set {
|
||||
/*@
|
||||
Set the minimum and maximum values for the spinner.
|
||||
|
||||
Define the allowed range of values to be selected by the user.
|
||||
|
||||
If actual value is less than $min, it will be updated to $min. If it
|
||||
is bigger then $max, will be updated to $max. Actual value can be
|
||||
get with elm_spinner_value_get().
|
||||
|
||||
By default, min is equal to 0, and max is equal to 100.
|
||||
|
||||
@warning Maximum must be greater than minimum.
|
||||
|
||||
@see elm_spinner_min_max_get()
|
||||
|
||||
@ingroup Spinner */
|
||||
}
|
||||
get {
|
||||
/*@
|
||||
Get the minimum and maximum values of the spinner.
|
||||
|
||||
@note If only one value is needed, the other pointer can be passed
|
||||
as $NULL.
|
||||
|
||||
@see elm_spinner_min_max_set() for details.
|
||||
|
||||
@ingroup Spinner */
|
||||
}
|
||||
values {
|
||||
min: double; /*@ The minimum value. */
|
||||
max: double; /*@ The maximum value. */
|
||||
min: double; [[The minimum value.]]
|
||||
max: double; [[The maximum value.]]
|
||||
}
|
||||
}
|
||||
@property step {
|
||||
[[Control the step used to increment or decrement the spinner value.
|
||||
|
||||
This value will be incremented or decremented to the displayed value.
|
||||
It will be incremented while the user keep right or top arrow pressed,
|
||||
and will be decremented while the user keep left or bottom arrow pressed.
|
||||
|
||||
The interval to increment / decrement can be set with @.interval.set.
|
||||
|
||||
By default step value is equal to 1.]]
|
||||
set {
|
||||
/*@
|
||||
Set the step used to increment or decrement the spinner value.
|
||||
|
||||
This value will be incremented or decremented to the displayed value.
|
||||
It will be incremented while the user keep right or top arrow pressed,
|
||||
and will be decremented while the user keep left or bottom arrow pressed.
|
||||
|
||||
The interval to increment / decrement can be set with
|
||||
elm_spinner_interval_set().
|
||||
|
||||
By default step value is equal to 1.
|
||||
|
||||
@see elm_spinner_step_get()
|
||||
|
||||
@ingroup Spinner */
|
||||
}
|
||||
get {
|
||||
/*@
|
||||
Get the step used to increment or decrement the spinner value.
|
||||
|
||||
@return The step value.
|
||||
|
||||
@see elm_spinner_step_get() for more details.
|
||||
|
||||
@ingroup Spinner */
|
||||
}
|
||||
values {
|
||||
step: double; /*@ The step value. */
|
||||
step: double; [[The step value.]]
|
||||
}
|
||||
}
|
||||
@property wrap {
|
||||
[[Control whether the spinner should wrap when it reaches its minimum or maximum value.
|
||||
|
||||
Disabled by default. If disabled, when the user tries to increment the
|
||||
value,
|
||||
but displayed value plus step value is bigger than maximum value,
|
||||
the new value will be the maximum value.
|
||||
The same happens when the user tries to decrement it,
|
||||
but the value less step is less than minimum value. In this case,
|
||||
the new displayed value will be the minimum value.
|
||||
|
||||
When wrap is enabled, when the user tries to increment the value,
|
||||
but displayed value plus step value is bigger than maximum value,
|
||||
the new value will be the minimum value. When the the user tries to
|
||||
decrement it, but the value less step is less than minimum value,
|
||||
the new displayed value will be the maximum value.
|
||||
|
||||
E.g.:
|
||||
$min = 10
|
||||
$max = 50
|
||||
$step = 20
|
||||
$displayed = 20
|
||||
|
||||
When the user decrement value (using left or bottom arrow), it will
|
||||
displays $50.]]
|
||||
set {
|
||||
/*@
|
||||
Set whether the spinner should wrap when it reaches its
|
||||
minimum or maximum value.
|
||||
|
||||
Disabled by default. If disabled, when the user tries to increment the
|
||||
value,
|
||||
but displayed value plus step value is bigger than maximum value,
|
||||
the new value will be the maximum value.
|
||||
The same happens when the user tries to decrement it,
|
||||
but the value less step is less than minimum value. In this case,
|
||||
the new displayed value will be the minimum value.
|
||||
|
||||
When wrap is enabled, when the user tries to increment the value,
|
||||
but displayed value plus step value is bigger than maximum value,
|
||||
the new value will be the minimum value. When the the user tries to
|
||||
decrement it, but the value less step is less than minimum value,
|
||||
the new displayed value will be the maximum value.
|
||||
|
||||
E.g.:
|
||||
@li min value = 10
|
||||
@li max value = 50
|
||||
@li step value = 20
|
||||
@li displayed value = 20
|
||||
|
||||
When the user decrement value (using left or bottom arrow), it will
|
||||
displays $50.
|
||||
|
||||
@see elm_spinner_wrap_get().
|
||||
|
||||
@ingroup Spinner */
|
||||
}
|
||||
get {
|
||||
/*@
|
||||
Get whether the spinner should wrap when it reaches its
|
||||
minimum or maximum value.
|
||||
|
||||
@return $true means wrap is enabled. $false indicates
|
||||
it's disabled. If $obj is $NULL, $false is returned.
|
||||
|
||||
@see elm_spinner_wrap_set() for details.
|
||||
|
||||
@ingroup Spinner */
|
||||
}
|
||||
values {
|
||||
wrap: bool; /*@ $true to enable wrap or $false to
|
||||
disable it. */
|
||||
wrap: bool; [[$true to enable wrap or $false to disable it.]]
|
||||
}
|
||||
}
|
||||
@property interval {
|
||||
[[Control the interval on time updates for an user mouse button hold on spinner widgets' arrows.
|
||||
|
||||
This interval value is decreased while the user holds the
|
||||
mouse pointer either incrementing or decrementing spinner's value.
|
||||
|
||||
This helps the user to get to a given value distant from the
|
||||
current one easier/faster, as it will start to change quicker and
|
||||
quicker on mouse button holds.
|
||||
|
||||
The calculation for the next change interval value, starting from
|
||||
the one set with this call, is the previous interval divided by
|
||||
$1.05, so it decreases a little bit.
|
||||
|
||||
The default starting interval value for automatic changes is
|
||||
$0.85 seconds.]]
|
||||
set {
|
||||
/*@
|
||||
Set the interval on time updates for an user mouse button hold
|
||||
on spinner widgets' arrows.
|
||||
|
||||
This interval value is @b decreased while the user holds the
|
||||
mouse pointer either incrementing or decrementing spinner's value.
|
||||
|
||||
This helps the user to get to a given value distant from the
|
||||
current one easier/faster, as it will start to change quicker and
|
||||
quicker on mouse button holds.
|
||||
|
||||
The calculation for the next change interval value, starting from
|
||||
the one set with this call, is the previous interval divided by
|
||||
$1.05, so it decreases a little bit.
|
||||
|
||||
The default starting interval value for automatic changes is
|
||||
$0.85 seconds.
|
||||
|
||||
@see elm_spinner_interval_get()
|
||||
|
||||
@ingroup Spinner */
|
||||
}
|
||||
get {
|
||||
/*@
|
||||
Get the interval on time updates for an user mouse button hold
|
||||
on spinner widgets' arrows.
|
||||
|
||||
@return The (first) interval value, in seconds, set on it.
|
||||
|
||||
@see elm_spinner_interval_set() for more details.
|
||||
|
||||
@ingroup Spinner */
|
||||
}
|
||||
values {
|
||||
interval: double; /*@ The (first) interval value in seconds. */
|
||||
interval: double; [[The (first) interval value in seconds.]]
|
||||
}
|
||||
}
|
||||
@property round {
|
||||
[[Control the round value for rounding
|
||||
|
||||
Sets the rounding value used for value rounding in the spinner.]]
|
||||
set {
|
||||
/*@
|
||||
Set the round value for rounding
|
||||
|
||||
Sets the rounding value used for value rounding in the spinner.
|
||||
|
||||
@see elm_spinner_round_get()
|
||||
@see elm_spinner_base_set()
|
||||
|
||||
@ingroup Spinner */
|
||||
}
|
||||
get {
|
||||
/*@
|
||||
Get the round value for rounding
|
||||
|
||||
@return The rounding value
|
||||
|
||||
This returns the round value for rounding.
|
||||
|
||||
@see elm_spinner_round_set() too.
|
||||
@see elm_spinner_base_set() too.
|
||||
|
||||
@ingroup Spinner */
|
||||
}
|
||||
values {
|
||||
rnd: int; /*@ The rounding value */
|
||||
rnd: int; [[The rounding value]]
|
||||
}
|
||||
}
|
||||
@property editable {
|
||||
[[Control whether the spinner can be directly edited by the user or not.
|
||||
|
||||
Spinner objects can have edition disabled, in which state they will
|
||||
be changed only by arrows.
|
||||
Useful for contexts
|
||||
where you don't want your users to interact with it writing the value.
|
||||
Specially
|
||||
when using special values, the user can see real value instead
|
||||
of special label on edition.
|
||||
|
||||
It's enabled by default.]]
|
||||
set {
|
||||
/*@
|
||||
Set whether the spinner can be directly edited by the user or not.
|
||||
|
||||
Spinner objects can have edition @b disabled, in which state they will
|
||||
be changed only by arrows.
|
||||
Useful for contexts
|
||||
where you don't want your users to interact with it writing the value.
|
||||
Specially
|
||||
when using special values, the user can see real value instead
|
||||
of special label on edition.
|
||||
|
||||
It's enabled by default.
|
||||
|
||||
@see elm_spinner_editable_get()
|
||||
|
||||
@ingroup Spinner */
|
||||
}
|
||||
get {
|
||||
/*@
|
||||
Get whether the spinner can be directly edited by the user or not.
|
||||
|
||||
@return $true means edition is enabled. $false indicates
|
||||
it's disabled. If $obj is $NULL, $false is returned.
|
||||
|
||||
@see elm_spinner_editable_set() for details.
|
||||
|
||||
@ingroup Spinner */
|
||||
}
|
||||
values {
|
||||
editable: bool; /*@ $true to allow users to edit it or $false to
|
||||
don't allow users to edit it directly. */
|
||||
editable: bool; [[$true to allow users to edit it or $false to don't allow users to edit it directly.]]
|
||||
}
|
||||
}
|
||||
@property base {
|
||||
[[Control the base for rounding
|
||||
|
||||
Rounding works as follows:
|
||||
|
||||
rounded_val = base + (double)(((value - base) / round) * round)
|
||||
|
||||
Where rounded_val, value and base are doubles, and round is an integer.
|
||||
|
||||
This means that things will be rounded to increments (or decrements) of
|
||||
"round" starting from value $base. The default base for rounding is 0.
|
||||
|
||||
Example: round = 3, base = 2
|
||||
Values: ..., -2, 0, 2, 5, 8, 11, 14, ...
|
||||
|
||||
Example: round = 2, base = 5.5
|
||||
Values: ..., -0.5, 1.5, 3.5, 5.5, 7.5, 9.5, 11.5, ...]]
|
||||
set {
|
||||
/*@
|
||||
Set the base for rounding
|
||||
|
||||
Rounding works as follows:
|
||||
|
||||
rounded_val = base + (double)(((value - base) / round) * round)
|
||||
|
||||
Where rounded_val, value and base are doubles, and round is an integer.
|
||||
|
||||
This means that things will be rounded to increments (or decrements) of
|
||||
"round" starting from value $base. The default base for rounding is 0.
|
||||
|
||||
Example: round = 3, base = 2
|
||||
Values: ..., -2, 0, 2, 5, 8, 11, 14, ...
|
||||
|
||||
Example: round = 2, base = 5.5
|
||||
Values: ..., -0.5, 1.5, 3.5, 5.5, 7.5, 9.5, 11.5, ...
|
||||
|
||||
@see elm_spinner_round_get()
|
||||
@see elm_spinner_base_get() too.
|
||||
|
||||
@ingroup Spinner */
|
||||
}
|
||||
get {
|
||||
/*@
|
||||
Get the base for rounding
|
||||
|
||||
@return The base rounding value
|
||||
|
||||
This returns the base for rounding.
|
||||
|
||||
@see elm_spinner_round_set() too.
|
||||
@see elm_spinner_base_set() too.
|
||||
|
||||
@ingroup Spinner */
|
||||
}
|
||||
values {
|
||||
base: double; /*@ The base value */
|
||||
base: double; [[The base value]]
|
||||
}
|
||||
}
|
||||
@property value {
|
||||
[[Control the value the spinner displays.
|
||||
|
||||
Value will be presented on the label following format specified with
|
||||
elm_spinner_format_set().
|
||||
|
||||
Warning The value must to be between min and max values. This values
|
||||
are set by elm_spinner_min_max_set().]]
|
||||
set {
|
||||
/*@
|
||||
Set the value the spinner displays.
|
||||
|
||||
Value will be presented on the label following format specified with
|
||||
elm_spinner_format_set().
|
||||
|
||||
@warning The value must to be between min and max values. This values
|
||||
are set by elm_spinner_min_max_set().
|
||||
|
||||
@see elm_spinner_value_get().
|
||||
@see elm_spinner_format_set().
|
||||
@see elm_spinner_min_max_set().
|
||||
|
||||
@ingroup Spinner */
|
||||
}
|
||||
get {
|
||||
/*@
|
||||
Get the value displayed by the spinner.
|
||||
|
||||
@return The value displayed.
|
||||
|
||||
@see elm_spinner_value_set() for details.
|
||||
|
||||
@ingroup Spinner */
|
||||
}
|
||||
values {
|
||||
val: double; /*@ The value to be displayed. */
|
||||
val: double; [[The value to be displayed.]]
|
||||
}
|
||||
}
|
||||
@property label_format {
|
||||
[[Control the format string of the displayed label.
|
||||
|
||||
If $NULL, this sets the format to "%.0f". If not it sets the format
|
||||
string for the label text. The label text is provided a floating point
|
||||
value, so the label text can display up to 1 floating point value.
|
||||
Note that this is optional.
|
||||
|
||||
Use a format string such as "%1.2f meters" for example, and it will
|
||||
display values like: "3.14 meters" for a value equal to 3.14159.
|
||||
|
||||
Default is "%0.f".]]
|
||||
set {
|
||||
/*@
|
||||
Set the format string of the displayed label.
|
||||
|
||||
If $NULL, this sets the format to "%.0f". If not it sets the format
|
||||
string for the label text. The label text is provided a floating point
|
||||
value, so the label text can display up to 1 floating point value.
|
||||
Note that this is optional.
|
||||
|
||||
Use a format string such as "%1.2f meters" for example, and it will
|
||||
display values like: "3.14 meters" for a value equal to 3.14159.
|
||||
|
||||
Default is "%0.f".
|
||||
|
||||
@see elm_spinner_label_format_get()
|
||||
|
||||
@ingroup Spinner */
|
||||
}
|
||||
get {
|
||||
/*@
|
||||
Get the label format of the spinner.
|
||||
|
||||
@return The text label format string in UTF-8.
|
||||
|
||||
@see elm_spinner_label_format_set() for details.
|
||||
|
||||
@ingroup Spinner */
|
||||
}
|
||||
values {
|
||||
fmt: const(char)* @nullable; /*@ The format string for the label display. */
|
||||
fmt: const(char)* @nullable; [[The format string for the label display.]]
|
||||
}
|
||||
}
|
||||
special_value_add {
|
||||
/*@
|
||||
Set a special string to display in the place of the numerical value.
|
||||
[[Control special string to display in the place of the numerical value.
|
||||
|
||||
It's useful for cases when a user should select an item that is
|
||||
better indicated by a label than a value. For example, weekdays or months.
|
||||
It's useful for cases when a user should select an item that is
|
||||
better indicated by a label than a value. For example, weekdays or months.
|
||||
|
||||
Note: If another label was previously set to $value, it will be replaced
|
||||
by the new label.]]
|
||||
|
||||
/* FIXME-doc
|
||||
E.g.:
|
||||
@code
|
||||
sp = elm_spinner_add(win);
|
||||
|
@ -344,18 +210,11 @@ class Elm.Spinner (Elm.Layout, Elm_Interface_Atspi_Value, Elm_Interface_Atspi_Wi
|
|||
elm_spinner_special_value_add(sp, 3, "March");
|
||||
evas_object_show(sp);
|
||||
@endcode
|
||||
|
||||
@note If another label was previously set to $value, it will be replaced
|
||||
by the new label.
|
||||
|
||||
@see elm_spinner_special_value_get().
|
||||
@see elm_spinner_special_value_del().
|
||||
|
||||
@ingroup Spinner */
|
||||
|
||||
*/
|
||||
params {
|
||||
@in value: double; /*@ The value to be replaced. */
|
||||
@in label: const(char)*; /*@ The label to be used. */
|
||||
@in value: double; [[The value to be replaced.]]
|
||||
@in label: const(char)*; [[The label to be used.]]
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue