Introduction
This article contains a briefly introduction of all widgets of the Roma Widget Set (Xrw). It has been created because the whole topic grows beyond 50 print pages, and i decided to split it into three parts with and into four parts with . With i moved the complete API description to a separate HTML documentation (that is part of the Xrw project) and restructured all four articles to make reading more entertaining and exciting:
- The origin article: Programming the Roma Widget Set (C# X11) - a zero dependency GUI application framework - Introduction. It contains a short explanation of the widget set's features. (Before it was: ~ Basics. It contained general descriptions.) This atricle should always be the preferred starting point.
- This first split-off article: Programming the Roma Widget Set (C# X11) - a zero dependency GUI application framework - Widget set. Due to the constantly growing of 'boring' API documentation, the API documentation has been moved with to a separate HTML documentation (that is part of the Xrw project) and this article has been focused on a briefly introduction of all widgets. (Before it was: ~ Intrinsic widgets. It contained the API reference description of intrinsic widgets only.)
- The second split-off article: Programming the Roma Widget Set (C# X11) - a zero dependency GUI application framework - Programming techniques. Due to the constantly growing of 'boring' API documentation, the API documentation has been moved with to a separate HTML documentation (that is part of the Xrw project) and this article has been focused on programming techniques. (Before it was: ~ Simple widgets. It contained the API reference description of simple widgets only.)
- The third split-off article: Programming the Roma Widget Set (C# X11) - a zero dependency GUI application framework - MVVM/XAML support. Due to the constantly growing of 'boring' API documentation, the API documentation has been moved with to a separate HTML documentation (that is part of the Xrw project) and this article has been focused on introducing the MVVM/XAML support of the Xrw. (Before it was: ~ Composite widgets. It contains the API reference description of composite widgets only.)
All features, described later on, can be marked as:
- available from version 0.1,
- available from version 0.2,
- available from version 0.3,
- available from version 0.4,
- available from version 0.5,
- available from version 0.6,
- available from version 0.7,
- available from version 0.8,
- available from version 0.9 and
|
- disabled with version 0.2,
- disabled with version 0.3,
- disabled with version 0.4,
- disabled with version 0.5,
- disabled with version 0.6,
- disabled with version 0.7,
- disabled with version 0.8,
- disabled with version 0.9.
|
The widget names and functionality follow the ideas of the "Athena widget set" with a little influence of the "Motif widget set" and GTK. The widget set is not complete, but continuously growing. Starting with version the widget set contains advanced widgets influenced by modern GUI toolkits. The widget hierarchy looks as follows:
The intrinsic widgets are, starting with , described within this article. Starting with , the widget API description has moved to a separate HTML documentation and this online version has been reduced to a a briefly introduction of all widgets.
The intrinsic widgets define the basic inheritance structure of the widget set - the majority of them are abstract base classes for specialized widgets/gadgets. Most of them have equivalents within the "Athena widget set" and are intended like their equivalents. The intrinsic widgets include:
XrwObject:IDisposable |
ultimate base object[1, ∅] of this widget set |
⌊ XrwFigure |
fundamental base object[1, ∅] for 2D shapes |
⌊ XrwRectObject |
fundamental base object[1, ∅] with geometry |
⌊ XrwVisibleRectObj |
fundamental base object[1, ∅] with drawing |
⌊ XrwCore |
universal base gadget/widget[2/3, ∅] |
⌊ XrwComposite |
container[2/3, ∅], managing many children |
⌊ XrwConstraint |
container[2/3, ∅], with geometry management |
⌊ XrwShell |
fundamental shell widget[3] |
⌊ XrwOverrideShell |
base class for popups, not interacting with the WM[4] |
⌊ XrwWmShell |
base class for shell, interacting with the WM[4] |
⌊ XrwApplicationShell |
the common code of an X11 application shell |
⌊ XrwTransientShell |
base class for popups, interacting with WM[4] |
[1] object = invisible and windowless, uses neither the ***parent*** window nor an ***onw*** window
[2] gadget = uses the ***parent*** window instead of an ***onw*** window, saves resources compared to widget, but can receive events only if forwarded from the widget it is contained in
[3] widget = has an ***onw*** window, can creceive events directly from the WM[4]
[4] WM = Windows Manager
[∅] do not instantiate
The figure gadgets are new to . They provide geometric shapes, that are typically used without user input support (in contrast to e.g. a command's click, a menu item's selection, a text field's edit, a list item's or tree node's selection). The figure gadgets include:
[1] object = invisible and windowless, uses neither the ***parent*** window nor an ***onw*** window
[2] gadget = uses the ***parent*** window instead of an ***onw*** window, saves resources compared to widget, but can receive events only if forwarded from the widget it is contained in
[3] widget = has an ***onw*** window, can creceive events directly from the WM[4]
[4] WM = Windows Manager
[∅] do not instantiate
The simple widgets introduction has been, starting with , described within the article Programming the Roma Widget Set (C# X11) - a zero dependency GUI application framework - Simple widgets (that now changed the focus to programming techniques) and has been moved, with , to this article. Starting with , the widget API description has moved to a separate HTML documentation and this online version has been reduced to a briefly introduction of all widgets.
The simple widgets/gadgets are characterized by the fact that they are neither composed from several widgets/gadgets nor they contain child widgets/gadgets. They include:
XrwObject:IDisposable |
ultimate base object[1, ∅] of this widget set |
⌊ XrwRectObject |
fundamental base object[1, ∅] with geometry |
⌊ XrwVisibleRectObj |
fundamental base object[1, ∅] with drawing |
⌊ XrwCore |
universal base gadget/widget[2/3, ∅] |
⌊ XrwSimple |
universal object[2/3] |
⌊ XrwColorChooserComb |
named color choser widget[3], colors arranged as comb |
⌊ XrwImage |
image object[2/3] |
⌊ XrwLabelBase |
static label base object[2/3, ∅] |
| ⌊ XrwComboBox |
drop down selection widget[3] |
| ⌊ XrwLabel |
static label[2/3] |
| | ⌊ XrwCommand |
command button widget[3] |
| | | ⌊ XrwMenuButton |
button widget[3], to pop up a simple menu |
| | ⌊ XrwSme |
simple menu entry gadget[2] |
| ⌊ XrwLabelAndColor |
label and color rectangle widget[3], select a color |
| ⌊ XrwTextSpinButton |
spin button widget[3], to spin text constants |
| ⌊ XrwToggle |
toggle button widget[3] |
| ⌊ XrwRadio |
radio button widget[3] |
| ⌊ XrwNotebookTab |
notebook tab button widget[3] |
⌊ XrwList |
list widget[3] |
⌊ XrwRange |
generic base for scroll bar and scale[3] |
| ⌊ XrwScale |
scale widget[3] |
| ⌊ XrwScrollbar |
scroll bar widget[3] |
⌊XrwRibbonCommandBase |
base object[2, ∅] of ribbon command gadgets |
| ⌊ XrwRibbonButton |
command button gadget[2] for ribbon |
| | ⌊ XrwRibbonSplitButton |
button gadget[2] for ribbon, to pop up a simple menu |
| ⌊ XrwRibbonControlGroup |
gadget[2] for ribbon, to organize control group nodes |
⌊ XrwText |
single line text edit widget[3] |
⌊ XrwTree |
toggle button widget[3] |
⌊ XrwViewportGridViewHeader |
column header widget for viewport embedded grids[3] |
[1] object = invisible and windowless, uses neither the ***parent*** window nor an ***onw*** window
[2] gadget = uses the ***parent*** window instead of an ***onw*** window, saves resources compared to widget, but can receive events only if forwarded from the widget it is contained in
[3] widget = has an ***onw*** window, can creceive events directly from the WM[4]
[4] WM = Windows Manager
[∅] do not instantiate
The composite widgets introduction has been, starting with , described within the article Programming the Roma Widget Set (C# X11) - a zero dependency GUI application framework - Composite widgets (that now changed the focus to MVVM/XAML support) and has been moved, with , to this article. Starting with , the widget API description has moved to a separate HTML documentation and this online version has been reduced to a briefly introduction of all widgets.
The composite widgets/gadgets are characterized by the fact that they are either composed from several widgets/gadgets or they can contain child widgets/gadgets. They include:
XrwObject:IDisposable |
ultimate base object[1, ∅] |
⌊ XrwRectObject |
fundamental base object[1, ∅] with geometry |
⌊ XrwVisibleRectObj |
fundamental base object[1, ∅] with drawing |
⌊ XrwCore |
universal base gadget/widget[2/3, ∅] |
⌊ XrwComposite |
container[2/3, ∅], managing many children |
⌊ XrwConstraint |
container[2/3, ∅], with geometry management |
| ⌊ XrwBox |
container[2/3], arranging children horiz./vert. |
| | ⌊ XrwHslColorPanel |
hue, saturation, lighness color chooser gadget[2] |
| | ⌊ XrwNotebook |
container[2/3], arranging children on pages |
| | ⌊ XrwRadioBox |
gadget[2], arranging XrwRadio children horiz./vert. |
| | ⌊ XrwSpinBox |
gadget[2], spinning invisible children to visible |
| ⌊ XrwCanvas |
container[2/3], for structured graphics of XrwFigure s |
| ⌊ XrwDockPanel |
container[2], rranges children into up to five regions |
| ⌊ XrwFrame |
container[2/3], arranging just one single child |
| ⌊ XrwGridForm |
container[2/3], arranging children in a columns/rows |
| | ⌊ XrwColorSelector-
| | GridForm |
container[2/3], XrwGridForm fo children to choose a predefined color |
| | ⌊ XrwCustomColorChooser-
| | GridForm |
container[2], XrwGridForm for children to choose a custom color via HSL or RGB color model |
| | ⌊ XrwHslColorPanel |
hue, saturation, lightness color chooser gadget[2] |
| | ⌊ XrwRgbColorPanel |
red, green, blue color chooser gadget[2] |
| ⌊ XrwPaned |
widget[3], controlling two or more paned children |
| ⌊ XrwPortHole |
gadget[2], display only ***one*** child at any time |
| ⌊ XrwPropertyGrid |
widget[3], browse and edit the properties of an object |
| ⌊ XrwRibbon |
widget[3], that realizes the ribbon GUI |
| ⌊ XrwRibbonPanel |
gadget[2], organizing command objects for ribbons |
| ⌊ XrwRibbonTab |
gadget[2], arranging XrwRibbonPanel children horiz. |
| ⌊ XrwUniformGrid |
container[2], arranging children in equally sized columns/rows |
| ⌊ XrwViewport |
container[2/3], enabling ***one*** child to scroll |
⌊ XrwShell |
fundamental shell widget[3] |
⌊ XrwOverrideShell |
base popup shell, not interacting with the WM[4] |
| ⌊ XrwBaseCellEditorShell |
popup editor shell[2] base class |
| ⌊ XrwGenericCell-
| EditorShell |
popup editor shell[2] for generic purpose |
| ⌊ XrwRibbonAppMenu |
popup application menu shell[2] of a XrwRibbon |
| ⌊ XrwSimpleMenu |
popup menu shell[2] for XrwSme gadget |
| ⌊ XrwDropDownCell-
| | ∙EditorShell |
popup editor shell[2] for drop down |
| ⌊ XrwSpinMenu |
popup scrollable menu shell of XrwSme gadgets[2] |
| ⌊ XrwToolTipShell |
popup tool tip shell[2] for widgets and gadgets |
⌊ XrwWmShell |
base shell, interacting with the WM[4] |
⌊ XrwApplicationShell |
the common code of an X11 application |
⌊ XrwTransientShell |
base class for popups, interacting with WM[4] |
⌊ XrwDialogShell |
base class for dialogs, interacting with WM[4] |
[1] object = invisible and windowless, uses neither the ***parent*** window nor an ***onw*** window
[2] gadget = uses the ***parent*** window instead of an ***onw*** window, saves resources compared to widget, but can receive events only if forwarded from the widget it is contained in
[3] widget = has an ***onw*** window, can creceive events directly from the WM[4]
[4] WM = Windows Manager
[∅] do not instantiate
A detailed description including API is avalable as a separate HTML documentation and part of the Programming the Roma Widget Set (C# X11) - a zero dependency GUI application framework - Introduction sample application's project Xrw. The subsequent listing is focused on an overview and a short introduction per widget/gadget.
The XrwObject
class is the ultimate base class of the widget set. It is comparable to Athena's "Object".
The X Toolkit Intrinsics's description for "Object" says (X Toolkit Intrinsics Reference Manual):
The Object is the root of the class hierarchy; it does not have a superclass. All objects and widgets are subclasses of Object. Object encapsulates the mechanismus for resource management and is never instanciated.
This class is abstract and can not be instantiated.
Inheritance (↑)
IDisposable --> XrwObject
The XrwFigure
class is the universal base object for simple 2D shapes. Such a class is unknown to Athena and GTK, it's prototype is the System.Windows.Shapes "Shape" class.
The figure object forms the base class for shape elements, such as line, arc, rctangle, rounded rectangle, ellipse, polyline, polygon or path. Path can include quadratic or cubic bezier curves.
This class is typically not instantiated.
The derived classes XrwArcFigure, XrwEllipseFigure, XrwLineFigure and XrwRectangleFigure represent primitive figures according to their names. The derived class XrwPathFigureCollection represents a complex figure. It can consist of multiple sub-figures, various line- and/or curve segments and can be an open or closed figure.
Even if polyline and polygon are not supported by XrwFigure
derived classes, any complexity of polyline and polygon can be created with XrwPathFigureCollection
.
Because XrwArcFigure
, XrwEllipseFigure
, XrwRectangleFigure
and XrwPathFigureCollection
support fill with a tile bitmap, these classes can be used to draw image figures.
The image shows several lines, arcs, rectangles, ellipse, polyline and polygon figures on a XrwCanvas
.
Inheritance (↑)
IDisposable --> XrwObject --> XrwFigure
The XrwRectObject
class is the fundamental base class for rectangle objects. It is comparable to Athena's "RectObj".
The X Toolkit Intrinsics's description for "RectObj" says (X Toolkit Intrinsics Reference Manual):
The RectObj is a direct subclass of Object. It does not have a window, but does have a width, height and location, and encapsulates the mechanismus for geometry management.
RectObj can be subclassed to provide widget-like objects (sometimes called "gadgets") that do not use windows and that do not have features often unused in simple widgets. This can save memory resources both in the server and in applications.
This class is abstract and can not be instantiated.
The image shows the general capabilities of a XrwRectObject
.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject
The XrwVisibleRectObj
class is the fundamental base class for visible rectangle objects. It is comparable to Athena's "unnamed".
This class is abstract and can not be instantiated.
The image shows the general capabilities of a XrwVisibleRectObj
.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj
The XrwCore
class is the universal base object for widgets/gadgets. It is comparable to Athena's "Core".
The Athena's description for "Core" says (X Window System Athena Widgets, Quick Reference Guide):
The core widget forms the basis for all the other widget classes. It is the highest level widget class that can actually be displayed (its parents in the class hierarchy have no windows associated with them, and thus aren’t very interesting from the application programmer’s point of view). The Core widget is sometimes used as a drawing area, but otherwise it is rarely instantiated.
This class is typically not instantiated.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore
The XrwComposite
class is the base object for composites. It is comparable to Xt's "Composite".
The X Toolkit Intrinsics's description for "Composite" says (X Toolkit Intrinsics Reference Manual):
Composite is the superclass of all the classes that can have children. It defines methods for geometry management of those children.
This class is abstract and can not be instantiated.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite
The XrwConstraint
class is the base object for constraints. It is comparable to Xt's "Constraint".
The X Toolkit Intrinsic's description for "Constraint" says (X Toolkit Intrinsics Reference Manual):
Constraint widgets are subclass of Composite. Their name is derved from the fact that they manage the geometry of their children based on constraints associated with each child. These constraints can be as simple as the maximum width and height the parent will allow the child to occupy or as complicated as how other children should change if this child is moved or resized. Constraint widgets let a parent define resources that are supplied for their children. For example, if the Constraint parent defines the maximum sizes for its children, these new size resources are retrieved for each child as if they were resources that were defined by the child widget. Accordingly, constraint resources may be included in the argument list or resource file just like any other resources for the child.
Constraint widgets have all the responsibilities of normal composite widgets and, in addition, must process and act upon the constraint information associated with each of their children.
To make it easy for widgets and the intrinsics to keep track on the constraints associated with a child, every widget has a "constraints" field, which is the address of a parent-specific structure that contains constraint information about the child. If a child's parent is not a subclass of Constraint, then the child's "constraints" filed is NULL.
Note that the constraint data structures are transparent to the child; that is, when a child is managed by a parent that is a subclass of a Constraint widget, there is no difference, as far as the child is concerned, from being managed by a normal Composite widget.
This class is abstract and can not be instantiated.
The image shows the XrwConstraint
derived class XrwGridForm
with four buttons, that demonstrate very well explicit constraints, a XrwConstraint
derived class applies to it's children:
- Button 1:
Row
= 0, Column
= 0, ColumnSpan
= 2 (column 2 has double width)
- Button 2:
Row
= 1, Column
= 0
- Button 3:
Row
= 2, Column
= 0 (row 2 has double height)
- Button 4:
Row
= 1, Column
= 1, RowSpan
= 2
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwConstraint
The XrwShell
class is the fundamental shell widget. It is comparable to Xt's "Shell" widget.
The X Toolkit Intrinsic's description for "Shell" says (X Toolkit Intrinsics Reference Manual):
Shell is a subclass of Composite that handles interactions with the window manager for its single allowed child widget.
Widgets negotiate their size and position with their parent widget (i.e., the widget that directly contains them). Widgets at the top of the hierarchy do not have parent widgets. Instead, they must deal with the outside world. To provide for this, each top-level widget is created as a child of a special widget, called a Shell.
Shells have been designed to be as nearly invisible as possible. Clients have to create them (the top-level widget returned by a call to XtAppInitialize() or XtCreateApplicationContext() is a Shell widget, as is a popup widget created with XtPopup()), but they should never have to worry about their sizes.
If a shell widget is resized from the outside (typically by a window manager), the shell widget also resizes its child widget automatically. Similarly, if the shell's child widget needs to change size, it can make a geometry request to the shell, and the shell negotiates the size change with the outer environment. Clients should never attempt to change the size of their shells directly.
There are seven different types of shells. Only four of these are public (i.e., should be instantiated by applications):
- OverrideShell.
Used for shell windows that completely bypass the window manager (for example, popup menu shells).
- TransientShell.
Used for shell windows that can be manipulated by the window manager but are not allowed to be iconified separately (for example, Dialog boxes that make no sense without their associated application). They are iconified by the window manager only if the main application shell is iconified.
- TopLevelShell.
Used for normal top-level windows (for example, any additional top-level widgets an application needs).
- ApplicationShell.
Used by the window manager to define a separate application instance, which is the main top-level window of the application.
Three classes of shells are internal and should not be instantiated or subclassed:
- Shell.
Provides the base class for shell widgets and the fields needed for all types of shells. Shell is a direct subclass of Composite.
- WMShell.
Contains fields needed by the common window manager protocol.
- VendorShell.
Contains fields used to communicate with vendor-specific window managers.
The class hierarchy for Shell widgets looks as follows:
Shell
⌊ OverrideShell
⌊ WMShell
∙⌊ VendorShell
⌊ TopLevelShell
| ⌊ ApplicationShell
⌊ TransientShell
This class is abstract and can not be instantiated.
The images shows an empty XrwWmShell
(with window decorations) and an empty XrwOverrideShell
(without window decorations).
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwShell
The XrwOverrideShell
class is the base popup shell, not interacting with the windows manager. It is comparable to Xt's "OverrideShell" widget.
The X Toolkit Intrinsic's description for "OverrideShell" says (X Toolkit Intrinsics Reference Manual):
OverrideShell is used for shell windows that completely bypass the window manager, for example, PopupMenu shells.
The XrwOverrideShell
automatically registeres itself on Realize()
to the XrwApplicationShell
's associated shells list (as override shell) to get events forwarded and deregisters itself on Unrealize()
from the XrwApplicationShell
's associated shells list to stop event forwarding.
This class is abstract and can not be instantiated. It must be inherited by an application's popup menu, popup tool tip or popup in-place editor.
The images show the XrwOverrideShell
(without window decorations) derived classes XrwToolTip
(empty), XrwSimpleMenu
(with two menu items), XrwGenericCellEditorShell
(with a XrwText
widget to edit text values) and XrwDropDownCellEditorShell
(with 4 selectable values).
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwShell --> XrwOverrideShell
The XrwWmShell
class is a base shell, interacting with the windows manager. It is comparable to Xt's "WMShell" widget.
The X Toolkit Intrinsic's description for "WMShell" says (X Toolkit Intrinsics Reference Manual):
WMShell is a direct subclass of Shell that provides basic window manager interaction. It should not be instantiated itself; its subclasses TransientShell, TopLevelShell, and ApplicationShell provide additional functionality suitable for particular types of top-level windows.
This class is abstract and can not be instantiated.
The image shows an empty XrwWmShell
.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwCore --> XrwComposite --> XrwShell --> XrwWmShell
The XrwApplicationShell
class is a base shell, interacting with the windows manager. It is comparable to Xt's "ApplicationShell" widget.
The X Toolkit Intrinsic's description for "ApplicationShell" says (X Toolkit Intrinsics Reference Manual):
An ApplicationShell is the normal top-level window for an application. It does not have a parent and is at the root of the widget tree. An application should have only one ApplicationShell, unless the application is implemented as multiple logical applications. Normally, an application will use TopLevelShell widgets for other top-level windows. An ApplicationShell is returned by the call to XtVaAppInitialize(). It can also be created explicitly with a call to XtVaAppCreateShell().
The XrwApplicationShell
also manages application's transient and override shells (that must register/deregister themselfs) to forward events.
This class is abstract and can not be instantiated. It must be inherited by an application's main window.
The image shows the XrwApplicationShell
derived class X11Window of the sample application.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwShell --> XrwWmShell --> XrwApplicationShell
The XrwTransientShell
class is the base class for popups, interacting with the windows manager. It is comparable to Xt's "TransientShell" widget.
The X Toolkit Intrinsic's description for "TransientShell" says (X Toolkit Intrinsics Reference Manual):
TransientShell is used for shell windows that can be manipulated by the window manager, but are not allowed to be iconified separately. For example, DialogBoxes make no sense without their associated application. They are iconified by the window manager only if the main application shell is iconified.
XrwTransientShell
s must always register and deregister themselfs to the superordinated XrwApplicationShell
.
This class is abstract and can not be instantiated. It must be inherited by an application's message, input or dialog window.
The image shows the XrwTransientShell
derived class X11About.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwShell --> XrwWmShell --> XrwTransientShell
A detailed description including API is avalable as a separate HTML documentation and part of the Programming the Roma Widget Set (C# X11) - a zero dependency GUI application framework - Introduction sample application's project Xrw. The subsequent listing is focused on an overview and a short introduction per widget/gadget.
The XrwArcFigure
class represents a simple 2D arc. Such a class is unknown to Athena, Motif and GTK.
The arc object represents a single circular or elliptical arc. The arc is specified by an axis aligned bounding rectangle and two (start and end) angles. The center of the circle or ellipse is the center of the rectangle, the major and minor axes are specified by the width and height.
This class has two public constructors. One of them defines a new XrwArcFigure
on center, radius, startAngle and endAngle with both angles in degrees clockwise relative to the 12 o'clock position. The other one defines a new XrwArcFigure
on box, startAngle and endAngle with both angles in radiants counterclockwise relative to the 3 o'clock position.
Typically a XrwArcFigure
is not a closed figure (except the magnitude between startAngle and endAngle is 360°), but it supports fill anyway.
The image shows two filled arcs on a XrwCanvas
.
Inheritance (↑)
IDisposable --> XrwObject --> XrwFigure --> XrwArcFigure
The XrwEllipseFigure
class represents a simple 2D ellipse. Such a class is unknown to Athena, Motif and GTK.
The ellipse object represents a single ellipsis. The ellipse is specified by an axis aligned bounding rectangle. The center of the ellipse is the center of the rectangle, the major and minor axes are specified by the width and height.
This class has two public constructors. One of them defines a new XrwEllipseFigure
on center and radius. The other one defines a new XrwEllipseFigure
on box.
A XrwEllipseFigure
is always a closed figure and supports fill.
The image shows two filled ellipses on a XrwCanvas
.
Inheritance (↑)
IDisposable --> XrwObject --> XrwFigure --> XrwEllipseFigure
The XrwLineFigure
class represents a simple 2D line. Such a class is unknown to Athena, Motif and GTK.
The line object represents a single line between two points. The line is specified by two (start and end) points.
This class has two public constructors. One of them defines a new XrwLineFigure
on startX, startY, endX and endY coordinates. The other one defines a new XrwLineFigure
on start and end point coordinates.
A XrwLineFigure
is always an open figure and doesn't support fill.
The image shows two lines on a XrwCanvas
.
Inheritance (↑)
IDisposable --> XrwObject --> XrwFigure --> XrwLineFigure
The XrwPathFigureCollection
class represents one or more 2D series of connected lines and curves. Such a class is unknown to Athena, Motif and GTK.
The path figure collection object represents one or more 2D series (figures) of connected lines and curves (segments). Every figure and every of it's segments must be specified separately.
This class has only the default constructor. Any number of X11PathFigures can be added to a path instance and any number of figure segments can be added to a figure instance. Currently the figure segments X11MoveToPathSegment
, X11LineToPathSegment
, X11LinePathSegment
, X11ArcPathSegment
, X11QuadraticBezierPathSegment
and X11CubicBezierPathSegment
are supported.
Typically a XrwPathFigureCollection
is not a closed figure (except the last interpolation point is equal to the first one), but it supports fill anyway.
The images show two popylines on one XrwCanvas
and two filled polygons on another XrwCanvas
.
Inheritance (↑)
IDisposable --> XrwObject --> XrwFigure --> XrwPathFigureCollection
The XrwRectangleFigure
class represents a simple 2D rectangle. Such a class is unknown to Athena, Motif and GTK.
The rectangle object represents a single rectangle. The rectangle is specified by an axis aligned bounding rectangle.
This class has two public constructors. One of them defines a new XrwRectangleFigure
on left, top, width and height coordinates. The other one defines a new rounded XrwRectangleFigure
on left, top, width, height, radiusX and radiusY coordinates.
A XrwRectangleFigure
is always a closed figure and supports fill.
The images show two filled rectangles on one XrwCanvas
and two filled rounded rectangles on another XrwCanvas
. One rectangle demonstrates the image fill and rotation capabilities, that most of the figures provide.
Inheritance (↑)
IDisposable --> XrwObject --> XrwFigure --> XrwRectangleFigure
A detailed description including API is avalable as a separate HTML documentation and part of the Programming the Roma Widget Set (C# X11) - a zero dependency GUI application framework - Introduction sample application's project Xrw. The subsequent listing is focused on an overview and a short introduction per widget/gadget.
The XrwSimple
class is a universal widget. It might be a good superclass to use for application specific widgets to write. It is comparable to Athena's "Simple" widget.
The Athena's description for "Simple" says (X Window System Athena Widgets, Quick Reference Guide):
The Simple widget is not very useful by itself, as it has no semantics of its own. It's main purpose is to be used as a common superclass for the other simple Athena widgets. This widget adds five resources to the resource list provided by the Core widget and its superclasses.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwSimple
The XrwColorChooserComb
class arranges 127 colors and 26 gray shades as comb to choose the desired color. Such a class is unknown to Athena, Motif and GTK, it's prototype is the System.Windows.Forms "ColorDialog" available standard colors tab page.
The XrwColorChooserComb
class is a widget that offers 127 colors and 26 gray shades, all are named X11 colors, to allow the user to choose a predefined color.
This class has no public constructor, but one static factory method. NewColorChooserCombWidget
creates a new XrwColorChooserComb
widget.
The image shows a XrwColorChooserComb
with color moroon highlighted.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwSimple --> XrwColorChooderComb
The XrwImage
class shows, different to the XrwLabel, one image only. It can show a marker, that points to a specific position inside the image. Such a class is unknown to Athena, Motif and GTK, it's prototype is the System.Windows.Forms "ColorDialog" hue and saturation selector.
The XrwImage
shows one image only and, optionally, a position marker.
This class has no public constructor, but two static factory methods. NewImageGadget/NewImageWidget
create a new XrwImage
.
The image shows a XrwImage
with a marker inside the green color range.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwSimple --> XrwImage
The XrwLabelBase
class is the base class for static text display widgets and gadgets.
The XrwLabelBase
class implements the fundamental functionality of a static text display. Such a class is unknown to Athena, Motif and GTK, but there are a lot of Xrw classes, that benefit from the fundamental functionality of a static text display, e.g. XrwLabel
, XrwToggle
, XrwComboBox
or XrwTextSpinButton
.
This class is abstract and can not be instantiated.
The XrwLabelBase
can have different TextOverflowBehaviour
s, that define how to process text overflows:
Clip
just clips the part of the text, that can't be displayed,
Ellipsis
clips the part of the text, that can't be displayed, and draws the ellipsis sign ("..."),
AutolinebreakClip
creates automatic linebreaks, if there is sufficient height, and clips the part of the text, that can't be displayed and
-
AutolinebreakEllipsis
creates automatic linebreaks, if there is sufficient height, clips the part of the text, that can't be displayed, and draws the ellipsis sign ("...").
The image shows the TextOverflowBehaviour.Ellipsis
for a XrwMenuButton
with poped up menu, that shows the complete text.
This version introduces markup, widely comparable with GTK's Pango Markup Language. The root tag of a marked-up text is <markup>
, this allows to use markup and non-markup sections within one text. The supported markup tags are:
<span>
with the attributes
foreground
(an RGB color specification such as '#00FF00' or a color name such as 'red'),
background
(an RGB color specification such as '#00FF00' or a color name such as 'red'),
underline
(the values 'single', 'double' and 'low' are treated the same way like <u>
and the value 'none' is treted like </u>
),
strikethrough
(the value 'true' is treted like <s>
and the value 'false' is treted like </s>
),
style
(the values 'oblique' and 'italic' are treted like <i>
and the value 'normal', is treted like </i>
),
weight
(the values 'bold', 'ultrabold' and 'heavy' are treted like <b>
and the values 'normal', 'light' and 'ultralight' are treted like </b>
),
size
(the value 'larger' is treted like <big>
, the value 'smaller' is treted like <small>
, the values 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large' and 'xx-large' are transferred to the sizes 7, 8, 10, 12, 14, 18 and 24),
<u>
for underline,
<s>
for strikeout,
<i>
for oblige (oblige is more common than italic for X11 fonts/fontsets),
<b>
for bold,
<big>
for a relatively larger font size and
<small>
for a relatively smaller font size.
To process the markup, the text is tranformed into and stored as a styled character array. The styled character array can be transformed back to a markup. This process preferres
<u>
over <span underline="single">
, <span underline="double">
and <span underline="low">
,
</u>
over <span underline="none
">
,
<s>
over <span strikethrough="true
">
,
</s>
over <span strikethrough="false">
,
<i>
over <span style="oblique">
and <span style="italic">
,
</i>
over <span style="normal
">
,
<b>
over <span weight="bold">
, <span weight="ultrabold">
and <span weight="heavy">
,
</b>
over <span weight="normal">
, <span weight="light">
and <span weight="ultralight">
,
<big>
over <span size="larger
">
and
<small>
over <span size="smaller
">
.
Most of the derived classes can utilize the markup, e. g. XrwLabel
(as well as XrwToggle
, XrwRadio
, XrwComboBox
, XrwTextSpinButton
and XrwLabelAndColor
):
The markup to achive this styled text looks like:
string markup = "<markup><i>Hello <b>App</b>!</i>\nWith<span strikethrough=\"true\">out</span> " +
"<span foreground=\"#AA0000\" background=\"#AADDDD\">markup</span>, " +
"<span foreground=\"#006600\" background=\"#DDCCDD\">multi lines</span> " +
"<span underline=\"single\">and</span> " +
"<span foreground=\"#6600AA\" background=\"#DDDDAA\">icons</span>!</markup>"
The markup, transformed back from styled character array, looks like:
"<i><span foreground="#000000">Hello <b>App</b>!</span></i>\n" +
"<span foreground="#000000">With<s>out</s> </span>" +
"<span foreground="#AAAA00" background="#AAAADD">markup</span>" +
"<span foreground="#000000">, </span>" +
"<span foreground="#000066" background="#DDDDCC">multi lines</span>" +
"<span foreground="#000000"> <u>and</u> </span>" +
"<span foreground="#666600" background="#DDDDDD">icons</span>" +
"<span foreground="#000000">!</span>
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwSimple --> XrwLabelBase
The XrwComboBox
class implements a drop down selection calling button widget, that pops up an XrwSpinMenu
via the button press event. It is comparable to Gtk's ComboBoxText.
A XrwComboBox
is a widget that allows the user to choose from a list of valid choices. The XrwComboBox
displays the selected choice. When activated, the XrwComboBox
displays a XrwSpinMenu
popup which allows the user to make a new choice.
This class has no public constructor, but one factory method. NewComboBoxWidget
creates a new XrwComboBox
.
This class incorporates a XrwSpinMenu
to realize the selection popup (creation and disposal is handled automatically).
The image shows a XrwComboBox
with left and right (transparent multicolor) bitmap as well as delimiter and right arrow.
This version introduces markup. See XrwLabelBase for details.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwSimple --> XrwLabelBase --> XrwComboBox
The XrwLabel
class implements a static label. It is comparable to Athena's "Label" widget.
The Athena's description for "Label" says (X Window System Athena Widgets, Quick Reference Guide):
A Label widget holds a graphic, displayed within a rectangular region of the screen. The graphic may be a text string containing multiple lines of characters in an 8 bit or 16 bit character set (to be displayed with a font), or in a multi-byte encoding (for use with a fontset). The graphic may also be a bitmap or pixmap. The Label widget will allow its graphic to be left, right, or center justified. Normally, this widget can be neither selected nor directly edited by the user. It is intended for use as an output device only.
This class has no public constructor, but two factory methods. NewLabelWidget
/NewLabelGadged
create a new XrwLabel
.
Use the XrwLabel
WIDGET in case of of ANY changes (font, text, color, ...) during an uninterrupted display.
Use the XrwLabel
GADGET in case of of NO changes (font, text, color, ...) during an uninterrupted display to safe resources.
The image shows a multi line XrwLabel
with left and right (transparent multicolor) bitmap.
This version introduces four special string constants
TextToArrowString.Up
,
TextToArrowString.Down
,
TextToArrowString.Left
and
TextToArrowString.Right
,
that are - set as the widget/gadget's label - drawn as an arrow instead of a string. This behaviour is applied especially for XrwSpinBox
and XrwSpinMenu
but can also be useful for any other purpose.
This version introduces markup. See XrwLabelBase for details.
This version introduces alternative left and right bitmaps if widget/gadget is insensitive.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwSimple --> XrwLabelBase --> XrwLabel
The XrwCommand
class implements a command button widget, that calls a callback via the clicked event. It is comparable to Athena's "Command" widget.
The Athena's description for "Command" says (X Window System Athena Widgets, Quick Reference Guide):
The Command widget is an area, often rectangular, that contains text or a graphical image. Command widgets are often referred to as ‘‘push buttons.’’ When the pointer is over a Command widget, the widget becomes highlighted by drawing a rectangle around its perimeter. This highlighting indicates that the widget is ready for selection. When mouse button 1 is pressed, the Command widget indicates that it has been selected by reversing its foreground and background colors.
When the mouse button is released, the Command widget’s notify action is invoked, calling all functions on its callback list. If the pointer is moved off of the widget before the pointer button is released, the widget reverts to its normal foreground and background colors, and releasing the pointer button has no effect. This behavior allows the user to cancel an action.
This class has no public constructor, but one factory method. NewCommandWidget
creates a new XrwCommand
.
The first image shows a XrwCommand
with left and right (transparent multicolor) bitmap.
The second image shows typical Gtk2 styled "Cancel" XrwCommand
buttons - one with normal state and one highlighted - with -misc-fixed-
font output, gradient background appearance and frame.
The third image shows "Cancel" XrwCommand
buttons - one with normal state and one highlighted - with -*-helvetica-
font output, flat background appearance (background without gradient) and frameless.
This version introduces markup. See XrwLabelBase for details. The fourth image shows "Cancel" XrwCommand
buttons - one with normal state and one highlighted - with markup text, flat background appearance (background without gradient) and frameless.
To draw a command button with flat appearance, the SetBackgroundFlatHighlighting()
method can be called. To draw a command button with gradient appearance, the SetBackgroundGradientHighlighting()
method can be called. The gradient background appearance is the default.
The markup to achive this styled text looks like:
string markup = "<markup><u>C</u><span foreground=\"#AA0000\" background=\"#AADDDD\">an</span>" +
"<b>c</b><span foreground=\"#6600AA\" background=\"#DDDDAA\">el</span></markup>"
If there is a need to provide an active link, this can be achieved by a flat borderless command button with markup text. The next image shows the same command button with an active link in normal state, highlighted and visited.
The code to achieve this looks like:
XrwCommand activeLink = XrwCommand.NewCommandWidget (hboxSpinNbTab,
"<markup><span foreground=\"#2222FF\">Link</span></markup>", null, false, null, false);
hboxSpinNbTab.AddChild (activeLink);
activeLink.SetBackgroundFlatHighlighting ();
activeLink.FrameType = TFrameType.None;
activeLink.FrameWidth = 0;
activeLink.Clicked += delegate(XrwRectObj source)
{
string label = activeLink.Lines.TotalMarkupText (activeLink.Styles, activeLink.Surface);
activeLink.Label = "<markup>" + label.Replace ("2222FF", "884488") + "</markup>";
};
This version introduces alternative left and right bitmaps if widget/gadget is insensitive.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwSimple --> XrwLabelBase --> XrwLabel --> XrwCommand
The XrwMenuButton
class implements a popup menu calling button widget, that pops up an XrwSimpleMenu
via the button press event. It is comparable to Athena's "MenuButton".
The X Toolkit Intrinsics's description for "MenuButton" says (Athena Widget Set — C Language Interface):
The MenuButton widget is an area, often rectangular, that displays a graphic. The graphic may be a text string containing multiple lines of characters in an 8 bit or 16 bit character set (to be displayed with a font), or in a multi-byte encoding (for use with a fontset). The graphic may also be a bitmap or pixmap.
When the pointer cursor is on a MenuButton widget, the MenuButton becomes highlighted by drawing a rectangle around its perimeter. This highlighting indicates that the MenuButton is ready for selection. When a pointer button is pressed, the MenuButton widget will pop up the menu named in the menuName resource.
This class has no public constructor, but one factory method. NewMenuButtonWidget
creates a new XrwMenuButton
.
This class incorporates a XrwSimpleMenu
to realize the popup menu (creation and disposal is handled automatically).
The image shows a simple XrwMenuButton
with left and right (transparent multicolor) bitmap - including it's poped up menu.
For details about background appearance and frame see XrwCommand
.
This version introduces markup. See XrwLabelBase for details.
This version introduces alternative left and right bitmaps if widget/gadget is insensitive.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore--> XrwSimple --> XrwLabelBase --> XrwLabel --> XrwCommand --> XrwMenuButton
The XrwSme
class implements a simple menu entry gadget. It is comparable to Athena's "SmeBSB" object.
The X Toolkit Intrinsic's description for "SmeBSB" says (Athena Widget Set — C Language Interface):
The SmeBSB object is used to create a menu entry that contains a string, and optional bitmaps in its left and right margins. Since each menu entry is an independent object, the application is able to change the font, color, height, and other attributes of the menu entries, on an entry by entry basis. The format of the string may either be the encoding of the 8 bit font utilized, or in a multibyte encoding for use with a fontSet.
This class has no public constructor, but one factory method. NewSmeGadget
creates a new XrwSme
.
The image shows two XrwSme
with left and right (transparent multicolor) bitmap contained in a XrwDialogShell
poped up from a XrwMenuButton
.
This version introduces markup. See XrwLabelBase for details.
This version introduces alternative left and right bitmaps if widget/gadget is insensitive.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwSimple --> XrwLabelBase --> XrwLabel --> XrwSme
The XrwLabelAndColor
class implements an optional static label and static color rectangle. Such a class is unknown to Athena, Motif and GTK,
The XrwLabelAndColor displays a color filled rectangle and optionally a static text.
This class has no public constructor, but two factory methods. NewLabelAndColorWidget
/NewLabelAndTextGadget
create a new XrwLabelAndColor
.
The image shows a XrwLabelAndColor
with a green filled rectangle and the color name text.
This version introduces markup. See XrwLabelBase for details.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwSimple --> XrwLabelBase --> XrwLabelAndColor
The XrwTextSpinButton
class implements a spin button widget, that can spin text constants via the clicked event. It is roughly comparable to GTK's SpinButton widget, but doesn't spin an integer or floating point number.
The XrwTextSpinButton is the ideal way to allow the user to set the value of some attribute. Rather than having to directly type a string into a XrwText, the XrwTextSpinButton allows the user to click on one of two arrows to increment or decrement the displayed text constant. The user can not type in any text, but has to select one of the predefined text constants.
This class has no public constructor, but two factory methods. NewHTextSpinButton
/NewVTextSpinButton
create a new horizintal/vertical spinning XrwTextSpinButton
.
The image shows a XrwTextSpinButton
with horizontal (left and right) navigators as well as a XrwTextSpinButton
with vertical (top and bottom) navigators.
This version introduces markup. See XrwLabelBase for details.
The markup to achive this styled text looks like:
string markup = "<markup>Sp<b><span foreground=\"#006600\" background=\"#DDCCDD\">in</span> " +
"<span foreground=\"#AA0000\" background=\"#AADDDD\">te</span>" +
"<span foreground=\"#4400CC\" background=\"#DDDDAA\">xt</span></b> " +
"<u>1</u></markup>"
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwSimple --> XrwLabelBase --> XrwSpinButton
The XrwToggle
class implements a toggle button widget. It is comparable to Athena's "Toggle" widget.
The Athena's description for "Toggle" says (X Window System Athena Widgets, Quick Reference Guide):
The Toggle widget is an area, often rectangular, containing a text label or bitmap image. This widget maintains a boolean state (e.g. True/False or On/Off) and changes state whenever it is selected. When the pointer is on the button, the button may become highlighted by drawing a rectangle around its perimeter. This highlighting indicates that the button is ready for selection. When pointer button 1 is pressed and released, the Toggle widget indicates that it has changed state by reversing its foreground and background colors, and its notify action is invoked, calling all functions on its callback list. If the pointer is moved out of the widget before the button is released, the widget reverts to its normal foreground and background colors, and releasing the button has no effect. This behavior allows the user to cancel an action.
This class has no public constructor, but one factory method. NewToggleWidget
creates a new XrwToggle
.
The first image shows three simple XrwToggle
s - one switched on, two switched off - with -misc-fixed-
font output, gradient background appearance and frame.
To draw the toggle buttons witha frame,
- the
FrameType
property can be set to (TFrameTypeExt)XrwTheme.InteractiveFrameType
and the FrameWidth
property can be set to XrwTheme.InteractiveFrameWidth
or
- the
SetButtonAppearance()
method can be called (that sets gradient background appearance as well).
The second image shows the same three XrwToggle
s frameless with -*-helvetica-
font output, flat background appearance (background without gradient) and frameless.
To draw the toggle buttons frameless the FrameType
property can be set to TFrameTypeExt.None
and the FrameWidth
property can be set to 0. The frameless appearance is the default.
This version introduces markup. See XrwLabelBase for details. The third image shows the three XrwToggle
s with markup text, flat background appearance (background without gradient) and frameless.
To draw the toggle buttons with flat background appearance, the SetBackgroundFlatHighlighting()
method can be called. To draw the toggle buttons with gradient background appearance, the SetBackgroundGradientHighlighting()
method can be called. The flat background appearance is the default.
The markup to achive these styled texts looks like:
string markup = "<markup>Toggle <span foreground=\"#AA0000\" background=\"#AADDDD\">test " +
"<u>1</u></span></markup>"
string markup = "<markup>Toggle <span foreground=\"#006600\" background=\"#DDCCDD\">test " +
"<u>2</u></span></markup>"
string markup = "<markup>Toggle <span foreground=\"#6600AA\" background=\"#DDDDAA\">test " +
"<u>3</u></span></markup>"
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwSimple --> XrwLabelBase --> XrwToggle
The XrwRadio
class implements a radio button widget. It is comparable to Gtk's "RadioButton".
Radio buttons are typically grouped by a XrwRadioBox
and at any time only one radio button of a group is set on, all others are set off. A single radio button performs the same basic function as a XrwToggle
.
Every radio button is a member of some group of radio buttons. When one is selected, all other radio buttons in the same group are deselected.
This class has no public constructor, but one factory method. NewRadioWidget
creates a new XrwRadio
.
The first image shows a horizontally oriented XrwRadioBox
with three simple XrwRadio
s - one switched on, two switched off - with -misc-fixed-
font output, gradient background appearance and frame.
To draw the radio buttons with a frame,
- the
FrameType
property can be set to (TFrameTypeExt)XrwTheme.InteractiveFrameType
and the FrameWidth
property can be set to XrwTheme.InteractiveFrameWidth
or
- the
SetButtonAppearance()
method can be called (that sets gradient background appearance as well).
The second image shows the same three XrwRadio
s frameless with -*-helvetica-
font output, flat background appearance (background without gradient) and frameless.
To draw the radio buttons frameless the FrameType
property can be set to TFrameTypeExt.None
and the FrameWidth
property can be set to 0. The frameless appearance is the default.
This version introduces markup. See XrwLabelBase for details. The third image shows the three XrwRadio
s with markup text, flat background appearance (background without gradient) and frameless.
To draw the radio buttons with flat background appearance, the SetBackgroundFlatHighlighting()
method can be called. To draw the radio buttons with gradient background appearance, the SetBackgroundGradientHighlighting()
method can be called. The flat background appearance is the default.
The markup to achive these styled texts looks like:
string markup = "<markup>Radio <span foreground=\"#AA0000\" background=\"#AADDDD\">test " +
"<u>1</u></span></markup>"
string markup = "<markup>Radio <span foreground=\"#006600\" background=\"#DDCCDD\">test " +
"<u>2</u></span></markup>"
string markup = "<markup>Radio <span foreground=\"#6600AA\" background=\"#DDDDAA\">test " +
"<u>3</u></span></markup>"
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwSimple --> XrwLabelBase --> XrwToggle --> XrwRadio
The XrwNotebookTab
class implements a notebook tab button widget. Such a class is unknown to Athena, Motif utilizes push buttons and GTK supports any widget as notebook tab.
Notebook tabs are used only by a XrwNotebook
and at any time only one notebook tab of a notebook is set on, all others are set off. A single notebook tab performs the same basic function as a XrwRadio
.
Every notebook tab is a member of a notebook. When one is selected, all other notebook tabs in the notebook are deselected.
This class has no public constructor, but one factory method NewNotebookTabWidget
creates a new XrwNotebookTab
.
The image shows a notebook with four tabs inside the tab-box ("File", "Dialog test", "Toggle test" and "Radio test"). The first tab "File" is selected and shows the first page inside the page-stack (with the four buttons "File", "Close menu", "Message box" and "Close app").
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwSimple --> XrwLabelBase --> XrwToggle --> XrwRadio --> XrwNotebookTab
The XrwList
class implements a list widget. It is comparable to Athena's "List" widget.
The Athena's description for "List" says (X Window System Athena Widgets, Quick Reference Guide):
The List widget contains a list of strings formatted into rows and columns. When one of the strings is selected, it is highlighted, and the List widget’s Notify action is invoked, calling all routines on its callback list. Only one string may be selected at a time.
This class has no public constructor, but one factory method. NewListWidget
creates a new XrwList
.
The image shows a simple XrwList
with one selected list item. Every list item shows an image and a text.
Starting with this version the XrwList.ListItem
don't contain the display string directly but a bound data object instead (which still can be a System.String
). And the XrwList
class implements the XrwIGridView
interface.
- The
XrwList.ListItem
's bound data object must be a System.Object
to support the ToString()
method for a fallback display member binding.
- The
XrwIGridView
interface enables the list to display multiple columns, even if embedded in a XrwViewport
. A XrwIGridView
defines the columns to display by a XrwGridViewColumnCollection
.
- For easy application and backward compatibility a newly created
XrwList
instance already contains one default XrwGridViewColumn
(inside it's XrwGridViewColumnCollection
) without any display member binding - so the display string falls back to the bound data object's ToString()
method result.
The image shows a XrwList
inside a XrwViewport
containing five columns and column headers with one selected list item. Every list item shows an image and a text inside the Name column. The columns 2 ... 5 are text only columns.
Starting with this version the XrwList
provides the View
property and supports the display of it's list items not only organized as ViewType.Details
but also as ViewType.List
, ViewType.SmallIcon
or ViewType.LargeIcon
.
The next three images demonstrate the new display capabilities.
To be compatible to the Microsoft (R) naming, all "node" namings have been changed to "item" namings. This affects:
XrwList.ListNode
==> XrwList.ListItem
Nodes
==> Items
NodeCommandInvoke
==> ItemCommandInvoke
OnNodeCommandInvoke
==> OnItemCommandInvoke
FindListNode() ==>
FindListItem()
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwSimple --> XrwList
The XrwRange
class implements common funftionality for XrwScale
and XrwScrollbar
widgets. It is comparable to GTK's "Range".
The GTK's description for "Range" says:
The GtkRange is a base class for widgets which visualize an adjustment.
This class is abstract and can not be instantiated.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwSimple --> XrwRange
The XrwScale
class implements a slider widget. It is comparable to GTK's "Scale".
The GTK's description for "Scale" says:
The GtkScale is a slider control used to select a numeric value. To use it, you'll probably want to investigate the methods on its base class, GtkRange, in addition to the methods for GtkScale itself.
...
This class has no public constructor, but two factory methods. NewHScaleWidget
/NewVScaleWidget
create a new XrwScale
.
The image shows a horizontally oriented XrwScale
.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwSimple --> XrwRange --> XrwSale
The XrwScrollbar
class implements a scroll bar widget. It is comparable to Athena's "Scrollbar".
The Athena's description for "Scrollbar" says (X Window System Athena Widgets, Quick Reference Guide):
The Scrollbar widget is a rectangular area containing a slide region and a thumb (also known as a slide bar). A Scrollbar can be used alone, as a value generator, or it can be used within a composite widget (for example, a Viewport). A Scrollbar can be oriented either vertically or horizontally.
When a Scrollbar is created, it is drawn with the thumb in a contrasting color. The thumb is normally used to scroll client data and to give visual feedback on the percentage of the client data that is visible.
...
While scrolling is in progress, the application receives notification through callback procedures.
...
To use the XrwScrollbar
class with all it's features, methods on its base class, XrwRange
, in addition to the methods for XrwScrollbar
itself are required.
The XrwScrollbar
supports continuous scrolling through auto repeat of ButtonPress
event.
Permanent pointer button press on up or down button repeat the step move.
Permanent pointer button press on the slide region repeat the page move.
This class has no public constructor, but two factory methods. NewHScrollWidget
/NewVScrollWidget
create a new XrwScrollbar
.
The image shows a horizontally oriented XrwScrollbar
.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwSimple --> XrwRange --> XrwScrollbar
The XrwRibbonCommandBase
is the base class for objects within the ribbon, calling a callback via button press event or clicked event. Such a class is unknown to Athena, Motif and GTK.
Because the ribbon is implemented as one integral widget, almost all of its children (including the ribbon command base) are implemented as gadgets. The ribbon command base consolidates the common functionality of ribbon children, that call a callback.
This class is abstract and can not be instantiated.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwSimple --> XrwRibbonCommandBase
The XrwRibbonButton
is a command button gadget to be used within the ribbon, that calls a callback via the click event. Because it is a gadget, it's ribbon is responsible for any event processing (highlight, button press, expose, ...). Such a class is unknown to Athena, Motif and GTK.
Because the ribbon is implemented as one integral widget, almost all of its children (including the ribbon button) are implemented as gadgets. The ribbon buttom is a ribbon child, that provides the functionality of a command button to the ribbon.
A XrwRibbonButton
can be displayed in different size modes, according to it's CurrentSizeMode
property.
RibbonPanelSizePolicy.Large
displays the XrwRibbonButton
with a 32px x 32px image and the label text beneath the image.
RibbonPanelSizePolicy.Medium
displays the XrwRibbonButton
with a 16px x 16px image and the label text aside the image.
RibbonPanelSizePolicy.Small
displays the XrwRibbonButton
with a 16px x 16px image and no label text.
This class has no public constructor, but one factory method. NewRibbonButton
creates a new XrwRibbonButton
.
The image shows two XrwRibbonPanel
s including the dialog launcher right beside the ribbon panel's label, one XrwRibbonPanel
containing three XrwRibbonButton
s with CurrentSizeMode
== RibbonPanelSizePolicy.Large
and another XrwRibbonPanel
containing three XrwRibbonButton
s with CurrentSizeMode
== RibbonPanelSizePolicy.Medium
. The first ribbon button is focused.
the XrwRibbonButton
can adopt it's size, if XrwRibbonTab
has insufficient width to display all XrwRibbonButton
s within all XrwRibbonPanel
s with it's PreferredSizeMode
.
Rule 1A) The first attempt to reduce the XrwRibbonButton
's PreferredSizeMode
is always made for the XrwRibbonButton
s within the rightmost XrwRibbonPanel
.
Rule 1B) If no reduction is applicable or if reduction is insufficient, the next attempt is made to the XrwRibbonButton
s within the next previous (from right to left) XrwRibbonPanel
. As long as reduction is not applicable or insufficient, every next attempt is made to the XrwRibbonButton
s within the next previous XrwRibbonPanel
until the first panel has been reached.
Rule 1C) If no reduction has been applicable or if all reductions have been insufficient, the contents of the XrwRibbonTab
is clipped.
Rule 2A) In the case of a XrwRibbonTab
has insufficient width, the XrwRibbonTab
tries to reduce the XrwRibbonButton
's CurrentSizeMode
from RibbonPanelSizePolicy.Large
to RibbonPanelSizePolicy.Medium
if applicable.
Rule 2B) Otherwise from RibbonPanelSizePolicy.Medium
to RibbonPanelSizePolicy.Small
if applicable.
The ruleset 1 has priority over the ruleset 2. That means precise, that rule 1B forces the application to apply rule 2A for all XrwRibbonPanel
s (from right to left) before it forces rule 2B to any XrwRibbonPanel
.
Rule 3A) The reduction of the XrwRibbonButton
's PreferredSizeMode
from RibbonPanelSizePolicy.Large
to RibbonPanelSizePolicy.Medium
is not applicable, if the XrwRibbonPanel
contains only two or less XrwRibbonButton
s.
Rule 3B) The reduction of the XrwRibbonButton
's PreferredSizeMode
from RibbonPanelSizePolicy.Medium
to RibbonPanelSizePolicy.Small
is not applicable, if either the XrwRibbonPanel
contains only three or less XrwRibbonButton
s or if the XrwRibbonPanel
contains any XrwRibbonSplitButton
.
The image shows the application of the rules to a sample XrwRibbonTab
step by step.
|
No width reduction is required.
Application of rules 1A and 2A to the rightmost panel.
Application of rules 1B and 2A to the next previous (from right to left) panel. (Rule 3B doesn't match for 4 buttons.)
Application of rules 1A and 2B to the left panel.
(Rule 3A doesn't match for 3 buttons.)
Application of rules 3B and 1C. |
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwSimple --> XrwRibbonCommandBase --> XrwRibbonButton
The XrwRibbonSplitButton
is a split button gadget to be used within the ribbon, that pops up a menu via the button press event. Because it is a gadget, it's ribbon is responsible for any event processing (highlight, button press, expose, ...). Such a class is unknown to Athena, Motif and GTK.
Because the ribbon is implemented as one integral widget, almost all of its children (including the ribbon split button) are implemented as gadgets. The ribbon split buttom is a ribbon child, that provides the functionality of a menu button to the ribbon.
A XrwRibbonSplitButton
can be displayed in different size modes, according to it's CurrentSizeMode
property.
RibbonPanelSizePolicy.Large
displays the XrwRibbonButton
with a 32px x 32px image. The label text and the arror are beneath the image.
RibbonPanelSizePolicy.Medium
displays the XrwRibbonButton
with a 16px x 16px image. The label text and the arror are aside the image.
This class has no public constructor, but one factory method. NewRibbonSplitButton
creates a new XrwRibbonSplitButton
.
The image shows two XrwRibbonPanel
, one XrwRibbonPanel
with one XrwRibbonSplitButton
on CurrentSizeMode
== RibbonPanelSizePolicy.Large
and another XrwRibbonPanel
with one XrwRibbonSplitButton
on CurrentSizeMode
== RibbonPanelSizePolicy.Medium
. The second ribbon split button has been clicked and shows it's popup menu.
the XrwRibbonSplitButton
can adopt it's size, if XrwRibbonTab
has insufficient width to display all XrwRibbonSplitButton
s within all XrwRibbonPanel
s with it's PreferredSizeMode
.
Rule 1A) The first attempt to reduce the XrwRibbonButton
's PreferredSizeMode
is always made for the XrwRibbonSplitButton
s within the rightmost XrwRibbonPanel
.
Rule 1B) If no reduction is applicable or if reduction is insufficient, the next attempt is made to the XrwRibbonSplitButton
s within the next previous (from right to left) XrwRibbonPanel
. As long as reduction is not applicable or insufficient, every next attempt is made to the XrwRibbonSplitButton
s within the next previous XrwRibbonPanel
until the first panel has been reached.
Rule 1C) If no reduction has been applicable or if all reductions have been insufficient, the contents of the XrwRibbonTab
is clipped.
Rule 2) In the case of a XrwRibbonTab
has insufficient width, the XrwRibbonTab
tries to reduce the XrwRibbonSplitButton
's CurrentSizeMode
from RibbonPanelSizePolicy.Large
to RibbonPanelSizePolicy.Medium
if applicable.
Rule 3) The reduction of the XrwRibbonButton
's PreferredSizeMode
from RibbonPanelSizePolicy.Large
to RibbonPanelSizePolicy.Medium
is not applicable, if the XrwRibbonPanel
contains only two or less XrwRibbonSplitButton
s.
The image shows the application of the rules to a sample XrwRibbonTab
step by step.
|
No width reduction is required.
Application of rules 1A and 2 to the right panel.
Application of rules 1B and 2 to the left panel.
Application of rule 1C. |
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwSimple --> XrwRibbonCommandBase --> XrwRibbonButton --> XrwRibbonSplitButton
The XrwRibbonControlGroup
is a gadget to be used within the ribbon, that organizes a group of interactive control group nodes and calls a callback via the click event. Because it is a gadget, it's ribbon is responsible for any event processing (highlight, button press, expose, ...). Such a class is unknown to Athena, Motif and GTK.
Because the ribbon is implemented as one integral widget, almost all of its children (including the ribbon control group) are implemented as gadgets. The ribbon control group is a ribbon child, that provides the functionality of a radio box to the ribbon. Different to the XrwRadioBox
it also permits to handle toggle and exclusive toggle buttons.
The XrwRibbonControlGroup
introduces four internal classes to provide radio, toggle and exclusive toggle buttons:
XrwRibbonControlGroupNode
is the abstract base calss for radio, toggle and exclusive toggle button within a XrwRibbonControlGroup
.
XrwRibbonControlGroupRadioNode
is derived from the abstract XrwRibbonControlGroupNode
base calss and behaves like a radio button (switches all other radio buttons of it's control group off, if switchted on).
XrwRibbonControlGroupToggleNode
is derived from the abstract XrwRibbonControlGroupNode
base calss and behaves like a toggle button (can be switched on and off indipendently from the state of other toggle buttons of it's control group).
XrwRibbonControlGroupExclusiveToggleNode
is derived from the abstract XrwRibbonControlGroupNode
base calss and behaves like a combination of a toggle button (can be switched off indipendently from the state of other toggle buttons of it's control group) and a radio button (switches other toggle buttons of it's control group off, if switchted on).
XrwRibbonControlGroupRadioNode
s, XrwRibbonControlGroupToggleNode
s and XrwRibbonControlGroupExclusiveToggleNode
s can be used within the same XrwRibbonControlGroup
.
In this case XrwRibbonControlGroupRadioNode
s only influence XrwRibbonControlGroupRadioNode
s and XrwRibbonControlGroupExclusiveToggleNode
s only influence XrwRibbonControlGroupToggleNode
s and XrwRibbonControlGroupExclusiveToggleNode
s.
This class has no public constructor, but one factory method. NewRibbonControlGroup
creates a new XrwRibbonControlGroup
.
The image shows two XrwRibbonPanel
s, each of them with two XrwRibbonControlGroup
s. The first XrwRibbonPanel
's upper XrwRibbonControlGroup
contains four (align horizontal left, align horizontal center, align horizontal justify and align horizontal right) and the lower XrwRibbonControlGroup
contains three (align vertical top, align vertical middle, align vertical bottom) XrwRibbonControlGroupRadioNode
s. The second XrwRibbonPanel
's upper XrwRibbonControlGroup
contains three (markup bold, markup italic and markup underline) XrwRibbonControlGroupToggleNode
s and the lower XrwRibbonControlGroup
contains two (position subscript, position superscript) XrwRibbonControlGroupExclusiveToggleNode
s.
At any time exactly one horizontal alignment and one vertical alignment is selected (this is realized by XrwRibbonControlGroupRadioNode
s). The three available markups permit any number (0 ... 3) of them to be selected (this is realized by XrwRibbonControlGroupToggleNode
s ). And the two positions permit none or one of them to be selected (this is realized by XrwRibbonControlGroupExclusiveToggleNode
s).
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwSimple --> XrwRibbonCommandBase --> XrwRibbonControlGroup
The XrwText
class implements a single line text edit widget. It's prototype is a simplified Athena's "Text" widget.
The XrwText
is a widget, used to render and edit text.
The XrwText
can validate the text using regular expression and exchange text data via clipboard.
Successfully tested are these text transfers:
- MS Notepad (Win7), Notepad++ (V. 6.4.5), MS Write (Win7), MS WinWord 2013 ==>
XrwText
XrwText
==> MS Notepad (Win7), Notepad++ (V. 6.4.5), MS Write (Win7), MS WinWord 2013
XrwText
==> XrwText
- gedit (V. 2.30.20), Leafpad (V. 0.8.17) ==>
XrwText
XrwText
==> gedit (V. 2.30.20), Leafpad (V. 0.8.17)
- KWrite (V. 4.4.4), Kate (V. 3.4.4) ==>
XrwText
XrwText
==> KWrite (V. 4.4.4), Kate (V. 3.4.4)
Note: Currently all text transfers use the X11 ICCCM selection mechanism with CLIPBOARD selection and STRING format. This includes the restriction, that copy source widget/gadget and copy target widget/gadget must both be alive during text transfer - there is no clip data buffer in X11 as it is known from Windows.
This class has no public constructor, but one factory method. NewTextWidget
creates a new XrwText
.
The image shows a simple XrwText
including a selection of two letters and the caret.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwSimple --> XrwText
The XrwTree
class implements a tree widget. It is not comparable to Athena's "Tree" widget.
The Athena's description for "Tree" says (X Window System Athena Widgets, Quick Reference Guide):
The Tree widget provides geometry management of arbitrary widgets arranged in a directed, acyclic graph (i.e., a tree). The hierarchy is constructed by attaching a constraint resource called treeParent
to each widget indicating which other node in the tree should be treated as the widget's superior. The structure of the tree is shown by laying out the nodes in the standard format for tree diagrams with lines drawn connecting each node with its children.
The Tree calculates it's size according to the needs of its children and is not intended to be resized by its parent. Instead, it should be placed inside another composite widget (such as the Porthole
or Viewport
) that can be used to scroll around in the tree.
Instead it is comparable to Gtk's "Tree".
The GtkTree widget is a container that shows users a list of items, in a tree format complete with branches and leafnodes. Branches can be expanded to show their child items, or collapsed to hide them.
This class has no public constructor, but one factory method. NewTreeWidget
creates a new XrwTree
.
The image shows a simple XrwTree
with one selected tree node. Every tree node (branch and leaf) shows the expander (), an image and a text.
Starting with this version the XrwTree.TreeNode
don't contain the display string directly but a bound data object instead (which still can be a System.String
). And the XrwTree
class implements the XrwIGridView
interface.
- The
XrwTree.TreeNode
's bound data object must be a System.Object
to support the ToString()
method for a fallback display member binding.
- The
XrwIGridView
interface enables the tree to display multiple columns, even if embedded in a XrwViewport
. A XrwIGridView
defines the columns to display by a XrwGridViewColumnCollection
.
- For easy application and backward compatibility a newly created
XrwTree
instance already contains one default XrwGridViewColumn
(inside it's XrwGridViewColumnCollection
) without any display member binding - so the display string falls back to the bound data object's ToString()
method result.
The image shows a XrwTree
inside a XrwViewport
containing five columns and column headers with one selected tree node. Every tree node (branch and leaf) shows the expander, an image and a text inside the Name column. The columns 2 ... 5 are text only columns.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwSimple --> XrwTree
The XrwViewportGridViewHeader
class implements a header widget for XrwViewPort
children, displaying a grid view. Such a class is unknown to Athena, Motif and GTK.
The XrwViewportGridViewHeader is an integral part of the XrwViewport widget - it will be created and destroed by the XrwViewport automatically. The XrwViewportGridViewHeader is responsible for the display of the column header names of an XrwViewport's child. It supports column resizing and reordering.
The XrwViewportGridViewHeader
has no internal header data. It takes the header data from the XrwIGridView
's Child
instead. Only for a XrwIGridView
's Child
implementing the XrwIGridView
interface, the XrwViewportGridViewHeader
shows column header names, otherwise it remains empty. Irrespective whether the XrwIGridView
's Child
is implementing the XrwIGridView
interface, the header can be visible, hidden or collpsed, controlled by the XrwViewPort.HeaderVisibility
property, and the header's preferred size can be defined, controlled by the XrwViewPort.HeaderPreferredHeight
property.
Currently the XrwList
and XrwTree
implement the XrwIGridView
interface.
The image shows a XrwViewportGridViewHeader
displaying 4 header names.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwSimple --> XrwViewportGridViewHeader
Composite widgets
The XrwBox
class arranges children horizontally or vertically. It is comparable to GTK's Box. It is not comparable to Athena's "Box", that only moves but does not resize its children.
The XrwBox
class is a sublass of XrwConstraint
. It evaluates its children's constraints ExpandToAvailableHeight
, ExpandToMaxSiblingHeight
, ExpandToAvailableWidth
, and ExpandToMaxSiblingWidth
and resizes the children, if apprpriate.
This class has no public constructor, but four static factory methods. NewHBoxWidget
/NewHBoxGadged
create a new XrwBox
with horizontally oriented cild placement, NewVBoxWidget
/NewVBoxGadged
create a new XrwBox
with vertically oriented child placement.
The image shows two horizontally oriented XrwCommand
cildren inside a XrwBox
. The child align is 1.0.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwConstraint --> XrwBox
The XrwHslColorPanel
class arranges a bitmap for hue and saturation selection and a scrollbar for lightness selection. Such a class is unknown to Athena, Motif and GTK, it's prototype is the System.Windows.Forms "ColorDialog" custom colors tab page HSL custom color selection.
The XrwHslColorPanel
class is a gadget that allows the user to choose a custom color value from hue, saturation and lightness color components.
This class has no public constructor, but one static factory method. NewHslColorPanelGadget
creates a new XrwHslColorPanel
.
The image shows a XrwHslColorPanel
with color white selected.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwConstraint --> XrwBox --> XrwHslColorPanel
The XrwNotebook
class arranges children on pages. It is comparable to GTK's Notebook.
The XrwNotebook
class is a sublass of XrwConstraint
whose children are pages that can be switched between, using tab labels along one edge.
This class has no public constructor, but two static factory method. NewTopTabedNotebookGadget
creates a new XrwNotebook
where tabs are placed on the top. NewBottomTabbedNotebookGadget
creates a new XrwNotebook
where tabs are placed at the bottom.
This class introduces four special constants
CaptionbarPosition.Top
,
CaptionbarPosition.Left
,
CaptionbarPosition.Right
and
CaptionbarPosition.Bottom
,
that define the position of the notebook's caption bar.
The next image shows a notebook with four CaptionbarPosition.Top
tabs inside the tab-box ("File", "Dialog test", "Toggle test" and "Radio test"). The first tab "File" is selected and shows the first page inside the page-stack (with the four buttons "File", "Close menu", "Message box" and "Close app").
The next image shows a notebook with five CaptionbarPosition.Bottom
tabs inside the tab-box ("Menu", "Toggle", "Radio", "Spin" and "Edit"). The fourth tab "Spin" is selected and shows the fourth page inside the page-stack (with one text spin button "Spin text 1" and a combo box "A", that has a spin menu).
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwConstraint --> XrwBox --> XrwNotebook
The XrwRadioBox
class arranges XrwRadio
children horizontally or vertically. It is comparable to GTK's representation of groups of radio buttons, that has no frame.
The XrwRadioBox
class is a sublass of XrwConstraint
that realizes that only one of its radio button children can be selected at any time.
This class has no public constructor, but two static factory methods. NewHRadioBoxGadget
creates a new XrwRadioBox
with horizontally oriented cildren, NewVRadioBoxGadget
creates a new XrwRadioBox
with vertically oriented children.
The image shows a horizontally oriented XrwRadioBox
with three radio buttons.
Inheritance (↑)
IDisposable -->XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwConstraint --> XrwBox --> XrwRadioBox
The XrwSpinBox
class arranges children horizontally or vertically like the XrwBox
class, but it can hide children to meet the requested qeometry. It's prototype is the GTK Nautilus (file manager) path bar.
The XrwSpinBox
class is a sublass of XrwConstraint
that can organize more children than displayable on its visible area. In that case it can spin invisible children to the visible area and visible children to the invisible area - wherefore it shows two spin navigators (forth and back) dynamically, if required.
This class has no public constructor, but four static factory methods. NewHSpinBoxWidget
/NewHSpinBoxGadget
creates a new XrwSpinBox
with horizontally oriented cild placement, NewVSpinBoxWidget
/NewVSpinBoxGadget
creates a new XrwSpinBox
with vertically oriented child placement.
The image shows a horizontally oriented XrwSpinBox
with back and fore navigators and eight buttons.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwConstraint --> XrwBox --> XrwSpinBox
The XrwCanvas
class arranges child figures based of offset constraints. Such a class is unknown to Athena, Motif and GTK, it's prototype is the GTK extension "crcanvas" class or the "GnomeCanvas" class but without scrolling.
The canvas widget/gadget offers an engine for structured (mainly vector) graphics (such as line, arc, rctangle, rounded rectangle, ellipse, polyline, polygon or path) drawing and easy coordinate manipulation.
This class has no public constructor, but two factory methods. NewCanvasWidget
/NewCanvasGadged
create a new XrwCanvas
.
Use the XrwCanvas
WIDGET in all typical use cases.
Use the XrwCanvas
GADGET in case of very low event processing.
The image shows a canvas with some drawing primitives (lines, arcs with solid fill and hatch fill, rctangles with solid fill and tile fill, rounded rectangle with hatch, ellipse without fill, polyline without fill and polygon with hatch fill).
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwConstraint --> XrwCanvas
The XrwDockPanel
class arranges children into up to five regions - top, bottom, left or right of the dock panel or filling the remaining space. This makes it a great choice in many situations, where a window is to divide into specific areas. It can replace nested XrwBox
layouts. Such a class is unknown to Athena, Motif and GTK, it's prototype can be WPF's "DockPanel".
The dock panel evaluates its children's dock style constraints to dock them at top, left, right, bottom or to fill the remaining space and resizes the children, if appropriate.
This class has no public constructor, but a static factory method. NewDockPanelGadget
creates a new XrwDockPanel
.
The image shows a XrwDockPanel
with all five dock positions occupied.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwConstraint --> XrwDockPanel
The XrwFrame
class arranges just one single child within a decorative frame. It is comparable to GTK's Frame.
The GTK manpage's description for "Frame" says:
A bin with a decorative frame and optional label.
Currently no label is supported.
This class has no public constructor, but two static factory methods. NewFrameWidget
/NewFrameGadget
create a new XrwFrame
.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwConstraint --> XrwFrame
The XrwGridForm
class arranges children using a grid of predefined columns and rows. It is comparable to Motif's "Form" widget but doesn't support alignment with reference to the form's edges or to each other.
The LessTif manpage's description for "Form" says (LessTif Manual):
XmForm is a widget which allows you to specify complicated geometries. The widget is capable of aligning children widgets with reference to each other. Widgets can be linked to each other's positions, hooked to a fixed place, or hooked to the form's edges. Positioning can be relative as well as absolute.
The algorithm used to lay out the children is an iterative one. In development versions of LessTif, the amount of iterations that the widget supports before it wants to have reached a steady state is 200. OSF/Motif® uses a much higher number than this; if the low number in LessTif gives you trouble (it generates a warning message mentioning "bailout") then either the number is too low or you've discovered a bug.
Instead of Motif's XmNfractionBase
resource it supports columns and rows with fixed dimension, by calling AddColumn(
"128")
or AddRow(
"256")
, and dynamic dimension, by calling AddColumn(
"1.0*")
or AddRow(
"1.5*")
. Fixed dimensions expect an integer value (in pixels) and dynamic dimensions expect a float followed by "*" (to be multiplied with the remaining available dimension). Fixed dimensions and dynamic dimensions can be used through the same form widget in parallel. XrwGridForm
does not calculate the position of it's children iterative, but in one single pass.
This class has no public constructor, but one static factory method. NewGridFormGadget
creates a new XrwGridForm
.
The image shows a XrwGridForm
with two dynamic columns ("1.0*" and "2.0*") and three rows (static "36" pixels, dynamic "1.0*" and "1.5*"). Four simple button widgets show column span (no. 1), row span (no. 4) and margin (no 1 ... no. 4).
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwConstraint --> XrwGridForm
The XrwColorSelectorGridForm
class arranges XrwLabelAndColor
children using a grid of predefined columns and rows. It is intended to be created as widget, to hold the children as gadgets (to save memory and X server communication) and to forward the events to it's children. The layout is taken unchanged from it's base class XrwGridForm. Such a class is unknown to Athena, Motif and GTK, it's prototype is the System.Windows.Forms "ColorDialog" available standard colors tab page color picker grid.
XmColorSelecrorGridForm is a widget that offers a grid of selectable predefined colors.
This class has no public constructor, but several static factory methods. NewColorSelectorGridForm16
creates a new XrwColorSelectorGridForm
for 16 selectable predefined colors. NewColorSelectorGridForm140
creates a new XrwColorSelectorGridForm
for 140 selectable predefined colors (thre are 140 named colors defined for X11).
The image shows a XrwColorSelectorGridForm
with 2 columns (static width) and 8 rows (static height) containing 16 XrwLabelAndColor
children, each displaying a color rectangle and the color name.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwConstraint --> XrwGridForm --> XrwColorSelectorGridForm
The XrwCustomColorChooserGridForm
class arranges it's children XrwHslColorPanel
and XrwHslColorPanel
using a grid of predefined columns and rows. It is comparable to parts of GTK's "ColorSelection" widget, but it's prototype is the System.Windows.Forms "ColorDialog" user defined colors tab page.
XmColorSelecrorGridForm is a gadget to choose a custom color via HSL or RGB color model.
This class has no public constructor, but one static factory method. NewCustomColorChooserGridForm
creates a new XrwCustomColorChooserGridForm
.
The image shows a XrwCustomColorChooserGridForm
with the XrwHslColorPanel
choose a custom color via HSL color model and the XrwHslColorPanel
choose a custom color via RGB color model .
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwConstraint --> XrwGridForm --> XrwCustomColorChooserGridForm
The XrwRgbColorPanel
class arranges a label, a scrollbar and an editor for each of the three color components red, green and blue. Such a class is unknown to Athena, Motif and GTK, it's prototype can be one of the many free color pickers on the internet.
The XrwRgbColorPanel
class is a gadget that allows the user to choose a custom color value from red, green and blue color components.
This class has no public constructor, but one static factory method. NewRgbColorPanelGadget
creates a new XrwRgbColorPanel
.
The image shows a XrwRgbColorPanel
with color white selected.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwConstraint --> XrwGridForm --> XrwRgbColorPanel
The XrwPaned
class arranges children tiled and allows to change their size. It is comparable to Athena's "Paned" widget already including the appropriate Athena "Grip" widget.
The X Toolkit Intrinsics's description for "Paned" says (X Toolkit Intrinsics Reference Manual):
The Paned widget manages children in a vertically or horizontally tiled fashion. The panes may be dynamically resized by the user by using the grips that appear near the right or bottom edge of the border between two panes.
When the pointer is positioned on a grip and pressed, an arrow is displayed that indicates the pane that is being resized. While keeping the pointer button down, the user can move the pointer up and down (or left and right). This, in turn, changes the border between the panes, causing one pane to shrink and some other pane (or panes) to grow. The size of the Paned widget will not change. The Paned widget may accept any widget class as a pane except Grip. Grip widgets have a special meaning for the Paned widget, and adding a Grip as its own pane will confuse the Paned widget.
This class has no public constructor, but two static factory methods. NewHPanedWidget
or NewVPanedWidget
create a new horizontally or vertically oriented XrwPaned
.
The image shows a horizontally oriented XrwPaned
with one XrwTree
and one XrwPropertyGrid
.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwConstraint --> XrwBox --> XrwPaned
The XrwPorthole
class arranges children stacked, but displays only one child at any time. It's prototype is Athena's "Porthole" widget.
The X Toolkit Intrinsics's description for "Porthole" says (X Toolkit Intrinsics Reference Manual):
The Porthole widget provides geometry management of a list of arbitrary widgets, only one of which may be managed at any particular time. The managed child widget is reparented within the porthole and is moved around by the application (typically under the control of a Panner widget).
The Porthole widget allows its managed children to request any size that is as large or larger than the Porthole itself and any location so long as the child still obscures all of the Porthole.
This class has no public constructor, but one static factory methods. NewPortholeGadget
creates a new XrwPorthole
.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwConstraint --> XrwPorthole
The XrwPropertyGrid
class enables browsing and editing the properties of an object. It's prototype is System.Windows.Forms "PropertyGrid" control.
A property grid widget is similar to a normal two-column tree widget, except that it provides only two levels of hierarchy (branch nodes and leaf nodes) and leaf nodes are editable. Leaf node editors can support text values, dropdown lists, filename browsers or pretty much other type imaginable.
The PropertyGrid widget displays the properties of a given object (class instance) grouped into categories allowing to edit these properties. The object's properties that are to display and edit are determined using reflection.
The XrwPropertyGrid
is more or less a wrapper around a specific configured XrwTree widget with some additional functionality. This includes:
- a title area displaying the type and name of the currently assigned object
- the two-column tree with edit capabilities for the leaf nodes at the second column
- a description area displaying the name and description of the currently selected property
This class has no public constructor, but one static factory method. NewPropertyGridWidget
creates a new XrwPropertyGrid
.
The image shows an XrwPropertyGrid
with two categories (branch nodes "Default" and "Demonstation"), two text properties (leaf nodes "Name" and "Col2"), one boolean property ( leaf node"Col5"), one three-state property (leaf node "Col6") and one enumeration property (leaf node "Col7"). All leaf nodes are editable. Currently the enumeration property (leaf node "Col7") is in edit mode.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwConstraint --> XrwPropertyGrid
The XrwRibbon
is a command bar that organizes the features of an application into a series of tabs at the top of the application window. The ribbon replaces the traditional menu bar and toolbars. The ribbon UI has a better discoverability of features and functions, enables a quicker learning of the application, and makes users feel more in control of their experience with the application.
A ribbon is made up of several components. Every ribbon has an application menu and an arbitrary number of ribbon tabs. Ribbon tabs contain panels and each panel contains command controls. Related command controls can be combined into control groups. Such a class is unknown to Athena, Motif and GTK.
The XrwRibbon
has a fixed height and should always expand to the window's full width.
This class has no public constructor, but a static factory method. NewRibbonWidget
creates a new XrwRibbon
instance, that already contains an XrwRibbonAppMenu
and is ready to accept XrwRibbonTab
children.
The image shows a XrwRibbon
with application menu button () and three tabs, "Dialog test", "Radio & toggle test" as well as "Split test". The first tab is selected and contains two ribbon panels. Each panel contains three ribbon buttons - the first panel," Large buttons", shows the dialog launcher right beside the ribbon panel's label and it's buttons with CurrentSizeMode
== RibbonPanelSizePolicy.Large
, the second panel, "Medium buttons", shows as well the dialog launcher right beside the ribbon panel's label and it's buttons with CurrentSizeMode
== RibbonPanelSizePolicy.Medium
.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwConstraint --> XrwRibbon
The XrwRibbonPanel
is the second highest level of application command control arrangement and groups command controls into related sets inside a ribbon tab. The descriptive ribbon panel's label explains the common purpose of its command controls. Such a class is unknown to Athena, Motif and GTK.
Because the ribbon is implemented as one integral widget, almost all of its children (including the ribbon panel) are implemented as gadgets. The ribbon panel is a ribbon child, that provides the functionality of a labeled frame to the ribbon.
The XrwRibbonPanel
has a fixed height and expands to the requested width according it's children. The XrwRibbonPanel
shows a dialog launcher (), if the ribbon panel has a ButtonRelease
event handler registered.
This class has no public constructor, but a static factory method. NewRibbonPanelGadget
creates a new empty XrwRibbonPanel
instance.
The image shows two XrwRibbonPanel
s including the dialog launcher right beside the ribbon panel's label, one XrwRibbonPanel
containing three XrwRibbonButton
s with CurrentSizeMode
== RibbonPanelSizePolicy.Large
and another XrwRibbonPanel
containing three XrwRibbonButton
s with CurrentSizeMode
== RibbonPanelSizePolicy.Medium
. The first ribbon button is focused.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwConstraint --> XrwRibbonPanel
The XrwRibbonTab
is the highest level of application command control arrangement and should offer a clear, obvious, and unique mapping between the descriptive ribbon tab's label and the command controls that reside inside them. It organizes the features of an application to aid discoverability. Such a class is unknown to Athena, Motif and GTK.
Because the ribbon is implemented as one integral widget, almost all of its children (including the ribbon tab) are implemented as gadgets. The ribbon tab is a ribbon child, that provides the functionality similar to a notebook tab to the ribbon.
Ribbon tabs are used for commands that affect the content of the window. Examples include commands used to present, format, modify, or use the content of a file or storage, or change the view. (By contrast, the application menu is used to present commands that involve doing something to or with a file or storage, such as commands that traditionally go in the file menu to create, open, and save, to print, and to send or publish data.)
The XrwRibbonTab
has a fixed height and expands always to the ribbon's full width.
This class has no public constructor, but a static factory method. NewRibbonTabGadget
creates a new empty XrwRibbonTab
instance.
The image shows a XrwRibbon
with application menu button () and three tabs, "Dialog test", "Radio & toggle test" as well as "Split test". The first tab is selected and contains two ribbon panels. Each panel contains three ribbon buttons - the first panel," Large buttons", shows the dialog launcher right beside the ribbon panel's label and it's buttons with CurrentSizeMode
== RibbonPanelSizePolicy.Large
, the second panel, "Medium buttons", shows as well the dialog launcher right beside the ribbon panel's label and it's buttons with CurrentSizeMode
== RibbonPanelSizePolicy.Medium
.
This version introduces markup. See XrwLabelBase for details.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwConstraint --> XrwRibbonTab
The XrwUniformGrid
class arranges children into equally sized rows and columns. The number of columns can be defined with the ColumnCount
property, the number of rows can be defined with the RowCount
property. Or the number of rows or/and columns can be calculated dynamically based on the children's preferred size and the availabe size of the XrwUniformGrid
. This makes it a great choice in many situations, where a window is to divide into multiple equally sized areas. It can simplify the creation of XrwGridForm
layouts. Children fill the XrwUniformGrid
row by row, starting with the left-most column of the top-most row. Such a class is unknown to Athena, Motif and GTK, it's prototype can be WPF's "UniformGrid".
The UniformGrid is just like the Grid, with the possibility of multiple rows and columns, but with one important difference: All rows and columns will have the same size! This can be used when a grid behavior is required without the need to specify different sizes for the rows and columns.
This class has no public constructor, but a static factory method. NewUniformGridGadget
creates a new XrwUniformGrid
.
Besides the HorzSpacing
and VertSpacing
properties, that affect ALL children, individual margins for any child can be applied within XrwDockPanel.ChildConstraints
. The default value is 0.
The image shows a XrwUniformGrid
with sixteen children and predefined ColumnCount
= 4 and RowCount
= 4. Children on the grid's diagonale have no margins, all other have.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwConstraint --> XrwUniformGrid
The XrwViewport
class is a scrollable viewing area widget. It is comparable to Athena's "Viewport" widget.
The Athena's description for "Viewport" says (X Window System Athena Widgets, Quick Reference Guide):
The Viewport widget consists of a frame window, one or two Scrollbars, and an inner window (usually containing a child widget). The size of the frame window is determined by the viewing size of the data that is to be displayed and the dimensions to which the Viewport is created. The inner window is the full size of the data that is to be displayed and is clipped by the frame window. The Viewport widget controls the scrolling of the data directly. No application callbacks are required for scrolling. When the geometry of the frame window is equal in size to the inner window, or when the data does not require scrolling, the Viewport widget automatically removes any scrollbars. The "forceBars" option causes the Viewport widget to display all scrollbars permanently.
A XrwViewport
uses four internal widgets - a Clip
widget (realized by an XrwSimple
), that clips the invisible area of the controlled Child
- a VScroll
widget (realized by a vertical XrwScroll
), that controlles the vertical position of the Child
- a HScroll
widget (realized by a horizontal XrwScroll
), that controlles the horizontal position of the Child
- and the controlled Child
. The Child
is the only user defined widget and must be assigned via AddChild()
or InsertChild()
and can be any XrwCore
or derived class.
This class has no public constructor, but two factory methods. NewViewportWidget
/NewViewportGadged
create a new XrwViewport
.
The image shows the general capabilities of a XrwViewport
.
Starting with this version the XrwViewport
has a new integral part, the XrwViewportGridViewHeader
widget - it will be created and destroed by the XrwViewport
automatically. The XrwViewportGridViewHeader
is responsible for the display of the column header names of an XrwViewport
's but has no internal header data. It takes the header data from the Child
instead. The Child
property supports any XrwCore
or derived class, but only for a Child
implementing the XrwIGridView
interface, the XrwViewportGridViewHeader
shows column header names, otherwise it remains empty. Irrespective whether the Child
is implementing the XrwIGridView
interface, the header can be visible, hidden or collpsed, controlled by the HeaderVisibility
property, and the header's preferred size can be defined, controlled by the HeaderPreferredHeight
property.
Currently the XrwList
and XrwTree
implement the XrwIGridView
interface.
The image shows the general capabilities of a XrwViewport
including a XrwViewportGridViewHeader
.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwConstraint --> XrwViewport
The XrwBaseCellEditorShell
is an abstract base class for popup cell editors, that are required for in-place editing of XrwList
, XrwTree
and XrwPropertyGrid
element values, that are no enumeration. It implements XrwICellEditorShell
. Such a class is unknown to Athena, Motif and GTK.
The base cell editor shell is used to determine the appropriate cell editor for a list's or tree's column in-place editing. The editor pops up as an overlay to the column's cell to edit and must fit the cell's data type.
This class is abstract and can not be instantiated.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwShell --> XrwOverrideShell --> XrwBaseCellEditorShell
The XrwGenericCellEditorShell
provides a popup cell editor for in-place editing of XrwList
's and XrwTree
's text value cell. Such a class is unknown to Athena, Motif and GTK.
The generic cell editor shell is used as popup text value editor for in-place editing of list or tree cells.
This class has no public constructor, but a static factory method. NewGenericCellEditorShell
creates a new empty XrwGenericCellEditorShell
instance. Typically it is not necessary to call the factory method from user code, because the XrwBaseCellEditorShell
's static FindCellEditor
method creates an instance, if required.
The image shows a XrwPropertyGrid
with poped up cell editor for row Name column Value.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwShell --> XrwOverrideShell --> XrwBaseCellEditorShell --> XrwGenericCellEditorShell
The XrwRibbonAppMenu
is the popup application menu of a XrwRibbon
, displaying XrwSme
s. Such a class is unknown to Athena, Motif and GTK.
The application menu is used to present commands that involve doing something to or with a file or storage, such as commands that traditionally go in the file menu to create, open, and save, to print, and to send or publish data. (By contrast, ribbon tabs are used for commands that affect the content of the window. Examples include commands used to present, format, modify, or use the content of a file or storage, or change change the view.)
This class has no public constructor, but a static factory method. NewRibbonAppMenu
creates a new empty XrwRibbonAppMenu
instance. Typically it is not necessary to call the factory method from user code, because the XrwRibbon
class always creates an application menu by default.
Since the XrwRibbonAppMenu
is derived from XrwOverrideShell
, it uses XrwOverrideShell
's mechanism to registeres itself on Realize()
to the XrwApplicationShell
's associated shells list (as override shell) to get events forwarded and to deregister itself on Unrealize()
from the XrwApplicationShell
's associated shells list to stop event forwarding.
The image shows a XrwRibbonAppMenu
containing a command panel and a details panel.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwShell --> XrwOverrideShell --> XrwRibbonAppMenu
The XrwSimpleMenu
class is a popup shell, displaying XrwSme
s. It is comparable to Athena's "SimpleMenu".
The Athena's description for "SimpleMenu" says (Athena Widget Set — C Language Interface):
The SimpleMenu widget is a container for the menu panes. It is a direct subclass of shell, and is should be created with XtCreatePopupShell(), not XtCreateManagedWidget(). This is the only part of the menu that actually is associated with a window, since each menu pane is a gadget. The SimpleMenu serves as the glue to bind the individual menu entries together into one menu.
This class has no public constructor, but a static factory method. NewSimpleMenu
creates a new empty XrwSimpleMenu
instance. Typically it is not necessary to call the factory method from user code, because the XrwMenuButton
and XrwRibbonSplitButton
class always create an simple menu by default.
Since the XrwSimpleMenu
is derived from XrwOverrideShell
, it uses XrwOverrideShell
's mechanism to registeres itself on Realize()
to the XrwApplicationShell
's associated shells list (as override shell) to get events forwarded and to deregister itself on Unrealize()
from the XrwApplicationShell
's associated shells list to stop event forwarding.
The image shows a XrwSimpleMenu
containing two XrwSme
s.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwShell --> XrwOverrideShell --> XrwSimpleMenu
The XrwDropDownCellEditorShell
provides a popup cell editor for in-place editing of XrwList
's and XrwTree
's enumerable value cell. It implements XrwICellEditorShell
. Such a class is unknown to Athena, Motif and GTK.
The drop down cell editor shell is used as popup enumerable value editor for in-place editing of list or tree cells.
This class has no public constructor, but a static factory method. NewDropDownCellEditorShell
creates a new empty XrwDropDownCellEditorShell
instance. Typically it is not necessary to call the factory method from user code, because the XrwBaseCellEditorShell
's static FindCellEditor
method creates an instance, if required.
The image shows a XrwPropertyGrid
with droped down cell editor for row Col7 column Value.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwShell --> XrwOverrideShell --> XrwSimpleMenu --> XrwDropDownCellEditorShell
The XrwSpinMenu
class is is a popup shell, displaying XrwSme
s. If there is not enough space to display all XrwSme
s, the content can be scrolled.
The XrwSpinMenu
class is a subclass of Xrw
Simple
Menu
. It is the only part of the menu that actually is associated with a window, since each menu pane is a gadget. The XrwSpinMenu
serves as the glue to bind the individual menu panes together into one menu. Different to Xrw
Simple
Menu
it can organize more menu panes than displayable on its visible area. In that case it can spin invisible menu panes to the visible area and visible menu panes to the invisible area - wherefore it shows two spin navigators (forth and back) dynamically, if required.
This class has no public constructor, but a static factory method. NewSpinMenu
creates a new empty XrwSpinMenu
instance. Typically it is not necessary to call the factory method from user code, because the XrwComboBox
class always creates an spin menu by default.
Since the XrwSpinMenu
is derived from XrwOverrideShell
(via XrwSimpleMenu
), it uses XrwOverrideShell
's mechanism to registeres itself on Realize()
to the XrwApplicationShell
's associated shells list (as override shell) to get events forwarded and to deregister itself on Unrealize()
from the XrwApplicationShell
's associated shells list to stop event forwarding.
The image shows a XrwSpinMenu
containing 10 menu pane XrwSme
s and the back and forth navigators.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwShell --> XrwOverrideShell --> XrwSimpleMenu --> XrwSpinMenu
The XrwToolTipShell
class is a popup shell, displaying a XrwLabel
with a tool tip next to the current pointer position. It is comparable to GTK's "GtkTooltip".
The GTK's description for "GtkToolTip" says (GTK — C Language Interface):
Basic tooltips can be realized simply by using gtk_widget_set_tooltip_text() or gtk_widget_set_tooltip_markup() without any explicit tooltip object. When you need a tooltip with a little more fancy contents, like adding an image, or you want the tooltip to have different contents per GtkTreeView row or cell, you will have to do a little more work.
Currently the XrwToolTipShell
supports text and markup text only. Options to provide more features (icon, user widget) in furure exist.The tool tip is more a property of according XrwCore
widgets and gadgets than an indipendend feature and can be set like notebooktabTextBoxTest.ToolTip = "<markup><b>XrwNotebookTab:</b> This is a notebook tab,\nthat represents a top aligned tab.</markup>";
.
A tool tip appears approximately 600 milliseconds after the pointer stops moving on a widget/gadget, that has set a tool tip text. The tool tip disappears immediately after the pointer restarts to move. The time delay is realized by the XrwToolTipManager
class and the tool tip launch is realized by the XrwToolTipWrapper
class.
This class has no public constructor, but a static factory method. NewToolTipShell
creates a new empty XrwToolTipShell
instance. Typically it is not necessary to call the factory method from user code, because the NewToolTipWrapper
cares for the whole lifetime of a tool tip.
Since the XrwToolTipShell
is derived from XrwOverrideShell
, it uses XrwOverrideShell
's mechanism to registeres itself on Realize()
to the XrwApplicationShell
's associated shells list (as override shell) to get events forwarded and to deregister itself on Unrealize()
from the XrwApplicationShell
's associated shells list to stop event forwarding.
The image shows a XrwToolTipShell
of a XrwNotebookTab
.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwShell --> XrwOverrideShell --> XrwToolTipShell
The XrwDialogShell
class is the base class for dialog box popups. It is comparable to GTK's "GtkDialog".
The GTK's description for "GtkDialog" says:
Create popup windows.
Xrw typically treats a dialog as a window, split vertically. The top section is called "content area" and the bottom section is called "action area". A XrwDialogShell
can be implemented modal (application blocking) or non-modal.
This class is abstract and must be inherited by an application's dialog window.
The image shows the standard XrwMessageBox
, that is a predefined inheritance of the XrwDialogShell
. It's "content area" contains a XrwLabel
and it's "action area" contains two XrwCommand
s.
Inheritance (↑)
IDisposable --> XrwObject --> XrwRectObject --> XrwVisibleRectObj --> XrwCore --> XrwComposite --> XrwShell --> XrwWmShell --> XrwTransientShell --> XrwDialogShell
History
This article has been split-off from the articles Programming the Roma Widget Set (C# X11) - a zero dependency GUI application framework - Intrinsic widgets and Programming the Roma Widget Set (C# X11) - a zero dependency GUI application framework - Composite widgets with the sixth public version of the Roma widget set, version from 05. October 2014.
The seventh public version of the Roma widget set is version from 14. December 2014.
The eighth public version of the Roma widget set is version from 8. March 2015.
The eighth public version of the Roma widget set is version from 11. October 2015.