efl/src/lib/elementary/elm_label.eo

134 lines
3.9 KiB
Plaintext
Raw Normal View History

import elm_general;
enum Elm.Label.Slide_Mode
{
[[Slide mode of a label widget]]
none = 0, [[No slide effect.]]
auto, [[Slide only if the label area is bigger than the text width length.]]
always [[Slide always.]]
}
class Elm.Label (Efl.Ui.Layout)
2014-03-23 05:42:31 -07:00
{
[[Elementary label class]]
legacy_prefix: elm_label;
2014-03-23 05:42:31 -07:00
eo_prefix: elm_obj_label;
event_prefix: elm_label;
2015-05-07 09:32:53 -07:00
methods {
@property wrap_width {
2015-08-07 06:10:49 -07:00
[[Control wrap width of the label
2014-03-23 05:42:31 -07:00
2015-08-07 06:10:49 -07:00
This function sets the maximum width size hint of the label.
2014-03-23 05:42:31 -07:00
2015-08-07 06:10:49 -07:00
Warning: This is only relevant if the label is inside a container.]]
set {
2014-03-23 05:42:31 -07:00
}
get {
}
values {
w: int; [[The wrap width in pixels at a minimum where words need to wrap]]
2014-03-23 05:42:31 -07:00
}
}
2015-05-07 09:32:53 -07:00
@property slide_speed {
2015-08-07 06:10:49 -07:00
[[Control the slide speed of the label
2014-03-23 05:42:31 -07:00
2015-08-07 06:10:49 -07:00
Note: If you set the duration of the slide using @.slide_duration.set
you cannot get the correct speed using this function until the label
is actually rendered and resized.
2014-03-23 05:42:31 -07:00
2015-08-07 06:10:49 -07:00
See @.slide_duration.set]]
set {
2014-03-23 05:42:31 -07:00
}
get {
}
values {
2015-08-07 06:10:49 -07:00
speed: double; [[The speed of the slide animation in px per seconds]]
2014-03-23 05:42:31 -07:00
}
}
2015-05-07 09:32:53 -07:00
@property slide_mode {
2015-08-07 06:10:49 -07:00
[[Control the slide mode of the label widget.
2014-03-23 05:42:31 -07:00
2015-08-07 06:10:49 -07:00
By default, slide mode is none. Possible values for $mode are:
@Elm.Label.Slide_Mode.none - no slide effect
@Elm.Label.Slide_Mode.auto - slide only if the label area is bigger than
the text width length
@Elm.Label.Slide_Mode.always - slide always
2014-03-23 05:42:31 -07:00
2015-08-07 06:10:49 -07:00
Warning: @Elm.Label.Slide_Mode.auto, @Elm.Label.Slide_Mode.always only work
with the themes "slide_short", "slide_long" and "slide_bounce".
Warning: @Elm.Label.Slide_Mode.auto, @Elm.Label.Slide_Mode.always don't work
if the line wrap(elm_label_line_wrap_set()) or
ellipsis(elm_label_ellipsis_set()) is set.
2014-03-23 05:42:31 -07:00
2015-08-07 06:10:49 -07:00
@since 1.8]]
set {
2014-03-23 05:42:31 -07:00
}
get {
}
values {
2015-08-07 06:10:49 -07:00
mode: Elm.Label.Slide_Mode; [[The slide mode]]
2014-03-23 05:42:31 -07:00
}
}
2015-05-07 09:32:53 -07:00
@property slide_duration {
2015-08-07 06:10:49 -07:00
[[Control the slide duration of the label
2014-03-23 05:42:31 -07:00
2015-08-07 06:10:49 -07:00
Note: If you set the speed of the slide using @.slide_speed.set
you cannot get the correct duration using this function until the label
is actually rendered and resized.]]
set {
2014-03-23 05:42:31 -07:00
}
get {
}
values {
2015-08-07 06:10:49 -07:00
duration: double; [[The duration in seconds in moving text from slide begin position to slide end position]]
2014-03-23 05:42:31 -07:00
}
}
2015-05-07 09:32:53 -07:00
@property line_wrap {
2015-08-07 06:10:49 -07:00
[[Control the wrapping behavior of the label
2014-03-23 05:42:31 -07:00
2015-08-07 06:10:49 -07:00
By default no wrapping is done. Possible values for $wrap are:
$ELM_WRAP_NONE - No wrapping
$ELM_WRAP_CHAR - wrap between characters
$ELM_WRAP_WORD - wrap between words
$ELM_WRAP_MIXED - Word wrap, and if that fails, char wrap]]
set {
2014-03-23 05:42:31 -07:00
}
get {
}
values {
2015-08-07 06:10:49 -07:00
wrap: Elm.Wrap.Type; [[To wrap text or not]]
2014-03-23 05:42:31 -07:00
}
}
2015-05-07 09:32:53 -07:00
@property ellipsis {
2015-08-07 06:10:49 -07:00
[[Control the ellipsis behavior of the label
2014-03-23 05:42:31 -07:00
2015-08-07 06:10:49 -07:00
If set to true and the text doesn't fit in the label an ellipsis("...")
will be shown at the end of the widget.
2014-03-23 05:42:31 -07:00
2015-08-07 06:10:49 -07:00
Warning This doesn't work with slide(elm_label_slide_set()) or if the
chosen wrap method was $ELM_WRAP_WORD.]]
set {
2014-03-23 05:42:31 -07:00
}
get {
}
values {
2015-08-07 06:10:49 -07:00
ellipsis: bool; [[To ellipsis text or not]]
2014-03-23 05:42:31 -07:00
}
}
slide_go {
2015-08-07 06:10:49 -07:00
[[Start slide effect.
2014-03-23 05:42:31 -07:00
2015-08-07 06:10:49 -07:00
See @.slide_mode.set.]]
2014-03-23 05:42:31 -07:00
}
}
implements {
class.constructor;
Efl.Object.constructor;
Efl.Ui.Widget.theme_apply;
Efl.Part.part;
2014-03-23 05:42:31 -07:00
}
events {
slide,end; [[Called when slide stopped]]
2014-03-23 05:42:31 -07:00
}
}