Figure 1-7. Panel item created with PANEL_TOGGLE macro
Figure 1-8. Panel item created with PANEL_CHOICE_STACK macro
1.13.1.3 Drop Target Items
A panel drop target item is a bordered image in a panel area that is used to transfer data to or
from applications. Before you use a panel drop target item you need to be familiar with the
SELECTION and DRAGDROP packages.
A panel drop target item is an object in the class Panel_drop_target_item which is
equivalent to a Panel_item. A drop target item’s owner is a Panel.
1.13.1.4 Panel Extension Items
Panel extension items support additional user defined panel items. Use of this type of panel
item is an advanced topic that is covered in Chapter 25, XView Internals, in the XView Pro-
gramming Manual.
18 XView Reference Manual
1.13.1.5 Gauges
Gauges are just like sliders, but they are “output only” items. That is, you set the value of the
item and the display of the gauge changes just as it would for sliders. Also, there is no
optional type-in field and there is no slider bar for the user to interactively change the value
of the gauge. The gauge is intended to be used only as a feedback item.
To create a gauge, use the PANEL_GAUGE package.
File View Edit Find
Load... Save... Print
Snap View
Text Editor V3 - (NONE), dir; /tmp_mnt/home/user1
/tmp_mnt/home/user1
Snap Type:
Snap Delay:
Window Region Screen
0 2 4 8 16
seconds
Beep During Countdown
Hide Window During Capture
SELECT - Select Window. ADJUST or MENU - Can
Drop Items
Figure 1-9. Panel drop target items
Figure 1-10. Panel item created with the PANEL_GAUGE package
XView Package
Summary
XView Package Summary 19
1.13.1.6 List ItemsScrolling Lists
OPENLOOK’s specification for scrolling lists is implemented by the PANEL_LIST panel
item. List items allow the user to make selections from a scrolling list of choices larger than
can be displayed on the panel at one time. The selections can be exclusive or nonexclusive,
like the choice items outlined in the previous section. The list is made up of strings or
images and a scrollbar that functions like any scrollbar in XView, except that it cannot be
split.
Figure 1-11. Panel list item created with the PANEL_LIST package
1.13.1.7 Message Items
Message items display a text or image message within a panel. The only visible component
of a message item is the label itself. Message items are useful for annotations of all kinds,
including titles, comments, descriptions, pictures, and dynamic status messages. The mes-
sage is often used to identify elements on the panel. A message has no value.
Figure 1-12. Panel item created with PANEL_MESSAGE package
20 XView Reference Manual
Figure 1-13. Another panel item created with PANEL_MESSAGE package
1.13.1.8 Multiline Text Items
Multiline text items are a special type of panel text item that allow a text field containing
multiple lines.
Figure 1-14. Panel item created with the PANEL_MULTILINE_TEXT package
1.13.1.9 Numeric Text Items
Panel numeric text items are virtually the same as panel text items except that the value
displayed is of type int. Also, convenience features (such as increment and decrement but-
tons) ease the manipulation of the text string’s numeric value, but there is little programmatic
difference between the text item and the numeric text item. You can create a numeric text
item using the PANEL_NUMERIC_TEXT package.
XView Package
Summary
XView Package Summary 21
Figure 1-15. Panel item created with the PANEL_NUMERIC_TEXT package
1.13.1.10 Slider Items
Slider items allow the graphical representation and selection of a value within a range as
shown in Figure 1-16. Sliders are appropriate for situations where it is desired to make fine
adjustments over a continuous range of values. The user selects the slider bar and drags it to
the value that he wishes. A slider has the following displayable components: the label, the
current value, the slider bar, and the minimum and maximum allowable integral values (the
range), end boxes, tick marks, tick mark minimum and maximum tick strings, as well as mini-
mum and maximum value text strings.
Figure 1-16. Panel item created with the PANEL_SLIDER package
1.13.1.11 Text Items
A panel text item contains as its value a
NULL-terminated string. Typically, it contains only
printable ASCII characters with no newlines. When a panel receives keyboard input (regard-
less of where the pointer is as long as it is within the boundaries of the panel), the keyboard
event is passed to the item with the keyboard focus. A caret is used to indicate the insertion
point where new text is added. You can type in more text than fits on the text field. If this
happens, a right arrow pointing to the left will appear on the left on the field, indicating that
some text to the left of the displayed text is no longer visible. Similarly, if text is inserted
causing text on the right to move out of the visible portion of the text item, then an arrow
pointing to the right will appear to the right of the text.
22 XView Reference Manual

Get Volume 7B: XView Reference Manual now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.