Document revision date: 10 November 2000
[Compaq] [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]
[OpenVMS documentation]

DECwindows Extensions to Motif


Previous Contents Index


DXmCSTextXYToPos

Retrieves (returns) the position in the text of the character nearest to a specified x and y position.

Format


DXmCSTextPosition DXmCSTextXYToPos(widget, x, y) 
                   Widget    widget; 
                   Position  x; 
                   Position  y; 


Return Value

An integer that identifies the position of the character in the text. This integer represents the number of characters from the beginning of the text buffer, with 0 indicating the position of the first character.

Arguments

widget

The identifier (widget ID) of the compound string text widget.

x

The x-coordinate relative to the upper left corner of the widget.

y

The y-coordinate relative to the upper left corner of the widget.

Description

The DXmCSTextXYToPos routine returns an integer that identifies the position in the text of the character that is nearest to a specified x and y position. See the DXmCSTextPosToXY routine for related information.

DXmCvtCStoDDIF

Converts a compound string into a DDIF format string.

Format


Opaque DXmCvtCStoDDIF (cs, byte_count, status) 
        XmString  cs; 
        long      *byte_count; 
        long      *status; 


Return Value

A pointer to the DDIF string.

Arguments

cs

A compound string.

byte_count

The number of bytes in the output length of the DDIF string.

status

The status of the conversion procedure, indicated by one of the following values:
Value Description
DXmCvtStatusOK The conversion was successful.
DXmCvtStatusDataLoss Data was lost during the conversion.
DXmCvtStatusFail The conversion was not successful.

Description

The DXmCvtCStoDDIF routine converts a compound string into a DDIF format string. The user must free the string by using the Intrinsic routine XtFree. (See the X Window System Toolkit manual for more information about using the Intrinsic routines.)

DXmCvtCStoFC

Converts a compound string to a file-compatible format string. Currently uses text format.

Format


Opaque DXmCvtCStoFC (cs, byte_count, status) 
        XmString  cs; 
        long      *byte_count; 
        long      *status; 


Return Value

A pointer to the file-compatible format string.

Arguments

cs

A compound string.

byte_count

The number of bytes in the output length of the string.

status

The status of the conversion procedure, indicated by one of the following values:
Value Description
DXmCvtStatusOK The conversion was successful.
DXmCvtStatusDataLoss Data was lost during the conversion.
DXmCvtStatusFail The conversion was not successful.

Description

The DXmCvtCStoFC routine converts a compound string to a file-compatible format string. It currently uses text format. The user must free the string by using the Intrinsic routine XtFree. (See the X Window System Toolkit manual for more information about using the Intrinsic routines.)

DXmCvtCStoOS

Converts a compound string to an operating-system specific format. Currently uses text format.

Format


Opaque DXmCvtCStoOS (cs, byte_count, status) 
        XmString  cs; 
        long      *byte_count; 
        long      *status; 


Return Value

The address of the file-compatible format string.

Arguments

cs

A compound string.

byte_count

The number of bytes in the length of the output string.

status

The status of the conversion procedure, indicated by one of the following values:
Value Description
DXmCvtStatusOK The conversion was successful.
DXmCvtStatusDataLoss Data was lost during the conversion.
DXmCvtStatusFail The conversion was not successful.

Description

The DXmCvtCStoOS routine converts a compound string to an operating-system specific format. It currently uses text format. The user must free the string by using the Intrinsic routine XtFree. (See the X Window System Toolkit manual for more information about using the Intrinsic routines.)

DXmCvtDDIFtoCS

Converts a string in DDIF format to a compound string.

Format


XmString DXmCvtDDIFtoCS (ddif,size,return_status) 
          Opaque  ddif; 
          long    *size; 
          long    *return_status; 


Return Value

A pointer to the compound string.

Arguments

ddif

A pointer to the DDIF input string.

size

The length of the compound string.

return_status

The status of the conversion procedure, indicated by one of the following values:
Value Description
DXmCvtStatusOK The conversion was successful.
DXmCvtStatusDataLoss Data was lost during the conversion.
DXmCvtStatusFail The conversion was not successful.

Description

