Recent Changes - Search:

WikiDoc

Categories

WindowAttributes

Interface.WindowAttributes History

Hide minor edits - Show changes to markup

February 05, 2009, at 01:26 PM by bd - New 'No Toolbar Button' attribute
Added line 1:
Changed lines 40-41 from:
to:
No Toolbar Button(1 << 13)8192
Changed lines 45-47 from:

Examples

to:

Examples

Important Temporary Note

The examples below apply to the [new] and [openFile] core commands. Some modifications will be necessary in the AlphaTcl library to make them available with the redefined [new] command and with the [edit] command which is built on top of the [openFile] command. Since AlphaTcl renames the core [new] command as [__new] (with two underscores), you can try the examples directly with [__new].
Changed lines 59-62 from:

The value 28 is the sum of 16 (noMarksPopup), 8 (noParsePopup) and 4 (noVcsPopup). The vertical scrollbar's top is moved up accordingly.

Add 2 to the previous example and there will be no Dirty State button either:

to:

The value 28 is the sum of 16 (noMarksPopup), 8 (noParsePopup) and 4 (noVcsPopup). The vertical scrollbar's top is moved up accordingly.

Add 2 to the previous example and there will be no Dirty State button either:

Changed line 65 from:
     new -n FooWin -attr 30
to:
 	new -n FooWin -attr 30
January 19, 2007, at 07:44 AM by bd - Removed temporary warning
Changed lines 45-47 from:

Important Temporary Note

The examples below apply to the [new] and [openFile] core commands. Some modifications will be necessary in the AlphaTcl library to make them available with the redefined [new] command and with the [edit] command which is built on top of the [openFile] command. Since AlphaTcl renames the core [new] command as [__new] (with two underscores), you can try the examples directly with [__new].
to:
December 15, 2006, at 08:46 AM by bd - One more example
Changed lines 71-72 from:

The same -attr option is also supported by the [openFile] command. For instance:

to:

The sum of all the attributes is 8191 (since 1+2^1+...+2^12 = 2^13 - 1 = 8191). This creates a completely bare window:

Changed line 74 from:
     openFile -attr 6144 /Applications/AlphaX/Help/Readme
to:
 	new -n FooWin -attr 8191
Added lines 76-81:

The same -attr option is also supported by the [openFile] command. For instance:

 
     openFile -attr 6144 /Applications/AlphaX/Help/Readme

December 15, 2006, at 08:36 AM by bd - New example
Changed line 62 from:
	new -n FooWin -attr 30
to:
     new -n FooWin -attr 30
December 15, 2006, at 08:35 AM by bd - New example
Changed lines 58-59 from:

Create a non resizable window:

to:

The vertical scrollbar's top is moved up accordingly.

Add 2 to the previous example and there will be no Dirty State button either:

Changed line 62 from:
     new -n FooWin -attr 6144
to:
	new -n FooWin -attr 30
Added lines 64-68:

Create a non resizable window:

 
     new -n FooWin -attr 6144

December 15, 2006, at 08:29 AM by bd - __new has two underscores
Deleted line 0:
Changed lines 46-47 from:
The examples below apply to the [new] and [openFile] core commands. Some modifications will be necessary in the AlphaTcl library to make them available with the redefined [new] command and with the [edit] command which is built on top of the [openFile] command. Since AlphaTcl renames the [new] command as [_new], you can try the examples directly with [_new].
to:
The examples below apply to the [new] and [openFile] core commands. Some modifications will be necessary in the AlphaTcl library to make them available with the redefined [new] command and with the [edit] command which is built on top of the [openFile] command. Since AlphaTcl renames the core [new] command as [__new] (with two underscores), you can try the examples directly with [__new].
May 11, 2006, at 12:48 PM by bd - New window attributes description
Added lines 1-70:

This page documents the new window attributes introduced in version 8.1a4 of AlphaX. These attributes let you select which controls should be drawn when creating a new window with the [new] or the [openFile] commands. By passing appropriate values via the -attr option in these commands, one can now specify that a particular control be absent from the window.

Traditionally, document windows in AlphaX come equipped with a certain number of controls. In the top right corner of the contents area, one can find :

  • a small square known as the Dirty State Button which displays a red floppy disk icon when the document is unsaved
  • three popup menus known respectively as the VCS Popup, the Parse Popup and the Marks Popup
  • a small rectangle known as the Split Handle which allows to split the window into two panes

Other elements are also considered as window controls:

  • the vertical and horizontal scrollbars
  • the toolbar at the top of the window (introduced in AlphaX 8.1a4)
  • the message bar at the bottom of the window (introduced in AlphaX 8.1a4)
  • the resize handle (small square in the bottom right corner of the window)
  • the three buttons in the left part of the title bar, known respectively as the close button, the collapse button and the zoom button

For each of these controls, there is a flag stating that this control should not be drawn. These flags are additive so that the new -attr option's value is the sum of all the flags corresponding to the elements you want to remove. A value of 0 corresponds to the traditional window layout. The flag values are shown in the table below:

No Toolbar(1 << 0)1
No Dirty State(1 << 1)2
No Vcs Popup(1 << 2)4
No Parse Popup(1 << 3)8
No Marks Popup(1 << 4)16
No Split Handle(1 << 5)32
No Message Bar(1 << 6)64
No Vertical Scrollbar(1 << 7)128
No Horizontal Scrollbar(1 << 8)256
No Close Button(1 << 9)512
No Collapse Button(1 << 10)1024
No Zoom Button(1 << 11)2048
No Resize Handle(1 << 12)4096

Note that in the case of the close button, the collapse button and the zoom button, specifying the corresponding flag means in fact that they will be drawn in disabled state.

Examples

Important Temporary Note

The examples below apply to the [new] and [openFile] core commands. Some modifications will be necessary in the AlphaTcl library to make them available with the redefined [new] command and with the [edit] command which is built on top of the [openFile] command. Since AlphaTcl renames the [new] command as [_new], you can try the examples directly with [_new].

Create a window without a toolbar

 
     new -n FooWin -attr 1

Create a window without the VCS, Parse and Marks popup controls

 
     new -n FooWin -attr 28

The value 28 is the sum of 16 (noMarksPopup), 8 (noParsePopup) and 4 (noVcsPopup).

Create a non resizable window:

 
     new -n FooWin -attr 6144

because 6144 = 2048 + 4096 = noZoom + noResize

The same -attr option is also supported by the [openFile] command. For instance:

 
     openFile -attr 6144 /Applications/AlphaX/Help/Readme

Page last modified on February 05, 2009, at 01:26 PM
Hosted on SourceForge.net Logo