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 (Elm.Layout)
{
   eo_prefix: elm_obj_label;
   methods {
      @property wrap_width {
         [[Control wrap width of the label

           This function sets the minimum and the maximum width size hint of the label.

           When the width is set to 0, there will be no size hint for both the minimum and the maximum width.

           Warning: This is only relevant if the label is inside a container.
                    When a wrap mode is disabled, only the minimum size hint will be decided.
                    That is, with this case, the maximum size hint does not be used.]]
         set {
            [[
              \@if MOBILE \@since_tizen 2.3
              \@elseif WEARABLE \@since_tizen 2.3.1
              \@endif
            ]]
         }
         get {
            [[
              \@if MOBILE \@since_tizen 2.3
              \@elseif WEARABLE \@since_tizen 2.3.1
              \@endif
            ]]
         }
         values {
            w: Evas.Coord; [[The wrap width in pixels where words need to wrap]]
         }
      }
      @property slide_speed {
         [[Control the slide speed of the label

           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.

           See @.slide_duration.set]]
         set {
            [[
              \@if MOBILE \@since_tizen 3.0
              \@elseif WEARABLE \@since_tizen 3.0
              \@endif
            ]]
         }
         get {
            [[
              \@if MOBILE \@since_tizen 3.0
              \@elseif WEARABLE \@since_tizen 3.0
              \@endif
            ]]
         }
         values {
            speed: double; [[The speed of the slide animation in px per seconds]]
         }
      }
      @property slide_mode {
         [[Control the slide mode of the label widget.

           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

           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.

           @since 1.8]]
         set {
            [[
              \@if MOBILE \@since_tizen 2.3
              \@elseif WEARABLE \@since_tizen 2.3.1
              \@endif
            ]]
         }
         get {
            [[
              \@if MOBILE \@since_tizen 2.3
              \@elseif WEARABLE \@since_tizen 2.3.1
              \@endif
            ]]
         }
         values {
            mode: Elm.Label.Slide_Mode; [[The slide mode]]
         }
      }
      @property slide_duration {
         [[Control the slide duration of the label

           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 {
            [[
              \@if MOBILE \@since_tizen 2.3
              \@elseif WEARABLE \@since_tizen 2.3.1
              \@endif
            ]]
         }
         get {
            [[
              \@if MOBILE \@since_tizen 2.3
              \@elseif WEARABLE \@since_tizen 2.3.1
              \@endif
            ]]
         }
         values {
            duration: double; [[The duration in seconds in moving text from slide begin position to slide end position]]
         }
      }
      @property line_wrap {
         [[Control the wrapping behavior of the label

           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 {
            [[
              \@if MOBILE \@since_tizen 2.3
              \@elseif WEARABLE \@since_tizen 2.3.1
              \@endif
            ]]
         }
         get {
            [[
              \@if MOBILE \@since_tizen 2.3
              \@elseif WEARABLE \@since_tizen 2.3.1
              \@endif
            ]]
         }
         values {
            wrap: Elm.Wrap.Type; [[To wrap text or not]]
         }
      }
      @property ellipsis {
         [[Control the ellipsis behavior of the label

           If set to true and the text doesn't fit in the label an ellipsis("...")
           will be shown at the end of the widget.

           Warning This doesn't work with slide(elm_label_slide_set()) or if the
           chosen wrap method was $ELM_WRAP_WORD.]]
         set {
            [[
              \@if MOBILE \@since_tizen 2.3
              \@elseif WEARABLE \@since_tizen 2.3.1
              \@endif
            ]]
         }
         get {
            [[
              \@if MOBILE \@since_tizen 2.3
              \@elseif WEARABLE \@since_tizen 2.3.1
              \@endif
            ]]
         }
         values {
            ellipsis: bool; [[To ellipsis text or not]]
         }
      }
      slide_go {
         [[Start slide effect.

           See @.slide_mode.set.

           \@if MOBILE \@since_tizen 2.3
           \@elseif WEARABLE \@since_tizen 2.3.1
           \@endif
         ]]
      }
      /* TIZEN_ONLY(20170526): Add elm_label_text_style_user_push, pop, peek APIs for internal usages */
      text_style_user_push @internal {
         params {
            @in style: const(char)*; [[The style user to push.]]
         }
      }
      text_style_user_pop {
      }
      text_style_user_peek @const @internal {
         return: const(char)*;
      }
      /* END */
   }
   implements {
      class.constructor;
      Eo.Base.constructor;
      Evas.Object_Smart.add;
      Elm.Widget.focus_next_manager_is;
      Elm.Widget.focus_direction_manager_is;
      Elm.Widget.theme_apply;
      Elm.Layout.text_set;
      Elm.Layout.text_aliases.get;
      Elm.Layout.sizing_eval;
   }
   events {
      language,changed;
      access,changed;
      slide,end;
   }

}
