The RadTextEdit class is the principal tool for AIS Lisp to surface text edit pane functionality. The RadTextEdit is one of the key words accepted by the qt new: function. Each RadTextEdit control comes with HTML rich text functionality. There can be many RadTextEdit objects.
Overview
The new function creates a new RadTextEdit object and returns a pointer to the newly created object. The RadTextEdit is one of the class key words accepted by the qt new: function. There can be many RadTextEdit objects.
Syntax
(qt new: RadTextEdit:)
(qt new: RadTextEdit: keyMgr)
Arguments
keyMgr | (Optional)The key manager lambda to manage the RADTextEDIT object's key strokes. |
Returns | Always returns a pointer to the newly created RadTextEdit object. |
Example1
(defun editMgr(...) true) ;; Don't do anything special when the tab is clicked
(qt mainWindow: setTitle: (append "My QT Horizontal Tab Demo.")) ;; Set the main window title
(setq radTextEditPtr (qt new: RadTextEdit:)) ;; Create a QT TextEdit object (a GUI descentant of RadWidget).
(setq tabIndex (qt mainWindow: addTab: radTextEditPtr "Edit" editMgr)) ;; Add a new tab to the main window horizontal tab bar
(qt mainWindow: maximize:) ;; Display the main window
Overview
The delete function destroys a RadTextEdit object and returns a null pointer.
Syntax
(qt delete: radTextEditPtr)
Arguments
radTextEditPtr | The pointer to the RadTextEdit object to be destroyed. |
Returns | Always returns a null pointer. |
Example1
(setq radTextEditPtr (qt new: RadTextEdit:)) ;; Create a RadTextEdit object.
(setq radTextEditPtr (qt delete: radTextEditPtr)) ;; Destroy the RadTextEdit object.
Overview
The RadTextEdit copy function copies the currently selected (highlights) text in the RadTextEdit display pane to the main window clipboard. The copy function alwats returns #void.
Syntax
(qt radTextEditPtr copy:)
Arguments
result | Always returns #void. |
Example1
(defun editMgr(...) true) ;; Don't do anything special when the tab is clicked
(qt mainWindow: setTitle: (append "My QT Horizontal Tab Demo.")) ;; Set the main window title
(setq radTextEditPtr (qt new: RadTextEdit:)) ;; Create a QT TextEdit object (a GUI descentant of RadWidget).
(setq tabIndex (qt mainWindow: addTab: radTextEditPtr "Edit" editMgr)) ;; Add a new tab to the main window horizontal tab bar
(qt mainWindow: maximize:) ;; Display the main window
(qt radTextEditPtr setText: "Hello world")) ;; Set the RadTextEdit display pane to "Hello world".
(setq return (qt radTextEditPtr find: "Hello" false true false)) ;; Select and highlight the "Hello" text in the RadTextEdit pane.
(qt radTextEditPtr copy:) ;; Copy the selected text to the main window clipboard.
Overview
The RadTextEdit find function locates and selects (highlights) the next occurance of the specified text in the RadTextEdit display pane. The find can be case sensitive, backwards or forewards, and search for whole words only depending on the specified switches. Once found the matching text is selected (highlighted) in the RadTextEdit display pane. The find function returns true if the specified text was found and selected.
Syntax
(setq result (qt radTextEditPtr find: text caseInSensitiveSW backWardsSW wholeWordSW))
Arguments
text | The text to be matched in the RadTextEdit display pane. |
caseInSensitiveSW | True if the find is to be case sensitive. |
backWardsSW | True if the find is to be backwards from the current cursor location. |
wholeWordSW | True if the find is to be for whole words only. |
result | Always returns the true if the find was successful. |
Example1
(defun editMgr(...) true) ;; Don't do anything special when the tab is clicked
(qt mainWindow: setTitle: (append "My QT Horizontal Tab Demo.")) ;; Set the main window title
(setq radTextEditPtr (qt new: RadTextEdit:)) ;; Create a QT TextEdit object (a GUI descentant of RadWidget).
(setq tabIndex (qt mainWindow: addTab: radTextEditPtr "Edit" editMgr)) ;; Add a new tab to the main window horizontal tab bar
(qt mainWindow: maximize:) ;; Display the main window
(qt radTextEditPtr setText: "Hello world")) ;; Set the RadTextEdit display pane to "Hello world".
(setq return (qt radTextEditPtr find: "Hello" false true false)) ;; Select and highlight the "Hello" text in the RadTextEdit pane.
Overview
The RadTextEdit getHtmlText function returns the entire contents of the RadTextEdite display pane as an HTML markup string.
Syntax
(setq myHtml (qt radTextEditPtr getHtmlText:))
Arguments
myHtml | Always returns the entire contents of the RadTextEdit display pane as an HTML markup string. |
Example1
(defun editMgr(...) true) ;; Don't do anything special when the tab is clicked
(qt mainWindow: setTitle: (append "My QT Horizontal Tab Demo.")) ;; Set the main window title
(setq radTextEditPtr (qt new: RadTextEdit:)) ;; Create a QT TextEdit object (a GUI descentant of RadWidget).
(setq tabIndex (qt mainWindow: addTab: radTextEditPtr "Edit" editMgr)) ;; Add a new tab to the main window horizontal tab bar
(qt mainWindow: maximize:) ;; Display the main window
(qt radTextEditPtr setHtmlText: "Hello world")) ;; Set the RadTextEdit display pane to specified HTML text.
(setq return (qt radTextEditPtr getHtmlText:)) ;; Return the HTML text in the RadTextEdit pane.
Overview
The RadTextEdit getText function returns the entire contents of the RadTextEdit display pane as an ASCII string.
Syntax
(setq myText (qt radTextEditPtr getText:))
Arguments
myText | Always returns the entire contents of the RadTextEdit display pane as an ADCII string. |
Example1
(defun editMgr(...) true) ;; Don't do anything special when the tab is clicked
(qt mainWindow: setTitle: (append "My QT Horizontal Tab Demo.")) ;; Set the main window title
(setq radTextEditPtr (qt new: RadTextEdit:)) ;; Create a QT TextEdit object (a GUI descentant of RadWidget).
(setq tabIndex (qt mainWindow: addTab: radTextEditPtr "Edit" editMgr)) ;; Add a new tab to the main window horizontal tab bar
(qt mainWindow: maximize:) ;; Display the main window
(qt radTextEditPtr setText: "Hello world")) ;; Set the RadTextEdit display pane to specified ASCII text.
(setq return (qt radTextEditPtr getText:)) ;; Return the ASCII text in the RadTextEdit pane.
Overview
The RadTextEdit getSelectedText function returns the entire contents of currently selected text in the RadTextEdit display pane.
Syntax
(setq myText (qt radTextEditPtr getSelectedText:))
Arguments
myText | Always returns the entire contents of currently selected text in the RadTextEdit display pane. |
Example1
(defun editMgr(...) true) ;; Don't do anything special when the tab is clicked
(qt mainWindow: setTitle: (append "My QT Horizontal Tab Demo.")) ;; Set the main window title
(setq radTextEditPtr (qt new: RadTextEdit:)) ;; Create a QT TextEdit object (a GUI descentant of RadWidget).
(setq tabIndex (qt mainWindow: addTab: radTextEditPtr "Edit" editMgr)) ;; Add a new tab to the main window horizontal tab bar
(qt mainWindow: maximize:) ;; Display the main window
(qt radTextEditPtr setText: "Hello world")) ;; Set the RadTextEdit display pane to specified ASCII text.
(setq result (qt radTextEditPtr find: "world" false true false)) ;; Select and highlight the "world" text on the RadTextEdit pane.
(setq result (qt radTextEditPtr getSelectedText:)) ;; Return the text selected by the find.
Overview
The RadTextEdit getSelectionEnd function returns the end position of the currently selected text in the RadTextEdit display pane.
Syntax
(setq pos (qt radTextEditPtr getSelectionEnd:))
Arguments
pos | Always returns the end position of the currently selected text in the RadTextEdit display pane. |
Example1
(defun editMgr(...) true) ;; Don't do anything special when the tab is clicked
(qt mainWindow: setTitle: (append "My QT Horizontal Tab Demo.")) ;; Set the main window title
(setq radTextEditPtr (qt new: RadTextEdit:)) ;; Create a QT TextEdit object (a GUI descentant of RadWidget).
(setq tabIndex (qt mainWindow: addTab: radTextEditPtr "Edit" editMgr)) ;; Add a new tab to the main window horizontal tab bar
(qt mainWindow: maximize:) ;; Display the main window
(qt radTextEditPtr setText: "Hello world")) ;; Set the RadTextEdit display pane to specified ASCII text.
(setq result (qt radTextEditPtr find: "world" false true false)) ;; Select and highlight the "world" text on the RadTextEdit pane.
(setq result (qt radTextEditPtr getSelectedEnd:)) ;; Return the selected text ending position of 10.
Overview
The RadTextEdit getSelectionStart function returns the start position of the currently selected text in the RadTextEdit display pane.
Syntax
(setq pos (qt radTextEditPtr getSelectionStart:))
Arguments
pos | Always returns the start position of the currently selected text in the RadTextEdit display pane. |
Example1
(defun editMgr(...) true) ;; Don't do anything special when the tab is clicked
(qt mainWindow: setTitle: (append "My QT Horizontal Tab Demo.")) ;; Set the main window title
(setq radTextEditPtr (qt new: RadTextEdit:)) ;; Create a QT TextEdit object (a GUI descentant of RadWidget).
(setq tabIndex (qt mainWindow: addTab: radTextEditPtr "Edit" editMgr)) ;; Add a new tab to the main window horizontal tab bar
(qt mainWindow: maximize:) ;; Display the main window
(qt radTextEditPtr setText: "Hello world")) ;; Set the RadTextEdit display pane to specified ASCII text.
(setq result (qt radTextEditPtr find: "world" false true false)) ;; Select and highlight the "world" text on the RadTextEdit pane.
(setq result (qt radTextEditPtr getSelectedStart:)) ;; Return the selected text starting position of 6.
Overview
The RadTextEdit paste function copies the main window clipboard contents into the currently selected (highlighted) text in the RadTextEdit display pane. The copy function alwats returns #void.
Syntax
(qt radTextEditPtr paste:)
Arguments
result | Always returns #void. |
Example1
(defun editMgr(...) true) ;; Don't do anything special when the tab is clicked
(qt mainWindow: setTitle: (append "My QT Horizontal Tab Demo.")) ;; Set the main window title
(setq radTextEditPtr (qt new: RadTextEdit:)) ;; Create a QT TextEdit object (a GUI descentant of RadWidget).
(setq tabIndex (qt mainWindow: addTab: radTextEditPtr "Edit" editMgr)) ;; Add a new tab to the main window horizontal tab bar
(qt mainWindow: maximize:) ;; Display the main window
(qt radTextEditPtr setText: "Hello world")) ;; Set the RadTextEdit display pane to "Hello world".
(setq return (qt radTextEditPtr find: "Hello" false true false)) ;; Select and highlight the "Hello" text in the RadTextEdit pane.
(qt mainWindow: setClipboardText: "Bye") ;; Copy the text "Byen" into the main window clipboard.
(qt radTextEditPtr paste:) ;; Copy the text "Bye" over the selected text in the RadTextEdit pane which now reads "Bye world".
Overview
The RadTextEdit selectAll function selects highlights all text in the RadTextEdit display pane.
Syntax
(qt radTextEditPtr selectAll:)
Arguments
returns | Always returns #void. |
Example1
(defun editMgr(...) true) ;; Don't do anything special when the tab is clicked
(qt mainWindow: setTitle: (append "My QT Horizontal Tab Demo.")) ;; Set the main window title
(setq radTextEditPtr (qt new: RadTextEdit:)) ;; Create a QT TextEdit object (a GUI descentant of RadWidget).
(setq tabIndex (qt mainWindow: addTab: radTextEditPtr "Edit" editMgr)) ;; Add a new tab to the main window horizontal tab bar
(qt mainWindow: maximize:) ;; Display the main window
(qt radTextEditPtr setText: "Hello world")) ;; Set the RadTextEdit display pane to specified ASCII text.
(qt radTextEditPtr selectAll:)) ;; Select and highlight all text in the RadTextEdit pane.
(setq result (qt radTextEditPtr getSelectedText:)) ;; Return the text selected which is "Hello world".
Overview
The RadTextEdit setAcceptRichText function sets the RadTextEdit to accept rich text (true) or not (false).
Syntax
(qt radTextEditPtr setAcceptRichText: switch)
Arguments
switch | The switch to accept rich text (true) or not (false). |
returns | Always returns #void. |
Example1
(defun editMgr(...) true) ;; Don't do anything special when the tab is clicked
(qt mainWindow: setTitle: (append "My QT Horizontal Tab Demo.")) ;; Set the main window title
(setq radTextEditPtr (qt new: RadTextEdit:)) ;; Create a QT TextEdit object (a GUI descentant of RadWidget).
(setq tabIndex (qt mainWindow: addTab: radTextEditPtr "Edit" editMgr)) ;; Add a new tab to the main window horizontal tab bar
(qt mainWindow: maximize:) ;; Display the main window
(qt radTextEditPtr setAcceptRichText: false)) ;; Set the RadTextEdit pane NOT tp accept rich text.
(qt radTextEditPtr setText: "Hello world")) ;; Set the RadTextEdit display pane to specified ASCII text.
Overview
The RadTextEdit setFocus function sets the RadTextEdit to have the focus.
Syntax
(qt radTextEditPtr setFocus:)
Arguments
returns | Always returns #void. |
Example1
(defun editMgr(...) true) ;; Don't do anything special when the tab is clicked
(qt mainWindow: setTitle: (append "My QT Edit Demo.")) ;; Set the main window title
(setq radTextEditPtr (qt new: RadTextEdit:)) ;; Create a QT TextEdit object (a GUI descentant of RadWidget).
(setq tabIndex (qt mainWindow: addTab: radTextEditPtr "Edit" editMgr)) ;; Add a new tab to the main window horizontal tab bar
(qt mainWindow: maximize:) ;; Display the main window
(qt radTextEditPtr setAcceptRichText: false)) ;; Set the RadTextEdit pane NOT tp accept rich text.
(qt radTextEditPtr setText: "Hello world")) ;; Set the RadTextEdit display pane to specified ASCII text.
(qt radTextEditPtr setFocus:)) ;; Sets the RadTextEdit display pane to have the focus.
Overview
The RadTextEdit setHtmlText function sets the entire contents of the RadTextEdit display pane to the specified HTML text.
Syntax
(qt radTextEditPtr setHtmlText: myText)
Arguments
myText | The ASCII text value to be set in the RadTextEdit display pane. |
Example1
(defun editMgr(...) true) ;; Don't do anything special when the tab is clicked
(qt mainWindow: setTitle: (append "My QT Edit Demo.")) ;; Set the main window title
(setq radTextEditPtr (qt new: RadTextEdit:)) ;; Create a QT TextEdit object (a GUI descentant of RadWidget).
(setq tabIndex (qt mainWindow: addTab: radTextEditPtr "Edit" editMgr)) ;; Add a new tab to the main window horizontal tab bar
(qt mainWindow: maximize:) ;; Display the main window
(qt radTextEditPtr setHtmlText: "Hello world")) ;; Set the RadTextEdit display pane to specified HTML text.
Overview
The RadTextEdit setMgr function sets the RadTextEdit key stroke manager name - where (defun mgrLambdaName(command) ...lisp code...)
Syntax
(qt radTextEditPtr setMgr: mgrLambdaName)
Arguments
mgrLambdaName | The RadTextEdit key stroke manager name - where (defun mgrLambdaName(command) ...lisp code...). |
Example1
(defun editMgr(...) true) ;; Don't do anything special when the tab is clicked
(qt mainWindow: setTitle: (append "My QT Edit Demo.")) ;; Set the main window title
(setq radTextEditPtr (qt new: RadTextEdit: editMgr)) ;; Create a QT TextEdit object (a GUI descentant of RadWidget).
(setq tabIndex (qt mainWindow: addTab: radTextEditPtr "Edit" editMgr)) ;; Add a new tab to the main window horizontal tab bar
(qt mainWindow: maximize:) ;; Display the main window
(qt radTextEditPtr setHtmlText: "Hello world")) ;; Set the RadTextEdit display pane to specified HTML text.
Overview
The RadTextEdit setReadOnly function sets the RadTextEdit to read only mode (true).
Syntax
(qt radTextEditPtr setReadOnly: switch)
Arguments
switch | The RadTextEdit read only switch (true) or (false) if editing allowed. |
Example1
(defun editMgr(...) true) ;; Don't do anything special when the tab is clicked
(qt mainWindow: setTitle: (append "My QT Edit Demo.")) ;; Set the main window title
(setq radTextEditPtr (qt new: RadTextEdit: editMgr)) ;; Create a QT TextEdit object (a GUI descentant of RadWidget).
(setq tabIndex (qt mainWindow: addTab: radTextEditPtr "Edit" editMgr)) ;; Add a new tab to the main window horizontal tab bar
(qt mainWindow: maximize:) ;; Display the main window
(qt radTextEditPtr setHtmlText: "Hello world") ;; Set the RadTextEdit display pane to specified HTML text.
(qt radTextEditPtr setReadOnly: true) ;; Set the RadTextEdit display pane to read only mode.
Overview
The RadTextEdit setSelectedText function sets the currently selected text based on the command (all, line, word).
Syntax
(qt radTextEditPtr setSelectedText: command)
(qt radTextEditPtr setSelectedText: start end)
Arguments
command | The the command (all, line, word) for selecting the text around the current cursor position. |
start | The starting position for selecting the text in the RadTextEdit display pane. |
end | The ending position for selecting the text in the RadTextEdit display pane. |
Example1
(defun editMgr(...) true) ;; Don't do anything special when the tab is clicked
(qt mainWindow: setTitle: (append "My QT Edit Demo.")) ;; Set the main window title
(setq radTextEditPtr (qt new: RadTextEdit: editMgr)) ;; Create a QT TextEdit object (a GUI descentant of RadWidget).
(setq tabIndex (qt mainWindow: addTab: radTextEditPtr "Edit" editMgr)) ;; Add a new tab to the main window horizontal tab bar
(qt mainWindow: maximize:) ;; Display the main window
(qt radTextEditPtr setText: "Hello world") ;; Set the RadTextEdit display pane to specified ASCII text.
(qt radTextEditPtr setSelectedText: word) ;; Set the RadTextEdit selected text to highlight the word "world".
Overview
The RadTextEdit setTabsOff function sets the RADTextEdit not to accept tabs.
Syntax
(qt radTextEditPtr setTabsOff:)
Arguments
returns | Always returns #void. |
Example1
(defun editMgr(...) true) ;; Don't do anything special when the tab is clicked
(qt mainWindow: setTitle: (append "My QT Edit Demo.")) ;; Set the main window title
(setq radTextEditPtr (qt new: RadTextEdit: editMgr)) ;; Create a QT TextEdit object (a GUI descentant of RadWidget).
(setq tabIndex (qt mainWindow: addTab: radTextEditPtr "Edit" editMgr)) ;; Add a new tab to the main window horizontal tab bar
(qt mainWindow: maximize:) ;; Display the main window
(qt radTextEditPtr setText: "Hello world") ;; Set the RadTextEdit display pane to specified ASCII text.
(qt radTextEditPtr setTabsOff:) ;; Set the RadTextEdit not to accept tabs.
Overview
The RadTextEdit setTabsOn function sets the RADTextEdit to accept tabs.
Syntax
(qt radTextEditPtr setTabsOn:)
Arguments
returns | Always returns #void. |
Example1
(defun editMgr(...) true) ;; Don't do anything special when the tab is clicked
(qt mainWindow: setTitle: (append "My QT Edit Demo.")) ;; Set the main window title
(setq radTextEditPtr (qt new: RadTextEdit: editMgr)) ;; Create a QT TextEdit object (a GUI descentant of RadWidget).
(setq tabIndex (qt mainWindow: addTab: radTextEditPtr "Edit" editMgr)) ;; Add a new tab to the main window horizontal tab bar
(qt mainWindow: maximize:) ;; Display the main window
(qt radTextEditPtr setText: "Hello world") ;; Set the RadTextEdit display pane to specified ASCII text.
(qt radTextEditPtr setTabsOn:) ;; Set the RadTextEdit to accept tabs.
Overview
The RadTextEdit setText function sets the entire contents of the RadTextEdit display pane to the specified ASCII text.
Syntax
(qt radTextEditPtr setText: myText)
Arguments
myText | The ASCII text value to be set in the RadTextEdit display pane. |
Example1
(defun editMgr(...) true) ;; Don't do anything special when the tab is clicked
(qt mainWindow: setTitle: (append "My QT Edit Demo.")) ;; Set the main window title
(setq radTextEditPtr (qt new: RadTextEdit:)) ;; Create a QT TextEdit object (a GUI descentant of RadWidget).
(setq tabIndex (qt mainWindow: addTab: radTextEditPtr "Edit" editMgr)) ;; Add a new tab to the main window horizontal tab bar
(qt mainWindow: maximize:) ;; Display the main window
(qt radTextEditPtr setText: "Hello world")) ;; Set the RadTextEdit display pane to specified ASCII text.
Overview
The RadTextEdit setWordWrapOff function sets the RADTextEdit not to wrap words at the end of the dispaly pane width.
Syntax
(qt radTextEditPtr setWordWrapOff:)
Arguments
returns | Always returns #void. |
Example1
(defun editMgr(...) true) ;; Don't do anything special when the tab is clicked
(qt mainWindow: setTitle: (append "My QT Edit Demo.")) ;; Set the main window title
(setq radTextEditPtr (qt new: RadTextEdit: editMgr)) ;; Create a QT TextEdit object (a GUI descentant of RadWidget).
(setq tabIndex (qt mainWindow: addTab: radTextEditPtr "Edit" editMgr)) ;; Add a new tab to the main window horizontal tab bar
(qt mainWindow: maximize:) ;; Display the main window
(qt radTextEditPtr setText: "Hello world") ;; Set the RadTextEdit display pane to specified ASCII text.
(qt radTextEditPtr setWordWrapOff:) ;; Set the RadTextEdit not to wrap words at the end of the dispaly pane width.
Overview
The RadTextEdit setWordWrapOn function sets the RADTextEdit to wrap words at the end of the dispaly pane width.
Syntax
(qt radTextEditPtr setWordWrapOn:)
Arguments
returns | Always returns #void. |
Example1
(defun editMgr(...) true) ;; Don't do anything special when the tab is clicked
(qt mainWindow: setTitle: (append "My QT Edit Demo.")) ;; Set the main window title
(setq radTextEditPtr (qt new: RadTextEdit: editMgr)) ;; Create a QT TextEdit object (a GUI descentant of RadWidget).
(setq tabIndex (qt mainWindow: addTab: radTextEditPtr "Edit" editMgr)) ;; Add a new tab to the main window horizontal tab bar
(qt mainWindow: maximize:) ;; Display the main window
(qt radTextEditPtr setText: "Hello world") ;; Set the RadTextEdit display pane to specified ASCII text.
(qt radTextEditPtr setWordWrapOn:) ;; Set the RadTextEdit to wrap words at the end of the dispaly pane width.