<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.ice-online.com/index.php?action=history&amp;feed=atom&amp;title=GCONTROL</id>
	<title>GCONTROL - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ice-online.com/index.php?action=history&amp;feed=atom&amp;title=GCONTROL"/>
	<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=GCONTROL&amp;action=history"/>
	<updated>2026-04-09T17:26:01Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.ice-online.com/index.php?title=GCONTROL&amp;diff=723&amp;oldid=prev</id>
		<title>ConvertBot: Macro interface for creating control panel entries</title>
		<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=GCONTROL&amp;diff=723&amp;oldid=prev"/>
		<updated>2020-04-27T22:04:37Z</updated>

		<summary type="html">&lt;p&gt;Macro interface for creating control panel entries&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Macro interface for creating control panel entries&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;TYPE&amp;gt;    Widget type: ALERT, BEAN, BUTTON, CALENDAR, CHOICE, DIALOG,&lt;br /&gt;
                       FILE, LABEL, LIST, MENU, PANEL, PIPEMON, PROMPT,&lt;br /&gt;
                       PROGRESS, QUERY, STEXT, TABLE, TEXT, (x)VAL&lt;br /&gt;
          Where (x) can be of type [DFLT] (eg DVAL, FVAL, LVAL, TVAL).&lt;br /&gt;
