UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
QfBrick.H
1 /* QfBrick.H */
2 /* $Id: QfBrick.H,v 1.9 2005/05/16 13:56:33 vlad Exp $ */
3 #ifndef __QfBrick_H
4 #define __QfBrick_H
5 
6 
7 #include <X11/Intrinsic.h>
8 
9 #include <mix/Types.h>
10 #include <mix/Exceptions.h>
11 #include <mix/misc.h>
12 #include <mix/wenv.h>
13 
14 #include <zm/Qmisc.H>
15 
16 
17 /***********************************************************************
18 
19  Main concept of form creation.
20 
21  Phase 1: Object creation.
22 
23  Programmer need to specify where external storage will reside. This
24  method helps to use statically allocated variables to store application
25  specific data.
26 
27  Phase 2: Object linking.
28 
29  Then object needs to be embedded into master structure to be part of
30  visual form.
31 
32  Phase 3: Widget creation.
33 
34  Then object creates owb GUI widgets/gadgets and represents the most
35  chargable (top in parent-child hierarchy) to own parent - master.
36  Radio and other behaviors must be initiated here.
37 
38  Phase 4: Managing.
39 
40  Master decides to manage children to display them and provide
41  interaction.
42 
43  **********************************************************************/
44 
45 
46 class QfBuilding; /* Forwarding */
47 
48 
49 /***********************************************************************
50  * Entry object in form. Common XToolkit object (Widget/Gadget, never
51  * mind) controlled by XtSetValues/XtGetValues. Needs to be overridden
52  * to provide any functionality.
53  */
54 class QfBrick
55 {
56  friend class QfBuilding;
57 
58 protected:
59 
60  Widget wSelf; /* Reference to the XToolkit object. */
61 
63  virtual void create_self (Widget wParent) = 0;
64 
66  virtual void radio_activity ();
67 
69  QCBDescrAr cbList;
70 
73 
74 public:
75 
78  QfBrick ();
79 
81  virtual ~QfBrick ();
82 
84  operator Widget () const
85  { return wSelf; }
86 
88  Widget widget () const
89  { return wSelf; }
90 
91  /*
92  * Adjustable features.
93  */
94 
96  virtual QfType type () const;
97 
99  virtual void manage ();
100 
103  virtual void store_gui ();
104 
107  virtual void load_gui ();
108 
111  virtual void radio_sensitive ();
112 
114  virtual void set_sensitive (Logic flag);
115 
117  virtual Logic get_sensitive ();
118 
120  virtual void add_callback (const QCallback& qcb);
121  friend QfBrick* operator+ (QfBrick* qControl, const QCallback& qcb);
122 
124  virtual void be_radio_active (const QRadioActive& qra);
125  friend QfBrick* operator+ (QfBrick* pThis,
126  const QRadioActive& qra);
127 
129  virtual void realized ();
130 
131 };
132 
133 
134 /***********************************************************************
135  * Template way to create array of bricks.
136  */
137 #define PtrType QfBrick*
138 #define PtrAr BricksAr
139 #include <mix/PtrAr.H>
140 
141 
142 #endif /* QfBrick.H */
virtual void load_gui()
virtual void realized()
virtual void add_callback(const QCallback &qcb)
QRadioActive * qRA
Definition: QfBrick.H:72
virtual void create_self(Widget wParent)=0
virtual void store_gui()
Definition: QfBrick.H:54
Definition: Qmisc.H:44
Widget widget() const
Definition: QfBrick.H:88
virtual QfType type() const
virtual void radio_sensitive()
virtual void manage()
virtual void set_sensitive(Logic flag)
virtual void radio_activity()
virtual ~QfBrick()
virtual Logic get_sensitive()
QCBDescrAr cbList
Definition: QfBrick.H:69
Definition: QfBuilding.H:15
Definition: Qmisc.H:68
virtual void be_radio_active(const QRadioActive &qra)