home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / viewkit / xcontact / include / Attributes.h next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  1.7 KB  |  71 lines

  1. /*
  2.  * Copyright (C) 1994, Silicon Graphics, Inc.
  3.  * All Rights Reserved.
  4.  *
  5.  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6.  * the contents of this file may not be disclosed to third parties, copied or
  7.  * duplicated in any form, in whole or in part, without the prior written
  8.  * permission of Silicon Graphics, Inc.
  9.  *
  10.  * RESTRICTED RIGHTS LEGEND:
  11.  * Use, duplication or disclosure by the Government is subject to restrictions
  12.  * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13.  * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14.  * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15.  * rights reserved under the Copyright Laws of the United States.
  16.  */
  17. ////////////////////////////////////////////////////////
  18. //  Attributes.h --
  19. ////////////////////////////////////////////////////////
  20. #ifndef ATTRIBUTES_H
  21. #define ATTRIBUTES_H
  22.  
  23. #include "OkToggleButton.h"
  24.  
  25. class Attributes;
  26.  
  27. class AttributeToggle : public OkToggleButton {
  28.  
  29.  private:
  30.   Attributes*   _parent;
  31.  
  32.  public:
  33.   AttributeToggle( const char* name, Widget, Attributes* parent );
  34.   ~AttributeToggle() {}
  35.  
  36.   void valueChanged( Boolean );
  37. };
  38.  
  39.  
  40. class CardView;
  41.  
  42. #define ATTR_COUNT 4
  43.  
  44. class Attributes : public OkComponent {
  45.  
  46.  friend class CardView;
  47.  friend class AttributeToggle;
  48.  
  49.  private:
  50.   AttributeToggle*    _attributeToggles[ ATTR_COUNT ];
  51.   CardView*        _parentView;
  52.  
  53.   Boolean        _radioStyle;
  54.   Widget        _radioRowColumn;
  55.   Widget        _rowColumn;
  56.  
  57.  public:
  58.   Attributes( const char* name, Widget parent );
  59.   ~Attributes();
  60.   const char* className() { return "Attributes"; }
  61.  
  62.   void setRadioStyle( Boolean b=TRUE );
  63.   void setAttrLabel( int i, const char* label );
  64.   void hideAttr( int i );
  65.   void showAttr( int i );
  66.  
  67. };
  68.  
  69.  
  70. #endif
  71.