Home

News

International

Screen Shots

Documentation

Download

Build

License

Credits

Contact

SourceForge Project

Tintware Documentation : Idget Library : Panels : panel.dialog and panel.window

Syntax

#(%panel.dialog,%layout)
#(%panel.dialog,%layout,%window)
#(%panel.window,%layout)
#(%panel.window,%layout,%window)

%panel specifies a panel. %layout specifies the layout of controls for the panel. %window optionally specifies a window which is the parent for the panel.

%panel.dialog makes a panel be modal, which means that the parent is inactive until the panel is hidden. %panel.window makes a panel be just another window, so both the panel and the parent can be active at the same time.

The layout is specified as an item which is the name of a control (relative to the panel), a box, or a border. Each control can be specified in a layout only once. Not all declared controls have to be specified.

A box can be an hbox (items are layed out horizontally from the left), vbox (items are layed out vertically the top), rhbox (items are layed out horizontally from the right), or bvbox (items are layed out vertically from the bottom). A box contains one or more items and is specified as (hbox,%item,...).

A border specifies a width and a height (in one fifth of the current font size units) and an item: (border,2,3,%item).

Example

Here is the code for laying out the buffer properties dialog in Tint Emacs.

#(emacs.dialog.properties.dialog,
	(vbox,(hbox,(vbox
			(border,2,1,major-title),
			(border,2,1,major-description),
			(border,2,1,major),
			(border,2,1,
				(vbox,minor-title,indent,fill,overwrite))),
		(vbox,
			(border,2,1,buffername-prefix),
			(border,2,1,buffername),
			(border,2,1,filename-title),
			(border,2,1,filename),
			(border,2,1,eol),
			(border,2,1,
				(vbox,modified,read-only)))),
		(border,2,1,(rhbox,ok,cancel))),
	emacs.display.frame)