Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
XmtProgress(3)		    Library Functions Manual		  XmtProgress(3)

NAME
     XmtProgress - a Percent Progress Widget

SYNOPSIS
     Include File:
	    #include <Xmt/Progress.h>

     Constructor:
	    XmtCreateProgress()

     Class Name:
	    XmtProgress

     Class Pointer:
	    xmtProgressWidgetClass

     Class Hierarchy:
	    Core -> XmPrimitive -> XmtProgress

DESCRIPTION
     The  XmtProgress  widget  is a widget which will display a percentage value
     graphically. It can display in three styles: a continuous	bar,  a  stepped
     bar, or a circle. As a stepped bar, it looks much like a similar control on
     a popular desktop OS.

     It  can  be  used	to  display the progress, or percentage completion, of a
     task; it can also be used for other visually similar  indicators,	such  as
     thermometers, gauges, or similar items.

     The  display  normally sweeps from left to right, or bottom to top, for the
     linear displays; for the circular displays, it sweeps in  a  counter-clock-
     wise  direction  from  the  vertical. However, the XmtNreverse resource, if
     set, will cause it to sweep in the opposite direction.

     The stepped display will have a shadow around each step, unless the XmPrim-
     itive XmNshadowThickness resource is zero. Each step  is  filled  when  the
     progress value reaches or exceeds that point.

     If desired, the widget can display the current percentage value or an arbi-
     trary label centered within itself.

     The convenience routines XmtProgressSet(), XmtProgressGet, and XmtProgress-
     Clear allow quick and efficent access to the widget's value setting.

     RESOURCES

     Cli inherits the resources of the XmPrimitive class, overriding the default
     of  XmNtraversalOn to False, and XmNhighlightThickess to 0, and defines the
     following new resources:

     +-----------------+----------------------+-----------------+--------+---------------+
     | Name	       | Type		      | Class		| Access | Default	 |
     +-----------------+----------------------+-----------------+--------+---------------+
     | XmtNfillColor   | XmtRPixel	      | XmtCForeground	| CSG	 | Dynamic	 |
     +-----------------+----------------------+-----------------+--------+---------------+
     | XmtNfontList    | XmtRXmFont	      | XmtCFontList	| CSG	 | Dynamic	 |
     +-----------------+----------------------+-----------------+--------+---------------+
     | XmtNlabelBoxed  | XmtRBoolean	      | XmtCLabelBoxed	| CSG	 | False	 |
     +-----------------+----------------------+-----------------+--------+---------------+
     | XmtNlabelString | XmtRXmString	      | XmtCLabelString | CSG	 | NULL 	 |
     +-----------------+----------------------+-----------------+--------+---------------+
     | XmtNlabelXOR    | XmtRBoolean	      | XmtCLabelXOR	| CSG	 | False	 |
     +-----------------+----------------------+-----------------+--------+---------------+
     | XmtNmargin      | XmtRDimension	      | XmtCMargin	| CSG	 | 2		 |
     +-----------------+----------------------+-----------------+--------+---------------+
     | XmtNorientation | unsigned char	      | XmtCOrientation | CSG	 | XmHORIZONTAL  |
     +-----------------+----------------------+-----------------+--------+---------------+
     | XmtNrenderTable | XmtRXmRenderTable    | XmtCRenderTable | CSG	 | dynamic	 |
     +-----------------+----------------------+-----------------+--------+---------------+
     | XmtNreverse     | XmtRBoolean	      | XmtCReverse	| CSG	 | False	 |
     +-----------------+----------------------+-----------------+--------+---------------+
     | XmtNshowPercent | XmtRBoolean	      | XmtCShowPercent | CSG	 | dynamic	 |
     +-----------------+----------------------+-----------------+--------+---------------+
     | XmtNstepSpacing | XmtRDimension	      | XmtCStepSpacing | CSG	 | 2		 |
     +-----------------+----------------------+-----------------+--------+---------------+
     | XmtNstepWidth   | XmtRDimension	      | XmtCStepWidth	| CSG	 | dynamic	 |
     +-----------------+----------------------+-----------------+--------+---------------+
     | XmtNstyle       | XmtRXmtProgressStyle | XmtCStyle	| CSG	 | XmtCONTINUOUS |
     +-----------------+----------------------+-----------------+--------+---------------+
     | XmtNvalue       | XmtRint	      | XmtCValue	| CSG	 | 0		 |
     +-----------------+----------------------+-----------------+--------+---------------+

     XmtNfillColor
	    The color used for the filled portion of the widget.  This	defaults
	    to the Motif select color.

     XmtNfontList
	    The  font  used to display the percentage or label. In Motif 2.0 and
	    later, this is an obsolete resource; XmtNrenderTable should be  used
	    instead.  This defaults to the Motif default font.

     XmtNlabelBoxed
	    Whether  the  label  should  be displayed filled with the background
	    color. Note that this usually produces poor results if  XmtNlabelXOR
	    is true. This defaults to False.

     XmtNlabelString
	    If	non-NULL and XmtNshowPercent is False, this label string is dis-
	    played centered in the widget. This defaults to NULL.

     XmtNlabelXOR
	    Draw the label, or percentage, using XOR, so  that	it  appears  in-
	    verted against the background or fill color. This defaults to False.

     XmtNmargin
	    The  margin  between  the edge of the widget and the percentage dis-
	    play. This defaults to 2.

     XmtNorientation
	    The orientation of the display, when XmtNstyle  is	XmtPROGRESS_CON-
	    TINUOUS  or  XmtPROGRESS_STEPPED. It can be XmVERTICAL or XmHORIZON-
	    TAL, and defaults to XmHORIZONTAL.

     XmtNrenderTable
	    For Motif 2.0 and later, this is the font rendition  table	for  the
	    label or percentage display.

     XmtNreverse
	    Reverse  the  direction of the display. For horizontal continuous or
	    stepped displays, display from right to left; for vertical	continu-
	    ous  or  stepped, display from bottom to top. For circular displays,
	    sweep in a clockwise direction. This defaults to False.

     XmtNshowPercent
	    Whether or not the widget display the  current  percentage	setting.
	    If	this  resource is True, then the widget will display the current
	    percentage, as an integer, in the center of the  widget.  If  False,
	    then  the  widget will display the XmtNlabelString, if set, or noth-
	    ing. This defaults to True for the XmtPROGRESS_CONTINUOUS  and  Xmt-
	    PROGRESS_CIRCLE styles, and False for the XmtPROGRESS_STEPPED style.

     XmtNstepSpacing
	    When the widget is in stepped mode, this is the spacing between each
	    step block, not including the shadow, if any. This defaults to 2.

     XmtNstepWidth
	    When  the  widget is in stepped mode, this is the size of the steps,
	    in the direction of the current orientation. If set to  0  (the  de-
	    fault), the widget computes the step width so that the steps are ap-
	    proximately square.

	    If	the  steps,  with  the spacing, are not an exact multiple of the
	    widget's interior width, then the last step will be shorted as  nec-
	    essary.

     XmtNstyle
	    The display style of the Progress widget. This can be:

	    XmtPROGRESS_CONTINOUS
		   A continous bar.

	    XmtPROGRESS_STEPPED
		   A  series  of  squares.  As the value reaches the end of each
		   square, the square is filled.

	    xmtPROGRESS_CIRCLE
		   A circle (or, more precisely, an ellipse). The filled area of
		   the circle sweeps from the vertical around the circle  (coun-
		   terclockwise  if  XmtNreverse  is False, and clockwise other-
		   wise). The ellipse fills the interior of the  widget,  so  it
		   will only be circular if the widget is square.

     XmtNvalue
	    The  current  value. This ranges from 0 to XmtPROGRESS_MAX; it is in
	    1/100ths of a percent (so that 1% is 100).

     CALLBACKS

     The Progress widget has no callbacks.

     TRANSLATIONS

     The Progress widget inherits an unmodified set of	the  XmPrimitive  widget
     translations.

SEE ALSO
     XmtProgressClear(), XmtProgressGet(), XmtProgressSet(),
     XmtProgressCreate().

Xmt				   Motif Tools			  XmtProgress(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=XmtProgress&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help