|
@@ -61,8 +61,13 @@ extern "C" {
|
61
|
61
|
and all callbacks from the cmUi to the master app.
|
62
|
62
|
use the cmUiDriverArg_t structure
|
63
|
63
|
|
|
64
|
+ 3) The panel tabs act like radio buttons. When a tab is
|
|
65
|
+ selected the clicked tab generates one event for each
|
|
66
|
+ tab (cId=kPanelUiCId usrId=panelId) w/ ival=1 for the
|
|
67
|
+ selected tab and ival=0 for all other tabs.
|
|
68
|
+
|
64
|
69
|
TODO:
|
65
|
|
- 0) Remove the 'cbArg' from the cmUiDriverArg_t record and
|
|
70
|
+ 0) [DONE] Remove the 'cbArg' from the cmUiDriverArg_t record and
|
66
|
71
|
pass it as a separate paramenter in the cmUiDriverFunc_t calls.
|
67
|
72
|
|
68
|
73
|
1) The controls should be based on a multilevel tree model
|
|
@@ -93,9 +98,9 @@ extern "C" {
|
93
|
98
|
Many of the fields are not use for event callbacks.
|
94
|
99
|
Which fields are used under which circumstances should
|
95
|
100
|
be documented. This would allow decreasing the size
|
96
|
|
- of the record during serialization.7
|
|
101
|
+ of the record during serialization.
|
97
|
102
|
|
98
|
|
- 6) Write a serialization/deserialization routines for cmUiDriverArg_t.
|
|
103
|
+ 6) [DONE] Write a serialization/deserialization routines for cmUiDriverArg_t.
|
99
|
104
|
unsigned cmUiDriverArgSerialBufByteCount(const cmUiDriverArg_t* a);
|
100
|
105
|
cmUiRC_t cmUiDriverArgSerialize( const cmUiDriverArg_t* a, char* buf, bufByteCnt );
|
101
|
106
|
cmUiRC_t cmUiDriverArgDeserialize( cmUiDriverArg_t* a, const char* buf, bufByteCnt );
|
|
@@ -153,7 +158,11 @@ extern "C" {
|
153
|
158
|
// Automatically sets and restores the ambient appId.
|
154
|
159
|
// In a plug-in context this function is generally called
|
155
|
160
|
// just prior a instantiating a plug-in object.
|
156
|
|
- cmUiRC_t cmUiCreateApp( cmUiH_t uiH, unsigned appId );
|
|
161
|
+ cmUiRC_t cmUiCreateApp( cmUiH_t uiH, unsigned appId, unsigned asSubIdx );
|
|
162
|
+
|
|
163
|
+ // Return true if 'appId' is active.
|
|
164
|
+ bool cmUiAppIsActive( cmUiH_t uiH, unsigned appId );
|
|
165
|
+
|
157
|
166
|
|
158
|
167
|
// Notify the cmUi manager that the resources associated
|
159
|
168
|
// with a client application can be released.
|
|
@@ -170,7 +179,10 @@ extern "C" {
|
170
|
179
|
// 'appId' an ambient parameter the User API calls are slightly
|
171
|
180
|
// simplified because they do not have to include it in each of the
|
172
|
181
|
// function calls.
|
173
|
|
- cmUiRC_t cmUiSetAppId( cmUiH_t uiH, unsigned appId );
|
|
182
|
+ //cmUiRC_t cmUiSetAppId( cmUiH_t uiH, unsigned appId );
|
|
183
|
+ //unsigned cmUiAppId( cmUiH_t uiH );
|
|
184
|
+
|
|
185
|
+ unsigned cmUiAppIdToAsSubIndex( cmUiH_t uiH, unsigned appId );
|
174
|
186
|
|
175
|
187
|
// Return the count of app's.
|
176
|
188
|
unsigned cmUiAppCount( cmUiH_t uiH );
|
|
@@ -185,46 +197,59 @@ extern "C" {
|
185
|
197
|
// Client Application API
|
186
|
198
|
//
|
187
|
199
|
|
188
|
|
-
|
189
|
|
- cmUiRC_t cmUiCreatePanel( cmUiH_t uiH, unsigned newPanelId, const cmChar_t* label );
|
190
|
|
-
|
191
|
|
- cmUiRC_t cmUiCreateBtn( cmUiH_t uiH, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags );
|
192
|
|
- cmUiRC_t cmUiCreateCheck( cmUiH_t uiH, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags, bool dflt );
|
193
|
|
- cmUiRC_t cmUiCreateLabel( cmUiH_t uiH, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags );
|
194
|
|
- cmUiRC_t cmUiCreateText( cmUiH_t uiH, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags, const cmChar_t* text );
|
195
|
|
- cmUiRC_t cmUiCreateNumber( cmUiH_t uiH, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags, double min, double max, double incr, double dflt );
|
196
|
|
- cmUiRC_t cmUiCreateHSlider( cmUiH_t uiH, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags, double min, double max, double incr, double dflt );
|
197
|
|
- cmUiRC_t cmUiCreateVSlider( cmUiH_t uiH, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags, double min, double max, double incr, double dflt );
|
198
|
|
- cmUiRC_t cmUiCreateProgress( cmUiH_t uiH, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags, int min, int max, int dflt );
|
199
|
|
- cmUiRC_t cmUiCreateHMeter( cmUiH_t uiH, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags, int min, int max, int dflt );
|
200
|
|
- cmUiRC_t cmUiCreateVMeter( cmUiH_t uiH, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags, int min, int max, int dflt );
|
201
|
|
- cmUiRC_t cmUiCreateFileBtn( cmUiH_t uiH, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags, const cmChar_t* dfltDir, const cmChar_t* patStr );
|
202
|
|
- cmUiRC_t cmUiCreateDirBtn( cmUiH_t uiH, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags, const cmChar_t* dfltDir );
|
203
|
|
- cmUiRC_t cmUiCreateMenuBtn( cmUiH_t uiH, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags );
|
204
|
|
- cmUiRC_t cmUiCreateMenuBtnV( cmUiH_t uiH, unsigned panelId, unsigned id, const cmChar_t* lavel, unsigned flags, const cmChar_t* label0, unsigned id0, va_list vl );
|
205
|
|
- cmUiRC_t cmUiCreateMenuBtnA( cmUiH_t uiH, unsigned panelId, unsigned id, const cmChar_t* lavel, unsigned flags, const cmChar_t* label0, unsigned id0, ... );
|
206
|
|
- cmUiRC_t cmUiCreateMenuBtnJson( cmUiH_t uiH, unsigned panelId, unsigned id, const cmChar_t* lavel, unsigned flags, const cmJsonNode_t* root, const cmChar_t* memberLabel );
|
207
|
|
- cmUiRC_t cmUiCreateList( cmUiH_t uiH, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags, unsigned visibleRowCnt );
|
208
|
|
- cmUiRC_t cmUiCreateListV( cmUiH_t uiH, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags, unsigned visibleRowCnt, const cmChar_t* label0, unsigned id0, va_list vl );
|
209
|
|
- cmUiRC_t cmUiCreateListA( cmUiH_t uiH, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags, unsigned visibleRowCnt, const cmChar_t* label0, unsigned id0, ... );
|
210
|
|
- cmUiRC_t cmUiCreateListJson( cmUiH_t uiH, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags, unsigned visibleRowCnt, const cmJsonNode_t* root, const cmChar_t* memberLabel );
|
|
200
|
+ // See above note on panel tabs acting like radio buttons.
|
|
201
|
+ cmUiRC_t cmUiCreatePanel( cmUiH_t uiH, unsigned appId, unsigned newPanelId, const cmChar_t* label, unsigned flags );
|
|
202
|
+
|
|
203
|
+ cmUiRC_t cmUiCreateBtn( cmUiH_t uiH, unsigned appId, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags );
|
|
204
|
+ cmUiRC_t cmUiCreateCheck( cmUiH_t uiH, unsigned appId, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags, bool dflt );
|
|
205
|
+ cmUiRC_t cmUiCreateLabel( cmUiH_t uiH, unsigned appId, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags );
|
|
206
|
+ cmUiRC_t cmUiCreateString( cmUiH_t uiH, unsigned appId, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags, const cmChar_t* text );
|
|
207
|
+ cmUiRC_t cmUiCreateConsole( cmUiH_t uiH, unsigned appId, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags, const cmChar_t* text );
|
|
208
|
+ cmUiRC_t cmUiCreateNumber( cmUiH_t uiH, unsigned appId, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags, double min, double max, double incr, double dflt );
|
|
209
|
+ cmUiRC_t cmUiCreateHSlider( cmUiH_t uiH, unsigned appId, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags, double min, double max, double incr, double dflt );
|
|
210
|
+ cmUiRC_t cmUiCreateVSlider( cmUiH_t uiH, unsigned appId, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags, double min, double max, double incr, double dflt );
|
|
211
|
+ cmUiRC_t cmUiCreateProgress( cmUiH_t uiH, unsigned appId, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags, int min, int max, int dflt );
|
|
212
|
+ cmUiRC_t cmUiCreateHMeter( cmUiH_t uiH, unsigned appId, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags, int min, int max, int dflt );
|
|
213
|
+ cmUiRC_t cmUiCreateVMeter( cmUiH_t uiH, unsigned appId, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags, int min, int max, int dflt );
|
|
214
|
+ cmUiRC_t cmUiCreateFileBtn( cmUiH_t uiH, unsigned appId, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags, const cmChar_t* dfltDir, const cmChar_t* patStr );
|
|
215
|
+ cmUiRC_t cmUiCreateDirBtn( cmUiH_t uiH, unsigned appId, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags, const cmChar_t* dfltDir );
|
|
216
|
+ cmUiRC_t cmUiCreateMenuBtn( cmUiH_t uiH, unsigned appId, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags );
|
|
217
|
+ cmUiRC_t cmUiCreateMenuBtnV( cmUiH_t uiH, unsigned appId, unsigned panelId, unsigned id, const cmChar_t* lavel, unsigned flags, const cmChar_t* label0, unsigned id0, va_list vl );
|
|
218
|
+ cmUiRC_t cmUiCreateMenuBtnA( cmUiH_t uiH, unsigned appId, unsigned panelId, unsigned id, const cmChar_t* lavel, unsigned flags, const cmChar_t* label0, unsigned id0, ... );
|
|
219
|
+ cmUiRC_t cmUiCreateMenuBtnJson( cmUiH_t uiH, unsigned appId, unsigned panelId, unsigned id, const cmChar_t* lavel, unsigned flags, const cmJsonNode_t* root, const cmChar_t* memberLabel );
|
|
220
|
+ cmUiRC_t cmUiCreateList( cmUiH_t uiH, unsigned appId, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags, unsigned visibleRowCnt );
|
|
221
|
+ cmUiRC_t cmUiCreateListV( cmUiH_t uiH, unsigned appId, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags, unsigned visibleRowCnt, const cmChar_t* label0, unsigned id0, va_list vl );
|
|
222
|
+ cmUiRC_t cmUiCreateListA( cmUiH_t uiH, unsigned appId, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags, unsigned visibleRowCnt, const cmChar_t* label0, unsigned id0, ... );
|
|
223
|
+ cmUiRC_t cmUiCreateListJson( cmUiH_t uiH, unsigned appId, unsigned panelId, unsigned id, const cmChar_t* label, unsigned flags, unsigned visibleRowCnt, const cmJsonNode_t* root, const cmChar_t* memberLabel );
|
211
|
224
|
|
212
|
225
|
// If 'id' identifies a 'list' control use tabs as column separators.
|
213
|
|
- cmUiRC_t cmUiAppendListEle( cmUiH_t uiH, unsigned panelId, unsigned id, const cmChar_t* text, unsigned eleId );
|
|
226
|
+ cmUiRC_t cmUiAppendListEle( cmUiH_t uiH, unsigned appId, unsigned panelId, unsigned id, const cmChar_t* text, unsigned eleId );
|
|
227
|
+
|
|
228
|
+ // Remove all the elements of a list control.
|
|
229
|
+ cmUiRC_t cmUiClearList( cmUiH_t uiH, unsigned appId, unsigned panelId, unsigned id );
|
|
230
|
+
|
|
231
|
+ // Enable/Disable a control
|
|
232
|
+ cmUiRC_t cmUiEnableCtl( cmUiH_t uiH, unsigned appId, unsigned panelId, unsigned id, bool enableFl );
|
|
233
|
+
|
|
234
|
+ // Enable/disable all controls on a panel except those included in the var args list.
|
|
235
|
+ // Terminate the var args list with cmInvalidId.
|
|
236
|
+ cmUiRC_t cmUiEnableAllExceptV( cmUiH_t uiH, unsigned appId, unsigned panelId, bool enableFl, va_list vl );
|
|
237
|
+ cmUiRC_t cmUiEnableAllExcept( cmUiH_t uiH, unsigned appId, unsigned panelId, bool enableFl, ... );
|
214
|
238
|
|
215
|
239
|
// If 'id' identifies a panel then all control belonging to the panel
|
216
|
240
|
// will also be destroyed.
|
217
|
|
- cmUiRC_t cmUiDestroyCtl( cmUiH_t uiH, unsigned id );
|
|
241
|
+ cmUiRC_t cmUiDestroyCtl( cmUiH_t uiH, unsigned appId, unsigned id );
|
218
|
242
|
|
219
|
243
|
// Returns true if the control exists.
|
220
|
244
|
// For panels set id=panelId.
|
221
|
|
- bool cmUiCtlExists( cmUiH_t uiH, unsigned panelId, unsigned id );
|
|
245
|
+ //bool cmUiCtlExists( cmUiH_t uiH, unsigned appId, unsigned panelId, unsigned id );
|
222
|
246
|
|
223
|
247
|
// Destroy all the controls in a panel.
|
224
|
|
- cmUiRC_t cmUiClearPanel( cmUiH_t uiH, unsigned panelId );
|
225
|
|
-
|
|
248
|
+ cmUiRC_t cmUiClearPanel( cmUiH_t uiH, unsigned appId, unsigned panelId );
|
226
|
249
|
|
|
250
|
+ //------------------------------------------------------------------------------------------
|
227
|
251
|
// Location:
|
|
252
|
+
|
228
|
253
|
// 1) If a 'next rect' is set the control will be placed according to it.
|
229
|
254
|
// 2) If cmUiSetBaseCol() was set then the control will be placed at the
|
230
|
255
|
// base col and base row.
|
|
@@ -242,29 +267,29 @@ extern "C" {
|
242
|
267
|
// Get/Set the fill directions. If the 'fill columns' flag is enabled
|
243
|
268
|
// then the next control is placed below the previous control otherwise
|
244
|
269
|
// the next control is placed to the right of the next control.
|
245
|
|
- bool cmUiFillRows( cmUiH_t uiH, unsigned panelId );
|
246
|
|
- bool cmUiSetFillRows( cmUiH_t uiH, unsigned panelId, bool enableFl );
|
|
270
|
+ bool cmUiFillRows( cmUiH_t uiH, unsigned appId, unsigned panelId );
|
|
271
|
+ bool cmUiSetFillRows( cmUiH_t uiH, unsigned appId, unsigned panelId, bool enableFl );
|
247
|
272
|
|
248
|
273
|
|
249
|
274
|
// Place the next control to the right/below of the previous ctl.
|
250
|
275
|
// These flags override the current fill row/col setting.
|
251
|
276
|
// Note that 'place right' and 'place below' are mutually
|
252
|
277
|
// exclusive. Enabling one disables the other.
|
253
|
|
- void cmUiPlaceRight( cmUiH_t uiH, unsigned panelId );
|
254
|
|
- void cmUiPlaceBelow( cmUiH_t uiH, unsigned panelId );
|
|
278
|
+ void cmUiPlaceRight( cmUiH_t uiH, unsigned appId, unsigned panelId );
|
|
279
|
+ void cmUiPlaceBelow( cmUiH_t uiH, unsigned appId, unsigned panelId );
|
255
|
280
|
|
256
|
281
|
// Place the next control at the base column below the previous ctl.
|
257
|
|
- void cmUiNewLine( cmUiH_t uiH, unsigned panelId );
|
|
282
|
+ void cmUiNewLine( cmUiH_t uiH, unsigned appId, unsigned panelId );
|
258
|
283
|
|
259
|
284
|
// Set/Get current base col and return previous value. Place the next
|
260
|
285
|
// control on the base row.
|
261
|
|
- int cmUiBaseCol( cmUiH_t uiH, unsigned panelId );
|
262
|
|
- int cmUiSetBaseCol( cmUiH_t uiH, unsigned panelId, int x );
|
|
286
|
+ int cmUiBaseCol( cmUiH_t uiH, unsigned appId, unsigned panelId );
|
|
287
|
+ int cmUiSetBaseCol( cmUiH_t uiH, unsigned appId, unsigned panelId, int x );
|
263
|
288
|
|
264
|
289
|
|
265
|
290
|
// Set/Get current base row and return previous value.
|
266
|
|
- int cmUiBaseRow( cmUiH_t uiH, unsigned panelId );
|
267
|
|
- int cmUiSetBaseRow( cmUiH_t uiH, unsigned panelId, int y );
|
|
291
|
+ int cmUiBaseRow( cmUiH_t uiH, unsigned appId, unsigned panelId );
|
|
292
|
+ int cmUiSetBaseRow( cmUiH_t uiH, unsigned appId, unsigned panelId, int y );
|
268
|
293
|
|
269
|
294
|
// Size:
|
270
|
295
|
// 1) If a 'next rect' is set the control will be placed according
|
|
@@ -277,81 +302,80 @@ extern "C" {
|
277
|
302
|
|
278
|
303
|
// Get/Set the default control width and height.
|
279
|
304
|
// Set returns previous value.
|
280
|
|
- int cmUiW( cmUiH_t uiH, unsigned panelId );
|
281
|
|
- int cmUiH( cmUiH_t uiH, unsigned panelId );
|
282
|
|
- int cmUiSetW( cmUiH_t uiH, unsigned panelId, int w );
|
283
|
|
- int cmUiSetH( cmUiH_t uiH, unsigned panelId, int h );
|
284
|
|
- void cmUiSetWH( cmUiH_t uiH, unsigned panelId, int w, int h );
|
|
305
|
+ int cmUiW( cmUiH_t uiH, unsigned appId, unsigned panelId );
|
|
306
|
+ int cmUiH( cmUiH_t uiH, unsigned appId, unsigned panelId );
|
|
307
|
+ int cmUiSetW( cmUiH_t uiH, unsigned appId, unsigned panelId, int w );
|
|
308
|
+ int cmUiSetH( cmUiH_t uiH, unsigned appId, unsigned panelId, int h );
|
|
309
|
+ void cmUiSetWH( cmUiH_t uiH, unsigned appId, unsigned panelId, int w, int h );
|
285
|
310
|
|
286
|
311
|
// Get/Set the control width and height for only the next control.
|
287
|
312
|
// Set returns previous value.
|
288
|
|
- int cmUiNextW( cmUiH_t uiH, unsigned panelId );
|
289
|
|
- int cmUiNextH( cmUiH_t uiH, unsigned panelId );
|
290
|
|
- void cmUiSetNextW( cmUiH_t uiH, unsigned panelId, int w );
|
291
|
|
- void cmUiSetNextH( cmUiH_t uiH, unsigned panelId, int h );
|
292
|
|
- void cmUiSetNextWH( cmUiH_t uiH, unsigned panelId, int w, int h );
|
|
313
|
+ int cmUiNextW( cmUiH_t uiH, unsigned appId, unsigned panelId );
|
|
314
|
+ int cmUiNextH( cmUiH_t uiH, unsigned appId, unsigned panelId );
|
|
315
|
+ void cmUiSetNextW( cmUiH_t uiH, unsigned appId, unsigned panelId, int w );
|
|
316
|
+ void cmUiSetNextH( cmUiH_t uiH, unsigned appId, unsigned panelId, int h );
|
|
317
|
+ void cmUiSetNextWH( cmUiH_t uiH, unsigned appId, unsigned panelId, int w, int h );
|
293
|
318
|
|
294
|
319
|
// Get/Set the default inter-control borders
|
295
|
320
|
// Set returns previous value.
|
296
|
|
- int cmUiHBorder( cmUiH_t uiH, unsigned panelId );
|
297
|
|
- int cmUiVBorder( cmUiH_t uiH, unsigned panelId );
|
298
|
|
- int cmUiSetHBorder( cmUiH_t uiH, unsigned panelId, int w );
|
299
|
|
- int cmUiSetVBorder( cmUiH_t uiH, unsigned panelId, int h );
|
|
321
|
+ int cmUiHBorder( cmUiH_t uiH, unsigned appId, unsigned panelId );
|
|
322
|
+ int cmUiVBorder( cmUiH_t uiH, unsigned appId, unsigned panelId );
|
|
323
|
+ int cmUiSetHBorder( cmUiH_t uiH, unsigned appId, unsigned panelId, int w );
|
|
324
|
+ int cmUiSetVBorder( cmUiH_t uiH, unsigned appId, unsigned panelId, int h );
|
300
|
325
|
|
301
|
326
|
// Get/Set the 'next' inter-control borders
|
302
|
327
|
// Set returns previous value.
|
303
|
|
- int cmUiNextHBorder( cmUiH_t uiH, unsigned panelId );
|
304
|
|
- int cmUiNextVBorder( cmUiH_t uiH, unsigned panelId );
|
305
|
|
- int cmUiSetNextHBorder( cmUiH_t uiH, unsigned panelId, int w );
|
306
|
|
- int cmUiSetNextVBorder( cmUiH_t uiH, unsigned panelId, int h );
|
|
328
|
+ int cmUiNextHBorder( cmUiH_t uiH, unsigned appId, unsigned panelId );
|
|
329
|
+ int cmUiNextVBorder( cmUiH_t uiH, unsigned appId, unsigned panelId );
|
|
330
|
+ int cmUiSetNextHBorder( cmUiH_t uiH, unsigned appId, unsigned panelId, int w );
|
|
331
|
+ int cmUiSetNextVBorder( cmUiH_t uiH, unsigned appId, unsigned panelId, int h );
|
307
|
332
|
|
308
|
333
|
// Place the next control at the following coordinates. The
|
309
|
334
|
// specified coordinates are only active during the next
|
310
|
335
|
// cmUiCreateXXX() call. Setting the 'next rect' overrides all
|
311
|
336
|
// other layout directives.
|
312
|
|
- cmUiRC_t cmUiNextRect( cmUiH_t uiH, unsigned panelId, int x, int y, int w, int h );
|
|
337
|
+ cmUiRC_t cmUiNextRect( cmUiH_t uiH, unsigned appId, unsigned panelId, int x, int y, int w, int h );
|
313
|
338
|
|
314
|
339
|
// Get the location/size of the previously created control.
|
315
|
340
|
// All ref. args are optional.
|
316
|
|
- cmUiRC_t cmUiPrevRect( cmUiH_t uiH, unsigned panelId, int* xRef, int* yRef, int* wRef, int* hRef );
|
317
|
|
- int cmUiPrevL( cmUiH_t uiH, unsigned panelId );
|
318
|
|
- int cmUiPrevT( cmUiH_t uiH, unsigned panelId );
|
319
|
|
- int cmUiPrevR( cmUiH_t uiH, unsigned panelId );
|
320
|
|
- int cmUiPrevB( cmUiH_t uiH, unsigned panelId );
|
321
|
|
- int cmUiPrevW( cmUiH_t uiH, unsigned panelId );
|
322
|
|
- int cmUiPrevH( cmUiH_t uiH, unsigned panelId );
|
323
|
|
-
|
324
|
|
-
|
|
341
|
+ cmUiRC_t cmUiPrevRect( cmUiH_t uiH, unsigned appId, unsigned panelId, int* xRef, int* yRef, int* wRef, int* hRef );
|
|
342
|
+ int cmUiPrevL( cmUiH_t uiH, unsigned appId, unsigned panelId );
|
|
343
|
+ int cmUiPrevT( cmUiH_t uiH, unsigned appId, unsigned panelId );
|
|
344
|
+ int cmUiPrevR( cmUiH_t uiH, unsigned appId, unsigned panelId );
|
|
345
|
+ int cmUiPrevB( cmUiH_t uiH, unsigned appId, unsigned panelId );
|
|
346
|
+ int cmUiPrevW( cmUiH_t uiH, unsigned appId, unsigned panelId );
|
|
347
|
+ int cmUiPrevH( cmUiH_t uiH, unsigned appId, unsigned panelId );
|
|
348
|
+
|
|
349
|
+ //------------------------------------------------------------------------------------------
|
325
|
350
|
//
|
326
|
351
|
// Get/set the value of UI control.
|
327
|
352
|
//
|
328
|
353
|
|
329
|
354
|
// TODO:
|
330
|
|
- // 1) Still need functions for setting auxilliary values like
|
|
355
|
+ // + Need functions for setting auxilliary values like
|
331
|
356
|
// min,max,etc..
|
332
|
|
- // 2) A coherent model needs to be selected for determining
|
333
|
|
- // how local values get set. As it is local values are
|
334
|
|
- // only set via callbacs from the UI driver.
|
335
|
357
|
|
336
|
358
|
// Set the value associated with a control.
|
337
|
|
- // These functions would be better named 'cmUiSendXXX()' since
|
338
|
|
- // they don't actually set the local value but rather call the
|
339
|
|
- // driver to set the UI value. The driver may then respond with
|
340
|
|
- // a callback which will set the local value. One advantage of
|
341
|
|
- // this is that the value will be filtered according to the
|
342
|
|
- // ui's rules (e.g. min, max .... )
|
343
|
|
- cmUiRC_t cmUiSetInt( cmUiH_t uiH, unsigned id, int v );
|
344
|
|
- cmUiRC_t cmUiSetUInt( cmUiH_t uiH, unsigned id, unsigned v );
|
345
|
|
- cmUiRC_t cmUiSetDouble( cmUiH_t uiH, unsigned id, double v );
|
346
|
|
- cmUiRC_t cmUiSetString( cmUiH_t uiH, unsigned id, const cmChar_t* v );
|
|
359
|
+ // Set the local value of the specified control and then
|
|
360
|
+ // send the value to the UI driver so that the UI reflects this value.
|
|
361
|
+ cmUiRC_t cmUiSetInt( cmUiH_t uiH, unsigned appId, unsigned id, int v );
|
|
362
|
+ cmUiRC_t cmUiSetUInt( cmUiH_t uiH, unsigned appId, unsigned id, unsigned v );
|
|
363
|
+ cmUiRC_t cmUiSetDouble( cmUiH_t uiH, unsigned appId, unsigned id, double v );
|
|
364
|
+ cmUiRC_t cmUiSetString( cmUiH_t uiH, unsigned appId, unsigned id, const cmChar_t* v );
|
|
365
|
+ cmUiRC_t cmUiSetVPrintf(cmUiH_t uiH, unsigned appId, unsigned id, const cmChar_t* fmt, va_list vl );
|
|
366
|
+ cmUiRC_t cmUiSetPrintf( cmUiH_t uiH, unsigned appId, unsigned id, const cmChar_t* fmt, ... );
|
347
|
367
|
|
348
|
368
|
// Get the value associated with a control. These functions return
|
349
|
369
|
// the control value cached in the local control, they do not need
|
350
|
370
|
// to call the driver and are therefore very fast.
|
351
|
|
- int cmUiInt( cmUiH_t uiH, unsigned id );
|
352
|
|
- unsigned cmUiUInt( cmUiH_t uiH, unsigned id );
|
353
|
|
- double cmUiDouble( cmUiH_t uiH, unsigned id );
|
354
|
|
- const cmChar_t* cmUiString( cmUiH_t uiH, unsigned id );
|
|
371
|
+ int cmUiInt( cmUiH_t uiH, unsigned appId, unsigned id );
|
|
372
|
+ unsigned cmUiUInt( cmUiH_t uiH, unsigned appId, unsigned id );
|
|
373
|
+ double cmUiDouble( cmUiH_t uiH, unsigned appId, unsigned id );
|
|
374
|
+ const cmChar_t* cmUiString( cmUiH_t uiH, unsigned appId, unsigned id );
|
|
375
|
+
|
|
376
|
+ unsigned cmUiListEleCount( cmUiH_t uiH, unsigned appId, unsigned id );
|
|
377
|
+ unsigned cmUiListEleId( cmUiH_t uiH, unsigned appId, unsigned id, unsigned index );
|
|
378
|
+ const cmChar_t* cmUiListEleLabel( cmUiH_t uiH, unsigned appId, unsigned id, unsigned index );
|
355
|
379
|
|
356
|
380
|
// Query/set the current error state.
|
357
|
381
|
cmUiRC_t cmUiLastRC( cmUiH_t uiH );
|