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. If a portal is created without any points, it will not be rendered until some points are added with the coords command. 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:

-border [10] Specifies border color of item

-borderwidth [11] Specifies width of border

-fill [23] Specifies fill color of item

-font [24] Specifies font to use for text

-lookon [36] Specifies the pad widget this item sees

-pen [45] Specifies pen color of item

-relief [49] Specifies how border should be rendered (raised, flat, sunken, ridge, groove)

-title [59] Some items only: Title of an item

-view [65] Specifies the view this item sees

-visiblelayers [67] The layers that are visible within this view (just for portals and surface, item #1)

Note that it is impossible to directly change an item's parameters when it is viewed within a portal. That is, you can not have an object that has a -minsize of 20% in the top-level view, but a -minsize of 0% within a portal. One (inelegant) workaround to this is to use an alias. You could fmake an alias of the original object and put it in a different place. Put what ever min/maxsize you want on the alias, and have the portal look onto the alias.


Pad++ Reference Manual - 20 JUN 1997

Copyright Computer Science Department, The University of New Mexico

Web Accessibility