home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.2 Development Libraries / SGI IRIX 6.2 Development Libraries.iso / dist / sgitcl_dev.idb / usr / sgitcl / include / ComboBox.h.z / ComboBox.h
Encoding:
C/C++ Source or Header  |  1996-03-15  |  3.4 KB  |  114 lines

  1. /*
  2.  * ComboBox.h, Interleaf, 16aug93 2:37pm Version 1.1.
  3.  */
  4.  
  5. /***********************************************************
  6. Copyright 1993 Interleaf, Inc.
  7.  
  8. Permission to use, copy, modify, and distribute this software
  9. and its documentation for any purpose without fee is granted,
  10. provided that the above copyright notice appear in all copies
  11. and that both copyright notice and this permission notice appear
  12. in supporting documentation, and that the name of Interleaf not
  13. be used in advertising or publicly pertaining to distribution of
  14. the software without specific written prior permission.
  15.  
  16. Interleaf makes no representation about the suitability of this
  17. software for any purpose. It is provided "AS IS" without any
  18. express or implied warranty. 
  19. ******************************************************************/
  20.  
  21. /*
  22.  *  (C) Copyright 1991,1992, 1993
  23.  *  Interleaf, Inc.
  24.  *  Nine Hillside Avenue, Waltham, MA  02154
  25.  *
  26.  * ComboBox.h: 
  27.  * 
  28.  * Public header file for DtComboBoxWidget.
  29.  */
  30. #ifndef _ComboBox_h
  31. #define _ComboBox_h
  32.  
  33. #ifndef AA
  34. #define AA(args) ()
  35. #endif
  36.  
  37. #include <Xm/Xm.h>
  38.  
  39. #define XmNarrowSize        "arrowSize"
  40. #define XmNarrowSpacing        "arrowSpacing"
  41. #define XmNarrowType        "arrowType"
  42. #define XmNlist            "list"
  43. #define XmNlistFontList        "listFontList"
  44. #define XmNpoppedUp        "poppedUp"
  45. #define XmNselectedPosition    "selectedPosition"
  46. #define XmNselectedItem        "selectedItem"
  47. #define XmNtextField        "textField"
  48. #define XmNcomboBoxType        "comboBoxType"
  49. #define XmNupdateLabel        "updateLabel"
  50.  
  51. #define XmCArrowSize        "ArrowSize"
  52. #define XmCArrowSpacing        "ArrowSpacing"
  53. #define XmCArrowType        "ArrowType"
  54. #define XmCHorizontalSpacing    "HorizontalSpacing"
  55. #define XmCList            "List"
  56. #define XmCListFontList        "ListFontList"
  57. #define XmCPoppedUp        "PoppedUp"
  58. #define XmCSelectedPosition    "SelectedPosition"
  59. #define XmCSelectedItem        "SelectedItem"
  60. #define XmCComboBoxType        "ComboBoxType"
  61. #define XmCTextField        "TextField"
  62. #define XmCUpdateLabel        "UpdateLabel"
  63. #define XmCVerticalSpacing    "VerticalSpacing"
  64.  
  65. #define XmRArrowType        "ArrowType"
  66. #define XmRComboBoxType        "ComboBoxType"
  67.  
  68. /* XmNorientation defines */
  69. #define XmLEFT        0
  70. #define XmRIGHT        1
  71.  
  72. /* ArrowType defines */
  73. #define XmMOTIF        0
  74. #define XmWINDOWS    1
  75.  
  76. /* XmNtype defines */
  77. #define XmDROP_DOWN_LIST_BOX    0
  78. #define XmDROP_DOWN_COMBO_BOX    1
  79.  
  80. /* ComboBox callback info */
  81. #define XmNselectionCallback    "selectionCallback"
  82. #define XmNmenuPostCallback    "menuPostCallback"
  83. #define XmCR_COMBO_SELECT    128 /* Large #, so no collisions with XM */
  84. #define XmCR_MENU_POST      129 /* Large #, so no collisions with XM */
  85.  
  86. typedef struct {
  87.    int          reason;
  88.    XEvent    *event;
  89.    XmString  item_or_text;
  90.    int       item_position;
  91. } DtComboBoxCallbackStruct;
  92.  
  93. extern WidgetClass dtComboBoxWidgetClass;
  94.  
  95. typedef struct _DtComboBoxClassRec *DtComboBoxWidgetClass;
  96. typedef struct _DtComboBoxRec      *DtComboBoxWidget;
  97.  
  98. /*
  99.  * External functions which manipulate the ComboBox list of items.
  100.  */
  101. extern Widget DtCreateComboBox(Widget parent, char *name,
  102.                    Arg *arglist, int num_args);
  103. extern Widget DtCreateDropDownComboBox(Widget, char *, Arg *, int);
  104. extern Widget DtCreateDropDownList(Widget, char *, Arg *, int);
  105.  
  106. extern void DtComboBoxAddItem(DtComboBoxWidget combo, XmString item,
  107.                   int pos, Boolean unique);
  108. extern void DtComboBoxDeletePos(DtComboBoxWidget combo, int pos);
  109. extern void DtComboBoxSetItem(DtComboBoxWidget combo, XmString item);
  110. extern void DtComboBoxSelectItem(DtComboBoxWidget combo, XmString item,
  111.                 Boolean notify);
  112.  
  113. #endif    /* _ComboBox_h */
  114.