The text editor main window. More...
void | addFunctionKey(int key,int function) |
void | addMacroKey(int key,string macroFileName, string title, string iconFileName) |
void | addMacroToolButton(string macroName,string parameter,string iconfilename) |
void | closeFile() |
int | countFiles() |
textDisplay* | drawing |
string | filename |
int | findFile(string filename) |
void | hideToolBar(string name) |
string | macroToolbarName |
void | menuAdd(string name,string entries ) |
void | needLayoutEditor(bool newOne=false) |
void | needSchematicEditor(bool newOne=false) |
void | newDoc() |
void | newFile() |
void | open(string filename) |
void | reload() |
void | save() |
void | saveAs() |
void | setFile(int i) |
void | setLexer(string lexer) |
void | setText(string text) |
void | showToolBar(string name) |
void | toolBarAdd(string name,string buttons) |
the main window of a TextEditor. The text can be accessed via the Class textDisplay. If more than one file is opened the current display file can be set with setFile.
if (text->drawing->modified())text->save();
text->needLayoutEditor();
layout->executeMacro(text->drawing->fileName);
Set the feature of an extra keyboard. key is the number of the key. It is numbered from 0 to the amount of keys the keyboard has. function is the feature code of the featur you want to add. As toolbutton, modification of the extra keyboard are not store and it is recommended to set it with an autostart macro. (introduced with release 20210905)
Will set an key of an external keyboard to a macro. key is the number of the key at the keyboard. macroFileName os the full path of the macro, title the capture and IconFileName the full path of the icon file. (introduced with release 20210910)
Add a new button to the toolbars. The button will be added to the toolbar 'Macros'. If this toolbar does not exist, it will be created. macroName specifies the name of the macro to be executed. iconfilename points to the file for the icon of the new button. If the given file does not exist, the default macro icon is used. !MacroToolButtons will not stored with shut-down.
Closes the current visible file.
Returns: number of open files within the text editor.
This class is the main class of the text file. It holds all relevant information of a single text file and point to the current displayed files.
This string hold the current filename.
Returns: the number of the file in the list of file in the case the filename is open. Otherwise -1 is returned;
Hides the named toolbar.
Holds the name of the toolbar containing custom macros. The name must be set before the first macro is added to the toolbar. (introduced with release 20211216)
Add a new entry to the main menu. The first parameter is the name of the menu. The second parameter contains last entries of the new menu separated with a semicolon. Next to the feature name the FeatureCode can be used to access a feature.
Calling the layout object from a macro will fail, if no layout window is associated with the textEdit class. Calling this feature will link the text edit window with a layout window. If newOne is true, a new empty layout window will be associated. Otherwise it will be looked for existing windows before creating a new one.
Calling the schematic object from a macro will fail, if no schematic window is associated with the textEdit class. Calling this feature will link the text edit window with a layout window. If newOne is true, a new empty schematic window will be associated. Otherwise it will be looked for existing windows before creating a new one.
Set the current file to a new empty file. A new file is created, if required. (introduced with release 20190405)
Open a new empty file for editing.
opens the named file.
Reloads the current displayed file from disk. Unsaved modifications are removed.
Saves the current text file. If the file is not store or have no file name set, it asked for a filename.
Ask for a file name and store the current file there.
Displayes the file on position i.
Set the lexer for the current displayed text.
Set the text for the current displayed text file.
Shows the named toolbar.
Add a new tool bar, separate multiple buttons with a ';'. Next to the feature name the FeatureCode can be used to access a feature. {{{ text->toolBarAdd("my toolbar","New Layout;Zoom Mouse;Code 39;Quit"); }}}