<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<!-- THIS FILE IS GENERATED DO NOT EDIT -->


<erlref>
<header>
  <copyright>
    <year>2020</year>
    <holder>Ericsson AB. All Rights Reserved.</holder></copyright>
  <legalnotice>
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.

  </legalnotice>
  <title>wxTextCtrl</title>
</header>
<module>wxTextCtrl</module>
<modulesummary>Functions for wxTextCtrl class</modulesummary>
<description><p>A text control allows text to be displayed and edited.
      </p><p>It may be single line or multi-line. Notice that a lot of methods of the text controls are found in the base <c>wxTextEntry</c> (not implemented in wx) class which is a common base class for <seeerl marker="wxTextCtrl"><c>wxTextCtrl</c></seeerl> and other controls using a single line text entry field (e.g. <seeerl marker="wxComboBox"><c>wxComboBox</c></seeerl>).
      </p><p>Styles</p><p>This class supports the following styles:
      </p><p>wxTextCtrl Text Format</p> <p>The multiline text controls always store the text as a sequence of lines separated by <c>'\n'</c> characters, i.e. in the Unix text format even on non-Unix platforms. This allows the user code to ignore the differences between the platforms but at a price: the indices in the control such as those returned by <seemfa marker="#getInsertionPoint/1"><c>getInsertionPoint/1</c></seemfa> or <seemfa marker="#getSelection/1"><c>getSelection/1</c></seemfa> can <c>not</c> be used as indices into the string returned by <seemfa marker="#getValue/1"><c>getValue/1</c></seemfa> as they're going to be slightly off for platforms using <c>"\\r\\n"</c> as separator (as Windows does).
      </p> <p>Instead, if you need to obtain a substring between the 2 indices obtained from the control with the help of the functions mentioned above, you should use <seemfa marker="#getRange/3"><c>getRange/3</c></seemfa>. And the indices themselves can only be passed to other methods, for example <seemfa marker="#setInsertionPoint/2"><c>setInsertionPoint/2</c></seemfa> or <seemfa marker="#setSelection/3"><c>setSelection/3</c></seemfa>.
      </p> <p>To summarize: never use the indices returned by (multiline) <seeerl marker="wxTextCtrl"><c>wxTextCtrl</c></seeerl> as indices into the string it contains, but only as arguments to be passed back to the other <seeerl marker="wxTextCtrl"><c>wxTextCtrl</c></seeerl> methods. This problem doesn't arise for single-line platforms however where the indices in the control do correspond to the positions in the value string.
      </p><p>wxTextCtrl Positions and Coordinates</p> <p>It is possible to use either linear positions, i.e. roughly (but <c>not</c> always exactly, as explained in the previous section) the index of the character in the text contained in the control or X-Y coordinates, i.e. column and line of the character when working with this class and it provides the functions <seemfa marker="#positionToXY/2"><c>positionToXY/2</c></seemfa> and <seemfa marker="#xYToPosition/3"><c>xYToPosition/3</c></seemfa> to convert between the two.
      </p> <p>Additionally, a position in the control can be converted to its coordinates in pixels using <c>PositionToCoords()</c> (not implemented in wx) which can be useful to e.g. show a popup menu near the given character. And, in the other direction, <c>HitTest()</c> (not implemented in wx) can be used to find the character under, or near, the given pixel coordinates.
      </p> <p>To be more precise, positions actually refer to the gaps between characters and not the characters themselves. Thus, position 0 is the one before the very first character in the control and so is a valid position even when the control is empty. And if the control contains a single character, it has two valid positions: 0 before this character and 1 - after it. This, when the documentation of various functions mentions "invalid position", it doesn't consider the position just after the last character of the line to be invalid, only the positions beyond that one (e.g. 2 and greater in the single character example) are actually invalid.
      </p><p>wxTextCtrl Styles.</p> <p>Multi-line text controls support styling, i.e. provide a possibility to set colours and font for individual characters in it (note that under Windows <c>wxTE_RICH</c> style is required for style support). To use the styles you can either call <seemfa marker="#setDefaultStyle/2"><c>setDefaultStyle/2</c></seemfa> before inserting the text or call <seemfa marker="#setStyle/4"><c>setStyle/4</c></seemfa> later to change the style of the text already in the control (the first solution is much more efficient).
      </p> <p>In either case, if the style doesn't specify some of the attributes (for example you only want to set the text colour but without changing the font nor the text background), the values of the default style will be used for them. If there is no default style, the attributes of the text control itself are used.
      </p> <p>So the following code correctly describes what it does: the second call to <seemfa marker="#setDefaultStyle/2"><c>setDefaultStyle/2</c></seemfa> doesn't change the text foreground colour (which stays red) while the last one doesn't change the background colour (which stays grey):
      </p> <p>wxTextCtrl and C++ Streams</p> <p>This class multiply-inherits from <c>std::streambuf</c> (except for some really old compilers using non-standard iostream library), allowing code such as the following:
      </p>  <p>Note that even if your build of wxWidgets doesn't support this (the symbol <c>wxHAS_TEXT_WINDOW_STREAM</c> has value of 0 then) you can still use <seeerl marker="wxTextCtrl"><c>wxTextCtrl</c></seeerl> itself in a stream-like manner:
      </p>  <p>However the possibility to create a <c>std::ostream</c> associated with <seeerl marker="wxTextCtrl"><c>wxTextCtrl</c></seeerl> may be useful if you need to redirect the output of a function taking a <c>std::ostream</c> as parameter to a text control.
      </p> <p>Another commonly requested need is to redirect <c>std::cout</c> to the text control. This may be done in the following way:
      </p>  <p>But wxWidgets provides a convenient class to make it even simpler so instead you may just do
      </p>  <p>See <c>wxStreamToTextRedirector</c> (not implemented in wx) for more details.
      </p><p>Event Handling.</p> <p>The following commands are processed by default event handlers in <seeerl marker="wxTextCtrl"><c>wxTextCtrl</c></seeerl>: <c>wxID_CUT</c>, <c>wxID_COPY</c>, <c>wxID_PASTE</c>, <c>wxID_UNDO</c>, <c>wxID_REDO</c>. The associated UI update events are also processed automatically, when the control has the focus.
      </p> <p>See: <seemfa marker="#create/4"><c>create/4</c></seemfa>, <c>wxValidator</c> (not implemented in wx)
      </p>
  <p>This class is derived (and can use functions) from: 
    <seeerl marker="wxControl"><c>wxControl</c></seeerl> <seeerl marker="wxWindow"><c>wxWindow</c></seeerl> <seeerl marker="wxEvtHandler"><c>wxEvtHandler</c></seeerl></p>
  
  <p>wxWidgets docs: <url href="https://docs.wxwidgets.org/3.1/classwx_text_ctrl.html">wxTextCtrl</url></p>
  </description><section><title>Events</title><p>Event types emitted from this class: <seeerl marker="wxCommandEvent"><c>command_text_updated</c></seeerl>, <seeerl marker="wxCommandEvent"><c>command_text_enter</c></seeerl>, <seeerl marker="wxCommandEvent"><c>text_maxlen</c></seeerl></p></section>
