TextBoxEditManager

Package: Libraries.Interface.Undo · Inherits from: Libraries.Interface.Events.TextChangeListener, Libraries.Language.Object, Libraries.Interface.Undo.EditManager

Variables

  • integer RESET_STATE: The manager will be in this state when it is ready for changes to the TextBox.
  • integer DELETE_WORD_STATE: This state is for when a word is being deleted from the TextBox
  • integer SPECIAL_STATE: This state is used for saving more complex actions such as adding multiple indentations to the text box. If the text box is set to this the text box wont leave it until it is switched out to the RESET_STATE
  • integer DELETE_SPACE_STATE: This state is for when whitespace is being deleted from the TextBox
  • integer ADD_SPACE_STATE: This state is for when whitespace is being added to the TextBox
  • integer NULL_STATE: This state is used to tell the edit manager to ignore any upcoming changes to the TextBox. The manager will not leave this state until set to another
  • integer OFF_STATE: This state is used for turning off the manager. This means that the manager will no longer have any edits and will try to make any new ones. Different from the NULL_STATE in that the OFF_STATE is mainly for use in TextBoxes that do need Undo functionality
  • integer ADD_WORD_STATE: This state is for when a word is being added to the TextBox

Actions

CanUndo()

If true is passed this will empty the manager and it will no longer save any states until called again with false

Returns

boolean

Empty()

This action empties the EditManager of all edits. In the process, it clears the current state and calls dispose on each edit to ensure it has the opportunity to free any resources.

GetCurrentState()

This state is for when whitespace is being added to the TextBox

Returns

integer

GetTextBox()

This state is for when a word is being deleted from the TextBox

Returns

Libraries.Interface.Controls.TextBox

Redo()

do the undo

Reset()

Saves the current Edit and sets the state to RESET

SetOff(boolean off)

If true is passed this will empty the manager and it will no longer save any states until called again with false

Parameters

  • off boolean

SetSpecialAction(boolean start)

do the redo

Parameters

  • start boolean

SetTextBox(Libraries.Interface.Controls.TextBox newBox)

This state is for when whitespace is being deleted from the TextBox

Parameters

SetToIgnore(boolean ignore)

If true then the Edit Manager will be in the NULL_STATE and will ignore any text change events until set to false

Parameters

  • ignore boolean

TextChanged(Libraries.Interface.Events.TextChangeEvent event)

Saves the current Edit and sets the state to RESET

Parameters

Undo()

This state is for when a word is being added to the TextBox

Inherited Actions

6 actions from Libraries.Interface.Undo.EditManager
3 actions from Libraries.Language.Object