Recent Changes - Search:

WikiDoc

Categories

The [winPane] command

Commands.WinPaneCommand History

Hide minor edits - Show changes to markup

October 02, 2008, at 01:59 PM by bd - testing after SF migration
Deleted line 0:
Added line 139:

bd test

August 11, 2008, at 09:21 AM by bd - Modified syntax
Changed lines 7-9 from:
to:
Changed lines 13-16 from:
to:
Changed line 28 from:
  • programmatically, there is a new command called [winPane] which lets you create, select or delete subpanes.
to:
  • programmatically, there is a new command called [winPane] which lets you create, select or close subpanes.
Changed lines 32-34 from:

In order to make the graphical interface less cumbersome, there is not a pair of scrollbars for each pane: when a window is split, the scrollbars of the document window act on the currently selected pane.

to:

In order to make the graphical interface less cumbersome, there is not a pair of scrollbars for each pane: when a window is split, the scrollbars of the document window act on the currently selected pane. If the specified index is out of range, the command does nothing.

Changed lines 45-48 from:

The [count] subcommand

This command returns the number of subpanes of a document window. This provides a way of testing if a window is split: if it is not, the count is equal to 1. The syntax is:

to:

Each window maintains a list of its panes in creation order: each time a subpane is added by subdivision of the current pane, it is appended to the list. Some commands accept an index argument which is the index of the pane in the list. This index is 0-based. The original pane is always at index 0.

The [close] subcommand

This command lets you close the pane corresponding to the specified index. The syntax is:

Changed line 53 from:
     winPane ?-w win? count
to:
     winPane ?-w win? close ?index?
Added lines 55-64:

If no index is specified, the command applies to the currently selected pane. if the pane which is closed was the current one, then the first pane (at index 0) becomes current.

The [count] subcommand

This command returns the number of subpanes of a document window. This provides a way of testing if a window is split: if it is not, the count is equal to 1. The syntax is:

 
     winPane ?-w win? count

Changed lines 69-70 from:

The [delete] subcommand

This command lets you delete the currently selected pane. The syntax is:

to:

The [current] subcommand

This command can take two forms:

Changed lines 72-73 from:
     winPane ?-w win? delete
to:
     winPane ?-w win? current
     winPane ?-w win? current index
Changed lines 75-84 from:

After a pane has been deleted, the first pane (at index 0) becomes current.

The [index] subcommand

This command returns the index of the currently selected pane. Each window maintains a list of its panes in creation order: each time a subpane is added by subdivision of the current pane, it is appended to the list. The syntax is:

 
     winPane ?-w win? index

This index is 0-based. The original pane is always at index 0.

to:

In the first case, it returns the index of the currently selected pane. In the second case, the pane at the specified index becomes current.

Changed line 99 from:
     winPane ?-w win? refresh index
to:
     winPane ?-w win? refresh ?index?
Changed lines 103-106 from:

range, the command does nothing.

The [select] subcommand

This command lets select the pane corresponding to the specified index. As explained above, panes are kept in a list in creation order. The syntax is:

to:

range, the command does nothing. If no index is specified, the command applies to the currently selected pane.

The [split] subcommand

This command lets you split the currently selected pane into two subpanes. Subdivision can be performed horizontally (subpanes side-by-side) or vertically (subpanes stacked). The syntax is:

Changed line 110 from:
     winPane ?-w win? select index
to:
     winPane ?-w win? split ?(horizontally|vertically)?
Deleted lines 111-120:

where index designates the index of the pane you want to make current. The first pane is at index 0. If the specified index is out of range, the command does nothing.

The [split] subcommand

This command lets you split the currently selected pane into two subpanes. Subdivision can be performed horizontally (subpanes side-by-side) or vertically (subpanes stacked). The syntax is:

 
     winPane ?-w win? split ?(horizontally|vertically)?

Changed line 114 from:

Hook

to:

Hook

Changed line 118 from:

Examples

to:

Examples

Changed line 126 from:
      winPane -w $win select 1
to:
      winPane -w $win current 1
Changed line 134 from:
      winPane -w $win delete
to:
      winPane -w $win close
August 11, 2008, at 09:12 AM by bd - Modified syntax
Added line 1:
Deleted line 2:
Changed lines 27-28 from:
  • in the graphical interface, there is a new Splitting popup menu located under the Marks popup menu and above the vertical scrollbar. It replaces the splitting bar found there in older versions of Alpha.
