{
get
{
- return Interop.Elementary.elm_box_horizontal_get(GetRealHandle(Handle));
+ return Interop.Elementary.elm_box_horizontal_get(RealHandle);
}
set
{
- Interop.Elementary.elm_box_horizontal_set(GetRealHandle(Handle), value);
+ Interop.Elementary.elm_box_horizontal_set(RealHandle, value);
}
}
public void PackEnd(EvasObject content)
{
- Interop.Elementary.elm_box_pack_end(GetRealHandle(Handle), content);
+ Interop.Elementary.elm_box_pack_end(RealHandle, content);
AddChild(content);
}
public void PackStart(EvasObject content)
{
- Interop.Elementary.elm_box_pack_start(GetRealHandle(Handle), content);
+ Interop.Elementary.elm_box_pack_start(RealHandle, content);
AddChild(content);
}
public void PackAfter(EvasObject content, EvasObject after)
{
- Interop.Elementary.elm_box_pack_after(GetRealHandle(Handle), content, after);
+ Interop.Elementary.elm_box_pack_after(RealHandle, content, after);
AddChild(content);
}
public void UnPack(EvasObject content)
{
- Interop.Elementary.elm_box_unpack(GetRealHandle(Handle), content);
+ Interop.Elementary.elm_box_unpack(RealHandle, content);
RemoveChild(content);
}
public void UnPackAll()
{
- Interop.Elementary.elm_box_unpack_all(GetRealHandle(Handle));
+ Interop.Elementary.elm_box_unpack_all(RealHandle);
ClearChildren();
}
{
action();
};
- Interop.Elementary.elm_box_layout_set(GetRealHandle(Handle), _layoutCallback, IntPtr.Zero, null);
+ Interop.Elementary.elm_box_layout_set(RealHandle, _layoutCallback, IntPtr.Zero, null);
}
protected override IntPtr CreateHandle(EvasObject parent)
IntPtr handle = Interop.Elementary.elm_layout_add(parent);
Interop.Elementary.elm_layout_theme_set(handle, "layout", "background", "default");
- IntPtr realHandle = Interop.Elementary.elm_box_add(handle);
- Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", realHandle);
+ RealHandle = Interop.Elementary.elm_box_add(handle);
+ Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);
return handle;
}
}
}
- protected virtual IntPtr GetRealHandle(IntPtr handle)
- {
- return Interop.Elementary.elm_object_part_content_get(handle, "elm.swallow.content");
- }
-
internal void AddChild(EvasObject obj)
{
_children.Add(obj);
{
public abstract class EvasObject
{
+ private IntPtr _realHandle = IntPtr.Zero;
internal IntPtr Handle { get; set; }
internal EvasObject Parent { get; set; }
+ internal IntPtr RealHandle
+ {
+ get
+ {
+ return _realHandle == IntPtr.Zero ? Handle : _realHandle;
+ }
+ set
+ {
+ _realHandle = value;
+ }
+ }
EvasObjectEvent _deleted;
EvasObjectEvent<EvasKeyEventArgs> _keyup;
get
{
int w, h;
- Interop.Evas.evas_object_size_hint_min_get(Handle, out w, out h);
+ Interop.Evas.evas_object_size_hint_min_get(RealHandle, out w, out h);
return w;
}
set
{
int h = MinimumHeight;
- Interop.Evas.evas_object_size_hint_min_set(Handle, value, h);
+ Interop.Evas.evas_object_size_hint_min_set(RealHandle, value, h);
}
}
get
{
int w, h;
- Interop.Evas.evas_object_size_hint_min_get(Handle, out w, out h);
+ Interop.Evas.evas_object_size_hint_min_get(RealHandle, out w, out h);
return h;
}
set
{
int w = MinimumWidth;
- Interop.Evas.evas_object_size_hint_min_set(Handle, w, value);
+ Interop.Evas.evas_object_size_hint_min_set(RealHandle, w, value);
}
}
{
get
{
- return Interop.Evas.evas_object_repeat_events_get(Handle);
+ return Interop.Evas.evas_object_repeat_events_get(RealHandle);
}
set
{
- Interop.Evas.evas_object_repeat_events_set(Handle, value);
+ Interop.Evas.evas_object_repeat_events_set(RealHandle, value);
}
}
{
get
{
- return Interop.Evas.evas_object_propagate_events_get(Handle);
+ return Interop.Evas.evas_object_propagate_events_get(RealHandle);
}
set
{
- Interop.Evas.evas_object_propagate_events_set(Handle, value);
+ Interop.Evas.evas_object_propagate_events_set(RealHandle, value);
}
}
{
get
{
- return Interop.Evas.evas_object_pass_events_get(Handle);
+ return Interop.Evas.evas_object_pass_events_get(RealHandle);
}
set
{
- Interop.Evas.evas_object_pass_events_set(Handle, value);
+ Interop.Evas.evas_object_pass_events_set(RealHandle, value);
}
}
public void MarkChanged()
{
- Interop.Evas.evas_object_smart_changed(Handle);
+ Interop.Evas.evas_object_smart_changed(RealHandle);
}
protected virtual void OnInvalidate()
{
get
{
- return Interop.Elementary.elm_table_homogeneous_get(GetRealHandle(Handle));
+ return Interop.Elementary.elm_table_homogeneous_get(RealHandle);
}
set
{
- Interop.Elementary.elm_table_homogeneous_set(GetRealHandle(Handle), value);
+ Interop.Elementary.elm_table_homogeneous_set(RealHandle, value);
}
}
set
{
_paddingX = value;
- Interop.Elementary.elm_table_padding_set(GetRealHandle(Handle), _paddingX, _paddingY);
+ Interop.Elementary.elm_table_padding_set(RealHandle, _paddingX, _paddingY);
}
}
set
{
_paddingY = value;
- Interop.Elementary.elm_table_padding_set(GetRealHandle(Handle), _paddingX, _paddingY);
+ Interop.Elementary.elm_table_padding_set(RealHandle, _paddingX, _paddingY);
}
}
{
if (obj == null)
throw new ArgumentNullException("obj");
- Interop.Elementary.elm_table_pack(GetRealHandle(Handle), obj, col, row, colspan, rowspan);
+ Interop.Elementary.elm_table_pack(RealHandle, obj, col, row, colspan, rowspan);
AddChild(obj);
}
{
if (obj == null)
throw new ArgumentNullException("obj");
- Interop.Elementary.elm_table_unpack(GetRealHandle(Handle), obj);
+ Interop.Elementary.elm_table_unpack(RealHandle, obj);
RemoveChild(obj);
}
public void Clear()
{
- Interop.Elementary.elm_table_clear(GetRealHandle(Handle), false);
+ Interop.Elementary.elm_table_clear(RealHandle, false);
ClearChildren();
}
IntPtr handle = Interop.Elementary.elm_layout_add(parent);
Interop.Elementary.elm_layout_theme_set(handle, "layout", "background", "default");
- IntPtr realHandle = Interop.Elementary.elm_table_add(handle);
- Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", realHandle);
+ RealHandle = Interop.Elementary.elm_table_add(handle);
+ Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);
return handle;
}