Regular API function

sim.textEditorOpen

Description Opens a text edition window. See simOpenTextEditor for the C version of this function. See also sim.textEditorClose, sim.textEditorShow and sim.textEditorGetInfo.
C synopsis
-
C parameters
-
C return value
-
Lua synopsis
number handle=sim.textEditorOpen(string initText,string properties)
Lua parameters
initText: the initial text to be displayed.
xml: an XML description of the text editor's properties. Can be an empty string for default properties. Following is a valid content:

<editor title="Window title" editable="true" searchable="true"
  tab-width="4" toolbar="false" statusbar="false" resizable="true" modal="false"
  on-close="callbackFunction" closeable="true" position="100 100" size="800 600"
  placement="absolute" font="Courier" font-size="14" activate="false" editable="true"
  line-numbers="true" max-lines="0" is-lua="true" wrap-word="false"
  text-col="50 50 50" background-col="190 190 190" selectionColor="128 128 255"
  comment-col="0 140 0" number-col="220 0 220" string-col="255 255 0"
  character-col="255 255 0" operator-col="0 0 0" identifier-col="64 64 64"
  preprocessor-col="0 128 128" keyword1-col="152 0 0" keyword2-col="220 80 20"
  keyword3-col="0 0 255" keyword4-col="152 64 0">

  <keywords1>
    <item word="sim.getObjectHandle" autocomplete="true"
      calltip="number handle=sim.getObjectHandle(number objectName)" />
    <item word="sim.getObjectPosition" autocomplete="true"
      calltip="table_3 pos=sim.getObjectPosition(number handle,
        number relHandle)" />
  </keywords1>
  <keywords2>
    <item word="sim.getObjectOrientation" autocomplete="true"
      calltip="table_3 euler=sim.getObjectOrientation(number handle,
        number relHandle)" />
  </keywords2>
</editor>
placement attribute recognizes following values: center, absolute and relative.
Lua return values
handle: the handle of the text editor.

All regular API functions on one page