VkCompletionField(3x) VkCompletionField(3x)
VkCompletionField - A text input field that supports automatic name
completion
VkComponent : VkCallbackObject
#include <Vk/VkCompletionField.h>
PUBLIC PROTOCOL SUMMARY
Constructor/Destructor
VkCompletionField(const char* name, Widget parent);
virtual void ~VkCompletionField(void);
Controlling Current Completions [Toc] [Back]
void add(char* name);
void clear(void);
Access to text [Toc] [Back]
char *getText();
PROTECTED PROTOCOL SUMMARY [Toc] [Back] Manipulating Partial Expansions
virtual void expand(struct XmTextVerifyCallbackStruct* cb);
Access to Current Expansions [Toc] [Back]
virtual void activate(struct XmTextVerifyCallbackStruct* cb);
VkNameList* _currentMatchList;
VkNameList* _nameList;
The VkCompletionField component is a text input field that supports
name expansion. If the user types a space, the component attempts to
complete the current contents of the text field, based on a known
list of possible expansions. Applications must provide the list of
possible expansions. Applications that wish to be notified when the
user types a <RETURN> into the text field can register a ViewKit
C++-style callback using the VkCompletionFiled::enterCallback()
hook.
Applications that wish to have more control over the expansion
process might benefit from subclassing. The expand() member
function, which is called when the user types into the text field,
Page 1
VkCompletionField(3x) VkCompletionField(3x)
can be overridden, and derived classes can also access the complete
list of possible completions as well as those items that match the
current list of partial matches. Derived classes that wish to be
notified when the user types a <RETURN> into the text field can
override the activate() member function.
FUNCTION DESCRIPTIONS [Toc] [Back] activate()
virtual void activate(struct XmTextVerifyCallbackStruct* cb);
Called when the user types a <RETURN> key. The component attempts to
expand the current content of the text field before this function is
called.
expand()
virtual void expand(struct XmTextVerifyCallbackStruct* cb);
Called when any text is typed into the text field.
VkCompletionField() [Toc] [Back]
VkCompletionField(const char* name, Widget parent);
Initializes the VkCompletionField class and creates the widgets used
by the component.
~VkCompletionField()
virtual void ~VkCompletionField(void);
Frees all storage associated with this class.
add()
void add(char* name);
Add an item to the list of possible expansions.
clear()
void clear(void);
Clear all possible expansions.
DATA MEMBER DESCRIPTIONS [Toc] [Back] _currentMatchList
Page 2
VkCompletionField(3x) VkCompletionField(3x)
VkNameList* _currentMatchList;
At any point following an expansion, this list contains all possible
expansions of the current text.
_nameList
VkNameList* _nameList;
This list contains all possible expansions registered with the
component.
INHERITED MEMBER FUNCTIONS [Toc] [Back] Inherited from VkComponent
installDestroyHandler(), removeDestroyHandler(), widgetDestroyed(),
afterRealizeHook(), setDefaultResources(), getResources(), show(),
hide(), realize(), manage(), unmanage(), name(), baseWidget()
okToQuit(), _name, _baseWidget, _w, deleteCallback
Inherited from VkCallbackObject [Toc] [Back]
callCallbacks(), addCallback(), removeCallback(),
removeAllCallbacks()
CLASSES USED BY THIS CLASS
VkNameList
SEE ALSO
VkComponent, VkNameList ViewKit Programmer's Guide
The X Window System, DEC Press, Bob Sheifler and Jim Gettys
The X Window System Toolkit, DEC Press, Paul Asente and Ralph Swick
The OSF/Motif Programmers Reference, Prentice Hall, OSF
PPPPaaaaggggeeee 3333 [ Back ]
|