You may return to the Cvo Object Documenation Index from this document. This document contains the following sections describing the Cvo_Pin object:
Cvo_Pin
Cvo_BasicButton
#include
<Cvo/Pin.h++>
new
Cvo_Pin ( char *resource,
{ Cvo_Object *parent | Display *display } )
A Cvo_Pin object provides a push pin that can be used in dialog boxes to indicate whether they should be saved or destroyed when the dialog box is used. They may be also used for pop up boxes. In general, a dialog box will start with the pin not pushed in, which implies that when a selection is made, the box should go away. If the pin is pushed in, the box will not go away when a selection is made. If the pin is released after being pushed in, the box is canceled.
The other method of using a pin is to start with it pushed in. When the pin is removed, the item being pinned should go away.
This object defines the following member functions in addition to those defined by its parent and ancestor objects.
ForceOn (
)
This function forces the Cvo_Pin to be pushed in.
ForceOff (
)
This function forces the Cvo_Pin to be pulled out.
int Pressed (
)
This function returns zero if the Cvo_Pin is not pushed in and a non-zero value if the Cvo_Pin is pushed in.
This object defines the following event translations in addition to those defined by its parent and ancestor objects.
<EnterWindow>
:
Enter()
The Enter()
translation informs the object when the cursor enters its
window. A Cvo_Pin object will change state from pinned to unpinned or
vice versa when the mouse button is pressed while the cursor is in
the Cvo_Pin window. However, this state will not take effect until
the mouse button is released within the Cvo_Pin window. This
translation permits the Cvo_Pin object to track the position of the
cursor.
<LeaveWindow>
:
Leave()
The Leave()
translation informs the object when the cursor leaves its
window. This translation, like the Enter()
translation, permits the
Cvo_Pin object to track the position of the cursor.
This object modifies the following X resources which are used by its parent or other ancestors.
*CvoPin.Chamfer
(new value:
0
)
*CvoPin.BorderWidth
(new value:
0
)
*CvoPin.Pad
(new value:
0
)
*CvoPin.Cursor
(new value:
Top Left Arrow
)
See the example source code for an example of how to use this object.
See the legend for information about the conventions used in this documentation.