diff options
Diffstat (limited to 'ElmSharp/ElmSharp/DateTimeSelector.cs')
-rwxr-xr-x[-rw-r--r--] | ElmSharp/ElmSharp/DateTimeSelector.cs | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/ElmSharp/ElmSharp/DateTimeSelector.cs b/ElmSharp/ElmSharp/DateTimeSelector.cs index fd3012d..5aff93a 100644..100755 --- a/ElmSharp/ElmSharp/DateTimeSelector.cs +++ b/ElmSharp/ElmSharp/DateTimeSelector.cs @@ -35,7 +35,7 @@ namespace ElmSharp public DateTimeSelector(EvasObject parent) : base(parent) { - _changed = new SmartEvent(this, "changed"); + _changed = new SmartEvent(this, this.RealHandle, "changed"); _changed.On += (s, e) => { DateTime newDateTime = DateTime; @@ -50,11 +50,11 @@ namespace ElmSharp { get { - return Interop.Elementary.elm_datetime_format_get(Handle); + return Interop.Elementary.elm_datetime_format_get(RealHandle); } set { - Interop.Elementary.elm_datetime_format_set(Handle, value); + Interop.Elementary.elm_datetime_format_set(RealHandle, value); } } @@ -63,13 +63,13 @@ namespace ElmSharp get { var tm = new Interop.Libc.SystemTime(); - Interop.Elementary.elm_datetime_value_max_get(Handle, ref tm); + Interop.Elementary.elm_datetime_value_max_get(RealHandle, ref tm); return tm; } set { Interop.Libc.SystemTime tm = value; - Interop.Elementary.elm_datetime_value_max_set(Handle, ref tm); + Interop.Elementary.elm_datetime_value_max_set(RealHandle, ref tm); } } @@ -78,13 +78,13 @@ namespace ElmSharp get { var tm = new Interop.Libc.SystemTime(); - Interop.Elementary.elm_datetime_value_min_get(Handle, ref tm); + Interop.Elementary.elm_datetime_value_min_get(RealHandle, ref tm); return tm; } set { Interop.Libc.SystemTime tm = value; - Interop.Elementary.elm_datetime_value_min_set(Handle, ref tm); + Interop.Elementary.elm_datetime_value_min_set(RealHandle, ref tm); } } @@ -93,35 +93,41 @@ namespace ElmSharp get { var tm = new Interop.Libc.SystemTime(); - Interop.Elementary.elm_datetime_value_get(Handle, ref tm); + Interop.Elementary.elm_datetime_value_get(RealHandle, ref tm); return tm; } set { Interop.Libc.SystemTime tm = value; - Interop.Elementary.elm_datetime_value_set(Handle, ref tm); + Interop.Elementary.elm_datetime_value_set(RealHandle, ref tm); _cacheDateTime = value; } } public bool IsFieldVisible(DateTimeFieldType type) { - return Interop.Elementary.elm_datetime_field_visible_get(Handle, (int)type); + return Interop.Elementary.elm_datetime_field_visible_get(RealHandle, (int)type); } public void SetFieldLimit(DateTimeFieldType type, int minimum, int maximum) { - Interop.Elementary.elm_datetime_field_limit_set(Handle, (int)type, minimum, maximum); + Interop.Elementary.elm_datetime_field_limit_set(RealHandle, (int)type, minimum, maximum); } public void SetFieldVisible(DateTimeFieldType type, bool visible) { - Interop.Elementary.elm_datetime_field_visible_set(Handle, (int)type, visible); + Interop.Elementary.elm_datetime_field_visible_set(RealHandle, (int)type, visible); } protected override IntPtr CreateHandle(EvasObject parent) { - return Interop.Elementary.elm_datetime_add(parent.Handle); + IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle); + Interop.Elementary.elm_layout_theme_set(handle, "layout", "elm_widget", "default"); + + RealHandle = Interop.Elementary.elm_datetime_add(handle); + Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle); + + return handle; } } } |