2017-10-25 00:42:39 -07:00
|
|
|
import efl_types;
|
|
|
|
|
2019-03-08 06:55:43 -08:00
|
|
|
enum @beta Efl.Ui.Calendar_Weekday
|
2017-10-25 00:42:39 -07:00
|
|
|
{
|
|
|
|
[[A weekday
|
|
|
|
|
|
|
|
See also @Efl.Ui.Calendar.first_day_of_week.set.
|
|
|
|
]]
|
|
|
|
sunday, [[Sunday weekday]]
|
|
|
|
monday, [[Monday weekday]]
|
2018-08-29 22:01:21 -07:00
|
|
|
tuesday, [[Tuesday weekday]]
|
2017-10-25 00:42:39 -07:00
|
|
|
wednesday, [[Wednesday weekday]]
|
|
|
|
thursday, [[Thursday weekday]]
|
|
|
|
friday, [[Friday weekday]]
|
|
|
|
saturday, [[Saturday weekday]]
|
|
|
|
last [[Sentinel value to indicate last enum field during iteration]]
|
|
|
|
}
|
|
|
|
|
2019-09-02 07:24:26 -07:00
|
|
|
class @beta Efl.Ui.Calendar extends Efl.Ui.Layout_Base
|
|
|
|
implements Efl.Ui.Focus.Composition, Efl.Access.Widget.Action, Efl.Ui.Format
|
2017-10-25 00:42:39 -07:00
|
|
|
{
|
|
|
|
[[Calendar widget
|
|
|
|
|
|
|
|
It helps applications to flexibly display a calendar with day of the week,
|
|
|
|
date, year and month. Applications are able to set specific dates to be
|
|
|
|
reported back, when selected, in the smart callbacks of the calendar widget.
|
|
|
|
]]
|
|
|
|
methods {
|
|
|
|
@property first_day_of_week {
|
2017-11-12 22:39:53 -08:00
|
|
|
[[The first day of week to use on calendar widgets.
|
|
|
|
|
2019-10-07 07:40:50 -07:00
|
|
|
This is the day that will appear in the left-most column (e.g. Monday
|
2017-11-12 22:39:53 -08:00
|
|
|
in France or Sunday in the US).
|
|
|
|
]]
|
2017-10-25 00:42:39 -07:00
|
|
|
values {
|
2018-04-06 07:33:44 -07:00
|
|
|
day: Efl.Ui.Calendar_Weekday(Efl.Ui.Calendar_Weekday.sunday);
|
2017-11-12 22:39:53 -08:00
|
|
|
[[The first day of the week.]]
|
2017-10-25 00:42:39 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@property date_min {
|
|
|
|
[[Minimum date on calendar.]]
|
|
|
|
set {
|
2019-10-07 07:40:50 -07:00
|
|
|
[[Setting the minimum date changes the displayed month or year if needed.
|
|
|
|
Displayed days may also be disabled if they are smaller than minimum date.
|
|
|
|
If the minimum date is greater than @.date_max date, the minimum
|
|
|
|
date will be changed to the maximum date returning $false.
|
2017-10-25 00:42:39 -07:00
|
|
|
]]
|
2019-10-07 07:40:50 -07:00
|
|
|
return: bool; [[$true on success.]]
|
2017-10-25 00:42:39 -07:00
|
|
|
}
|
|
|
|
get {
|
2019-10-07 07:40:50 -07:00
|
|
|
[[Default value is 1 JAN,1902.
|
2017-10-25 00:42:39 -07:00
|
|
|
]]
|
|
|
|
}
|
|
|
|
values {
|
2018-08-29 22:01:21 -07:00
|
|
|
min: Efl.Time; [[Time structure containing the minimum date.]]
|
2017-10-25 00:42:39 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@property date_max {
|
|
|
|
[[Maximum date on calendar.]]
|
|
|
|
set {
|
2019-10-07 07:40:50 -07:00
|
|
|
[[Setting the maximum date changes the displayed month or year if needed.
|
|
|
|
Displayed days may also be disabled if they are bigger than maximum date.
|
|
|
|
If the maximum date is less than @.date_min, the maximum date
|
|
|
|
will be changed to the minimum date returning $false.
|
2017-10-25 00:42:39 -07:00
|
|
|
]]
|
2019-10-07 07:40:50 -07:00
|
|
|
return: bool; [[$true on success.]]
|
2017-10-25 00:42:39 -07:00
|
|
|
}
|
|
|
|
get {
|
2019-10-07 07:40:50 -07:00
|
|
|
[[Default maximum year is -1.
|
2017-10-25 00:42:39 -07:00
|
|
|
Default maximum day and month are 31 and DEC.
|
|
|
|
|
|
|
|
If the maximum year is a negative value, it will be limited depending
|
|
|
|
on the platform architecture (year 2037 for 32 bits);
|
|
|
|
]]
|
|
|
|
}
|
|
|
|
values {
|
|
|
|
max: Efl.Time; [[Time structure containing the maximum date.]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@property date {
|
|
|
|
[[The selected date on calendar.]]
|
|
|
|
set {
|
2019-10-07 07:40:50 -07:00
|
|
|
[[Dates will be clamped between @.date_min and @.date_max, returning $false
|
|
|
|
when trying to set out-of-bounds values.
|
2017-10-25 00:42:39 -07:00
|
|
|
]]
|
2019-10-07 07:40:50 -07:00
|
|
|
return: bool; [[$true on success.]]
|
2017-10-25 00:42:39 -07:00
|
|
|
}
|
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
|
|
|
date: Efl.Time; [[Time structure containing the selected date.]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
implements {
|
|
|
|
class.constructor;
|
|
|
|
Efl.Object.constructor;
|
|
|
|
Efl.Object.destructor;
|
|
|
|
Efl.Canvas.Group.group_calculate;
|
2018-01-07 20:55:35 -08:00
|
|
|
Efl.Ui.Widget.theme_apply;
|
|
|
|
Efl.Ui.Widget.on_access_update;
|
2018-01-19 00:25:47 -08:00
|
|
|
Efl.Ui.Focus.Object.on_focus_update;
|
2019-03-04 10:37:18 -08:00
|
|
|
Efl.Ui.Widget.widget_input_event_handler;
|
2017-11-15 18:31:26 -08:00
|
|
|
Efl.Access.Widget.Action.elm_actions { get; }
|
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;
|
2017-10-25 00:42:39 -07:00
|
|
|
}
|
|
|
|
events {
|
efl: Add missing event types
Summary:
All events must have a type now, otherwise bindings don't know how to handle
the event_info field.
Most of the missing event types were actually "void" (no event_info present).
Some struct definitions had to be moved to eo instead of h files, so they
are available to bindings. Some have not, and are marked with FIXME.
Some namespaces have been fixed (like Efl_Event_Cb -> Efl.Event_Cb).
In general, there are hundreds of changed files, but mostly to add a type which
was not present before, so there's no harm done.
Also, A lot of FIXMEs have been added which should be, like, fixed.
For example, some events can send different types of event_info, which is
very inconvenient (and error prone).
Test Plan: make with c# bindings works, make check and make examples work too.
Reviewers: cedric, q66, lauromoura
Subscribers: zmike
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6169
2018-05-11 08:20:40 -07:00
|
|
|
changed: void; [[Emitted when the selected date in the calendar is changed]]
|
2017-10-25 00:42:39 -07:00
|
|
|
}
|
|
|
|
}
|