You may return to the Cvo Object Documenation Index from this document. This document contains the following sections describing the Cvo_Iwin object:
Cvo_Iwin
Cvo_Window
#include
<Cvo/Iwin.h++>
new
Cvo_Iwin ( char *resource_name,
{ Cvo_Object *parent | Display *display } )
A Cvo_Iwin object provides a canvas on which to display icons. Once the icons have been placed, they may be selected as well as dragged. When dragged, they may either be dropped on the Cvo_Iwin window, in which case they will be moved there, or they may be dropped outside the window, in which case the application should generate a drop event for that location.
This object defines the following member functions in addition to those defined by its parent and ancestor objects.
AddIcon (
char *tag,
[ int x, int y ],
Cvo_Image *icon,
[ Cvo_Image *selected_icon ],
[ Pixmap icon_mask ],
[ void *client_data ],
[ int orientation ] )
Add an icon to the icon window, described by the icon argument. Below the icon, the text specified by tag will be drawn. If an x and y are provided, they define where the icon should initially be placed.
If selected_icon is specified, it describes what the icon should look like when int the selected state. The optional icon_mask is used to mask which pixels are drawn when drawing the icon.
Client_data is passed in the event structure when Primary and Secondary events are generated by the Iwin object. The orientation parameter, which defaults to Cvo_VERTICAL, defines where the tag should be drawn (below or to the right). Either Cvo_HORIZONTAL or Cvo_VERTICAL may be passed.
Cvo_IwinItem *Items (
)
Return the list of icons in the Icon Window.
BOOL DisableOutput (
)
EnableOutput (
BOOL value )
The DisableOutput function disables the updating of the Icon Window. This is useful when making more than one or two changes at a time, such as when adding many icons. The EnableOutput function should be called with the return status of DisableOutput. This allows for correctly nested DisableOutput/EnableOutput pairs.
Redisplay (
)
Redisplay the icons in the Icon Window.
AllowIntraPaneMv (
BOOL value )
By default, the user is allowed to move icons around within the Icon Window.
If False
is passed as value, then this ability is disabled. A value
of True will re-enable this.
int Selected (
)
Returns the number of icons currently selected.
.member ( AutoPlace Cvo_IwinItem *icon )
Automatically positions icon
in the window.
Causes all the icons in the window to be selected.
.member ( UnselectAll )Causes all the icons in the window to be not selected.
.member ( SelectByTag ,
char *tag )
Causes all icons with who have the string tag
as their tag to be selected.
See the legend for information about the conventions used in this documentation.