The widget_text is a special module use to show text dynamically.

How to Initialize any Widgets?


To add a widgets call AddWidget function from GUIs members that own this function.


Class Details


Main Functions


       Initialization & Main Functions

Name

Arguments

Return

Description

Init

  • String: BaseID - HMTL ID defining the position in the DOM of the tab. (Automatically set by AddWidgets).
  • String: RegistryName - Name that define this overlay, all children IDs will start by this.

VOID

This function Initialized every part of the viewer : HMTL, CSS, Data, Events, etc...

It will be generated in the defined ID and all HTML IDs used for this  will start by the RegistryName defined in arguments.


It will also call the parent Init() and finish by adding event with the function: InitEvents.

InitEvents

  • None

VOID

Initialize all button events.

.Launch

  • None

VOID

Launch all systems required by the this and will call all children launch.


It will also call the parent Launch().



Button Functions


Name

Arguments

Return

Description

SetOnClicked

  • Function: FuncIn - Function called when pressed
  • Class: Args - Arguments required by FuncIn

THIS

Setup the function called when the button is pressed.




Overrides / Inherited Functions:

Setters Functions


Name

Arguments

Return

Description

AddLayout

  • LayoutType@: Type - Define which layout you want.

Layout

Same as parent.

AddWidget

  • WidgetType@: Type - Define which widget you want.
  • String: Name - Name of this widgets.

Widgets

Same as parent.

Destroy

  • None

None

Same as parent.

Clear

  • None

None

Same as parent.




Design functions

               Positions and general design:


Name

Arguments

Return

Description

Visible

  • Boolean: IsVisible - Set you want it to appear or disappear.
  • Integer: Fade - Fading time in MS
  • Function: VisCallback - Callback function called when fade is over.

This

Same as parent.

SetSizePosition

  • Integer - @CSS String: Width - of this widget (based  on parent).
  • Integer - @CSS String: Height - of this widget (based  on parent).
  • Integer - @CSS String: X - (horizontal) of this widget (based  on parent).
  • Integer - @CSS String: Y - (vertical) of this widget (based  on parent).
  • Boolean: FromRight - Set if x has to start from right
  • Boolean: FromBottom - Set if x has to start from bottom

This

Same as parent.

GetPosition

  • @CSS String: Where - position in CSS

@CSS String

Same as parent.

GetSize

  • None

Class:

  • w: width
  • h: height

Same as parent.

SetPadding

  • String: At - Where to add the padding (Top, Left, Bottom, Right or All).
  • Integer - @CSS String: Value - Size of the padding

This

Same as parent.

SetMargin

  • String: At - Where to add the padding (Top, Left, Bottom, Right or All).
  • Integer - @CSS String: Value - Size of the margin

This

Same as parent.

AddVerticalOverflow

  • @CSS String: State - CSS overflow state

This

Same as parent.

AddHorizontalOverflow

  • @CSS String: State - CSS overflow state

This

Same as parent.

SetRotation

  • Integer: Deg - Degrees of rotation

This

Same as parent.



               Style:


Name

Arguments

Return

Description

SetBackgroundColor

  • Color: Normal - Background color when normal
  • Color: Hovered - Background color when hovered
  • Color: Pressed - Background color when pressed

This

Same as parent but in 3 step to set all 3 button conditions

SetBackgroundImage

  • String: NormalURL - Image link when normal
  • @Nullable String: HoveredURL - Image link when hovered
  • @Nullable String: PressedURL - Image link when pressed
  • Function: SBICallback - Callback when the image has been loaded.
  • Boolean: Debug - Set if you need a debug when the image has been loaded.

VOID

Same as parent but in 3 step to set all 3 button conditions

SetBGImageRepeat

  • @Nullable @CSS String: Vertical - repeat CSS property for vertical.
  • @Nullable @CSS String: Vertical - repeat CSS property for Horizontal.

This

Same as parent.

SetBGImageSizeAndPosition

  • Integer - @CSS String: Size - CSS background size.
  • Integer - @CSS String: X - CSS position
  • Integer - @CSS String: Y - CSS position 

This

Same as parent.

SetOpacity

  • Float: NormalOpacity - Opacity value [0,1]
  • Float: HoveredOpacity - Opacity value [0,1]
  • Float: PressedOpacity - Opacity value [0,1]

This

Same as parent but in 3 step to set all 3 button conditions



               Contour:


Name

Arguments

Return

Description

SetBorder

  • String: At - Define which border you want or enter "All" (Can can add more than one - it always start by a capital).
  • @CSS String: Type - CSS border type.
  • Integer - @CSS String: Thickness - CSS border size.
  • Color: Color - Border Color
  • Integer - @CSS String - Class: Thickness - Set the border radius (integer will be same "px" for all). To use the class just send member like: class.top_left.
  • String: On - Setup the button condition ("Normal", "Hovered", "Pressed" or "All")

This

Same as parent but you can choose the condition you apply to

RemoveOutline

  • None

This

Same as parent.


Font:


Name

Arguments

Return

Description

SetFontSize

  • Integer - @CSS String : Value - Set the font size based on CSS values.

This

Same as parent.


Interaction:


Name

Arguments

Return

Description

ForceInteraction

  • None

This

Same as parent.

AddHoveredEvent

  • Function: funcIn - Function called when mouse enter
  • Function: funcOut  - Function called when mouse leave

VOID

Same as parent.

AddPressedEvent

  • Function: funcIn - Function called when mouse is pressed
  • Function: funcOut  - Function called when mouse is released

VOID

Same as parent.

Movable

  • Boolean: LockHorizontal
  • Boolean: LockVertical

VOID

Same as parent.

trigger

  • String : Trigger - JQuery event name.

VOID

Same as parent.



Private Details



All private details are usable but its recommended to not use any of those. It might modify the proper functioning of the class.


Variables (Members):


       Main Members

Name

Type

Default Value

Description

parent

Widget

undefined

Parent class of this widget

id

String

undefined

Global HMTL Id of the viewer (# + name).

registryName

String

undefined

Name of this widget.

basedId

String

undefined

Where it is located is the existing DOM (its parent).

widgetType

WidgetType

WIDGET

Hold the type of this widget.

layout

Layout

null

Hold this widget layout (if created).


Information

Name

Type

Default Value

Description

statusCss

Status[]

 [Status, Status, Status]

Hold the condition Status for updating the CSS

onClicked

Function

null

Hold the on clicked function.

onClickedArgs

Lang

null

Hold the on clicked function arguments.

functions:


Name

Arguments

Return

Description

ChangeCSS

  • Integer: On - Define which condition.

None

This function is called by button events to update all the CSS.



Overrides / Inherited functions:


Name

Arguments

Return

Description

Shift

  • Integer - @CSS String: ShiftX
  • Integer - @CSS String: ShiftY

None

Same as parent.



Compatibility



LANGUAGE CLASS:  Not compatible.

Created with the Personal Edition of HelpNDoc: Easily create iPhone documentation