Introduction

Read-only variables

The core of Alpha defines a few Tcl variables which are available in the AlphaTcl library as global variables. The following variables are currently defined:
screenWidthwidth of the main screen in pixels
screenHeightheight of the main screen in pixels
menubarHeightheight of the menu bar (deprecated: use [menuBar height] instead)
controlbarHeightheight of the control bar (containing popups)
messagebarHeightheight of the message bar (at bottom of document windows)

Linked variables

A few variables defined in the core are linked to global variables available in the AlphaTcl scripts. They are known as linkVars. Being linked means that these variables have two faces: one in the AlphaTcl library as a global variable and one in the core as a C (extern) variable. A change made to any of these variables is immediately shadowed by its counterpart: if the variable is modified in a Tcl script, the corresponding C variable is modified accordingly, and vice versa.
On the AlphaTcl side, these variables are available as preferences. They can be of two types: integer value or chain of characters.
The following sections indicate the currently available linked variables.

Integer variables

allowsOtherFileTypes
the allowsOtherFileTypes variable indicates whether the user is allowed to save files with an extension that's not in the list of allowed types.
autosavesInPlace
the autosavesInPlace variable decides whether autosaving should be done in place or elsewhere. To enable this, you must also set a non 0 value for autosavingDelay.
autosavingDelay
the autosavingDelay variable sets the time interval in seconds for periodic autosaving. A value of 0 disables periodic autosaving.
checkTextOnOpen
the checkTextOnOpen variable tells whether to perform a text checking for the currently enabled text checking options (like link detection, quotes substitution, etc.) when a document is opened. By default, text checking is asynchronous. You may also use the Edit ↣ Editing Options ↣ Check Document menu item later to trigger a text checking.
coloring
the coloring variable contols words coloring according to mode and context. Set it to 0 to turn off syntax coloring and have the text in plain black and white.
clearUndoStackOnSave
the clearUndoStackOnSave variable sets whether the stack of undos should be cleared when saving a window.
continuousSpellChecking
the continuousSpellChecking variable is used to enable or disable continuous spell checking for newly opened windows.
copyIncludesFontInfo
the copyIncludesFontInfo variable is used to enable or disable copy of rich text. If this flag is set, copy operations include font and style info. Otherwise only the text is written to the pasteboard.
dashSubstitution
the dashSubstitution variable controls substitution of dash characters. Automatic dash substitution causes conversion of sequences of hyphen characters to typographic dashes.
dataDetection
the dataDetection variable controls automatic detection of dates, addresses, and phone numbers.
defHeight
the defHeight variable is the default height of a newly created window. This value can also be overriden with the windowGeometry preference.
defOrigX
the defOrigX variable is the default x-coordinate of the lower left corner of a newly created window. This value can also be overriden with the windowGeometry preference.
defOrigY
the defOrigY variable is the default y-coordinate of the lower left corner of a newly created window. This value can also be overriden with the windowGeometry preference.
defWidth
the defWidth variable is the default width of a newly created window. This value can also be overriden with the windowGeometry preference.
displayLineNumbers
the displayLineNumbers variable tells whether to display line numbers in the left margin of a newly created window. This can be modified later with the Open Windows ↣ Window Info ↣ Show/Hide Line Numbers menu item.
displayVirtualColumn
the displayVirtualColumn variable tells whether the column indicator at bottom of document windows should display virtual positions (taking tabSize into account) or true positions.
forceMainScreen
the forceMainScreen variable tells to force newly opened windows onto the main screen.
grammarChecking
the grammarChecking variable is used to enable or disable grammar checking for newly opened windows.
incrementalSearching
the incrementalSearching variable is used to enable or disable incremental searching for newly opened windows. This setting can be overridden later with the Search ↣ Turn Incremental On/Off menu item.
linkDetection
the linkDetection variable is used to enable or disable automatic link detection that causes strings representing URLs typed in the document window to be automatically made into links to those URLs.
needsBreakColumn
the needsBreakColumn variable specifies a value that triggers line breaking. Alpha asks if line breaking should be done whenever the user opens files that have lines longer than the specified number of characters.
openPackages
the openPackages variable tells the Get File dialog whether to open bundled apps rather than hide their contents and display them as a file.
printHeader
the printHeader variable tells whether a header should be printed with documents.
printMarginBottom
the printMarginBottom variable specifies the height of the bottom printing margin (in 1/72 inch). The default value is 72.
printMarginLeft
the printMarginLeft variable specifies the width of the left printing margin (in 1/72 inch). The default value is 48.
printMarginRight
the printMarginRight variable specifies the width of the right printing margin (in 1/72 inch). The default value is 48.
printMarginTop
the printMarginTop variable specifies the width of the right printing margin (in 1/72 inch). The default value is 72.
quoteSubstitution
the quoteSubstitution variable is used to enable or disable automatic quote substitution that causes quotation marks and apostrophes to be automatically replaced with typographic symbols.
showInvisibleFiles
the showInvisibleFiles variable tells the Get File dialog whether to display the invisible files.
showInvisibles
the showInvisibles variable tells Alpha whether to show all tabs, carriage returns, spaces etc with distinct symbols, when a new document is opened.
smartInsertDelete
the smartInsertDelete variable is used to enable or disable smart insert/delete feature regarding spaces.
spellingCorrection
the spellingCorrection variable is used to enable or disable automatic spelling correction.
statusBarFontSize
the statusBarFontSize variable specifies the default font size to use for the status bar.
statusBarLocation
the statusBarLocation variable specifies the position of the status bar (top=0, bottom=1). Note that the status bar may not be located at the bottom if the dock is there.
statusBarVisible
the statusBarVisible variable specifies whether the status bar is visible at startup. This can be changed later with the Open Windows ↣ Show/Hide Status Bar menu item.
tabSize
the tabSize variable specifies the default size for a tab character for new windows (not necessarily the same as the amount of space used for visual indentation of code).
textReplacement
the textReplacement variable is used to enable or disable automatic text replacement: this enables automatic substitution of a variety of static text items based on system wide user preferences.
tileHeight
the tileHeight variable is initially set by the core as the height of the usable screen frame (portion of the main screen not including menu bar, status and dock).
tileOrigX
the tileOrigX variable is initially set by the core as the x-coordinate of the lower left corner of the usable screen frame (portion of the main screen not including menu bar, status and dock).
tileOrigY
the tileOrigY variable is initially set by the core as the y-coordinate of the lower left corner of the usable screen frame (portion of the main screen not including the dock if it is located along a vertical edge).
tileWidth
the tileWidth variable is initially set by the core as the width of the usable screen frame (portion of the main screen not including the dock if it is located along a vertical edge).
undoOn
the undoOn variable is used to turn on/off the undo manager for all documents.
useDynamicMenus
the useDynamicMenus variable tells Alpha whether to use dynamic menus (in which similar items are shown as a single item which changes when you hold down 'option', 'control' etc). If this option is not checked, all menu items are displayed no matter which modifier key is pressed.
useKerning
the useKerning variable tells Alpha whether to use glyph kerning.
useLigatures
the useLigatures variable tells Alpha whether to use ligatures.
useSmallPopupMenuFont
the useSmallPopupMenuFont variable tells Alpha to use a small font for the various pop-up menus (e.g. marks popup menu)
wrapOnOpen
the wrapOnOpen variable tells whether to apply soft wrapping when opening a window.

String variables

backgroundColor
the backgroundColor variable specifies the default background color for text panes.
defaultFont
the defaultFont variable specifies the default font and size to use for new windows.
foregroundColor
the foregroundColor variable specifies the default text color for document windows. It applies to the portions of text which are not otherwise colorized by the current mode.
inputEncoding
the inputEncoding variable specifies the default input encoding used when opening a file.
outputEncoding
the outputEncoding variable specifies the default output encoding.
printerFont
the printerFont variable specifies the default font and size used for printing.
wordBreak
the wordBreak variable specifies a regular expression used to define words for all internal operations. Note that most modes have their own definition of this variable which can override this value.