&amp;lt;NAME&amp;gt;    Control name for messaging/result table access&lt;br /&gt;
&amp;lt;TITLE&amp;gt;   On-screen control label or prompt for all widget types&lt;br /&gt;
&amp;lt;P1&amp;gt;      First &amp;lt;TYPE&amp;gt;-dependent parameter&lt;br /&gt;
&amp;lt;P2&amp;gt;      Second &amp;lt;TYPE&amp;gt;-dependent parameter&lt;br /&gt;
&amp;lt;P3&amp;gt;      Third &amp;lt;TYPE&amp;gt;-dependent parameter&lt;br /&gt;
&amp;lt;P4&amp;gt;      Fourth &amp;lt;TYPE&amp;gt;-dependent parameter&lt;br /&gt;
&amp;lt;P5&amp;gt;      Fifth &amp;lt;TYPE&amp;gt;-dependent parameter&lt;br /&gt;
&lt;br /&gt;
Keyword Only Parameters:&lt;br /&gt;
[TABLE] - Inline Table to set gcontrol options (properties). (Since 2.7.0)&lt;br /&gt;
          E.g. to set the ItemColors MENU and it's ToolTipText:&lt;br /&gt;
          TABLE={ItemColors={PASS=&amp;quot;GREEN&amp;quot;,FAIL=&amp;quot;RED&amp;quot;},ToolTipText=&amp;quot;more info..&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
This intrinsic creates control panel objects and sends them to a PANEL&lt;br /&gt;
primitive for handling.  The default handler is REG.PANEL.  To specify an&lt;br /&gt;
alternate panel, use the /PANEL=xxx switch (without the REG.).  A GCONTROL may&lt;br /&gt;
be created any time after the parent PANEL has been created. If used without a&lt;br /&gt;
parent macro or panel, the gcontrol will run standalone and return its value in&lt;br /&gt;
a result parameter named by &amp;lt;name&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Each control has a common set of parameters and flags, and another set that is&lt;br /&gt;
specific to each widget type.&lt;br /&gt;
&lt;br /&gt;
The common flags for all widgets are:&lt;br /&gt;
 PERMANENT - widget persists no matter what action is taken&lt;br /&gt;
 STICKY    - widget persists until a right click removes it&lt;br /&gt;
 FIXED     - widget is not allowed to be moved by the user&lt;br /&gt;
 NOEDIT    - widget cannot be edited nor any action taken&lt;br /&gt;
 INLINE    - removes borders to allow embedding in another display&lt;br /&gt;
 INBAND    - not implemented&lt;br /&gt;
 NOMSG     - suppress messages to the macro when this widget changes&lt;br /&gt;
 VBOX      - draw box around current value&lt;br /&gt;
 VBOXMO    - draw box around current value on mouse over&lt;br /&gt;
&lt;br /&gt;
Flags can be set using the /FLAGS=NOMSG|STICKY syntax, or by specifying a state&lt;br /&gt;
switch with flag name like /NOMSG or /STICKY.  Note that flags placed  in the&lt;br /&gt;
/FLAGS switch can be abbreviated, where flags as standalone switches must be&lt;br /&gt;
exact matches or its negation, ie (/MSG=N matches the NOMSG flag). Also,&lt;br /&gt;
standalone flag switches must appear on the command line, they do not check the&lt;br /&gt;
global macro switches.&lt;br /&gt;
&lt;br /&gt;
By default a GCONTROL responds only to graphical interaction; however, there&lt;br /&gt;
are three provisions for non-graphical interaction.  First, the value of any&lt;br /&gt;
control can be set behind the scenes by any NeXtMidas object that can call the&lt;br /&gt;
control's setValue() method.  Second, the /MON=resname switch causes the&lt;br /&gt;
control to update its value based on the result named &amp;lt;resname&amp;gt; if the control's&lt;br /&gt;
poll() method is coded.  Third, if the /MSG=no switch is not asserted, all&lt;br /&gt;
controls except LABELs send update messages to the macro's processMessage&lt;br /&gt;
handler.&lt;br /&gt;
&lt;br /&gt;
All GCONTROLS have setValue(), getValue(), and setAction() methods that can be&lt;br /&gt;
called from the macro language.  Setting GC.&amp;lt;NAME&amp;gt;.VALUE simply updates the&lt;br /&gt;
current value and display.  Using GC.&amp;lt;NAME&amp;gt;.ACTION updates the current value and&lt;br /&gt;
sends a message as if graphical action were performed.&lt;br /&gt;
&lt;br /&gt;
Functions are listed below in alphabetical order.&lt;br /&gt;
&lt;br /&gt;
FUNCTIONS:&lt;br /&gt;
  ALERT - Pop up message (nxm.sys.libg.GAlert)&lt;br /&gt;
    GCONTROL ALERT &amp;lt;NAME&amp;gt; &amp;lt;TITLE&amp;gt; &amp;lt;P1=text&amp;gt; &amp;lt;P2=actions[OK]&amp;gt; &amp;lt;P3=default[1]&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  BEAN - Instantiates an external control that exists within a user option tree&lt;br /&gt;
         specified as &amp;lt;P1&amp;gt;. (Since NeXtMidas 2.9.1)&lt;br /&gt;
    GCONTROL BEAN &amp;lt;NAME&amp;gt; &amp;lt;TITLE&amp;gt; &amp;lt;P1=fully qualified class name&amp;gt; &amp;amp;&lt;br /&gt;
                  &amp;lt;TABLE={Property1=Value1,Property2=Value2,..}&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    Example to use Date/Time picker under UCL:&lt;br /&gt;
      TIMEX now myDateTime&lt;br /&gt;
      GCONTROL BEAN uclDatePicker &amp;quot;Date Picker&amp;quot; P1=&amp;quot;nxm.ucl.libg.GDatePicker&amp;quot; &amp;amp;&lt;br /&gt;
        TABLE={StartTime=^myDateTime}&lt;br /&gt;
&lt;br /&gt;
    Example to use GSwingLabel (javax.swing.JLabel) under UCL:&lt;br /&gt;
      SET htmltext &amp;quot;&amp;lt;html&amp;gt;JLabel &amp;lt;i&amp;gt;with&amp;lt;/i&amp;gt; &amp;lt;b&amp;gt;styled&amp;lt;/b&amp;gt; &amp;lt;font color=#ff0000&amp;gt;&amp;amp;&lt;br /&gt;
                    HTML&amp;lt;/font&amp;gt; &amp;lt;font color=#00ff00&amp;gt;tags&amp;lt;/font&amp;gt;.&amp;lt;/html&amp;gt;&amp;quot;&lt;br /&gt;
      GCONTROL BEAN uclJLabel &amp;quot;title&amp;quot; P1=&amp;quot;nxm.ucl.libg.GSwingLabel&amp;quot; &amp;amp;&lt;br /&gt;
        TABLE={LabelText=&amp;quot;^htmltext&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
  BUTTON - Button group (nxm.sys.libg.GMenu)&lt;br /&gt;
    GCONTROL BUTTON &amp;lt;NAME&amp;gt; &amp;lt;TITLE&amp;gt; &amp;lt;P1=names&amp;gt; &amp;lt;P2=default[1]&amp;gt;&lt;br /&gt;
      names   - list of button names (comma-separated) for button group&lt;br /&gt;
      default - default button to select&lt;br /&gt;
&lt;br /&gt;
    Flags: Toggle                         - toggle allows multiple selections&lt;br /&gt;
           ChkBox                         - display buttons with check box&lt;br /&gt;
           TTop,TLeft,TRight,TBottom,TOff - title placement&lt;br /&gt;
           OneRow,ToggleList              - format options&lt;br /&gt;
           NoState                        - selected button not shown as&lt;br /&gt;
                                            depressed&lt;br /&gt;
&lt;br /&gt;
  CALENDAR - Date selector (nxm.sys.libg.GCalendar)&lt;br /&gt;
    GCONTROL CALENDAR &amp;lt;NAME&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    A CALENDAR control defaults to a square of size PANEL_WIDTH x PANEL_WIDTH.&lt;br /&gt;
    The GET command can be used against a CALENDAR control to retrieve the&lt;br /&gt;
    following information:&lt;br /&gt;
&lt;br /&gt;
      DATE    = string in the form: 'Sat Nov 03 08:41:12 EST 2001'&lt;br /&gt;
      MONTH   = index of month:      11&lt;br /&gt;
      YEAR    = numeric of year:     2001&lt;br /&gt;
      DAY     = current day:         3&lt;br /&gt;
&lt;br /&gt;
  CHOICE - Pull down selector (nxm.sys.libg.GMenu)&lt;br /&gt;
    GCONTROL CHOICE &amp;lt;NAME&amp;gt; &amp;lt;TITLE&amp;gt; &amp;lt;P1=choice list&amp;gt; &amp;lt;P2=default[1]&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    Flags: Input        - allows input of a value not in the current list&lt;br /&gt;
           CS           - Return values Case Sensitive (as entered)&lt;br /&gt;
           TTop,TBottom - title placement [DEF=TLeft]&lt;br /&gt;
           TLeft,TRight&lt;br /&gt;
&lt;br /&gt;
  DIALOG - Widget Dialog control object (nxm.sys.libg.GDialog)&lt;br /&gt;
    GCONTROL/handle=&amp;lt;registryName&amp;gt; DIALOG &amp;lt;NAME&amp;gt; &amp;lt;TITLE&amp;gt; &amp;lt;P1=width&amp;gt; &amp;lt;P2=height&amp;gt;&lt;br /&gt;
                                          &amp;lt;P3=buttonList&amp;gt; &amp;lt;P4=noCloseList[null]&amp;gt;&lt;br /&gt;
    NOTE: A CANCEL button in &amp;lt;buttonList&amp;gt; will NOT send a message.&lt;br /&gt;
&lt;br /&gt;
    A DIALOG control must include a /HANDLE=name switch to add it to the&lt;br /&gt;
    registry. The dialog is then populated by instantiating controls with&lt;br /&gt;
    /PANEL=name specifying which dialog to add them to.  When a dialog is&lt;br /&gt;
    processed, the message data is a table of the embedded controls including a&lt;br /&gt;
    menu named DIALOG which contains the state of the action button&lt;br /&gt;
    (i.e. msg.data.dialog.value).&lt;br /&gt;
    Since NeXtMidas 3.0.1, the one-based index of the pressed button is stored&lt;br /&gt;
      in message info (i.e. msg.info)&lt;br /&gt;
&lt;br /&gt;
  FILE - File selector (nxm.sys.libg.GPrompt/nxm.sys.libg.GFiles)&lt;br /&gt;
    GCONTROL FILE &amp;lt;NAME&amp;gt; &amp;lt;TITLE&amp;gt; &amp;lt;P1=seed[&amp;quot;&amp;quot;]&amp;gt; &amp;lt;P2=filter[*.tmp|prm]&amp;gt;&lt;br /&gt;
                         &amp;lt;P3=auxlist[AUX.WRITE]&amp;gt; &amp;lt;P4=cols[50]&amp;gt; &amp;lt;P5=rows[15]&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    The &amp;lt;seed&amp;gt; is the current selected file. The &amp;lt;filter&amp;gt; is a single filter&lt;br /&gt;
    (like *.tmp) with additional extensions separated by a |.&lt;br /&gt;
&lt;br /&gt;
    Flags:&lt;br /&gt;
      Path      - Include path in displayed filename&lt;br /&gt;
      AuxID     - Include AUX ID in displayed filename&lt;br /&gt;
      Qual      - Include QUAL data ({AUX=&amp;quot;+aux+&amp;quot;}) in displayed filename&lt;br /&gt;
      Ext       - Selection data includes extension&lt;br /&gt;
      SingleAux - Only allow a single AUX to be selected from the AUX list&lt;br /&gt;
      HideOpts  - Hide the list of options&lt;br /&gt;
&lt;br /&gt;
    The standard FILE popup (such as PLOT popup for adding new files to the&lt;br /&gt;
        displayed PLOT), contains lines for the following:&lt;br /&gt;
      File    - The selected filename&lt;br /&gt;
      Filter  - Filter on file names (typically extensions)&lt;br /&gt;
      AuxList - Aux's to look for files&lt;br /&gt;
      Option  - Show PATH, AuxID, or QUAL in the selected file name&lt;br /&gt;
                PATH  - Selection data includes path&lt;br /&gt;
                AUXID - Selection data is of form: &amp;lt;AUX&amp;gt;/&amp;lt;name&amp;gt; (e.g. web use)&lt;br /&gt;
                QUAL  - Selection data is of form: &amp;lt;name&amp;gt;{AUX=&amp;quot;+aux+&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
    Example:&lt;br /&gt;
      gcontrol FILE filechooser &amp;quot;Files&amp;quot; world.prm &amp;quot;*.tmp|prm&amp;quot; &amp;quot;DAT|CWD&amp;quot; 60 10&lt;br /&gt;
&lt;br /&gt;
  LABEL - Roll-up/roll-down.  Non-label controls below this are hidden&lt;br /&gt;
          and shown by clicking on this widget. (nxm.sys.libg.GLabel)&lt;br /&gt;
      GCONTROL LABEL &amp;lt;NAME&amp;gt; &amp;lt;TITLE&amp;gt; &amp;lt;P1=Hidden|Closed|Open|AlwaysOpen[Open]&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    When a LABEL control is created, all controls added up to the next LABEL&lt;br /&gt;
    will belong to a group identified by the first label's &amp;lt;NAME&amp;gt;.  To add a&lt;br /&gt;
    control to a group that is not the current one, use the /GRP=name switch.&lt;br /&gt;
    A LABEL has a setAction() method to control how the label appears:&lt;br /&gt;
      0=label only, 1=label and contents, -1=nothing.&lt;br /&gt;
    Clicking on the label toggles between active=0 and active=1.  By default, no&lt;br /&gt;
    message is sent to the macro's processMessage handler when a LABEL is&lt;br /&gt;
    clicked.  To enable LABEL message sending, assert /MSG=yes.&lt;br /&gt;
&lt;br /&gt;
    Prior to NeXtMidas 2.1.0: &amp;lt;P1=Hide|Off|On [On]&amp;gt;, old values are deprecated,&lt;br /&gt;
    please change them.&lt;br /&gt;
&lt;br /&gt;
  LINE - Draws a horizontal line across the control panel (nxm.sys.libg.GLine)&lt;br /&gt;
         (Since NeXtMidas 2.9.1)&lt;br /&gt;
     GCONTROL LINE &amp;lt;NAME&amp;gt; &amp;lt;TITLE&amp;gt; &amp;lt;P1=COLOR&amp;gt; &amp;lt;P2=THICKNESS&amp;gt; &amp;lt;P3=PERCENTAGE&amp;gt;&lt;br /&gt;
                                  &amp;lt;P4=POSITION&amp;gt;&lt;br /&gt;
           COLOR      - String form of color [Theme foreground color]&lt;br /&gt;
           THICKNESS  - Thickness of line in pixels [Default Border Width]&lt;br /&gt;
           PERCENTAGE - Percentage of the control panel to draw across [100]&lt;br /&gt;
           POSITION   - Where to draw from (LEFT, RIGHT, or [CENTER])&lt;br /&gt;
&lt;br /&gt;
     Example to draw a green line 5 pixels thick across the central half of the&lt;br /&gt;
     control panel:&lt;br /&gt;
       gcontrol LINE myLine &amp;quot;&amp;quot; &amp;quot;GREEN&amp;quot; 5  50 &amp;quot;CENTER&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  LIST - List selector (nxm.sys.libg.GList)&lt;br /&gt;
    GCONTROL LIST &amp;lt;NAME&amp;gt; &amp;lt;TITLE&amp;gt; &amp;lt;P1=String of entries&amp;gt; &amp;lt;P2=width in chars [40]&amp;gt;&lt;br /&gt;
                                 &amp;lt;P3=height in lines [20]&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  MENU - Menu of items (nxm.sys.libg.GMenu)&lt;br /&gt;
    GCONTROL MENU &amp;lt;NAME&amp;gt; &amp;lt;TITLE&amp;gt; &amp;lt;P1=item list&amp;gt; &amp;lt;P2=default item&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    Flags: Button,Toggle,ChkBox           - toggle allows multiple selections&lt;br /&gt;
           TTop,TLeft,TRight,TBottom,TOff - title placement&lt;br /&gt;
           OneRow,ToggleList              - format options&lt;br /&gt;
           CS                             - Return values Case Sensitive&lt;br /&gt;
                                            (as entered)&lt;br /&gt;
&lt;br /&gt;
    NOTE: Do not use the Rollup flag, it is mean to be an internal state toggle&lt;br /&gt;
          for popup menus when collapsed (rolled up) or expanded (opened).&lt;br /&gt;
          Instead, use GCONTROL LABEL with a Closed state.&lt;br /&gt;
&lt;br /&gt;
  PANEL - Widget panel to host another graphical primitive (nxm.sys.libg.GPanel)&lt;br /&gt;
    GCONTROL PANEL &amp;lt;NAME&amp;gt; &amp;lt;TITLE&amp;gt; &amp;lt;P1=width_pixels[200]&amp;gt; &amp;lt;P2-height_pixels[200]&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  PIPEMON - Pipe monitor for debugging pipes or simple status displays&lt;br /&gt;
            (nxm.sys.libg.GPipeMonitor)&lt;br /&gt;
    GCONTROL PIPEMON &amp;lt;NAME&amp;gt; &amp;lt;TITLE [&amp;quot;NOPIPE&amp;quot;]&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    Flags: Slider   - show slider bar with read/write pointers&lt;br /&gt;
           Showrate - show numeric value of data rate in display (MByte/sec)&lt;br /&gt;
&lt;br /&gt;
  PROMPT - Text prompt and entry (nxm.sys.libg.GPrompt)&lt;br /&gt;
    GCONTROL PROMPT &amp;lt;NAME&amp;gt; &amp;lt;TITLE[&amp;quot;Input&amp;quot;]&amp;gt; &amp;lt;P1=DEF[&amp;quot;default&amp;quot;]&amp;gt;&lt;br /&gt;
                                            &amp;lt;P2=length=# chars[10]&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    Flags: Password -   The prompt text field is a password field. All text is&lt;br /&gt;
                        hidden (dummy echo chars displayed instead). Plain text&lt;br /&gt;
                        may be obtained via getValue (e.g. gc.idprompt.value).&lt;br /&gt;
                        (Since NextMidas 2.9.0)&lt;br /&gt;
&lt;br /&gt;
           LimitChars - Enforce a max limit for the number of input characters&lt;br /&gt;
                        to whatever is specified in LEN=.&lt;br /&gt;
                        (Since NeXtMidas 2.9.0)&lt;br /&gt;
&lt;br /&gt;
           NoWarn     - Do not display a warning to the user if the user is&lt;br /&gt;
                        trying to exceed the character limit set in LimitChars.&lt;br /&gt;
                        (Since NeXtMidas 2.9.0)&lt;br /&gt;
&lt;br /&gt;
  PROGRESS - Graphical Progress Monitor/Abort Dialog (nxm.sys.libg.GProgress)&lt;br /&gt;
    GCONTROL PROGRESS &amp;lt;NAME&amp;gt; &amp;lt;TITLE&amp;gt; &amp;lt;P1=button list[&amp;quot;Run,Pause,Exit&amp;quot;&amp;gt;&lt;br /&gt;
                                     &amp;lt;P2=display text[&amp;quot;Job Completion Status&amp;quot;]&amp;gt;&lt;br /&gt;
                                     &amp;lt;P3=width&amp;gt; &amp;lt;P4=height&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  QUERY - Query control object for debug or control of an object&lt;br /&gt;
          (nxm.sys.libg.GQuery)&lt;br /&gt;
    GCONTROL QUERY &amp;lt;NAME&amp;gt; &amp;lt;TITLE [&amp;quot;QUERY&amp;quot;]&amp;gt; &amp;lt;P1=object name&amp;gt; &amp;lt;P2=property list&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    Flags: Filter - apply default filter to limit introspection&lt;br /&gt;
&lt;br /&gt;
  STEXT - Multi-line styled text/HTML display object (nxm.sys.libg.GSText)&lt;br /&gt;
          (Since NeXtMidas 3.1.1)&lt;br /&gt;
    GCONTROL STEXT &amp;lt;NAME&amp;gt; &amp;lt;TITLE&amp;gt; &amp;lt;P1=styled text string&amp;gt; &amp;lt;P2=columns&amp;gt; &amp;lt;P3=rows&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  TABLE - Table Dialog control object (nxm.sys.libg.GDialog)&lt;br /&gt;
    GCONTROL TABLE &amp;lt;NAME&amp;gt; &amp;lt;TITLE [&amp;quot;Table&amp;quot;]&amp;gt; &amp;lt;P1=values table&amp;gt; &amp;lt;P2=config table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  TEXT - Multi-line text display object (nxm.sys.libg.GText)&lt;br /&gt;
    GCONTROL TEXT &amp;lt;NAME&amp;gt; &amp;lt;TITLE&amp;gt; &amp;lt;P1=text string&amp;gt; &amp;lt;P2=columns&amp;gt; &amp;lt;P3=rows&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  LVAL   - Int (32-bit)&lt;br /&gt;
  TVAL   - Time&lt;br /&gt;
  DVAL   - Double&lt;br /&gt;
  FVAL   - Float&lt;br /&gt;
  (x)VAL - Value control widget. (nxm.sys.libg.GValue)&lt;br /&gt;
         The (x) is one of: T-Time, D-Double, F-Float, or L-Int&lt;br /&gt;
    GCONTROL (x)VAL &amp;lt;NAME&amp;gt; &amp;lt;TITLE&amp;gt; &amp;lt;P1=DEF[0.5]&amp;gt; &amp;lt;P2=MIN[0.0]&amp;gt; &amp;lt;P3=MAX[1.0]&amp;gt;&lt;br /&gt;
                                   &amp;lt;P4=INCrement[(MAX-MIN)/20]&amp;gt;&lt;br /&gt;
    Flags: NoNumb       - do Not display the numeric value&lt;br /&gt;
           Gauge        - display as a clickable empty/full gauge&lt;br /&gt;
           Slider       - display as slider bar&lt;br /&gt;
           VuMeter      - display as blocked gauge&lt;br /&gt;
           Minimum      - display minimum value&lt;br /&gt;
           Maximum      - display maximum value&lt;br /&gt;
           Percent      - display as percent&lt;br /&gt;
           Hex          - display as hex&lt;br /&gt;
           Discrete     - allow values only where val%inc==0&lt;br /&gt;
           MsgOnDrag    - send slider msg while slider is moving [DEF=TRUE]&lt;br /&gt;
           RightJustify - allow users to right justify   (Since NeXtMidas 3.7.0)&lt;br /&gt;
    &lt;br /&gt;
    Note: Setting P3 to -1 makes the MAX value unlimited.&lt;br /&gt;
           &lt;br /&gt;
    Note: The default values for TVAL are &amp;lt;P1=DEF[0.0]&amp;gt; &amp;lt;P2=MIN[0.0]&amp;gt;&lt;br /&gt;
          &amp;lt;P3=MAX[-1.0]&amp;gt; &amp;lt;P4=INCrement[1.0]&amp;gt;.            (Since NeXtMidas 3.5.1)&lt;br /&gt;
&lt;br /&gt;
Toggles&lt;br /&gt;
=======&lt;br /&gt;
  Buttons and Menus can be implemented as Toggles. Toggles, since they allow&lt;br /&gt;
  multiple concurrent item selections, use a MASK value for selecting items,&lt;br /&gt;
  not an index. Therefore, users should be aware when setting the value of a&lt;br /&gt;
  toggle to use the recommended syntax for setting MASK values. For example:&lt;br /&gt;
&lt;br /&gt;
    gcontrol/toggle button myButt &amp;quot;Title&amp;quot; &amp;quot;A,B,C&amp;quot; &amp;quot;A|C&amp;quot;    ! Correct&lt;br /&gt;
    gcontrol/toggle button myButt &amp;quot;Title&amp;quot; &amp;quot;A,B,C&amp;quot; &amp;quot;C&amp;quot;      ! Correct&lt;br /&gt;
    gcontrol/toggle button myButt &amp;quot;Title&amp;quot; &amp;quot;A,B,C&amp;quot; &amp;quot;+C&amp;quot;     ! Correct&lt;br /&gt;
    gcontrol/toggle button myButt &amp;quot;Title&amp;quot; &amp;quot;A,B,C&amp;quot; &amp;quot;~C&amp;quot;     ! Correct&lt;br /&gt;
    gcontrol/toggle button myButt &amp;quot;Title&amp;quot; &amp;quot;A,B,C&amp;quot; &amp;quot;|C|&amp;quot;    ! Correct&lt;br /&gt;
    gcontrol/toggle button myButt &amp;quot;Title&amp;quot; &amp;quot;A,B,C&amp;quot; &amp;quot;ALL&amp;quot;    ! Correct&lt;br /&gt;
    gcontrol/toggle button myButt &amp;quot;Title&amp;quot; &amp;quot;A,B,C&amp;quot; &amp;quot;NONE&amp;quot;   ! Correct&lt;br /&gt;
    gcontrol/toggle button myButt &amp;quot;Title&amp;quot; &amp;quot;A,B,C&amp;quot; 3        ! WRONG&lt;br /&gt;
&lt;br /&gt;
  Also, since toggles uses an 32-bit integer mask value (with values &amp;lt;0&lt;br /&gt;
  being special), a toggle is limited to 31 items.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Setting Menu Colors&lt;br /&gt;
===================&lt;br /&gt;
Menu item colors can be manipulated with a Table of colors for each item in&lt;br /&gt;
the menu:&lt;br /&gt;
  {ITEM1=RED,ITEM2=BLUE,...ITEMn=GREEN}&lt;br /&gt;
&lt;br /&gt;
The following code-snippet is used in many of the test macros in the&lt;br /&gt;
nxm.sys.test directory.&lt;br /&gt;
   ...&lt;br /&gt;
    pipe on&lt;br /&gt;
      panel/controls=gc&lt;br /&gt;
      gcontrol menu main &amp;quot;Exit with Status = &amp;quot; &amp;quot;PASS,FAIL&amp;quot;&lt;br /&gt;
      set gc.main.itemColors {PASS=GREEN,FAIL=RED}&lt;br /&gt;
    pipe off&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
Disabling Gcontrols&lt;br /&gt;
===================&lt;br /&gt;
Since NeXtMidas 2.9.1, it is possible to disable certain GControls. The&lt;br /&gt;
controls that can be disabled are Labels, Prompts, Values (dVal, lVal, etc),&lt;br /&gt;
and Menus (Buttons, Menus, and Choices). Disabling the control is the same as&lt;br /&gt;
setting the flags NOMSG and NOEDIT, plus the control text changes color&lt;br /&gt;
(default is gray) to depict this change. To disable:&lt;br /&gt;
&lt;br /&gt;
   set gc.ControlID.enabled false&lt;br /&gt;
      -or -&lt;br /&gt;
   gcontrol button myButt &amp;quot;Label&amp;quot; &amp;quot;A,B,C&amp;quot; TABLE={ENABLED=&amp;quot;FALSE&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
To re-enable the control:&lt;br /&gt;
&lt;br /&gt;
   set gc.ControlID.enabled true&lt;br /&gt;
&lt;br /&gt;
To toggle the enabled state of the control:&lt;br /&gt;
&lt;br /&gt;
   invoke gc.ControlID.toggleEnabled()&lt;br /&gt;
&lt;br /&gt;
To change the color of the disabled text (does not refresh automatically):&lt;br /&gt;
&lt;br /&gt;
   set gc.ControlID.disabledColor &amp;quot;&amp;lt;COLOR&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Disabling Individual Menu Items&lt;br /&gt;
===============================&lt;br /&gt;
Since NeXtMidas 2.9.1, it is possible to disable individual menu items. This&lt;br /&gt;
includes buttons. The disabled items will have their text change color (default&lt;br /&gt;
is to GRAY) and will not send a message or otherwise be selected when clicked.&lt;br /&gt;
To disable an item:&lt;br /&gt;
&lt;br /&gt;
   set gc.MenuID.disableItem &amp;quot;&amp;lt;ItemText&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To re-enable a disabled item:&lt;br /&gt;
&lt;br /&gt;
   set gc.MenuID.enableItem &amp;quot;&amp;lt;ItemText&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To disable multiple items:&lt;br /&gt;
   set gc.MenuID.disabledItems &amp;quot;&amp;lt;Item1Text,Item4Text&amp;gt;&amp;quot;&lt;br /&gt;
      - or -&lt;br /&gt;
   gcontrol button myButt &amp;quot;LABEL&amp;quot; &amp;quot;A,B,C,D&amp;quot; &amp;quot;A&amp;quot; TABLE={DISABLEDITEMS=&amp;quot;B,C&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
To change the color of a disabled items (does not effect currently disabled&lt;br /&gt;
items):&lt;br /&gt;
&lt;br /&gt;
   set gc.MenuID.disabledItemColor &amp;quot;&amp;lt;COLOR&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Since NeXtMidas 3.5.1, if the default item is disabled, the default will be set&lt;br /&gt;
to none.&lt;br /&gt;
&lt;br /&gt;
Formatting xVal and PipeMon Values&lt;br /&gt;
==================================&lt;br /&gt;
The /FMT= switch can be used with [x]VAL and PIPEMON controls to format the&lt;br /&gt;
displayed numerical values of the control. There are a variety of acceptable&lt;br /&gt;
inputs to this switch, as well as the special patterns:&lt;br /&gt;
   HH:MM:SS - Show in hours:minutes:seconds&lt;br /&gt;
   DMS      - Show in deg'min'sec format (i.e 33'22'11)&lt;br /&gt;
   ?        - Question marks are replaced with blanks and trigger the&lt;br /&gt;
                     use of a multiplier&lt;br /&gt;
&lt;br /&gt;
Units are defined as the String to the right of the last blank space in the&lt;br /&gt;
input String. (e.g. &amp;quot;## MHz&amp;quot; the units are MHz).&lt;br /&gt;
&lt;br /&gt;
See nxm.sys.lib.Format.java for more details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
  1. A two column toggle menu with checkbox.&lt;br /&gt;
      gcontrol menu MYMENU &amp;quot;Selections&amp;quot; &amp;quot;A,B,C,D,E,F&amp;quot; /nc=2 /flags=chkbox|tright&lt;br /&gt;
&lt;br /&gt;
  2. Same as above but using switches instead of flags&lt;br /&gt;
     gcontrol menu MYMENU &amp;quot;Selections&amp;quot; &amp;quot;A,B,C,D,E,F&amp;quot; /nc=2 /chkbox /tright&lt;br /&gt;
&lt;br /&gt;
  3. A simple DIALOG box from the SD360 macro&lt;br /&gt;
    gc/temp/handle=dlog dialog &amp;quot;DIALOG&amp;quot; &amp;quot;Test Dialog Box&amp;quot; 300 -6&lt;br /&gt;
    gc/panel=dlog choice shape &amp;quot;Shape&amp;quot; reg.waveform.shapeList reg.waveform.shape&lt;br /&gt;
    gc/panel=dlog button wind  &amp;quot;Window  &amp;quot; reg.fft.windowList reg.fft.window &amp;amp;&lt;br /&gt;
      /tleft /nc=3&lt;br /&gt;
    gc/panel=dlog dvalue sfreq &amp;quot;SineFreq&amp;quot; sfreq -sr sr sr/20&lt;br /&gt;
    gc/panel=dlog text   text  &amp;quot;TextInfo&amp;quot; &amp;quot;A test message&amp;quot; 30 3&lt;br /&gt;
    gc/panel=dlog menu   form  &amp;quot;Format  &amp;quot; &amp;quot;SF,CF,SI,CI&amp;quot; reg.waveform.format &amp;amp;&lt;br /&gt;
      /tleft /nc=4&lt;br /&gt;
    gc/panel=dlog list   list  &amp;quot;TextList&amp;quot; &amp;quot;A,B,C,D,E,F,G,Another Long One&amp;quot; 30 3&lt;br /&gt;
&lt;br /&gt;
  4. Use inline 'TABLE=' format to set gcontrol options&lt;br /&gt;
    gcontrol/tleft menu  MAIN   &amp;quot;Exit with Status = &amp;quot; &amp;quot;PASS,FAIL&amp;quot; &amp;amp;&lt;br /&gt;
      table={ITEMCOLORS={PASS=GREEN,FAIL=RED}}&lt;br /&gt;
&lt;br /&gt;
  5. Create a CHOICE Widget and set its tool tip text.&lt;br /&gt;
     gcontrol choice choiceWidget &amp;quot;CHOICES&amp;quot; &amp;quot;Choice1,Choice2&amp;quot; &amp;quot;Choice2&amp;quot;&lt;br /&gt;
            /input /tooltip=&amp;quot;Some Text&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  6. Example to display html styled text inside a gcontrol widget:&lt;br /&gt;
       res mystr &amp;quot;&amp;lt;html&amp;gt;&amp;lt;body&amp;gt;My HTML &amp;lt;b&amp;gt;BOLD string&amp;lt;/b&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&amp;quot;&lt;br /&gt;
       gcontrol STEXT gstext &amp;quot;HTML/Styled Text Below&amp;quot; mystr 24 25 /title&lt;br /&gt;
&lt;br /&gt;
  7. Disable a gcontrol widget from updating the status/title bar text. This&lt;br /&gt;
     is usually from mouse hovers.&lt;br /&gt;
       gcontrol prompt prompt1 &amp;quot;PROMPT 1&amp;quot; &amp;quot;Text&amp;quot; /noReadoutUpdates&lt;br /&gt;
     - or -&lt;br /&gt;
       set gc.prompt1.NoReadoutUpdates true&lt;br /&gt;
&lt;br /&gt;
  8. Display the current date and time in a gcontrol widget:&lt;br /&gt;
       timex now currTime&lt;br /&gt;
       gcontrol TVAL gcDateTime &amp;quot;Date &amp;amp; Time&amp;quot; currTime 1 -1 1&lt;br /&gt;
&lt;br /&gt;
  9. Display the current date and time in a gcontrol widget:&lt;br /&gt;
       timex now currTime&lt;br /&gt;
       gcontrol TVAL gcDateTime &amp;quot;Date &amp;amp; Time&amp;quot; currTime min=1 max=-1 inc=1&lt;br /&gt;
&lt;br /&gt;
 10. Display the current time in a gcontrol widget:&lt;br /&gt;
       timex now currTime sod=secOfDay&lt;br /&gt;
       gcontrol TVAL gcTime &amp;quot;Time&amp;quot; secOfDay min=1 max=-1 inc=1&lt;br /&gt;
&lt;br /&gt;
  The demo.mm and nxm.sys.test_gcontrol.mm macros have more examples of each&lt;br /&gt;
  widget type. The macro test_gcontrol_table.mm has more examples of the inline&lt;br /&gt;
  set method ('TABLE=').&lt;br /&gt;
&lt;br /&gt;
Messages:&lt;br /&gt;
  Received:&lt;br /&gt;
    EXIT    - Destroy control&lt;br /&gt;
    REFRESH - Refresh control on screen&lt;br /&gt;
    SHOWN   - Same as REFRESH&lt;br /&gt;
  Sent:&lt;br /&gt;
    All widgets can send messages by the id &amp;lt;NAME&amp;gt;&lt;br /&gt;
    (x)VAL - INFO = GValue.CHANGED_BY_POLL or GValue.CHANGED_BY_CLICK&lt;br /&gt;
&lt;br /&gt;
Switches:&lt;br /&gt;
  /BORDER    Turns on the widget border.&lt;br /&gt;
  /CS        MENU,CHOICE,BUTTON - Return values case-sensitive (as-entered)&lt;br /&gt;
  /DIALOG    Treats the control as part of a dialog.&lt;br /&gt;
  /EDIT=     Widget is editable [true]&lt;br /&gt;
  /EVENTFILTER= Window event filter mask (e.g. NoMouse,NoKeyboard,NoMove,&lt;br /&gt;
             NoPushPop,NoMiddleMouse). For complete list of values see&lt;br /&gt;
             nxm.sys.libg.MWindow.eventFilterList.                 (Since 3.3.1)&lt;br /&gt;
  /FLAGS=    One or more ORed flags selected from the common|specific lists&lt;br /&gt;
             See above for a description of how flags can be entered as named&lt;br /&gt;
             switches as well.&lt;br /&gt;
  /FMT=      Text format specifier of the form xxx.xx(&amp;lt;TYPE&amp;gt;=[x]VAL or PIPEMON)&lt;br /&gt;
             Can be used with /MULT switch to control format.&lt;br /&gt;
             DEFAULTS -&amp;gt; TVAL=&amp;quot;HH:MM:SS&amp;quot;, LVAL=&amp;quot;#0&amp;quot;, DVAL=&amp;quot;##0.###E0&amp;quot;&lt;br /&gt;
             See note above for more details.&lt;br /&gt;
  /GC=&amp;lt;table&amp;gt; Look in given table for a key &amp;lt;NAME&amp;gt; to set the default value for&lt;br /&gt;
             this control.  This is useful for holding all the controls' state&lt;br /&gt;
             in one table.&lt;br /&gt;
  /GRP=      Name of control group (LABELed section) to which GCONTROL belongs&lt;br /&gt;
  /HANDLE=   Handle of control's entry in results table (for /TEMP)&lt;br /&gt;
  /HEADLESS  Suggests headless operation.(Does not guarantee true headless&lt;br /&gt;
             operation at this time.)&lt;br /&gt;
  /IDEF=     Sets default value as an integer. This overrides the default used&lt;br /&gt;
             with most controls that is read in as a string.&lt;br /&gt;
  /INPUT=    When TRUE, allow input as well as to pick from CHOICE list.&lt;br /&gt;
             CHOICE ONLY [DEF=FALSE]&lt;br /&gt;
  /INPUTBORDER={PERM,MO} Draw either a permanent (PERM) or mouseover (MO) border&lt;br /&gt;
             around widget to indicate user's ability to right-click and enter&lt;br /&gt;
             text. Valid for editable CHOICE (w/input flag), (x)VAL, and PROMPT&lt;br /&gt;
             widgets.&lt;br /&gt;
  /LEGACY    Temporarily override the fix for Bug 205 (hard to use popups).&lt;br /&gt;
             (The /LEGACY switch will be removed in the future.)&lt;br /&gt;
  /LH=       Line height in pixels [0==&amp;gt;automatic]&lt;br /&gt;
  /MON=      Name of result parameter to poll for changes &amp;lt;TYPE&amp;gt;=xVAL or PROMPT.&lt;br /&gt;
             Note that for (x)VAL widgets, a change via a click can be&lt;br /&gt;
             distinguished  from an external (result) change via the info field.&lt;br /&gt;
             For a click change the info field has a value of:&lt;br /&gt;
                 GValue.CHANGED_BY_CLICK&lt;br /&gt;
             and for a result change the info field has a value of:&lt;br /&gt;
                 GValue.CHANGED_BY_POLL&lt;br /&gt;
  /MSG       Send message upon change [false for &amp;lt;TYPE&amp;gt;=LABEL, otherwise true]&lt;br /&gt;
  /MULT=     Convert units using scientific notation prefix. (&amp;lt;TYPE&amp;gt;=[x]VAL).&lt;br /&gt;
             Arguments for this switch can be passed in three ways:&lt;br /&gt;
                1) n, where n is one of -12,-9,-6,-3,3,6,9,12: (e.g. 6 is Mega)&lt;br /&gt;
                2) One of: pico,nano,micro, milli,Kilo,Mega,Giga,Tera&lt;br /&gt;
                3) One of: 'p','n','u','m','K','M','G','T'&lt;br /&gt;
  /NC=       Number of columns {&amp;lt;TYPE&amp;gt;=MENU} [0==&amp;gt;automatic]&lt;br /&gt;
  /NOALTTITLE Disables gcontrols automatically updating the text of the&lt;br /&gt;
             title/status bar on events such as mouse hovers. Since 3.3.0.&lt;br /&gt;
  /NODEPRESS Selected button is not shown as depressed&lt;br /&gt;
  /NOMSG     Disables sending of a message when updated&lt;br /&gt;
  /NONUMB    Do not display numbers on (x)VAL.&lt;br /&gt;
  /NOREADOUTUPDATES Disables mouse hovers updating the title bar readout&lt;br /&gt;
  /NOSTATE   Button does not change state when pressed&lt;br /&gt;
  /PANEL=    Panel to contain widget [&amp;quot;PANEL&amp;quot;]&lt;br /&gt;
  /TEMP      Widget is temporary [false]&lt;br /&gt;
  /TEXT      Include text in control (&amp;lt;TYPE&amp;gt;=[x]VAL) [true]&lt;br /&gt;
  /THEME=    NOTE: This affects the GLOBAL theme!  Use /WTHEME to affect only&lt;br /&gt;
             this gcontrol's theme. Refer to /WTHEME below for list of options.&lt;br /&gt;
  /TIMEOUT=  Sets an ALERT to automatically close after the specified number of&lt;br /&gt;
             seconds have passed (no timeout if &amp;lt;= 0)  (NeXtMidas 1.9.2)&lt;br /&gt;
  /TITLE     Turns on the title for the widget.&lt;br /&gt;
  /TOOLTIP=  Sets the ToolTipText in a Swing Widget, or adds the text to the&lt;br /&gt;
             title bar readout.&lt;br /&gt;
  /UNITS=    Units string to append to value in appropriate widgets&lt;br /&gt;
  /WAIT=     Wait for control to complete its function (implies /TEMP)&lt;br /&gt;
  /WFS=      Override Widget Font Size [DEF=12]&lt;br /&gt;
  /WH=       Control height in pixels [0==&amp;gt;automatic]&lt;br /&gt;
  /WIN=      Override the parent window.&lt;br /&gt;
  /WTHEME=   Affect only this gcontrol's theme and not the global theme.&lt;br /&gt;
             (NeXtMidas 2.7.0) Color scheme name selected from list:&lt;br /&gt;
               Desktop,Default,WoB,GoB,BoW,Browser,Gear1,Gear2,Gear3,Gear4,NAK&lt;br /&gt;
             or a table creates a custom theme. Table keys are:&lt;br /&gt;
               CBG  - background color&lt;br /&gt;
               CFG  - foreground color&lt;br /&gt;
               CWBG - widget background color&lt;br /&gt;
               CWTS - widget top shade&lt;br /&gt;
               CWBS - widget bottom shade&lt;br /&gt;
               CWMS - widget middle shade&lt;br /&gt;
               CWFH - current widget foreground highlight (Roll down name color)&lt;br /&gt;
               CWFG - current widget foreground color&lt;br /&gt;
               CWTI - current widget title color&lt;br /&gt;
             Note1: Since NeXtMidas 3.0.0, it is possible to set a component&lt;br /&gt;
               color based off another color in the current theme(_THEME_). E.g.&lt;br /&gt;
                 gc button myBtn &amp;quot;Title&amp;quot; &amp;quot;A,B&amp;quot; &amp;quot;A&amp;quot; /wtheme={CWTI=_THEME_CWFG}&lt;br /&gt;
             Note2: Since NeXtMidas 3.1.1, this overrides /THEME= switch.&lt;br /&gt;
  /WW=       Control width in pixels [0==&amp;gt;automatic]&lt;br /&gt;
&lt;br /&gt;
See Also: PANEL, nxm.sys.libg.GWidget, nxm.sys.libg.GMenu, nxm.sys.libg.GValue&lt;br /&gt;
See Also: nxm.sys.test.test_gcontrol.mm&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:NXM_Explain]]&lt;/div&gt;</summary>
		<author><name>ConvertBot</name></author>
		
	</entry>
</feed>