home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / fontutil.6 / fontutil / fontutils-0.6 / include / Item.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-27  |  2.4 KB  |  73 lines

  1. /* Item.h: public header file for an ``item widget'': a composite widget
  2.    consisting of a label and a (string) value.  Both subwidgets are
  3.    created by the Item itself, and geometry requests from them are
  4.    ignored.
  5.  
  6. Copyright (C) 1992 Free Software Foundation, Inc.
  7.  
  8. This program is free software; you can redistribute it and/or modify
  9. it under the terms of the GNU General Public License as published by
  10. the Free Software Foundation; either version 2, or (at your option)
  11. any later version.
  12.  
  13. This program is distributed in the hope that it will be useful,
  14. but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. GNU General Public License for more details.
  17.  
  18. You should have received a copy of the GNU General Public License
  19. along with this program; if not, write to the Free Software
  20. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  21.  
  22. #ifndef ITEM_WIDGET_H
  23. #define ITEM_WIDGET_H
  24.  
  25. #include "xt-common.h"
  26.  
  27. #include "types.h"
  28.  
  29.  
  30. /* Resources (in addition to those in Core and Composite):
  31.  
  32. Name        Class        RepType        Default Value
  33. ----        -----        -------        -------------
  34. callback    Callback    Callback    NULL
  35.   These routines are called when the accept_value action (see below) is
  36.   performed.  The call_data passed is the contents of the `value'
  37.   resource.
  38.  
  39. label        Label        String        name of widget
  40.   A constant string displayed before the editable text.  The characters
  41.   in this string are copied by the Item widget.
  42.  
  43. length        Length        Dimension    1
  44.   The longest `value' allowed, in characters.
  45.  
  46. translations    Translations    TranslationTable NULL
  47.   The event bindings associated with this widget.  The Item
  48.   provides an action `AcceptValue', which calls the routines in the
  49.   `callback' resource.  `AcceptValue' does not take any parameters.
  50.  
  51.   By default, no events are bound to `AcceptValue'.  Default bindings
  52.   (perhaps to RET and CTRL-M) should be put in the app-defaults file.
  53.  
  54. value        Value        String        empty string
  55.   The editable text.  The longest value allowed is the value of `length'.
  56. */
  57.  
  58. /* Convenience procedures.  */
  59. extern string ItemGetLabelString (Widget);
  60. extern string ItemGetValueString (Widget);
  61. extern Widget ItemGetValueWidget (Widget);
  62.  
  63.  
  64.  
  65. /* The class variable, for arguments to XtCreateWidget et al.  */
  66. extern WidgetClass itemWidgetClass;
  67.  
  68. /* The class and instance record types.  */
  69. typedef struct _ItemClassRec *ItemWidgetClass;
  70. typedef struct _ItemRec *ItemWidget;
  71.  
  72. #endif /* not ITEM_WIDGET_H */
  73.