Difference between revisions of "Documentation:Windows Section 5.1"

From POV-Wiki
Jump to navigation Jump to search
m (adjusting section break)
m (link repair after realignment)
Line 566: Line 566:
  
 
<p>
 
<p>
See the <!--<linkto "Default Key Mappings">Default Key Mappings</linkto>--->[[Documentation:Windows Section 2.1#Default Key Mappings|Default Key Mappings]] section for a list of all
+
See the <!--<linkto "Default Key Mappings">Default Key Mappings</linkto>--->[[Documentation:Windows Section 2#Default Key Mappings|Default Key Mappings]] section for a list of all
 
the default assignments of editor commands to keystrokes. Note that each command may have two
 
the default assignments of editor commands to keystrokes. Note that each command may have two
 
different key sequences assigned to it, and that each key sequence may have up to two keystrokes
 
different key sequences assigned to it, and that each key sequence may have up to two keystrokes
Line 648: Line 648:
  
 
<p>
 
<p>
See <!--<linkto "Using the Mouse">Using the Mouse</linkto>--->[[Documentation:Windows Section 2.1#Using the Mouse|Using the Mouse]] for a description of how to select
+
See <!--<linkto "Using the Mouse">Using the Mouse</linkto>--->[[Documentation:Windows Section 2#Using the Mouse|Using the Mouse]] for a description of how to select
 
columnar blocks.
 
columnar blocks.
 
</p>
 
</p>

Revision as of 00:31, 31 January 2013

This document is protected, so submissions, corrections and discussions should be held on this documents talk page.


Text Menu

WinImgMenusText.gif

The Text Menu contains options and operations that act on text which is displayed in the editor. It is only displayed when an editor pane is chosen.

The Text Menu

Show White Space

Indicate where white space is using a dot. Note that this does not affect the file itself, just how it is shown on the screen.

Set Repeat Count

Most editor commands can be automatically repeated a specified number of times. By setting the repeat count, you cause the next editor command you issue to be repeated that number of times (this includes caret positioning using the keyboard).

Tab Size

The Tab size setting only applies to the current file and any subsequently opened files. Changing the tab spacing for one file does not automatically change it for all the other files that are already open. The tab setting you choose is stored with the MRU list, so if you re-open a file from the MRU, the old setting comes back (for that file only).

Note that the new value you apply to the tab setting becomes the default for any file opened or created after that point (apart from those in the MRU list). So if you change the tab setting to, say, 3, the setting for the current file changes, but not that of any other open file. Any new file that you create or load from that point, however, will be created with a default tab spacing of 3.

Indent

WinImgSubMenusIndent.gif

See the Selection Sub-Menu.

The Indent Sub-Menu

Auto-Indent Style
WinImgSubMenusAutoindent.gif

The Autoindent Sub-Menu

None

No indentation occurs. The next line begins at column 1.

Language Scope

Language-specific scoping is used to determine the correct indentation level for the next line. This setting causes the editor to parse the buffer contents, looking backward for scope keywords until the start of the current scope is encountered. Once found, the indentation is copied to the next line. If no language is set, the editor acts as if 'Copy From Previous Line' was chosen.

Copy From Previous Line

Indentation is copied from the previous line.

Bookmarks

Bookmarks provide a means to quickly get to a previously-marked position in a file. Any bookmarks you define are lost when POVWIN exits.

WinImgSubMenusBookmarks.gif

The Bookmarks Sub-Menu

Clear All

Delete all bookmarks.

First

Jump to the first bookmark.

Last

Jump to the last bookmark.

Next

Jump to the next bookmark.

Previous

Jump to the previous bookmark.

Toggle

Toggle a bookmark on or off at the current line.

Editor Menu

The Editor Menu contains commands that relate to the configuration and use of the editor. It is only displayed when an editor pane is selected.

WinImgMenusEditor.gif

The Editor Menu

Auto-Load Error File

If this option is checked, POVWIN will automatically load a file, in which a parse error has occurred, into the editor (or select it if it's already loaded), then place the cursor on the line and column of the offending code.

Note that if this option is on, and the message window was displayed automatically (see 'Auto-Show Parse Messages' below), it will be closed automatically rather than being left open. The text describing the error will be displayed in the status bar at the bottom of the window. Note that, occasionally, if the error occurs inside a macro, the displayed line/column for the error will be wrong.

Auto-Show Parse Messages

If this option is selected, when you start a render, a small version of the message window will be opened at the bottom of the edit window. You can resize this window vertically using the mouse. To close it, just hit ESCAPE.

Note that unless you have 'Auto-Load Error File' selected, the message window will remain visible upon a parse error (so that you can see it without switching windows). If the render completes successfully, the message window will close.

Auto-Save Delay

The delay, in minutes, between automatic saves of your work. If you set this to 0, no automatic saves will be made.

Be Aware: If Auto-Reload is set to either 'Ask' or 'Always', switching focus to another application will cause all of your files to be automatically saved.

Create Backups

If this option is checked, the editor will create a backup file named the same as the original but with '.bak' appended to it the first time the file is saved in each edit session. Note that it is not created with each save, but only the first!

Also note that appending the '.bak' extension is meant literally - unlike editors that hail from the old 8.3 filename era, which would remove the old extension and replace it with .bak (e.g. 'foo.pov' would become 'foo.bak'), we literally append '.bak', such that 'foo.pov' becomes 'foo.pov.bak', thus avoiding the problem that having two files named 'foo.pov' and 'foo.inc' in the same directory would have caused.

Allow Undo After Manual Save

Unless this option is checked, manually saving a file clears the undo buffer. In this case, you will not be able to undo changes made before you saved a file.

Click Beyond EOL

This option, which is on by default, allows the editor caret to be positioned beyond the end of the line if you choose to left-click there with the mouse. This is the behavior that most users seem to want. However, a number of users have requested that the 'old' behavior (from the previous POVWIN editor, which did not allow the caret beyond the end of a line) be preserved. Note that this option is only available if 'Constrain Caret to Text' (see below) is not checked.

Constrain Caret To Text

This option forces the edit caret to always remain within existing text (except when extending the end of the file). As with the 'Click Beyond EOL' option above, this is the behaviour that some users prefer and was the default in the POVWIN 3.0 editor. Note that selecting this option causes the 'Click Beyond EOL' menu entry to be disabled.

If 'Click Beyond EOL' is turned off, and you left-click beyond the end of a line, the editor caret will snap to the location after the last character on the line. You can still manually (using the cursor keys) move the caret right past the end of the line, or down onto a new line (and thus be past the end of that line, if it were shorter).

If 'Constrain Caret to Text' is turned on, it has the same effect as turning 'Click Beyond EOL' on, with the additional restriction that using the cursor keys will not move the caret into virtual space. For example, moving the caret right at the end of a line will cause it to wrap to the start of the next line instead of moving right into virtual space.

Overlay Keyword Expansion On Tab Key

See the Keyword Expansion section.

Show Message Window

Manually cause the small message window to be displayed (or hidden if it is showing, in which case this menu entry will read 'Hide Message Window' instead of 'Show Message Window'). Note that you can also use the Escape key to hide the message window.

See Auto-Show Parse Messages for more information.

Editor Preferences Dialog

See the Editor Preferences sub-section.

Record Macro/Play Macro

A keystroke macro (not to be confused with POV-Ray scene file macros) is a collection of editing actions (which may include cursor movement, text editing, search, replace, and so forth) which may be assigned to a shortcut key and stored for re-use. POV-Ray for Windows stores macros in the registry, so they will still be available next time you run the program. You can have up to ten keystroke macros recorded at any one time.

Once you activate the 'Record Macro' command, a small dialog box will appear that allows you to stop the recording, and then assign a key to the macro before it is saved. If you do not assign a key, the macro will still be playable via the 'Play Macro' menu.

Auto-Reload

WinImgSubMenusAutoreload.gif

The Auto-Reload Sub-Menu

The Auto-Reload facility (which by default is set to 'Ask') causes the editor to check the time and date of all files that are currently open when it receives focus from another application. For example, suppose you were using a program that automatically generates POV scene files (these are quite common) and had the output file open in POVWIN. If you switched to that application, told it to regenerate the output file, then switched back to POVWIN, the editor would detect that the file had been changed (assuming Auto-Reload is enabled).

The three settings available for Auto-Reload are 'Never', 'Ask', and 'Always'.

  • 'Never' means never check - changes to a file made externally to POVWIN will not be detected and you risk overwriting the changes if you save the copy open in the editor.
  • 'Ask' means that, if changes to a file are detected, POVWIN will ask you if you want it reloaded. If you reply 'Yes' and you have unsaved changes, they will be lost. Your undo buffer will also be cleared.
  • 'Always' means that, if POVWIN detects that a file has changed, it will always reload it without asking you! If you have unsaved changes, they will be automatically discarded. Your undo buffer is also cleared.

Be Aware: If Auto-Reload is set to either 'Ask' or 'Always', switching focus to another application will cause all of your files to be automatically saved.

Warning: The auto-reload feature is not intended as a substitute for common sense. We do not guarantee that it will work. It is not always possible to determine if a file has changed (for example, the time stamp may not be updated by the other application) and apart from that, it takes time to save a file. If the other application is still in the process of saving the file when you switch back to POVWIN, it's possible that the change won't be picked up. Likewise if POVWIN is still saving the file when the other application is selected; for example, if it is an editor with a similar feature, it may not pick up the change.

Nevertheless, Auto-Reload is a useful feature under most circumstances.

Scroll Bars

WinImgSubMenusScrollbars.gif

The Scrollbar Menu

Select whether the edit window has horizontal scrollbars, vertical scrollbars, or both.

Note that if you turn off a scrollbar, you lose the ability to split the window in that direction (since the window splitter for each direction is on the scrollbar).

Color Scheme

WinImgSubMenusColorscheme.gif

The Color Scheme Menu

The colors used by POVWIN's editor are able to be customized by you on a case-by-case basis. However, for convenience, there are two built-in color schemes accessible from the Editor menu. These are 'Black on White' (the default) and 'White on Black'.

Black on White is the traditional Windows style of presentation, with black text being drawn on a white background.

White on Black is the other way around - a black background with white text. Many users who became accustomed to using text editors under DOS will be comfortable with this.

Note that choosing one of these options will overwrite any changes you had made to your color scheme ! Once you have chosen a new scheme, you may customize it from that point (or simply choose 'Custom' to be taken to the Color/Font dialog).

Editor Preferences

The following sections cover the available Editor Preferences.

Color/Font

This property page allows setting of various editor parameters relating to the color of the syntax highlighting, page background, and font. Changes made on this page affect all editor windows immediately and are stored in the registry for recall the next time POVWIN is run.

WinImgDialogsEditprop-colorfont.gif

The Editor Preferences Dialog

Item

This list box allows you to select which item you want to set the color for. An 'item' is any individually-controllable color within the editor. For example, plain text, bookmarks, the left border, comments, and so on are all individually controllable.

See also Color Scheme.

Color

This sets the foreground color of the item selected in the 'Item' listbox.

Background

This sets the background color of the item selected in the 'Item' listbox. If it is set to 'default', then the background color will be the same as the window background.

Font

This allows you to set the font face, size, and style that is used for displaying the text within the editor windows.

Language/Tabs

This property page allows you to manually specify the language that the current file uses. The editor normally will set this for you, but if you are editing a supported language in a file with an unrecognized extension, you may want to manually specify it.

You can also set the auto-indentation style in use and the tab settings.

WinImgDialogsEditprop-language.gif

The Language/Tabs Dialog

Auto Indentation Style

This allows you to select the auto-indentation style for the currently selected file. This style will then become the default for all newly-loaded files, but will not change the auto-indentation style for any already-loaded files. Note that the auto-indentation style selected for a file is saved in the registry, and is retained with the file in the MRU (most-recently-used) file list held in the File Menu.

Tabs

You can select the number of columns tabs expand to here. Additionally, if 'Convert tabs to spaces while typing' is checked, pressing the TAB key will not insert a hard tab but will instead insert the apppropriate number of spaces.

We strongly recommend that you use the 'Convert tabs to spaces while typing' option if you intend to use the tab key in a file that you will distribute to other users. This is because different people have different preferences for tab indentation settings, and if a person receives a file from you with hard tabs embedded in it, and has a different setting for tab expansion, your code may not align properly. This can make it hard to read.

Changing the tab expansion setting affects the current file, and also becomes the default for any newly-loaded files. It does not affect the tab expansion settings for already-loaded files.

Language

You can choose the file language here. This setting controls syntax highlighting and the indentation rules (if you have 'Follow Language Scoping' set for the Auto-indentation style).

The editor supports syntax highlighting for the following file types: POV-Ray, C/C++, Basic, Java, Pascal, SQL, HTML, and XML.

Keyboard

This property page allows you to set the key sequence assigned to all built-in editor commands.

WinImgDialogsEditprop-keyboard.gif

The Keyboard Configuration Dialog

Not all commands are assignable ! In general, only the commands that are directly implemented in the CodeMax editor DLL are able to be set. These commands are ones that relate to operations on individual edit buffers. They do not include such things as file operations (load, save, print, etc). These operations are implemented in the POVWIN editor wrapper code and are not managed or able to be changed by CodeMax. Therefore, it should be clear that you can neither change the key bindings for operations such as file save, nor use the POVWIN- assigned keystroke (e.g. Ctrl-S in the case of save) for any other purpose.

See the Default Key Mappings section for a list of all the default assignments of editor commands to keystrokes. Note that each command may have two different key sequences assigned to it, and that each key sequence may have up to two keystrokes (e.g. the old 'Wordstar'-style commands).

To assign a key to a command, choose the command you want in the listbox on the left, and then click in the box titled 'New Key Assignment' and press the key(s) you want to use, then press 'Assign' to set it.

Hint: It's very easy to just press 'OK' after typing in a new key assignment, without pressing 'Assign' first! If you do this, the new keystroke will not be assigned.

Misc

With the exception of 'Line Numbers', all the options on this property page affect all editors. All take effect immediately.

WinImgDialogsEditprop-misc.gif

The Miscellaneous Settings Dialog

Smooth Scrolling

If checked, scrolling of the editor window will be 'smooth' rather than jerky. Some people prefer this, though it is slower than the traditional scrolling.

Show Left Margin

If checked, the left margin will be visible. The left margin is a useful area that can contain things such as line numbers and bookmark markers. It can also be colored differently from the main text. You can highlight an entire line by clicking in the left margin next to it, and highlight a range of lines by clicking and dragging in the margin.

See The Editor Window for an example of the appearance of the left margin.

Line Tooltips on Scroll

If checked, and you scroll the edit window by dragging the scroll-bar thumb, a line tooltip will show the approximate line number you have scrolled to.

Allow Drag and Drop

If checked, OLE drag and drop text editing is enabled. This allows you to highlight blocks of text and drag them to another position within the editor window, or even to another editor program that supports the same feature (e.g. the standard Windows 'wordpad' editor, Microsoft Word, and many others). Of course, you can also drag text from those applications and drop it into the editor window.

Mouse ActionResult
L-Button down over selection, and dragMoves text
Ctrl + L-Button down over selection, and dragCopies text
Allow Column Selection

If checked, columns of text can be selected with the mouse and then manipulated. Empty columns (columns with a width of zero characters) can be selected, causing subsequent typing and deletion to occur over multiple lines at the same time.

See Using the Mouse for a description of how to select columnar blocks.

Confine Caret to Text

This is the same as the Constrain Caret To Text option in the Editor Menu. Please refer to that documentation.

Color Syntax Highlighting

If checked, color syntax highlighting will be used according to the Language setting. You can control the colors used from the Color/Font.

See The Editor Window for an example of the appearance of syntax highlighting.

Show Horizontal/Vertical Scrollbar

These two options select whether the edit window has horizontal scrollbars, vertical scrollbars, or both.

Note that if you turn off a scrollbar, you lose the ability to split the window in that direction (since the window splitter for each direction is on the scrollbar). In this case, the appropriate 'Allow Splitting' option (see below) will be dimmed and unavailable.

Allow Horizontal/Vertical Splitting

These two options select whether or not you can split a window by dragging on the horizontal or vertical splitters (see The Editor Window for an example of what the splitters look like).

Using this method you can split the window into up to four different sections. Each section will still show the same file, but the sections can show different parts of the file. Editing in one section causes the changes to be immediately visible in any other sections that are showing the same part of the file.

Line Numbering

This allows you to turn on line numbering, which may be in decimal, hex, octal or binary (!). Note that this setting does not influence whether or not line numbers are included in printouts you make of the file; if you want printed line numbers, you can select that option in the print dialog.

Note that, unlike the other settings on this property page, the Line Numbers setting only applies to the current editor file. Additionally, it is not preserved across invocations of the editor; once you exit, the setting is forgotten.

Max Undoable Actions

Allows you to set a limit on the number of edit actions that will be stored in the 'undo' buffer. Actions older than this limit will be discarded. Unless you are critically low on memory (or don't like having hundreds of undo's available), we recommend that you leave this on the default setting of 'infinite'.


Match Brace Insert Menu


This document is protected, so submissions, corrections and discussions should be held on this documents talk page.