Regular API function

simOpenTextEditor

Description Opens a modal text edition window.
C synopsis simChar* simOpenTextEditor(const simChar* initText,const simChar* xml,simVoid* reserved)
C parameters
initText: a pointer to the initial text to be displayed.
xml: a pointer to an XML description of the text editor's properties. Can be NULL for default properties. Following is a valid content:

<editor title="Window title" editable="true" searchable="true"
        tabWidth="4" textColor="50 50 50" backgroundColor="190 190 190"
        selectionColor="128 128 255" size="800 600" position="100 100" >

    <keywords1 color="152 0 0" >
        <item word="simGetObjectHandle" autocomplete="true"
              calltip="number handle=simGetObjectHandle(number objectName)" />
        <item word="simGetObjectPosition" autocomplete="true"
              calltip="table_3 pos=simGetObjectPosition(number handle,number relHandle)" />
    </keywords1>
    <keywords2 color="220 80 20" >
        <item word="simGetObjectOrientation" autocomplete="true"
              calltip="table_3 euler=simGetObjectOrientation(number handle,number relHandle)" />
    </keywords2>
</editor>
Other editor attributes with their default values are:
isLua="false"
useVrepKeywords="false"
commentColor="0 140 0"
numberColor="220 0 220"
stringColor="255 255 0"
characterColor="255 255 0"
operatorColor="0 0 0"
preprocessorColor="0 128 128"
identifierColor="64 64 64"
wordColor="0 0 255"
word4Color="152 64 0"
reserved: reserved for future extension. Set to NULL.
C return value
NULL in case of an error. Otherwise a pointer to the text. The user is in charge of releasing the returned buffer with simReleaseBuffer.
Lua synopsis string text=simOpenTextEditor(string initText,string xml=nil)
Lua parameters
Similar to C-function
Lua return values
Similar to C-function

All regular API functions on one page