home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / DtWidgets / ComboBox.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  4.2 KB  |  154 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. #ifdef __cplusplus
  34. extern "C" {
  35. #endif
  36.  
  37. #ifndef AA
  38. #define AA(args) ()
  39. #endif
  40.  
  41. #include <Xm/Xm.h>
  42.  
  43. #ifndef XmNarrowSize
  44. #define XmNarrowSize        "arrowSize"
  45. #endif
  46. #ifndef XmNarrowSpacing
  47. #define XmNarrowSpacing        "arrowSpacing"
  48. #endif
  49. #define XmNarrowType        "arrowType"
  50. #ifndef XmNlist
  51. #define XmNlist            "list"
  52. #endif
  53. #define XmNlistFontList        "listFontList"
  54. #define XmNpoppedUp        "poppedUp"
  55. #ifndef XmNselectedPosition
  56. #define XmNselectedPosition    "selectedPosition"
  57. #endif
  58. #ifndef XmNselectedItem
  59. #define XmNselectedItem        "selectedItem"
  60. #endif
  61. #ifndef XmNtextField
  62. #define XmNtextField        "textField"
  63. #endif
  64. #define XmNtype            "type"
  65. #define XmNupdateLabel        "updateLabel"
  66. #define XmNmoveSelectedItemUp    "moveSelectedItemUp"
  67. #define XmNnoCallbackForArrow    "noCallbackForArrow"
  68.  
  69. #ifndef XmCArrowSize
  70. #define XmCArrowSize        "ArrowSize"
  71. #endif
  72. #ifndef XmCArrowSpacing
  73. #define XmCArrowSpacing        "ArrowSpacing"
  74. #endif
  75. #define XmCArrowType        "ArrowType"
  76. #define XmCHorizontalSpacing    "HorizontalSpacing"
  77. #ifndef XmCList
  78. #define XmCList            "List"
  79. #endif
  80. #define XmCListFontList        "ListFontList"
  81. #define XmCPoppedUp        "PoppedUp"
  82. #ifndef XmCSelectedPosition
  83. #define XmCSelectedPosition    "SelectedPosition"
  84. #endif
  85. #ifndef XmCSelectedItem
  86. #define XmCSelectedItem        "SelectedItem"
  87. #endif
  88. #define XmCType            "Type"
  89. #ifndef XmCTextField
  90. #define XmCTextField        "TextField"
  91. #endif
  92. #define XmCUpdateLabel        "UpdateLabel"
  93. #define XmCVerticalSpacing    "VerticalSpacing"
  94. #define XmCMoveSelectedItemUp    "MoveSelectedItemUp"
  95. #define XmCNoCallbackForArrow    "NoCallbackForArrow"
  96.  
  97. #define XmRArrowType        "ArrowType"
  98. #define XmRType            "Type"
  99.  
  100. /* XmNorientation defines */
  101. #define XmLEFT        0
  102. #define XmRIGHT        1
  103.  
  104. /* ArrowType defines */
  105. #define XmMOTIF        0
  106. #define XmWINDOWS    1
  107.  
  108. /* XmNtype defines */
  109. #define XmDROP_DOWN_LIST_BOX    0
  110. #define XmDROP_DOWN_COMBO_BOX    1
  111.  
  112. /* ComboBox callback info */
  113. #ifndef XmNselectionCallback
  114. #define XmNselectionCallback    "selectionCallback"
  115. #endif
  116. #define XmNmenuPostCallback    "menuPostCallback"
  117. #define XmCR_SELECT        128 /* Large #, so no collisions with XM */
  118. #define XmCR_MENU_POST      129 /* Large #, so no collisions with XM */
  119.  
  120. typedef struct {
  121.    int          reason;
  122.    XEvent    *event;
  123.    XmString  item_or_text;
  124.    int       item_position;
  125. } DtComboBoxCallbackStruct;
  126.  
  127. extern WidgetClass dtComboBoxWidgetClass;
  128.  
  129. typedef struct _DtComboBoxClassRec *DtComboBoxWidgetClass;
  130. typedef struct _DtComboBoxRec      *DtComboBoxWidget;
  131.  
  132. /*
  133.  * External functions which manipulate the ComboBox list of items.
  134.  */
  135. extern Widget DtCreateComboBox (Widget parent, char *name,
  136.                    Arg *arglist, int num_args);
  137. extern void DtComboBoxAddItem (Widget combo, XmString item,
  138.                   int pos, Boolean unique);
  139. extern void DtComboBoxDeletePos (Widget combo, int pos);
  140. extern void DtComboBoxDeleteAllItems(Widget combo);
  141. extern void DtComboBoxSetItem (Widget combo, XmString item);
  142. extern void DtComboBoxSelectItem (Widget combo, XmString item);
  143.  
  144. /* xfe additions */
  145. extern void DtComboBoxAddItemSelected (Widget combo, XmString item, int pos, Boolean unique);
  146. extern void DtComboBoxDeleteAllItems (Widget combo);
  147.  
  148.  
  149. #ifdef __cplusplus
  150. };
  151. #endif
  152.  
  153. #endif    /* _ComboBox_h */
  154.