2019-02-28 07:23:11 -08:00
|
|
|
class @beta 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
|
|
|
{
|
2016-11-24 05:55:50 -08:00
|
|
|
[[Elementary progressbar class]]
|
2015-05-07 09:32:53 -07:00
|
|
|
methods {
|
2017-05-23 22:12:34 -07:00
|
|
|
@property pulse_mode {
|
2015-08-07 07:48:51 -07:00
|
|
|
[[Control whether a given progress bar widget is at "pulsing mode" or not.
|
|
|
|
|
2018-01-04 04:16:23 -08:00
|
|
|
By default progress bars display values from low to
|
|
|
|
high boundaries. There are situations however in which the
|
|
|
|
progress of a given task is unknown. In these cases,
|
|
|
|
you can set a progress bar widget to a "pulsing state" to give
|
|
|
|
the user an idea that some computation is being done
|
|
|
|
without showing the precise progress rate. In the default theme, it will
|
|
|
|
animate the bar with content, switching constantly between filling it and back
|
|
|
|
to non-filled in a loop. To start and stop this pulsing
|
2019-04-29 04:16:51 -07:00
|
|
|
animation you need to explicitly call @.pulse.set().
|
2017-05-23 22:12:34 -07:00
|
|
|
]]
|
|
|
|
|
2014-03-26 00:36:41 -07:00
|
|
|
set {
|
|
|
|
}
|
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
2015-08-07 07:48:51 -07:00
|
|
|
pulse: bool; [[$true to put $obj in pulsing mode, $false to put it back to its default one]]
|
2014-03-26 00:36:41 -07:00
|
|
|
}
|
|
|
|
}
|
2017-05-23 22:12:34 -07:00
|
|
|
@property pulse {
|
2019-09-13 03:25:49 -07:00
|
|
|
[[Start/stop a given progress bar "pulsing" animation, if its under that mode.
|
2017-05-23 22:12:34 -07:00
|
|
|
|
2019-04-29 04:16:51 -07:00
|
|
|
Note: This call won't do anything if $obj is not under "pulsing mode". See @.pulse_mode.
|
2019-09-13 03:25:49 -07:00
|
|
|
]]
|
|
|
|
set {
|
2017-05-23 22:12:34 -07:00
|
|
|
}
|
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
|
|
|
state: bool; [[$true, to start the pulsing animation, $false to stop it]]
|
|
|
|
}
|
|
|
|
}
|
2019-06-28 01:08:03 -07:00
|
|
|
@property show_progress_label {
|
|
|
|
[[Whether a textual progress label is shown alongside the progressbar to give an exact
|
|
|
|
numerical indication of the current progress.
|
|
|
|
|
|
|
|
Not to be confused with the widget label set through @Efl.Text.text.
|
|
|
|
]]
|
|
|
|
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
|
|
|
}
|
|
|
|
}
|