The widget_TextInput is a special module use that use and enhance the HTML text input.

How to Initialize any Widgets?


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


Class Details


Enumerations:


Name

List

Description

inputType

  • TEXT
  • PASSWORD

This is used to defined the input type in SetType.



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().

Launch

  • None

VOID

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


It will also call the parent Launch().

SetType

  • inputType@: Type

THIS

Change the input type.



Text Functions


Name

Arguments

Return

Description

SetLang

  • Lang: Lang - Lang to assign with this widget.

THIS

Assign a Lang class to this widgets to make the function SetTextHolder_L usable.

SetTextHolder_L

  • String: TextID - Text id is the JSON file
  • String: TextID - Text group is the JSON file
  • String: TextID - The default if not found

THIS

Set the text holder of this widgets (will not work if no Lang is set).

SetTextHolder

  • String: Text - Text you want to add.

THIS

Set the text holder to the widget.


Note: to use Lang class use SetTextHolder_L function.

GetText

  • None

String

Get the entered text.

SetText

  • String: Text - Text you want to add.

THIS

Change the input text (not the text holder).

SetFont

  • String: Name - Font family name.

THIS

Change text font family.





Interaction Functions


Name

Arguments

Return

Description

SetFocus

  • Function: FocusIn - Function called when focused
  • Function: FocusOut - Function called when focus is lost.

THIS

Add events on "focusin" or "focusout".

SetOnTextChanged

  • Function: FuncIn - Function called when text has changed.

THIS

Set up the event "input" to detect when the text has been changed.



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: BG - Background Color

This

Same as parent.

SetBackgroundImage

  • String: URL - Image link
  • 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.

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: Opacity - Opacity value [0,1]

None

Same as parent.



               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.

This

Same as parent.

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

lang

Lang

null

Hold the Lang class used for the text.

isFocus

Boolean

undefined

Use to check if the widget is actually focused.


Overrides / Inherited functions:


Name

Arguments

Return

Description

Shift

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

None

Same as parent.



Compatibility



LANGUAGE CLASS: Compatible.

Created with the Personal Edition of HelpNDoc: Easily create Web Help sites