TextEdit Class Reference
The text editor main window. More...
See also: List of Classes
Member
- addMacroToolButton(string macroName,string parameter,string iconfilename)
- closeFile()
- countFiles()
- drawing
- filename
- findFile(string filename)
- hideToolBar(string name)
- menuAdd(string name,string entries )
- needLayoutEditor(bool newOne=false)
- needSchematicEditor(bool newOne=false)
- newFile()
- open(string filename)
- reload()
- save()
- saveAs()
- setFile(int i)
- setLexer(string lexer)
- setText(string text)
- showToolBar(string name)
- toolBarAdd(string name,string buttons)
Detailed Description
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.
Member Function Documentation
void textEdit::addMacroToolButton(string macroName,string parameter,string iconfilename)
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.
(introduced with version 20170716)
void textEdit::closeFile()
Closes the current visible file.
int textEdit::countFiles()
Returns: number of open files within the text editor.
textDisplay* textEdit::drawing
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.
string textEdit::filename
This string hold the current filename.
This feature is only part of LayoutEditors C++ Macros.
int textEdit::findFile(string filename)
Returns: the number of the file in the list of file in the case the filename is open. Otherwise -1 is returned; (introduced with version 20160405)
void textEdit::hideToolBar(string name)
Hides the named toolbar.
void textEdit::menuAdd(string name,string entries )
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.
void textEdit::needLayoutEditor(bool newOne=false)
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. (introduced with version 20130923)
void textEdit::needSchematicEditor(bool newOne=false)
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. (introduced with version 20130923)
void textEdit::newFile()
Open a new empty file for editing.
void textEdit::open(string filename)
opens the named file.
void testEdit::reload()
Reloads the current displayed file from disk. Unsaved modifications are removed. (introduced with version 20160405)
void textEdit::save()
Saves the current text file. If the file is not store or have no file name set, it asked for a filename. (introduced with version 20130923)
void textEdit::saveAs()
Ask for a file name and store the current file there. (introduced with version 20130923)
void textEdit::setFile(int i)
Displayes the file on position i.
void textEdit::setLexer(string lexer)
Set the lexer for the current displayed text.
(introduced with version 20130101)
void textEdit::setText(string text)
Set the text for the current displayed text file.
(introduced with version 20130101)
void textEdit::showToolBar(string name)
Shows the named toolbar.
void textEdit::toolBarAdd(string name,string buttons)
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");