2015-04-22 04:43:05 -07:00
|
|
|
class Elm.Photo (Elm.Widget, Efl.File, Evas.Clickable_Interface, Evas.Draggable_Interface)
|
2014-03-25 04:11:57 -07:00
|
|
|
{
|
|
|
|
eo_prefix: elm_obj_photo;
|
2015-05-07 09:32:53 -07:00
|
|
|
methods {
|
|
|
|
@property editable {
|
2014-03-25 04:11:57 -07:00
|
|
|
set {
|
2015-07-02 06:43:50 -07:00
|
|
|
[[Set editability of the photo.
|
2014-03-25 04:11:57 -07:00
|
|
|
|
2015-07-02 06:43:50 -07:00
|
|
|
An editable photo can be dragged to or from, and can be cut or
|
|
|
|
pasted too. Note that pasting an image or dropping an item on
|
|
|
|
the image will delete the existing content.
|
|
|
|
]]
|
2014-03-25 04:11:57 -07:00
|
|
|
}
|
|
|
|
get {
|
2015-07-02 06:43:50 -07:00
|
|
|
[[Get editability of the photo.]]
|
2014-03-25 04:11:57 -07:00
|
|
|
}
|
|
|
|
values {
|
2015-07-02 06:43:50 -07:00
|
|
|
set: bool; [[To set of clear editability.]]
|
2014-03-25 04:11:57 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property fill_inside {
|
2014-03-25 04:11:57 -07:00
|
|
|
set {
|
2015-07-02 06:43:50 -07:00
|
|
|
[[Set if the photo should be completely visible or not.]]
|
2014-03-25 04:11:57 -07:00
|
|
|
}
|
|
|
|
get {
|
2015-07-02 06:43:50 -07:00
|
|
|
[[Get if the photo should be completely visible or not.]]
|
2014-03-25 04:11:57 -07:00
|
|
|
}
|
|
|
|
values {
|
2015-07-02 06:43:50 -07:00
|
|
|
fill: bool; [[Photo visibility.]]
|
2014-03-25 04:11:57 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property aspect_fixed {
|
2014-03-25 04:11:57 -07:00
|
|
|
set {
|
2015-07-02 06:43:50 -07:00
|
|
|
[[Set whether the original aspect ratio of the photo should be kept
|
|
|
|
on resize.
|
2014-03-25 04:11:57 -07:00
|
|
|
|
2015-07-02 06:43:50 -07:00
|
|
|
The original aspect ratio (width / height) of the photo is
|
|
|
|
usually distorted to match the object's size. Enabling this
|
|
|
|
option will fix this original aspect, and the way that the
|
|
|
|
photo is fit into the object's area.
|
2014-03-25 04:11:57 -07:00
|
|
|
|
2015-07-08 07:49:38 -07:00
|
|
|
See also @.aspect_fixed.get.
|
2015-07-02 06:43:50 -07:00
|
|
|
]]
|
2014-03-25 04:11:57 -07:00
|
|
|
}
|
|
|
|
get {
|
2015-07-02 06:43:50 -07:00
|
|
|
[[Get if the object keeps the original aspect ratio.]]
|
2014-03-25 04:11:57 -07:00
|
|
|
}
|
|
|
|
values {
|
2015-07-08 07:49:38 -07:00
|
|
|
fixed: bool; [[$true if the photo should fix the aspect,
|
|
|
|
$false otherwise.]]
|
2014-03-25 04:11:57 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property size {
|
2014-03-25 04:11:57 -07:00
|
|
|
set {
|
2015-07-02 06:43:50 -07:00
|
|
|
[[Set the size that will be used on the photo]]
|
2014-03-25 04:11:57 -07:00
|
|
|
}
|
|
|
|
get {
|
2015-07-02 06:43:50 -07:00
|
|
|
[[Get the size that will be used on the photo]]
|
2014-03-25 04:11:57 -07:00
|
|
|
}
|
|
|
|
values {
|
2015-07-02 06:43:50 -07:00
|
|
|
size: int; [[The size of the photo]]
|
2014-03-25 04:11:57 -07:00
|
|
|
}
|
|
|
|
}
|
2014-07-22 09:13:52 -07:00
|
|
|
thumb_set @const {
|
2015-07-02 06:43:50 -07:00
|
|
|
[[Set the file that will be used as thumbnail in the photo.]]
|
2014-03-25 04:11:57 -07:00
|
|
|
params {
|
2015-07-02 06:43:50 -07:00
|
|
|
@in file: const(char)* @nullable; [[The path to file that will be
|
|
|
|
used as thumbnail.]]
|
|
|
|
@in group: const(char)* @optional; [[The key used in case of an EET
|
|
|
|
file.]]
|
2014-03-25 04:11:57 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
implements {
|
2014-06-20 02:47:39 -07:00
|
|
|
class.constructor;
|
2014-06-27 15:36:05 -07:00
|
|
|
Eo.Base.constructor;
|
2014-07-22 08:20:31 -07:00
|
|
|
Efl.File.file.set;
|
2014-06-27 15:36:05 -07:00
|
|
|
Evas.Object_Smart.add;
|
|
|
|
Evas.Object_Smart.del;
|
2015-04-22 04:33:10 -07:00
|
|
|
Elm.Widget.theme_apply;
|
2014-03-25 04:11:57 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|