Reference Guide > W Routines > WtSet Function
  

WtSet Function
Sets widget resources.
Usage
status = WtSet(widget, [argv])
Parameters
widget — The widget ID.
argv — (optional) An unnamed structure specifying the resources for the widget or shell.
Returned Value
status — One (1) indicates success; zero (0) indicates failure.
Keywords
Append=com — Appends a command to the command widget.
Callback=reason — Calls all defined callbacks for the specified reason for this widget.
Destroy — Destroys the widget and all children of the widget.
Error=errmsg — Displays an error message in the history area of the command widget.
Manage — Manages the given widget (WtCreate manages widgets by default).
Map — Maps the given widget.
MultiClick — Sets the time interval (in milliseconds) that is used to determine if consecutive mouse button clicks are to be interpreted as multiple clicks.
Nonsensitive — Sets the given widget to nonsensitive.
Popup=event — Pops up the given menu (event specifies the location).
Raise — If present and nonzero, pops the given widget in front of other windows displayed on the monitor.
Realize — Realizes (displays) the given widget.
Realize=grab — Realizes the given shell with one of these grab values:
*Xtgrabnone
*Xtgrabnonexclusive
*Xtgrabexclusive
Remove_callback = name — If the name of a callback routine is specified, this keyword removes the named callback. If name is not specified, all callbacks for the specified widget are removed.
Remove_handler = name — If the name of an event handler is specified, this keyword removes the named event handler. If name is not specified, all event handlers for the specified widget are removed.
Search=dir — (Motif only) Sets the search context for a file selection widget.
Sensitive — Sets the given widget to sensitive.
Tab_Win — If this keyword is present and nonzero, the tab navigation feature is turned on for the supplied widget ID. If this keyword is set to zero, the tab navigation feature is turned off for the supplied widget ID.
Unmanage — Unmanages the given widget.
Unmap — Unmaps the given widget.
Unrealize — If present and nonzero, unrealizes a widget, or pops down (undisplays) a shell.
Update — If present and nonzero, all pending exposure (i.e., window repair) events are processed immediately. If you suspect that a callback procedure will take a long time, use this keyword to update the display before starting the time consuming operation.
Userdata — Stores a copy of the value of a variable.
Value=value — Sets value for command, scale, scroll bar, or toggle button.
Whenmapped — Sets mapped to true for managed attributes.
Whenunmapped — Sets mapped to false for managed attributes.
Discussion
Resources are passed as an unnamed structure, where tag names correspond to resource names and tag definitions are resource values. Resource names are given without the XmN (Motif) prefix.
 
note
Rogue Wave has ported a subset of the Widget Toolbox (Wt) that is available for Motif to Microsoft Windows. Because the Widget Toolbox under Windows is not a complete implementation, we recommend that Windows developers use the PV‑WAVE Widgets (Ww) layer or the VDA Tools when developing GUI applications.
The WtSet keywords are supported for Windows; however, the use of the argv parameter to pass resource-value pairs is not supported.
An unnamed structure has the following general definition:
x = {, tag_name1: tag_def1, tag_namen: tag_defn}
See the PV‑WAVE Programmer’s Guide for detailed information on unnamed structures.
For a list of resources for the specified widget or shell, see the appropriate OSF/Motif Programmer’s Reference.
 
note
If the color, font, or bitmap (called a “pixmap” in Motif) resource value is of type string, it is assumed to be the value of the color/font name or bitmap filename, and the appropriate resources are loaded.
Example
.
args={,x:100,y:100,label:'Enter File:',$
   string:'/usr/home/myfile.pro'}
; Resources are defined in an unnamed structure.
status=WtSet(w,args)
.
status=WtSet(top,/Realize)
.
See Also
For detailed information on GUI development, refer to the PV‑WAVE Application Developer’s Guide.
For more information about how to write an application program based on the PV‑WAVE Widget Toolbox, refer to Using the Widget Toolbox in the PV‑WAVE Application Developer’s Guide.

Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.