Initial import of the CDE 2.1.30 sources from the Open Group.
[oweals/cde.git] / cde / programs / dtinfo / dtinfo / wwl / include / WWL / WRect.h
1 /*
2  * $XConsortium: WRect.h /main/3 1996/06/11 16:58:33 cde-hal $
3  *
4  * Copyright (c) 1991 HaL Computer Systems, Inc.  All rights reserved.
5  * UNPUBLISHED -- rights reserved under the Copyright Laws of the United
6  * States.  Use of a copyright notice is precautionary only and does not
7  * imply publication or disclosure.
8  * 
9  * This software contains confidential information and trade secrets of HaL
10  * Computer Systems, Inc.  Use, disclosure, or reproduction is prohibited
11  * without the prior express written permission of HaL Computer Systems, Inc.
12  * 
13  *                         RESTRICTED RIGHTS LEGEND
14  * Use, duplication, or disclosure by the Government is subject to
15  * restrictions as set forth in subparagraph (c)(l)(ii) of the Rights in
16  * Technical Data and Computer Software clause at DFARS 252.227-7013.
17  *                        HaL Computer Systems, Inc.
18  *                  1315 Dell Avenue, Campbell, CA  95008
19  * 
20  */
21
22 // This code is automatically generated in -*- C++ -*-
23 #ifndef WRect_h
24 #define WRect_h
25
26 #include "wwl.h"
27 #include <X11/Object.h>
28 #include "WObject.h"
29 #include <X11/RectObj.h>
30
31 class WRect : public WObject {
32 public :
33                 DEFINE_INIT (WRect, WObject, rectObjClass)
34                 DEFINE_POPUP_INIT (WRect, WObject, rectObjClass)
35 inline  void    Manage () const { XtManageChild (widget); }
36 inline  void    Unmanage () const { XtUnmanageChild (widget); }
37 inline  Boolean IsManaged () const      { return XtIsManaged (widget); }
38 /*
39   inline  void  SetSensitive (Boolean o) const { XtSetSensitive (widget, o); }
40  while a bug exists in Motif 
41  */
42 inline  void    SetSensitive (Boolean o, Boolean remanage = False) const
43
44     Boolean sensitive = IsSensitive();
45     
46     // only if values differ 
47     
48     if ((sensitive && !o) ||
49         (!sensitive && o)) {
50         XtSetSensitive (widget, o);
51         if (remanage)
52           {
53             Unmanage();
54             Manage();
55           }
56     }
57 }
58
59 inline  Boolean IsSensitive () const    { return XtIsSensitive (widget); }
60                 DEFINE_GETTER_SETTER (AncestorSensitive,Boolean,"ancestorSensitive")
61                 DEFINE_GETTER_SETTER (X,Position,"x")
62                 DEFINE_GETTER_SETTER (Y,Position,"y")
63                 DEFINE_GETTER_SETTER (Width,Dimension,"width")
64                 DEFINE_GETTER_SETTER (Height,Dimension,"height")
65                 DEFINE_GETTER_SETTER (BorderWidth,Dimension,"borderWidth")
66                 DEFINE_GETTER_SETTER (Sensitive,Boolean,"sensitive")
67 };
68
69 #define NULLWRect               WRect((Widget)0)
70
71 #endif // WRect_h