<datatypes><datatype><name name="wxTextCtrl"/></datatype></datatypes>

<funcs>
  <func>
    <name name="new" arity="0" clause_i="1" since=""/>
    <fsummary>Default ctor. </fsummary>
    <desc><p>Default ctor. 
      </p></desc>
  </func>
  
  <func>
    <name name="new" arity="2" clause_i="1" since=""/>
    <fsummary>See: <c>new/3</c></fsummary>
  </func>
  
  <func>
    <name name="new" arity="3" clause_i="1" since=""/>
    <fsummary>Constructor, creating and showing a text control. </fsummary>
    <desc><p>Constructor, creating and showing a text control. 
      </p><p>Remark: The horizontal scrollbar (wxHSCROLL style flag) will only be created for multi-line text controls. Without a horizontal scrollbar, text lines that don't fit in the control's size will be wrapped (but no newline character is inserted). Single line controls don't have a horizontal scrollbar, the text is automatically scrolled so that the insertion point is always visible.
      </p><p>See: <seemfa marker="#create/4"><c>create/4</c></seemfa>, <c>wxValidator</c> (not implemented in wx)
      </p></desc>
  </func>
  
  <func>
    <name name="destroy" arity="1" clause_i="1" since=""/>
    <fsummary>Destructor, destroying the text control. </fsummary>
    <desc><p>Destructor, destroying the text control. 
      </p></desc>
  </func>
  
  <func>
    <name name="appendText" arity="2" clause_i="1" since=""/>
    <fsummary>Appends the text to the end of the text control. </fsummary>
    <desc><p>Appends the text to the end of the text control. 
      </p><p>Remark: After the text is appended, the insertion point will be at the end of the text control. If this behaviour is not desired, the programmer should use <seemfa marker="#getInsertionPoint/1"><c>getInsertionPoint/1</c></seemfa> and <seemfa marker="#setInsertionPoint/2"><c>setInsertionPoint/2</c></seemfa>.
      </p><p>See: <seemfa marker="#writeText/2"><c>writeText/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="canCopy" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the selection can be copied to the clipboard. </fsummary>
    <desc><p>Returns true if the selection can be copied to the clipboard. 
      </p></desc>
  </func>
  
  <func>
    <name name="canCut" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the selection can be cut to the clipboard. </fsummary>
    <desc><p>Returns true if the selection can be cut to the clipboard. 
      </p></desc>
  </func>
  
  <func>
    <name name="canPaste" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the contents of the clipboard can be pasted into the text control. </fsummary>
    <desc><p>Returns true if the contents of the clipboard can be pasted into the text control. 
      </p><p>On some platforms (Motif, GTK) this is an approximation and returns true if the control is editable, false otherwise. 
      </p></desc>
  </func>
  
  <func>
    <name name="canRedo" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if there is a redo facility available and the last operation can be redone. </fsummary>
    <desc><p>Returns true if there is a redo facility available and the last operation can be redone. 
      </p></desc>
  </func>
  
  <func>
    <name name="canUndo" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if there is an undo facility available and the last operation can be undone. </fsummary>
    <desc><p>Returns true if there is an undo facility available and the last operation can be undone. 
      </p></desc>
  </func>
  
  <func>
    <name name="clear" arity="1" clause_i="1" since=""/>
    <fsummary>Clears the text in the control. </fsummary>
    <desc><p>Clears the text in the control. 
      </p><p>Note that this function will generate a <c>wxEVT_TEXT</c> event, i.e. its effect is identical to calling <c>SetValue</c>(""). 
      </p></desc>
  </func>
  
  <func>
    <name name="copy" arity="1" clause_i="1" since=""/>
    <fsummary>Copies the selected text to the clipboard. </fsummary>
    <desc><p>Copies the selected text to the clipboard. 
      </p></desc>
  </func>
  
  <func>
    <name name="create" arity="3" clause_i="1" since=""/>
    <fsummary>See: <c>create/4</c></fsummary>
  </func>
  
  <func>
    <name name="create" arity="4" clause_i="1" since=""/>
    <fsummary>Creates the text control for two-step construction. </fsummary>
    <desc><p>Creates the text control for two-step construction. 
      </p><p>This method should be called if the default constructor was used for the control creation. Its parameters have the same meaning as for the non-default constructor. 
      </p></desc>
  </func>
  
  <func>
    <name name="cut" arity="1" clause_i="1" since=""/>
    <fsummary>Copies the selected text to the clipboard and removes it from the control. </fsummary>
    <desc><p>Copies the selected text to the clipboard and removes it from the control. 
      </p></desc>
  </func>
  
  <func>
    <name name="discardEdits" arity="1" clause_i="1" since=""/>
    <fsummary>Resets the internal modified flag as if the current changes had been saved. </fsummary>
    <desc><p>Resets the internal modified flag as if the current changes had been saved. 
      </p></desc>
  </func>
  
  <func>
    <name name="changeValue" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the new text control value. </fsummary>
    <desc><p>Sets the new text control value. 
      </p><p>It also marks the control as not-modified which means that IsModified() would return false immediately after the call to <seemfa marker="#changeValue/2"><c>changeValue/2</c></seemfa>.
      </p><p>The insertion point is set to the start of the control (i.e. position 0) by this function.
      </p><p>This functions does not generate the <c>wxEVT_TEXT</c> event but otherwise is identical to <seemfa marker="#setValue/2"><c>setValue/2</c></seemfa>.
      </p><p>See overview_events_prog for more information.
      </p><p>Since: 2.7.1
      </p></desc>
  </func>
  
  <func>
    <name name="emulateKeyPress" arity="2" clause_i="1" since=""/>
    <fsummary>This function inserts into the control the character which would have been inserted if the given key event had occurred in the text control. </fsummary>
    <desc><p>This function inserts into the control the character which would have been inserted if the given key event had occurred in the text control. 
      </p><p>The <c>event</c> object should be the same as the one passed to <c>EVT_KEY_DOWN</c> handler previously by wxWidgets. Please note that this function doesn't currently work correctly for all keys under any platform but MSW.
      </p><p>Return: true if the event resulted in a change to the control, false otherwise. 
      </p></desc>
  </func>
  
  <func>
    <name name="getDefaultStyle" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the style currently used for the new text. </fsummary>
    <desc><p>Returns the style currently used for the new text. 
      </p><p>See: <seemfa marker="#setDefaultStyle/2"><c>setDefaultStyle/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getInsertionPoint" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the insertion point, or cursor, position. </fsummary>
    <desc><p>Returns the insertion point, or cursor, position. 
      </p><p>This is defined as the zero based index of the character position to the right of the insertion point. For example, if the insertion point is at the end of the single-line text control, it is equal to <seemfa marker="#getLastPosition/1"><c>getLastPosition/1</c></seemfa>.
      </p><p>Notice that insertion position is, in general, different from the index of the character the cursor position at in the string returned by <seemfa marker="#getValue/1"><c>getValue/1</c></seemfa>. While this is always the case for the single line controls, multi-line controls can use two characters <c>"\\r\\n"</c> as line separator (this is notably the case under MSW) meaning that indices in the control and its string value are offset by 1 for every line.
      </p><p>Hence to correctly get the character at the current cursor position, taking into account that there can be none if the cursor is at the end of the string, you could do the following:
      </p></desc>
  </func>
  
  <func>
    <name name="getLastPosition" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the zero based index of the last position in the text control, which is equal to the number of characters in the control. </fsummary>
    <desc><p>Returns the zero based index of the last position in the text control, which is equal to the number of characters in the control. 
      </p></desc>
  </func>
  
  <func>
    <name name="getLineLength" arity="2" clause_i="1" since=""/>
    <fsummary>Gets the length of the specified line, not including any trailing newline character(s). </fsummary>
    <desc><p>Gets the length of the specified line, not including any trailing newline character(s). 
      </p><p>Return: The length of the line, or -1 if <c>lineNo</c> was invalid. 
      </p></desc>
  </func>
  
  <func>
    <name name="getLineText" arity="2" clause_i="1" since=""/>
    <fsummary>Returns the contents of a given line in the text control, not including any trailing newline character(s). </fsummary>
    <desc><p>Returns the contents of a given line in the text control, not including any trailing newline character(s). 
      </p><p>Return: The contents of the line. 
      </p></desc>
  </func>
  
  <func>
    <name name="getNumberOfLines" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the number of lines in the text control buffer. </fsummary>
    <desc><p>Returns the number of lines in the text control buffer. 
      </p><p>The returned number is the number of logical lines, i.e. just the count of the number of newline characters in the control + 1, for wxGTK and wxOSX/Cocoa ports while it is the number of physical lines, i.e. the count of lines actually shown in the control, in wxMSW. Because of this discrepancy, it is not recommended to use this function.
      </p><p>Remark: Note that even empty text controls have one line (where the insertion point is), so <seemfa marker="#getNumberOfLines/1"><c>getNumberOfLines/1</c></seemfa> never returns 0. 
      </p></desc>
  </func>
  
  <func>
    <name name="getRange" arity="3" clause_i="1" since=""/>
    <fsummary>Returns the string containing the text starting in the positions <c>from</c> and up to <c>to</c> in the control. </fsummary>
    <desc><p>Returns the string containing the text starting in the positions <c>from</c> and up to <c>to</c> in the control. 
      </p><p>The positions must have been returned by another <seeerl marker="wxTextCtrl"><c>wxTextCtrl</c></seeerl> method. Please note that the positions in a multiline <seeerl marker="wxTextCtrl"><c>wxTextCtrl</c></seeerl> do <c>not</c> correspond to the indices in the string returned by <seemfa marker="#getValue/1"><c>getValue/1</c></seemfa> because of the different new line representations (<c>CR</c> or <c>CR</c> LF) and so this method should be used to obtain the correct results instead of extracting parts of the entire value. It may also be more efficient, especially if the control contains a lot of data. 
      </p></desc>
  </func>
  
  <func>
    <name name="getSelection" arity="1" clause_i="1" since=""/>
    <fsummary>Gets the current selection span. </fsummary>
    <desc><p>Gets the current selection span. 
      </p><p>If the returned values are equal, there was no selection. Please note that the indices returned may be used with the other <seeerl marker="wxTextCtrl"><c>wxTextCtrl</c></seeerl> methods but don't necessarily represent the correct indices into the string returned by <seemfa marker="#getValue/1"><c>getValue/1</c></seemfa> for multiline controls under Windows (at least,) you should use <seemfa marker="#getStringSelection/1"><c>getStringSelection/1</c></seemfa> to get the selected text.
      </p></desc>
  </func>
  
  <func>
    <name name="getStringSelection" arity="1" clause_i="1" since=""/>
    <fsummary>Gets the text currently selected in the control. </fsummary>
    <desc><p>Gets the text currently selected in the control. 
      </p><p>If there is no selection, the returned string is empty. 
      </p></desc>
  </func>
  
  <func>
    <name name="getStyle" arity="3" clause_i="1" since=""/>
    <fsummary>Returns the style at this position in the text control. </fsummary>
    <desc><p>Returns the style at this position in the text control. 
      </p><p>Not all platforms support this function.
      </p><p>Return: true on success, false if an error occurred (this may also mean that the styles are not supported under this platform).
      </p><p>See: <seemfa marker="#setStyle/4"><c>setStyle/4</c></seemfa>, <seeerl marker="wxTextAttr"><c>wxTextAttr</c></seeerl>
      </p></desc>
  </func>
  
  <func>
    <name name="getValue" arity="1" clause_i="1" since=""/>
    <fsummary>Gets the contents of the control. </fsummary>
    <desc><p>Gets the contents of the control. 
      </p><p>Notice that for a multiline text control, the lines will be separated by (Unix-style) <c>\n</c> characters, even under Windows where they are separated by a <c>\r\n</c> sequence in the native control. 
      </p></desc>
  </func>
  
  <func>
    <name name="isEditable" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the controls contents may be edited by user (note that it always can be changed by the program). </fsummary>
    <desc><p>Returns true if the controls contents may be edited by user (note that it always can be changed by the program). 
      </p><p>In other words, this functions returns true if the control hasn't been put in read-only mode by a previous call to <seemfa marker="#setEditable/2"><c>setEditable/2</c></seemfa>. 
      </p></desc>
  </func>
  
  <func>
    <name name="isModified" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the text has been modified by user. </fsummary>
    <desc><p>Returns true if the text has been modified by user. 
      </p><p>Note that calling <seemfa marker="#setValue/2"><c>setValue/2</c></seemfa> doesn't make the control modified.
      </p><p>See: <seemfa marker="#markDirty/1"><c>markDirty/1</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="isMultiLine" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if this is a multi line edit control and false otherwise. </fsummary>
    <desc><p>Returns true if this is a multi line edit control and false otherwise. 
      </p><p>See: <seemfa marker="#isSingleLine/1"><c>isSingleLine/1</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="isSingleLine" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if this is a single line edit control and false otherwise. </fsummary>
    <desc><p>Returns true if this is a single line edit control and false otherwise. 
      </p><p>See: <seemfa marker="#isSingleLine/1"><c>isSingleLine/1</c></seemfa>, <seemfa marker="#isMultiLine/1"><c>isMultiLine/1</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="loadFile" arity="2" clause_i="1" since=""/>
    <fsummary>See: <c>loadFile/3</c></fsummary>
  </func>
  
  <func>
    <name name="loadFile" arity="3" clause_i="1" since=""/>
    <fsummary>Loads and displays the named file, if it exists. </fsummary>
    <desc><p>Loads and displays the named file, if it exists. 
      </p><p>Return: true if successful, false otherwise. 
      </p></desc>
  </func>
  
  <func>
    <name name="markDirty" arity="1" clause_i="1" since=""/>
    <fsummary>Mark text as modified (dirty). </fsummary>
    <desc><p>Mark text as modified (dirty). 
      </p><p>See: <seemfa marker="#isModified/1"><c>isModified/1</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="paste" arity="1" clause_i="1" since=""/>
    <fsummary>Pastes text from the clipboard to the text item. </fsummary>
    <desc><p>Pastes text from the clipboard to the text item. 
      </p></desc>
  </func>
  
  <func>
    <name name="positionToXY" arity="2" clause_i="1" since=""/>
    <fsummary>Converts given position to a zero-based column, line number pair. </fsummary>
    <desc><p>Converts given position to a zero-based column, line number pair. 
      </p><p>Return: true on success, false on failure (most likely due to a too large position parameter).
      </p><p>See: <seemfa marker="#xYToPosition/3"><c>xYToPosition/3</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="redo" arity="1" clause_i="1" since=""/>
    <fsummary>If there is a redo facility and the last operation can be redone, redoes the last operation. </fsummary>
    <desc><p>If there is a redo facility and the last operation can be redone, redoes the last operation. 
      </p><p>Does nothing if there is no redo facility. 
      </p></desc>
  </func>
  
  <func>
    <name name="remove" arity="3" clause_i="1" since=""/>
    <fsummary>Removes the text starting at the first given position up to (but not including) the character at the last position. </fsummary>
    <desc><p>Removes the text starting at the first given position up to (but not including) the character at the last position. 
      </p><p>This function puts the current insertion point position at <c>to</c> as a side effect.
      </p></desc>
  </func>
  
  <func>
    <name name="replace" arity="4" clause_i="1" since=""/>
    <fsummary>Replaces the text starting at the first position up to (but not including) the character at the last position with the given text. </fsummary>
    <desc><p>Replaces the text starting at the first position up to (but not including) the character at the last position with the given text. 
      </p><p>This function puts the current insertion point position at <c>to</c> as a side effect.
      </p></desc>
  </func>
  
  <func>
    <name name="saveFile" arity="1" clause_i="1" since=""/>
    <fsummary>See: <c>saveFile/2</c></fsummary>
  </func>
  
  <func>
    <name name="saveFile" arity="2" clause_i="1" since=""/>
    <fsummary>Saves the contents of the control in a text file. </fsummary>
    <desc><p>Saves the contents of the control in a text file. 
      </p><p>Return: true if the operation was successful, false otherwise. 
      </p></desc>
  </func>
  
  <func>
    <name name="setDefaultStyle" arity="2" clause_i="1" since=""/>
    <fsummary>Changes the default style to use for the new text which is going to be added to the control. </fsummary>
    <desc><p>Changes the default style to use for the new text which is going to be added to the control. 
      </p><p>This applies both to the text added programmatically using <seemfa marker="#writeText/2"><c>writeText/2</c></seemfa> or <seemfa marker="#appendText/2"><c>appendText/2</c></seemfa> and to the text entered by the user interactively.
      </p><p>If either of the font, foreground, or background colour is not set in <c>style</c>, the values of the previous default style are used for them. If the previous default style didn't set them neither, the global font or colours of the text control itself are used as fall back.
      </p><p>However if the <c>style</c> parameter is the default <seeerl marker="wxTextAttr"><c>wxTextAttr</c></seeerl>, then the default style is just reset (instead of being combined with the new style which wouldn't change it at all).
      </p><p>Return: true on success, false if an error occurred (this may also mean that the styles are not supported under this platform).
      </p><p>See: <seemfa marker="#getDefaultStyle/1"><c>getDefaultStyle/1</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="setEditable" arity="2" clause_i="1" since=""/>
    <fsummary>Makes the text item editable or read-only, overriding the <c>wxTE_READONLY</c> flag. </fsummary>
    <desc><p>Makes the text item editable or read-only, overriding the <c>wxTE_READONLY</c> flag. 
      </p><p>See: <seemfa marker="#isEditable/1"><c>isEditable/1</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="setInsertionPoint" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the insertion point at the given position. </fsummary>
    <desc><p>Sets the insertion point at the given position. 
      </p></desc>
  </func>
  
  <func>
    <name name="setInsertionPointEnd" arity="1" clause_i="1" since=""/>
    <fsummary>Sets the insertion point at the end of the text control. </fsummary>
    <desc><p>Sets the insertion point at the end of the text control. 
      </p><p>This is equivalent to calling <seemfa marker="#setInsertionPoint/2"><c>setInsertionPoint/2</c></seemfa> with <seemfa marker="#getLastPosition/1"><c>getLastPosition/1</c></seemfa> argument. 
      </p></desc>
  </func>
  
  <func>
    <name name="setMaxLength" arity="2" clause_i="1" since=""/>
    <fsummary>This function sets the maximum number of characters the user can enter into the control. </fsummary>
    <desc><p>This function sets the maximum number of characters the user can enter into the control. 
      </p><p>In other words, it allows limiting the text value length to <c>len</c> not counting the terminating <c>NUL</c> character.
      </p><p>If <c>len</c> is 0, the previously set max length limit, if any, is discarded and the user may enter as much text as the underlying native text control widget supports (typically at least 32Kb). If the user tries to enter more characters into the text control when it already is filled up to the maximal length, a <c>wxEVT_TEXT_MAXLEN</c> event is sent to notify the program about it (giving it the possibility to show an explanatory message, for example) and the extra input is discarded.
      </p><p>Note that in wxGTK this function may only be used with single line text controls. 
      </p></desc>
  </func>
  
  <func>
    <name name="setSelection" arity="3" clause_i="1" since=""/>
    <fsummary>Selects the text starting at the first position up to (but not including) the character at the last position. </fsummary>
    <desc><p>Selects the text starting at the first position up to (but not including) the character at the last position. 
      </p><p>If both parameters are equal to -1 all text in the control is selected.
      </p><p>Notice that the insertion point will be moved to <c>from</c> by this function.
      </p><p>See: <c>SelectAll()</c> (not implemented in wx)
      </p></desc>
  </func>
  
  <func>
    <name name="setStyle" arity="4" clause_i="1" since=""/>
    <fsummary>Changes the style of the given range. </fsummary>
    <desc><p>Changes the style of the given range. 
      </p><p>If any attribute within <c>style</c> is not set, the corresponding attribute from <seemfa marker="#getDefaultStyle/1"><c>getDefaultStyle/1</c></seemfa> is used.
      </p><p>Return: true on success, false if an error occurred (this may also mean that the styles are not supported under this platform).
      </p><p>See: <seemfa marker="#getStyle/3"><c>getStyle/3</c></seemfa>, <seeerl marker="wxTextAttr"><c>wxTextAttr</c></seeerl>
      </p></desc>
  </func>
  
  <func>
    <name name="setValue" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the new text control value. </fsummary>
    <desc><p>Sets the new text control value. 
      </p><p>It also marks the control as not-modified which means that IsModified() would return false immediately after the call to <seemfa marker="#setValue/2"><c>setValue/2</c></seemfa>.
      </p><p>The insertion point is set to the start of the control (i.e. position 0) by this function unless the control value doesn't change at all, in which case the insertion point is left at its original position.
      </p><p>Note that, unlike most other functions changing the controls values, this function generates a <c>wxEVT_TEXT</c> event. To avoid this you can use <seemfa marker="#changeValue/2"><c>changeValue/2</c></seemfa> instead.
      </p></desc>
  </func>
  
  <func>
    <name name="showPosition" arity="2" clause_i="1" since=""/>
    <fsummary>Makes the line containing the given position visible. </fsummary>
    <desc><p>Makes the line containing the given position visible. 
      </p></desc>
  </func>
  
  <func>
    <name name="undo" arity="1" clause_i="1" since=""/>
    <fsummary>If there is an undo facility and the last operation can be undone, undoes the last operation. </fsummary>
    <desc><p>If there is an undo facility and the last operation can be undone, undoes the last operation. 
      </p><p>Does nothing if there is no undo facility. 
      </p></desc>
  </func>
  
  <func>
    <name name="writeText" arity="2" clause_i="1" since=""/>
    <fsummary>Writes the text into the text control at the current insertion position. </fsummary>
    <desc><p>Writes the text into the text control at the current insertion position. 
      </p><p>Remark: Newlines in the text string are the only control characters allowed, and they will cause appropriate line breaks. See operator&lt;&lt;() and <seemfa marker="#appendText/2"><c>appendText/2</c></seemfa> for more convenient ways of writing to the window. After the write operation, the insertion point will be at the end of the inserted text, so subsequent write operations will be appended. To append text after the user may have interacted with the control, call <seemfa marker="#setInsertionPointEnd/1"><c>setInsertionPointEnd/1</c></seemfa> before writing. 
      </p></desc>
  </func>
  
  <func>
    <name name="xYToPosition" arity="3" clause_i="1" since=""/>
    <fsummary>Converts the given zero based column and line number to a position. </fsummary>
    <desc><p>Converts the given zero based column and line number to a position. 
      </p><p>Return: The position value, or -1 if x or y was invalid. 
      </p></desc>
  </func>
  </funcs>
</erlref>
