The NeXtMidas panel is a Java AWT (Abstract Windowing Toolkit) panel that serves as a container to attach other NeXtMidas graphic primitives.
Graphical user interfaces, or GUIs (pronounced gooies), contain menus
and prompts in addition to graphical objects. An excellent way to get
acquainted with a NeXtMidas GUI is to use one. To start a NeXtMidas GUI demo,
type DEMO at the NeXtMidas prompt.
The following subsections provide an overview of the NeXtMidas panel:
A PANEL primitive is executed in the piped section of a macro like
other commands, or automatically with the PIPE ON command.
The command:
pipe/panel onis the same as:
pipe on
panel/msgid=main/setup
A PANEL primitive is a raw window with an interactive panelizer
holding multiple panes. Each pane is given an entry in the registry for other
primitives to draw into. By default, the registry entry for the table of
window panes is REG.WIN. When graphical primitives start up, they
look in REG.WIN for their ID, and draw there if they find it.
A graphical primitive with a /WIN= switch attempts to attach
to the named object. A graphical primitive without a
/WIN= switch looks in the REG.WIN table for an
entry matching its /ID= value. If not found, it creates its
own window frame.
In macro mode, the config file name is generated by replacing the extension
on the macro file with .mmp (Midas Macro Panel). If
/SETUP=XYZ is specified, the extension becomes
.mmpXYZ, where XYZ is a user designated alternate
setup. The default for /SETUP is "", which creates the
extension .mmp.
A PANEL has 4 fixed-size margins at the top, bottom, left, and
right edges of the window. These regions, when not hidden, have a separator
bar with an arrow to either hide or show the region. Dragging the separator bar
enlarges or shrinks the region.
The regions display text no matter how small the PANEL is sized.
The area inside the margins or
borders are further separated by vertical or horizontal bars with
margins or other bars as endpoints. These bars are created using the
Configure-->Modify menus, and scale to the PANEL's
size. Most data displays are placed in these regions.
To be used by a plotter, a region must have a PANE. Panes are
added to any inner region defined by bars, or to a margin
area for easy collapsing.
The panes in the panel are accessible through the PANES property
table. This example sets the title on a pane named PANE1:
set REG.PANEL.PANES.PANE1.TITLE "My Title String"
Normally, each pane in the panel is named with the ID of the primitive to be
displayed there. This is perfomed by the ATTACH menu item
in the EDITPANE configuration option. All configuration items
are accessed graphically and saved to a setup file for future use. See
the panel's CONFIGURE menu item for more information.
To create the inner region bars and panes, enter the Configure-->Modify mode. When the mouse is over the point of interest, press the middle mouse button (MMB). A Cfg.Add menu appears with the following items:
CANCEL - don't do anything here VLINE - place a vertical bar between closest natural endpoints HLINE - place a horizontal bar between closest natural endpoints VLINEX - place a vertical bar between margins HLINEX - place a horizontal bar between margins PANE - add a pane in this regionTo configure a pane, press the MMB over the pane. Now you can set the title, text, size, and color; or, you can attach a primitive.
In some applications, especially those with channelized data, a variable number of plots with equal size is desired.
If the /GRID={table} switch is present, an NxM grid of
evenly spaced panes is generated regardless of the mmp file
contents. The table entries are:
NX - number of panes in the horizontal direction
NY - number of panes in the vertical direction
PX - optional override of evenly spaced columns
there should be one entry for each column with total = 1.0
ex: PX="(0.30,0.20,0.30,0.20)"
NX2 - optional different number of panes for last row
PX2 - optional override of evenly spaced columns for last row
ID - id + index is the pane id
NAME - name + index is the pane name
TITLE - title + index is the pane title
TS - title size in pixels (=0 to supress)
By default, any control widget created by the GCONTROL intrinsic
in a macro is added to the collapsable control panel in the left margin
of the PANEL. These widgets can be dragged into other margins or on top of other
panes using the appropriate Configure menu options. Widgets
not in the left margin are called by name in the saved .mmp setup file.
Groups are defined by the label widgets that precede them. If new controls
need to be added to previously defined groups, use the
GCONTROL/GRP= switch. Entire groups are rolled up/down or hidden with
mouse clicks on the label or by setting the LABEL's action
from the macro.
Any graphical control added to the panel using the WIDGET
property is contained in a table that is accessed through the
CONTROLS property. So, for a panel registry named
PANEL, the value of a control widget named FREQ
could be set with the following example line:
set REG.PANEL.CONTROLS.FREQ.value 1.33It is a common practice to make a shorter reference to this table for easier coding:
set gc REG.PANEL.CONTROLS ! or use panel/controls=gc res gc.FREQ.value 1.33 res gc.MAINMENU.item 1