Text Formatting Functions

CTextView Class Description


The CTextView class manages the Mira Text Editor window. Use this class to print messages in a scrolling editor window. For further information on the Text Editor, see the Mira User's Guide. This is a class-based version of the global CreateTextWindow function.

Usage

Construction

Object = new_textview()

Object = attach_textview()

Object = attachlist_textview()

Object = CTextView:new()

Object = CTextView:Attach()

Object = CTextView:AttachFromList()

Destruction

Object:delete()

Creation - Non-class Functions

These functions are normally used to create and attach a new CTextView object as an alternative to the class-based construction methods.

new_textview

Creates a new instance of the CTextView class.

attach_textview_by_name

Directly attaches a text window from the Mira desktop using the window title, without selecting the window from a list as with attachlist_textview. It creates and returns a new CTextView object.

attach_textview

Creates a new CTextView object attached to the top-most text window on the Mira desktop. This is equivalent to the Attach class method.

attachlist_textview

Creates a new CTextView object attached to a text editor window selected from a list of windows on the Mira desktop. This is equivalent to the AttachFromList class method.

Construction and Destruction - Class Methods

new

Creates a new instance of a CTextView object.

delete

Deletes the CTextView object.

Attach

Creates a new CTextView object and attaches it to the top-most text editor window on the Mira desktop.

AttachFromList

Creates a new CTextView object and attaches it to a text editor window selected from a list of windows on the Mira desktop.

Close

Closes the CTextView window.

General Methods

Clear

Clears all text from the CTextView window.

GetTitle

Rturns the title of the CTextView window.

GetWordwrap

Returns the current word wrapping state of the CTextView.

Printf

Prints formatted text to the CTextView.

Save

Saves the content of the CTextView to a text file.

SaveAs

Saves the content of the CTextView to a text file with a different name using a File Save dialog.

SetTitle

Sets the text window title to a new name.

SetWordwrap

Sets the word wrapping state of the window wrapped by the CTextView.

Related Topics

Script Classes

Text Formatting Functions

 


Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.