5 dict = IdentityDictionary.new;
6 dict.put( \left, 16r1 | 16r80 );
7 dict.put( \center, 16r4 | 16r80 );
8 dict.put( \right, 16r2 | 16r80 );
9 dict.put( \topLeft, 16r1 | 16r20 );
10 dict.put( \top, 16r4 | 16r20 );
11 dict.put( \topRight, 16r2 | 16r20 );
12 dict.put( \bottomLeft, 16r1 | 16r40 );
13 dict.put( \bottom, 16r4 | 16r40 );
14 dict.put( \bottomRight, 16r2 | 16r40 );
17 *new { arg alignment; ^dict[alignment]; }
24 dict = IdentityDictionary.new;
25 dict.put( \horizontal, 1 );
26 dict.put( \vertical, 2 );
29 *new { arg alignment; ^dict[alignment]; }
36 dict = IdentityDictionary.new;
37 dict.put( \maxWidgetSize, 16777215 );
40 *new { arg limit; ^dict[limit]; }
54 <control = 16r4000000,
57 <keypad = 16r20000000;
61 if (mods & QKeyModifiers.shift > 0) {cmods = cmods | 131072};
62 if (mods & QKeyModifiers.alt > 0 ) {cmods = cmods | 524288};
66 if (mods & QKeyModifiers.control > 0) {cmods = cmods | 1048576}; // Cmd
67 if (mods & QKeyModifiers.meta > 0) {cmods = cmods | 262144}; // Ctrl
69 { if (mods & QKeyModifiers.control > 0) {cmods = cmods | 262144} } // Ctrl
71 if (mods & QKeyModifiers.keypad > 0) {cmods = cmods | 2097152};
72 // TODO: caps-lock, func, help
86 *new { arg symbol; ^this.perform(symbol); }
92 <linear = 1, <lin = 1,
95 <exponential = 4, <exp = 4,
96 <squared = 5, <sqr = 5,
100 ^ if (curve.isNumber) {curve.asFloat} {this.perform(curve).asInteger};
111 *new { arg name; ^this.perform(name) }
137 *new { arg name; ^this.perform(name) }