2020-01-31 07:11:57 -08:00
|
|
|
class Efl.Ui.Progressbar extends Efl.Ui.Layout_Base implements Efl.Ui.Range_Display, Efl.Ui.Format,
|
2019-05-24 09:30:31 -07:00
|
|
|
Efl.Ui.Layout_Orientable, Efl.Access.Value,
|
2019-01-18 05:22:23 -08:00
|
|
|
Efl.Text, Efl.Content, Efl.Text_Markup
|
2014-03-26 00:36:41 -07:00
|
|
|
{
|
2020-01-16 07:05:43 -08:00
|
|
|
[[Progress bar widget.
|
|
|
|
|
|
|
|
It shows a graphical indication of the current progress of some lengthy operation,
|
|
|
|
typically as a bar that gradually fills or a pointer that moves from one side of the
|
|
|
|
bar to the other. The bar can be horizontal or vertical, controlled with @Efl.Ui.Layout_Orientable.
|
|
|
|
|
|
|
|
The minimum and maximum values (or starting and ending values), along with the current
|
|
|
|
value can be set using the @Efl.Ui.Range_Display interface.
|
|
|
|
|
|
|
|
@.infinite_mode can be set when the progress state is unknown.
|
|
|
|
An optional textual label can be shown to indicate the exact numerical value of the progress.
|
2020-01-31 07:11:57 -08:00
|
|
|
|
|
|
|
@since 1.24
|
2020-01-16 07:05:43 -08:00
|
|
|
]]
|
2015-05-07 09:32:53 -07:00
|
|
|
methods {
|
2019-12-30 08:08:53 -08:00
|
|
|
@property infinite_mode {
|
2020-01-16 07:05:43 -08:00
|
|
|
[[When this mode is enabled the progress bar indicates that there is an operation
|
|
|
|
going on, but does not give information about its progress.
|
|
|
|
This is typically shown as a "pulsing" animation or an endless spinning bar,
|
|
|
|
depending on the theme.
|
|
|
|
]]
|
2019-09-13 03:25:49 -07:00
|
|
|
set {
|
2017-05-23 22:12:34 -07:00
|
|
|
}
|
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
2020-01-16 07:05:43 -08:00
|
|
|
state: bool; [[$true if the progress bar should animate infinitely.]]
|
2017-05-23 22:12:34 -07:00
|
|
|
}
|
|
|
|
}
|
2019-06-28 01:08:03 -07:00
|
|
|
@property show_progress_label {
|
2020-01-16 07:05:43 -08:00
|
|
|
[[Whether a textual progress label is shown alongside the progress bar to give an exact
|
|
|
|
numerical indication of the current progress. Control the conversion of the numerical
|
|
|
|
value to a text string using @Efl.Ui.Format.
|
2019-06-28 01:08:03 -07:00
|
|
|
|
|
|
|
Not to be confused with the widget label set through @Efl.Text.text.
|
2020-01-16 07:05:43 -08:00
|
|
|
|
|
|
|
The exact location and appearance of the progress label depend on the theme.
|
2019-06-28 01:08:03 -07:00
|
|
|
]]
|
|
|
|
values {
|
|
|
|
show: bool; [[$true to show the progress label.]]
|
|
|
|
}
|
|
|
|
}
|
2014-03-26 00:36:41 -07:00
|
|
|
}
|
|
|
|
implements {
|
2016-08-10 07:23:04 -07:00
|
|
|
Efl.Object.constructor;
|
2018-01-07 20:55:35 -08:00
|
|
|
Efl.Ui.Widget.theme_apply;
|
2019-01-21 07:22:32 -08:00
|
|
|
Efl.Ui.Range_Display.range_value { get; set; }
|
2019-06-19 00:55:51 -07:00
|
|
|
Efl.Ui.Range_Display.range_limits {get; set; }
|
2019-05-24 09:30:31 -07:00
|
|
|
Efl.Ui.Layout_Orientable.orientation { get; set; }
|
Efl.Ui.Format revamp
This class helps widgets which contain a numerical value and must display it,
like Progressbar (units label), Spin, Spin_Button, Slider (both units and popup
labels, in legacy), Tags (when in shrunk mode) or Calendar (year_month label).
Previously this was a mix of interface and mixin: widgets had to support setting a
formatting func, and the mixin offered support for formatting strings, by setting
an internal formatting func. On top of that, the spinner widget supported "special
values", a list of values that should be shown as certain strings instead.
This has now been simplified and unified:
Widgets including this mixin can use the formatted_value_get() method which accepts
an Eina_Value and returns a string. Thats's it.
The mixin adds three properties to the widget (format_values, format_func and
format_string) which users can use to tailor formatting. The widget does not need
to know which method has been used, it just retrieves the resulting string.
This removes a lot of duplicated widget code, and adds functionality which was
missing before. For example, all widgets support passing a list of values now.
Widgets must implement the apply_formatted_value() method so they are notified
of changes in the format and they can redraw anything they need.
Tests have been added to the Elementary Spec suite for all cases.
Legacy widgets behavior has not been modified, although a few needed some code
changes.
2019-07-02 05:40:06 -07:00
|
|
|
Efl.Ui.Format.apply_formatted_value;
|
2018-05-03 16:34:17 -07:00
|
|
|
Efl.Part.part_get;
|
2017-11-15 19:05:21 -08:00
|
|
|
Efl.Access.Value.value_and_text { get; }
|
2018-01-16 03:09:54 -08:00
|
|
|
Efl.Text.text { get; set; }
|
2018-04-06 04:30:40 -07:00
|
|
|
Efl.Text_Markup.markup { get; set; }
|
2018-01-16 03:09:54 -08:00
|
|
|
Efl.Content.content { get; set; }
|
|
|
|
Efl.Content.content_unset;
|
2018-12-21 14:46:10 -08:00
|
|
|
Efl.Ui.L10n.l10n_text { get; set; }
|
2014-03-26 00:36:41 -07:00
|
|
|
}
|
|
|
|
}
|