CW_ITWINDOW
Syntax | Return Value | Arguments | Keywords | Widget Events Returned by the CW_ITWINDOW Widget | Version History | See Also
The CW_ITWINDOW function creates an iTool draw widget that contains an IDLitWindow object.
Warning
This routine can only be used in the context of a user-created iTool. See Overview of iTools Compound Widgets for details.
The CW_ITWINDOW widget automatically performs the following actions:
- Creates a scrolling draw widget with the specified dimensions.
- Adds itself as an observer of the underlying IDLitWindow object. The CW_ITWINDOW widget listens for the following message:
- Handles all mouse and keyboard events. See "IDLitWindow" (IDL Reference Guide) for a list of the mouse and keyboard callback methods.
See iTool Messaging System for a discussion of observers and notifications.
Resizing CW_ITWINDOW Widgets
CW_ITWINDOW does not automatically resize itself to fit its parent widget. To resize the widget, your base widget must call the CW_ITWINDOW_RESIZE procedure with the new size. This procedure has the following interface:
where Widget_ID is the CW_ITWINDOW widget ID, and Xsize and Ysize are the new visible size of the draw window.
Syntax
Result = CW_ITWINDOW(Parent, UI [, DIMENSIONS=[width, height]] [, VIRTUAL_DIMENSIONS=[width, height] ] [Also accepts all WIDGET_DRAW keywords])
Return Value
This function returns the widget ID of the newly-created iTool draw widget.
Arguments
Parent
The widget ID of the parent base widget.
UI
An object reference of the IDLitUI object associated with the iTool. See User Interface Object for information on creating user interface objects.
Keywords
DIMENSIONS
Set this keyword to a two-element vector containing the initial width and height of the visible portion of the draw widget. The default is [640, 480].
UNAME
Set this keyword to a string that can be used to identify the widget in your code. You can associate a name with each widget in a specific hierarchy, and then use that name to query the widget hierarchy and get the correct widget ID.
To query the widget hierarchy, use the WIDGET_INFO function with the FIND_BY_UNAME keyword. The UNAME should be unique to the widget hierarchy because the FIND_BY_UNAME keyword returns the ID of the first widget with the specified name.
UVALUE
The "user value" to be assigned to the widget. Each widget can contain a user-specified value of any data type and organization. This value is not used by the widget in any way, but exists entirely for the convenience of the IDL programmer. This keyword allows you to set this value when the widget is first created. If UVALUE is not present, the widget's initial user value is undefined.
The user value for a widget can be accessed and modified at any time by using the GET_UVALUE and SET_UVALUE keywords to the WIDGET_CONTROL procedure.
VIRTUAL_DIMENSIONS
Set this keyword to a two-element vector containing the width and height of the virtual canvas. The default is to use the same values as DIMENSIONS.
WIDGET_DRAW Keywords Accepted
See WIDGET_DRAW for the description of the following keywords:
APP_SCROLL, BUTTON_EVENTS, CLASSNAME, COLOR_MODEL, COLORS, EVENT_FUNC, EVENT_PRO, EXPOSE_EVENTS, FRAME, FUNC_GET_VALUE, GRAPHICS_LEVEL, GROUP_LEADER, IGNORE_ACCELERATORS, KEYBOARD_EVENTS, KILL_NOTIFY, MOTION_EVENTS, NO_COPY, NOTIFY_REALIZE, PRO_SET_VALUE, RENDERER, RESOURCE_NAME, RETAIN, SCR_XSIZE, SCR_YSIZE, SCROLL, SENSITIVE, TOOLTIP, TRACKING_EVENTS, UNAME, UNITS, UVALUE, VIEWPORT_EVENTS, WHEEL_EVENTS, XOFFSET, XSIZE, X_SCROLL_SIZE, YOFFSET, YSIZE, Y_SCROLL_SIZE
Widget Events Returned by the CW_ITWINDOW Widget
CW_IT* compound widgets do not return widget events. All interaction with the iTool user interface is accomplished via the iTool messaging system and the callback mechanism implemented in the user interface creation routine.
Version History
Introduced: 6.1
See Also
Creating a Custom iTool Widget Interface, CW_ITMENU, CW_ITPANEL, CW_ITSTATUSBAR, CW_ITTOOLBAR