home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.3 Development Libraries / SGI IRIX 6.3 Development Libraries.iso / dist6.3 / ViewKit_dev.idb / usr / include / Vk / VkCompletionField.h.z / VkCompletionField.h
Encoding:
C/C++ Source or Header  |  1996-09-20  |  2.2 KB  |  59 lines

  1. ////////////////////////////////////////////////////////////////////////////////
  2. ///////   Copyright 1992, Silicon Graphics, Inc.  All Rights Reserved.   ///////
  3. //                                                                            //
  4. // This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;     //
  5. // the contents of this file may not be disclosed to third parties, copied    //
  6. // or duplicated in any form, in whole or in part, without the prior written  //
  7. // permission of Silicon Graphics, Inc.                                       //
  8. //                                                                            //
  9. // RESTRICTED RIGHTS LEGEND:                                                  //
  10. // Use,duplication or disclosure by the Government is subject to restrictions //
  11. // as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data     //
  12. // and Computer Software clause at DFARS 252.227-7013, and/or in similar or   //
  13. // successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -    //
  14. // rights reserved under the Copyright Laws of the United States.             //
  15. //                                                                            //
  16. ////////////////////////////////////////////////////////////////////////////////
  17. #ifndef VKCOMPLETIONFIELD_H
  18. #define VKCOMPLETIONFIELD_H
  19.  
  20. #include <Vk/VkComponent.h>
  21.  
  22. class VkNameList;
  23.  
  24. class VkCompletionField : public VkComponent {
  25.  
  26.   public:
  27.  
  28.     static const char * const enterCallback;
  29.     
  30.     VkCompletionField(const char *name, Widget);
  31.     ~VkCompletionField();
  32.  
  33.     void add(char* name);
  34.     void addList(char* name); // Comma-separated list
  35.     
  36.     void clear(VkNameList *nameList = NULL);    // existing list deleted
  37.  
  38.  
  39.     char *getText();    
  40.     virtual const char* className();
  41.  
  42.     static VkComponent *CreateVkCompletionField(const char *name, Widget parent);
  43.     
  44.   private:
  45.  
  46.     static void expandCallback(Widget, XtPointer, XtPointer);
  47.     static void activateCallback(Widget, XtPointer, XtPointer);
  48.  
  49.   protected:
  50.  
  51.     VkNameList *_currentMatchList;
  52.     VkNameList   *_nameList;
  53.  
  54.     virtual void expand(XmTextVerifyCallbackStruct *);
  55.     virtual void activate(XmTextVerifyCallbackStruct *);
  56. }; 
  57.  
  58. #endif
  59.