Free Electron
datauiAS.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __dataui_dataiAS_h__
8 #define __dataui_dataiAS_h__
9 
10 #include "shape/shapeAS.h"
11 namespace fe
12 {
13 namespace ext
14 {
15 
16 /** manipulator.
17  Typically populated and created on-demand by a Handler, so generic
18  attributes are used.
19  */
21  virtual public AsPoint,
22  virtual public AsBounded,
23  public Initialize<AsManipulator>
24 {
25  public:
26  void initialize(void)
27  {
28  add(points, FE_USE("generic:g_0"));
29  add(state, FE_USE("generic:i_0"));
30  add(base, FE_USE("manip:base"));
31  add(style, FE_USE("generic:i_1"));
32  }
33  /// manipulated points
35 
36  /// actively manipulating
38 
39  /// base location used during manipulation
41 
42  /// style 0: single center sphere 1: gnomon-like jack
44 };
45 
46 /// manipulated
48  virtual public AsPoint,
49  public Initialize<AsManipulatable>
50 {
51  public:
52  void initialize(void)
53  {
54  add(prev, FE_USE("manip:prev"));
55  }
56  /// base location used during manipulation
58 };
59 
60 /// Rectangular widget
61 class AsWidget :
62  public AccessorSet,
63  public Initialize<AsWidget>
64 {
65  public:
66  void initialize(void)
67  {
68  add(start, FE_USE("win:rb_start"));
69  add(end, FE_USE("win:rb_end"));
70  add(depth, FE_USE("win:rb_depth"));
71  add(screen, FE_USE("win:wd_screen"));
72  }
73  /// 2D start point of rectangle
75  /// 2D end point of rectangle
77  /// depth of button
79  /// x1 y1 x2 y2; x1 < x2 and y1 < y2
81 };
82 
83 /// Rectangular UI button
84 class AsRectButton :
85  public AsWidget,
86  public Initialize<AsRectButton>
87 {
88  public:
89  void initialize(void)
90  {
91  add(state, FE_USE("win:rb_state"));
92  add(signal, FE_USE("win:rb_signal"));
93  add(unsignal, FE_USE("win:rb_unsignal"));
94  add(label, FE_USE("dataui:name"));
95  add(accelerator, FE_USE("win:accel"));
96  add(unaccelerator, FE_USE("win:unaccel"));
97  }
98  /// state of button
100  /// signal callback
102  /// unsignal callback
104  /// label
106  /// accelerator (as WindowEvent)
108  /// unaccelerator (as WindowEvent)
110 };
111 
112 ///
113 class AsValueButton :
114  public AccessorSet,
115  public Initialize<AsValueButton>
116 {
117  public:
118  void initialize(void)
119  {
120  add(value, FE_USE("win:vb_value"));
121  add(minimum, FE_USE("win:vb_min"));
122  add(maximum, FE_USE("win:vb_max"));
123  add(scale, FE_USE("win:vb_scale"));
124  }
125  ///
126  Accessor<Vector2> value;
127  Accessor<Vector2> minimum;
128  Accessor<Vector2> maximum;
129  Accessor<Vector2> scale;
130 };
131 
132 /// string entry
134  public AsWidget,
135  public Initialize<AsStringEntry>
136 {
137  public:
138  void initialize(void)
139  {
140  add(state, FE_USE("win:se_state")); // differs from rb_
141  add(text, FE_USE("dataui:name"));
142  add(cursor, FE_USE("win:se_cursor"));
143  add(signal, FE_USE("win:rb_signal"));
144  }
145  /// state of button
147  /// text
149  /// cursor
151  /// signal callback
153 };
154 
155 class AsPane :
156  public AsWidget,
157  public Initialize<AsPane>
158 {
159  public:
160  void initialize(void)
161  {
162  add(group, FE_USE("win:group"));
163  }
164  /// widgets in pane
166 };
167 
168 class AsBinding :
169  public AccessorSet,
170  public Initialize<AsBinding>
171 {
172  public:
173  void initialize(void)
174  {
175  add(name, FE_USE("name"));
176  add(event, FE_USE("bind:event"));
177  }
178  /// name
180  /// event
181  Accessor< String > event;
182 };
183 
184 
185 } /* namespace ext */
186 } /* namespace fe */
187 
188 #endif /* __dataui_dataiAS_h__ */
189 
Accessor< Record > signal
signal callback
Definition: datauiAS.h:101
Accessor< int > style
style 0: single center sphere 1: gnomon-like jack
Definition: datauiAS.h:43
Accessor< int > state
actively manipulating
Definition: datauiAS.h:37
Set of accessors.
Definition: AccessorSet.h:18
string entry
Definition: datauiAS.h:133
Rectangular widget.
Definition: datauiAS.h:61
manipulated
Definition: datauiAS.h:47
kernel
Definition: namespace.dox:3
Per-class participation in the Initialized <> mechanism.
Definition: Initialized.h:117
Rectangular UI button.
Definition: datauiAS.h:84
The main data access class for the data system.
Definition: Accessor.h:128
Accessor< Record > unaccelerator
unaccelerator (as WindowEvent)
Definition: datauiAS.h:109
Accessor< Record > signal
signal callback
Definition: datauiAS.h:152
Accessor< Record > unsignal
unsignal callback
Definition: datauiAS.h:103
manipulator.
Definition: datauiAS.h:20
Accessor< Real > depth
depth of button
Definition: datauiAS.h:78
Accessor< sp< RecordGroup > > points
manipulated points
Definition: datauiAS.h:34
Accessor< int > state
state of button
Definition: datauiAS.h:146
Accessor< Vector2 > end
2D end point of rectangle
Definition: datauiAS.h:76
Accessor< Record > accelerator
accelerator (as WindowEvent)
Definition: datauiAS.h:107
Accessor< String > text
text
Definition: datauiAS.h:148
possible bounding area/volume attributes
Definition: shapeAS.h:148
Accessor< String > label
label
Definition: datauiAS.h:105
const String & name(void) const
Return the components chosen name.
Definition: Component.h:77
Accessor< SpatialVector > prev
base location used during manipulation
Definition: datauiAS.h:57
Accessor< int > state
state of button
Definition: datauiAS.h:99
Accessor< Vector2 > start
2D start point of rectangle
Definition: datauiAS.h:74
Accessor< int > cursor
cursor
Definition: datauiAS.h:150
Accessor< SpatialVector > base
base location used during manipulation
Definition: datauiAS.h:40
Accessor< Vector4 > screen
x1 y1 x2 y2; x1 < x2 and y1 < y2
Definition: datauiAS.h:80