to:
  • in the graphical interface, there is a new Splitting popup menu located under the Marks popup menu and above the vertical scrollbar. It

replaces the splitting bar found there in older versions of Alpha.

Deleted line 29:
August 08, 2008, at 08:28 AM by bd - Doc for new winPane command
Added lines 1-141:

(:title The [winPane] command:)

This file documents the [winPane] command introduced in version 8.2a3d5 of AlphaX.


Introduction

The [winPane] command lets you create and manipulate subpanes in AlphaX's document windows. Since version 8.2a3d5 of AlphaX, the possibility of splitting a document window has been reimplemented and enhanced. Older versions only allowed to split a window into two subpanes stacked vertically. It is now possible to split a window vertically or horizontally in as many subpanes as desired. The process of splitting is controlled at two levels:

  • in the graphical interface, there is a new Splitting popup menu located under the Marks popup menu and above the vertical scrollbar. It replaces the splitting bar found there in older versions of Alpha.
  • programmatically, there is a new command called [winPane] which lets you create, select or delete subpanes.

There is always only one currently active pane. Clicking on any pane makes it current: this pane is designated by a blue focus bounding box. This focus rectangle is drawn only if the window is split. In order to make the graphical interface less cumbersome, there is not a pair of scrollbars for each pane: when a window is split, the scrollbars of the document window act on the currently selected pane.

Synopsis

The formal syntax of the [winPane] command is:

winPane ?-w win? subcommand ?options?

The possible subcommands are described below. Depending on the subcommand, some options can be additionnally specified. The -w option is used to specify the window the command applies to: by default, this is the topmost document window.

The [count] subcommand

This command returns the number of subpanes of a document window. This provides a way of testing if a window is split: if it is not, the count is equal to 1. The syntax is:

 
     winPane ?-w win? count

Note: testing if a window is split can still be done as in the older versions of Alpha using the command [getWinInfo]. The split key of the returned array is equal to 1 if the window is split, 0 otherwise.

The [delete] subcommand

This command lets you delete the currently selected pane. The syntax is:

 
     winPane ?-w win? delete

After a pane has been deleted, the first pane (at index 0) becomes current.

The [index] subcommand

This command returns the index of the currently selected pane. Each window maintains a list of its panes in creation order: each time a subpane is added by subdivision of the current pane, it is appended to the list. The syntax is:

 
     winPane ?-w win? index

This index is 0-based. The original pane is always at index 0. Note: this is the same value returned by the [getWinInfo] command in the paneNum key.

The [next] subcommand

This command lets you select the next pane. This is circular: if the current pane is the last one then the command selects the first one in the list. The syntax is:

 
     winPane ?-w win? next

This command returns the index of the newly selected pane.

The [previous] subcommand

This command lets you select the previous pane. This is circular: if the current pane is the first one then the command selects the last one. The syntax is:

 
     winPane ?-w win? previous

This command returns the index of the newly selected pane.

The [refresh] subcommand

This command performs an immediate redraw of the pane corresponding to the specified index. The syntax is:

 
     winPane ?-w win? refresh index

where index designates the index of the pane you want to be redrawn. The first pane is at index 0. If the specified index is out of range, the command does nothing.

The [select] subcommand

This command lets select the pane corresponding to the specified index. As explained above, panes are kept in a list in creation order. The syntax is:

 
     winPane ?-w win? select index

where index designates the index of the pane you want to make current. The first pane is at index 0. If the specified index is out of range, the command does nothing.

The [split] subcommand

This command lets you split the currently selected pane into two subpanes. Subdivision can be performed horizontally (subpanes side-by-side) or vertically (subpanes stacked). The syntax is:

 
     winPane ?-w win? split ?(horizontally|vertically)?

If the last argument is not specified, the pane is split vertically by default.

Hook

The menu displayed when the user clicks on the Splitting popup is built via the splitMenuHook hook. The [splitMenuHook] proc is defined in AlphaTcl and returns the token associated with this menu.

Examples

Here are a few basic examples which can be executed from the Tcl shell in AlphaX:

 
     Welcome to AlphaX's AlphaTcl shell.
      set win $PREFS/prefs.tcl
      edit $win
      winPane -w $win split
      winPane -w $win select 1
      winPane -w $win split horizontally
      winPane -w $win count
     3
      winPane -w $win next
     2
      winPane -w $win next
     0
      winPane -w $win delete
      winPane -w $win count
     2


(add your comments here...)

Page last modified on October 02, 2008, at 01:59 PM
Hosted on SourceForge.net Logo