xref: /inferno-os/man/9/panel (revision 46439007cf417cbd9ac8049bb4122c890097a0fa)
PANEL 9
NAME
panel - embedded graphics
SYNOPSIS
\f5panel pathName ?options?
STANDARD OPTIONS
.EX -anchor -borderwidth -background -relief
"WIDGET-SPECIFIC OPTIONS"

-height dist Specifies a desired height for the panel. If this option isn't specified, the panel's desired height is computed from the image and mask images. If these are replicated, the default is zero.

-width dist Specifies a desired width for the panel. If this option isn't specified, the panel's desired height is computed from the image and mask images. If these are replicated, the default is zero.

DESCRIPTION
The \f5panel command creates a new window (given by the pathName argument) and makes it into a panel widget. Additional options, described above, may be specified on the command line to configure aspects of the panel such as its background colour and 3-D relief. The \f5panel command returns its pathName argument. At the time this command is invoked, there must not exist a window named pathName.

A panel is a widget that displays arbitrary graphics drawn outside of Tk. An application is free to use any image or mask that it chooses to create; the panel will display the contents of the image through the mask (see draw (2)).

A panel widget will not display anything until its image has been set using putimage (see tk (2)).

"WIDGET COMMAND"
The \f5panel command creates a new Tk command whose name is pathName. This command may be used to invoke various operations on the widget: It has the following general form:

.EX pathName option ?arg arg ...?

Option and the args determine the exact behaviour of the command. The following commands are possible for panel widgets:

pathName \f5cget option Returns the current value of the configuration option given by option. Option may have any of the values accepted by the \f5panel function.

pathName \f5configure ?option? ?value option value ...? Query or modify the configuration options of the widget. If no option is specified, returns a list of all of the available options for pathName. If one or more option-value pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. Option may have any of the values accepted by the \f5panel function

pathName \f5dirty ?minx miny maxx maxy? Mark the area inside the given rectangle ((minx, miny), (maxx, maxy)) to be flushed to the screen. If the rectangle is not given, the whole area will be marked. The coordinates are relative to the image's origin.

pathName \f5origin ?x y? Set the point within the image that will be displayed at the top left of the panel's rectangle. If the area allocated to the panel is more than the area drawn by the image, the ``top left'' will positioned with respect to the value of the -anchor option. If the point is not given, the current origin is returned.

pathName \f5panelx ?screenx? Given a screen x-coordinate, screenx , this command returns the image x-coordinate displayed at that location.

pathName \f5panely ?screeny? Given a screen y-coordinate, screeny , this command returns the image y-coordinate displayed at that location.

pathName \f5screenx ?panelx? Given an image x-coordinate, panelx , this command returns the equivalent screen x-coordinate.

pathName \f5screeny ?panely? Given an image y-coordinate, panely , this command returns the equivalent screen y-coordinate.

BINDINGS
When a new panel is created, it has no default event bindings.
SEE ALSO
draw (2), tk (2), options (9), types (9)