43
spMinimumExpanding = 3,
34
49
readonly attribute long widgetID;
36
51
attribute Widget parent;
37
52
attribute long x,y,width,height;
38
53
attribute boolean visible;
54
attribute SizePolicy hSizePolicy;
55
attribute SizePolicy vSizePolicy;
44
interface HBox : Widget {
47
interface VBox : Widget {
70
MenuBarPanel = 0x0008,
71
ToolBarPanel = 0x0009,
72
LineEditPanel = 0x000a,
73
TabWidgetPanel = 0x000b,
84
interface Frame : Widget {
85
void constructor( Widget parent );
87
attribute long margin;
88
attribute long linewidth;
89
attribute long midlinewidth;
91
attribute long framestyle;
92
attribute Shape frameshape;
93
attribute Shadow frameshadow;
97
Some alignmentflags used by various widgets.
98
Taken from Qt. (akrille)
113
Directions. From Qt. (akrille)
115
enum Direction { LeftToRight, RightToLeft, TopToBottom, BottomToTop };
117
/** The LayoutBox. - Arrange your widgets vertical or horizontal.
119
Usage is quite simple: Add the widgets you have in the right order
120
to the layoutbox by calling addWidget().
121
Thats it, no ._addChild or .parent with this widget.
123
For more information see QBoxLayout.
126
interface LayoutBox : Frame {
127
/// Sets the direction of the widgets. Can be changed on-the-fly.
128
attribute Direction direction;
129
/// Adds a widget with the stretch-factor and the alignment.
130
void addWidget( Widget widget, long stretch, long align );
131
void addWidget( Widget widget, long stretch );
132
void addWidget( Widget widget );
133
/// Inserts the Widget at the given position
134
void insertWidget( long position, Widget widget, long stretch, long align );
135
void insertWidget( long position, Widget widget, long stretch );
136
void insertWidget( long position, Widget widget );
137
/// Adds a stretch with stretch-factor.
138
void addStretch( long stretch );
140
/// Adds a Spacer the given width or height according your direction.
141
void addSpace( long space );
142
/** [From QBoxLayout]
143
Limits the perpendicular dimension of the box (e.g. height if the
144
box is LeftToRight) to a minimum of size. Other constraints may
147
void addStrut( long size );
148
/// Adds a separator (a horizontal/vertical line)
149
void addSeparator(long stretch, long align);
150
void addSeparator(long stretch);
152
/// Adds a line with width and space left/right (top/bottom)
153
void addLine(long width, long space, long stretch, long align);
154
void addLine(long width, long space, long stretch);
155
void addLine(long width, long space);
156
/// The spacing between all widgets.
157
attribute long spacing;
158
/// The margin at the outsideborder.
159
attribute long layoutmargin;
162
/** IMHO (akrille) this should be removed and everywhere replaced with the LayoutBox... */
163
interface HBox : Frame {
164
attribute long spacing;
167
interface VBox : Frame {
168
attribute long spacing;
171
/** The PopupBox. - It can hide the widgets inside or show them as an own window.
173
Usage is quite simple: Create the Widget you want to be hidable inside
174
a container like LayoutBox or a normal widget. Then create the PopupBox
175
and call <Name_of_PopupBox>.widget( <Name_of_your_Container> ).
176
Thats it, no ._addChild or .parent with this widget.
179
interface PopupBox : Frame {
180
/// The direction of the PopupBox.
181
attribute Direction direction;
182
/// The name of the box, this gets shown inside the titlebar if its not inside but an own toplevel-widget.
183
attribute string name;
184
/// Sets the widget that is shown/hidden.
185
attribute Widget widget;
50
188
interface Button : Widget {
189
void constructor( Widget parent );
190
void constructor( string text, Widget parent );
51
192
attribute string text;
54
interface Poti : Widget {
55
// FIXME: text should probably be called caption here
56
attribute string text, color;
57
attribute float min, max, value;
193
attribute boolean toggle;
194
readonly attribute boolean pressed;
195
readonly attribute boolean clicked; //clicked( true ) is emitted whenever the button
196
//is pressed an released with the mouse cursor
197
//still above the button
200
interface Poti : Frame {
201
attribute string caption, color;
202
attribute float min, max, value;
203
attribute float logarithmic;
204
attribute long range;
207
interface Fader : Widget {
208
void constructor( Widget parent );
210
attribute string caption, color;
211
attribute float min, max, value;
212
attribute float logarithmic;
60
215
interface LineEdit : Widget {
216
void constructor( Widget parent );
61
218
attribute string caption;
62
219
attribute string text;
65
222
interface SpinBox : Widget {
223
void constructor( Widget parent );
66
225
attribute string caption;
67
226
attribute long min, max, value;
70
229
interface ComboBox : Widget {
230
void constructor( Widget parent );
71
232
attribute string caption;
72
233
attribute sequence<string> choices;
73
234
attribute string value;
237
interface Graph : Widget {
238
void constructor( Widget parent );
240
attribute string caption;
241
attribute float minx, maxx, miny, maxy;
247
interface GraphLine {
248
attribute Graph graph;
249
attribute boolean editable;
250
attribute string color;
251
attribute sequence<GraphPoint> points;
254
enum TextBottom { South, North, West, East };
256
interface Label : Frame {
257
/// The text to show.
258
attribute string text;
259
/// The alignment of the text. See enum Align
260
attribute long align;
262
/*writeonly*/ attribute long fontsize;
264
/*writeonly*/ attribute string fontfamily;
265
/// Direction of the text in normal L-R-mode. Is used to rotate the text accordingly.
266
attribute TextBottom bottom;
270
// - The calculation of the peak is very easy, but it can be changed without changing all styles..
272
/** * Styles for the LevelMeter. *
274
- lmNormalBars: <count> colored Bars.
275
- lmFireBars: One Bar moving up and down.
276
- lmLineBars: One Bar moving up and down, color depends on the invalue.
279
- 1: one color (blue) with clipping (red). The old aRtsControl style.
280
- lmLEDs: <count> but not more than [height|width]/15 LEDs. (not yet implemented)
281
So minimum size of the LED's is 15 pixel.
282
substyle (first tree belong together others are to be or'ed):
286
- 4: Circular (otherwise Rectangular)
287
- 8: SingleColor (otherwise in colors green/yellow/red)
288
- lmAnalog: An old-style analog VU-Meter. (not yet implemented)
289
- lmSmall: One Bar with the color depending on the invalue.
291
enum LevelMeterStyle { lmNormalBars, lmFireBars, lmLineBars, lmLEDs, lmAnalog, lmSmall };
296
interface LevelMeter : Frame {
298
The Style of the LevelMeter.
300
attribute LevelMeterStyle style;
302
A substyle. Is different on every style;-)
304
attribute long substyle;
306
How many Bars/LEDs it should have. If the size is smaller than
307
this count it will have only that many Bars. So set Count to something
308
very high for smooth vu-meters.
309
Note: not every Style will honor this.
310
Note2: Perhaps this could be integrated into substyle.
312
attribute long count;
314
Sets the peakfalloff. Set to 0 to deactivate peaks.
315
Is used for weighting the average.
316
Peak is evaluated: ( peakfalloff * oldpeak + invalue ) / ( peakfalloff + 1 )
318
attribute long peakfalloff;
320
Minimum and minimum dB for the LevelMeter.
321
Maximum should always be 0dB.
323
attribute float mindB, maxdB;
325
The incomming signal...
326
This attribute always returns 0.0, altough it processes all its input.
328
/*writeonly*/ attribute float invalue;
330
The Direction of the levelmeter from null-value to highest value.
332
attribute Direction direction;
336
enum Position { posLeft=0x0001, posRight=0x0002, posTop=0x0004, posBottom=0x0008 };
338
/// Tickmarks for LevelMeter / Fader / etc.
339
interface Tickmarks : Frame {
340
void constructor( float min, float max, Direction dir, long pos );
341
/// Minimum/Maximum shown value.
342
attribute float min, max;
343
/// The minimal stepsize for numbers, and substep for smaller marks.
344
attribute float minstep, substep;
345
/// Direction from min to max.
346
attribute Direction direction;
348
* The position of the levelmeter/fader/etc which gets the marks.
349
* Only Left/Right are needed. As if direction is Up/Down...
350
* For stereotickmarks set this to posLeft|posRight.
352
attribute long position;
355
/// A Fader specially for volumes
356
// Maybe something can be ported to the normal Fader.
357
interface VolumeFader : Frame {
358
void constructor( float dbmin, float dbmax, Direction dir );
359
/// Minimum/Maximum values in dB
360
attribute float dbmin, dbmax;
361
/// Direction from min to max
362
attribute Direction direction;
364
*The actual volume (calling this value only changes the gui and not the
365
* underlying/connected objects ie. doesn't send a change notification.)
367
attribute float volume;
368
/// The actual volume in dB (no change notification)
369
attribute float dbvolume;
77
373
* A gui factory is an object that can create a Widget which provides a
78
374
* user interface for a running object (for instance, you might have an