Overview of Item Types

Portal Items

Portals are a special type of item in Pad++ that sit on the Pad++ surface with a view onto a different location. Because each portal has its own view, a surface might be visible at several locations, each at a different magnification, through various portals. In addition, portals can look onto surfaces of other Pad++ widgets. The surface that the portal is looking onto is called that portal's lookon. Portal items are created with widget commands of the following form:

pathName create portal x1 y1 x2 y2 ... [option value option value ...]

If two points are specified, then the portal will be rectangular where those two points specify the lower left and upper right coordinates of the portal. If more than two points are specified, then the portal will be polygonal shaped by those points. There may be any number of option-value pairs, each of which sets one of the configuration options for the item. These same option-value pairs may be used in itemconfigure widget commands to change the item's configuration. The following options are supported for text items:

[63] -border color

(available only for HTML and portal item types)
Color specifies a color to use for drawing the border of the portal; it may have any of the forms accepted by Tk_GetColor. If color is "none", the outline will not be drawn. This option defaults to the fill color.

[64] -borderwidth width

(available only for HTML and portal item types)

Width specifies the width of the border in current units to be drawn around the item. Wide borders will be drawn completely inside the path specified by the points of this object. Note that this is different than pens. If width is 0, then the border will always be drawn one pixel wide, independent of the zoom. Width defaults to 1 pixel.

[65] -fill color

(available only for handle, HTML, polygon, portal and rectangle item types)

Fill the background of the portal with color, which may be specified in any of the forms accepted by Tk_GetColor. If color is "none", the background will not be drawn. It defaults to the background of the Pad++ widget it is created on.

[66] -font fontname

(available only for HTML, portal, text and textfile item types)

Specifies the font to be used for rendering text for this item. fontname must specify a filename which contains an Adobe Type 1 font, or the string "System" which causes the Pad++ line-font to be used. Defaults to "System".


[67] -lookon surface

(available only for portal item types)

Specifies which Pad++ surface this portals looks onto. surface should be the complete pathName of a Pad++ widget. Defaults to the surface the portal was created on.

[68] -pen color

(available only for handle, line, polygon, portal, rectangle, spline, text and textfile image types)

color specifies the text color of the title. If color is "none", then no outline will be drawn for the rectangle. This option defaults to either black or white - whichever contrasts the most with the fill color.

[69] -relief relief

(available only for portal item types)


Specifies the relief to be used by the border of this item. relief may be any of: raised, sunken, flag, ridge, or groove. Defaults to "ridge"


[70] -title title

(available only for portal item types)


If title is specified, then the portal will be rendered with a titlebar consisting of title. Otherwise, no title bar is drawn. Defaults to the empty string.


[71] -view place

(available only for portal item types)


Specifies the (x, y, zoom) location this portal looks onto. Like a Pad++ widget, place specifies the point rendered at the center of the portal and the magnification. Defaults to directly under the location the portal was created at.

[72] -visiblelayers layers

(available only for pad and portal item types)


Specifies what layers are visible within this portal. layers can be either a list of layers which will specify which items will be displayed within this portal, or take the special form of "all -layer1 -layer2 -layer3 ..." in which case all layers except the ones specified will be displayed. Defaults to "all". (See the -layer itemconfigure option that all items have.)


July 9, 1996 - 9 JUL 1996

Generated with Harlequin WebMaker

Web Accessibility