The DXmCvtDDIFtoCS routine converts a string in DDIF format to a compound string. The user must free the string by using the Toolkit routine XmStringFree. (See the OSF/Motif Programmer's Reference for more information about using this routine.)

DXmCvtFCtoCS

Converts a string in the file-compatible format to a compound string.

Format


XmString DXmCvtFCtoCS (fc, byte_count, status) 
          Opaque  fc; 
          long    *byte_count; 
          long    *status; 


Return Value

A pointer to the compound string.

Arguments

fc

A pointer to the input string.

byte_count

The number of bytes in the length of the output string.

status

The status of the conversion procedure, indicated by one of the following values:
Value Description
DXmCvtStatusOK The conversion was successful.
DXmCvtStatusDataLoss Data was lost during the conversion.
DXmCvtStatusFail The conversion was not successful.

Description

The DXmCvtFCtoCS routine converts a string in the file-compatible format to a compound string. The user must free the string by using the Toolkit routine XmStringFree. (See the OSF/Motif Programmer's Reference for more information about using this routine.)

DXmCvtOStoCS

Converts a string in the operating-system-specific format to a compound string.

Format


XmString DXmCvtOStoCS (os_string, byte_count, status) 
          Opaque  os_string; 
          long    *byte_count; 
          long    *status; 


Return Value

A pointer to the compound string.

Arguments

os_string

A pointer to the input string.

byte_count

The number of bytes in the length of the output string.

status

The status of the conversion procedure, indicated by one of the following values:
Value Description
DXmCvtStatusOK The conversion was successful.
DXmCvtStatusDataLoss Data was lost during the conversion.
DXmCvtStatusFail The conversion was not successful.

Description

The DXmCvtOStoCS routine converts a string in the operating-system-specific format to a compound string. The user must free the string by using the Toolkit routine XmStringFree. (See the OSF/Motif Programmer's Reference for more information about using this routine.)

DXmDescToNull

Converts an OpenVMS string descriptor to a null-terminated string. This routine is specific to OpenVMS operating systems.

Format


char *DXmDescToNull(desc) 
       struct dsc$descriptor_s    *desc; 


Return Value

The address of a null-terminated string that has been allocated a block of storage by the Intrinsic routine XtMalloc. The user must free this string, using the Intrinsic routine XtFree.

Arguments

desc

The address of an OpenVMS string descriptor for the string to be converted.

Description

The DXmDescToNull routine converts an OpenVMS string descriptor to a null terminated string, which must be freed with the Intrinsic routine XtFree. (See the X Window System Toolkit manual for more information about using the Intrinsic routines.)

DXmDisplayCSMessage

Displays a compound string message.

Format


Widget DXmDisplayCSMessage(parent_widget, name, 
                           default_position, x, y, 
                           style, message_vector, 
                           widget, convert_proc, 
                           ok_callback, help_callback) 
        Widget          parent_widget; 
        char            *name; 
        Boolean         default_position; 
        Position        x; 
        Position        y; 
        unsigned char   style; 
        int             *message_vector; 
        Widget          *widget; 
        int             *convert_proc; 
        XtCallbackList  ok_callback; 
        XtCallbackList  help_callback; 


Return Value

The identifier (widget ID) of the message box widget.

Arguments

parent_widget

The identifier (widget ID) for the parent widget of the created widget.

name

The name of the created widget.

default_position

When True, the x and y positions of the widget window are ignored in favor of the default, which centers the message box in the window of the parent widget.

x

The placement, in pixels, of the left side of the message box relative to the inner upper left corner of the parent window.

y

The placement, in pixels, of the upper side of the message box relative to the inner upper left corner of the parent window.

style

The style of the dialog box widget used for the message box. The predefined values for this resource are as follows:
Value Description
XmDIALOG_FULL_APPLICATION_MODAL Used for dialogs that must be responded to before other interactions in the same application
XmDIALOG_MODELESS Modeless type dialog box
XmDIALOG_PRIMARY_ APPLICATION_MODAL Used when dialogs must be responded to before other interactions in ancestors of the widget
XmDIALOG_SYSTEM_MODAL Modal type dialog box

The default is XmDIALOG_MODELESS.

message_vector

The message argument vector specifying the compound strings and associated information.

The first longword contains the number of longwords in the message blocks to follow. The first longword in each message block contains a pointer to the compound string. The next word consists of the $FAO parameter count. The remaining longwords in the message block are the $FAO parameters.

In addition to the standard $FAO system service flags, the compound string message routine will accept the new FAO directive "!CS." When used, this directive will insert a compound string itself.

widget

The identifier (widget ID) of an already existing message box widget. The Intrinsic routine XtSetValues is called on this widget to change the text of the message to match the new message. (Note, however, that this call to XtSetValues does not set default_position, x, y, or style for the existing message box widget.) If this argument is 0, a new message box widget is created. (See the X Window System Toolkit manual for more information about using the Intrinsic routines.)

convert_proc

A pointer to a routine that is executed after the message is formatted but before it is displayed.

A pointer to the formatted string is passed to the routine as a parameter. The parameter is a null-terminated character string.

ok_callback

A callback descriptor data structure. The callback is executed when the user clicks on the Acknowledged button. The reason is XmCR_OK.

help_callback

A callback descriptor data structure. The callback is executed when the user requests help. The reason returned is XmCR_HELP.

Description

The DXmDisplayCSMessage routine accepts an array of compound strings, formats them, and, if necessary, creates a message box. A return of 0 (Null) indicates that the message box could not be created.

DXmDisplayVMSMessage

Accepts and displays an OpenVMS message. (This routine is available only on OpenVMS systems.)

Format


Widget DXmDisplayVMSMessage(parent_widget, name, 
                            default_position, x, y, 
                            style, message_vector, 
                            widget, convert_proc, 
                            ok_callback, help_callback) 
      Widget          parent_widget; 
      char            *name; 
      Boolean         default_position; 
      Position        x; 
      Position        y; 
      unsigned char   style; 
      int             *message_vector; 
      Widget          *widget; 
      int             *convert_proc; 
      XtCallbackList  ok_callback; 
      XtCallbackList  help_callback; 


Return Value

The identifier (widget ID) of the message box widget.

Arguments

parent_widget

The identifier (widget ID) for the parent widget of the created widget.

name

The name of the created widget.

default_position

When True, the x and y positions of the message box are ignored in favor of the default, which centers the message box in the window of the parent widget.

x

The placement, in pixels, of the left side of the message box relative to the inner upper left corner of the parent window.

y

The placement, in pixels, of the upper side of the message box relative to the inner upper left corner of the parent window.

style

The style of the dialog box widget used for the message box. The predefined values for this resource are as follows:
Value Description
XmDIALOG_FULL_APPLICATION_MODAL Used for dialogs that must be responded to before other interactions in the same application
XmDIALOG_MODELESS Modeless type dialog box
XmDIALOG_PRIMARY_ APPLICATION_MODAL Used when dialogs must be responded to before other interactions in ancestors of the widget
XmDIALOG_SYSTEM_MODAL Modal type dialog box

The default is XmDIALOG_MODELESS.

message_vector

The message argument vector specifying the message identifier and associated information. This argument is identical to the OpenVMS $PUTMSG system service.

The first longword contains the number of longwords in the message blocks to follow. The first longword in each message block contains a pointer to the OpenVMS message identifier. Message identifiers are passed by value.

If the message is supplied by the application, the next word consists of the $FAO parameter count. The remaining longwords in the message block are the $FAO parameters.

widget

The identifier (widget ID) of an already existing message box widget. The Intrinsic routine XtSetValues is called on this widget to change the text of the message to match the new message. (Note, however, that this call to XtSetValues does not set default_position, x, y, or style for the existing message box widget.) If this argument is 0, a new message box widget is created. (See the X Window System Toolkit manual for more information about using the Intrinsic routines.)

convert_proc

A pointer to a routine that is executed after the message is formatted but before it is displayed.

A pointer to the formatted string is passed to the routine as an argument. The parameter is a null-terminated character string.

ok_callback

A callback descriptor data structure. The callback is executed when the user clicks on the Acknowledged button. The reason is XmCR_OK.

help_callback

A callback descriptor data structure. The callback is executed when the user requests help. The reason returned is XmCR_HELP.

Description

The DXmDisplayVMSMessage routine accepts standard OpenVMS message vectors (defined by the $PUTMSG system service), retrieves them, and creates a message box to display the message. A return of 0 (Null) indicates that the message box could not be created.

DXmFindFontFallback

Associates the given XLFD font name with a new XLFD font name.

Format


char *DXmFindFontFallback(fontname) 
       char  *fontname; 


Return Value

A pointer to an XLFD font name string.

Arguments

fontname

A pointer to the XLFD font name.

Description

The DXmFindFontFallback routine associates the given XLFD (X Logical Font Description) font name with a new XLFD font name. This routine does not load the generated font, nor guarantee that it will load successfully. The application calling the routine is responsible for freeing the returned font name through the Intrinsic routine XtFree when the font name is no longer required.

See the DXmFindFontFallback routine for related information. See also the X Window System Toolkit manual for information about the Intrinsic routine XtFree and the X Window System for information about how the X Window System defines valid font names.


DXmFormSpaceButtonsEqually

Sets push buttons in a form widget to be equally spaced and sized.

Format


void DXmFormSpaceButtonsEqually (parent, widget_list, num_widgets) 
      Widget    parent; 
      Widget    *widget_list; 
      Cardinal  num_widgets; 


Arguments

parent

The identifier (widget ID) of the form widget containing the buttons.

widget_list

Array of widget IDs of the push buttons to be changed.

Note that you must list the widget IDs in the same order as they are displayed in the dialog box and that you should not specify left or right attachments for the push buttons.

num_widgets

The number of widgets in the widget_list.

Description

The DXmFormSpaceButtonsEqually routine enables you to set the push buttons in a form widget to be equally spaced and sized. Your application must call this routine after the dialog box is managed.


Previous Next Contents Index

  [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]  
  privacy and legal statement  
5635PRO_010.HTML