A text editor widget. More...
| void | convert(string format) |
| string | fileName |
| void | openFile(string fileName, string codec="") |
| bool | modified() |
| void | saveFile(string fileName, string codec="") |
| bool | setModifyAdded() |
| bool | setModifyChanged() |
| bool | setModifySaved() |
| void | setLexer(string lexer) |
| void | setText(string text) |
| string | text() |
| string | title |
A textDisplay is one open file inside a textEdit window. You reach the visible file as text->drawing. text() reads the whole buffer; setText replaces it. fileName is the path on disk; modified is true after edits until save. setLexer chooses syntax highlighting for macros, spice, and similar. Encoding on open and save is automatic when codec is empty. This class does not own menus; those stay on textEdit.
Example:
string t = text->drawing->text();
text->drawing->setText(t + "\n// appended\n");
Convert the contents text into an other format. format will choose the target format. These format convertion are available:
None yet.
This string hold the current filename.
A file with the name s is opened. If codec is empty the encoding is detected automatic.
| Parameter: | |
|---|---|
| fileName | path of the file |
| codec | codec |
Returns: true, if the design was modifies after the last save
The text is saved to fileName. If codec is empty the encoding is detected automatic.
| Parameter: | |
|---|---|
| fileName | path of the file |
| codec | codec |
marks the design shapes to be added
Returns: true or false.
marks the design to be modified
Returns: true or false.
marks the design not to be modified
Returns: true or false.
The lexer for highlighting is set.
set the text being displayed
Returns: The complete text of the file.
Title of this file only used in the list open open files.