Browse Source

cmUi.h/c: Base row/col now have both set and get accessors. Added cmUiNewline().

master
kevin 11 years ago
parent
commit
3491613a50
2 changed files with 380 additions and 249 deletions
  1. 352
    240
      cmUi.c
  2. 28
    9
      cmUi.h

+ 352
- 240
cmUi.c
File diff suppressed because it is too large
View File


+ 28
- 9
cmUi.h View File

@@ -251,15 +251,20 @@ extern "C" {
251 251
   // Note that 'place right' and 'place below' are mutually
252 252
   // exclusive. Enabling one disables the other.
253 253
   void     cmUiPlaceRight( cmUiH_t uiH, unsigned panelId );          
254
-  void     cmUiPlaceBelow( cmUiH_t uiH, unsigned panelId );          
254
+  void     cmUiPlaceBelow( cmUiH_t uiH, unsigned panelId );
255 255
 
256
-  // Set current base col and return previous value. Place the next
256
+  // Place the next control at the base column below the previous ctl.
257
+  void     cmUiNewLine(    cmUiH_t uiH, unsigned panelId );
258
+
259
+  // Set/Get current base col and return previous value. Place the next
257 260
   // control on the base row.
258
-  int      cmUiBaseCol(    cmUiH_t uiH, unsigned panelId, int x );   
261
+  int      cmUiBaseCol(       cmUiH_t uiH, unsigned panelId );
262
+  int      cmUiSetBaseCol(    cmUiH_t uiH, unsigned panelId, int x );   
259 263
 
260 264
 
261
-  // Set current base row and return previous value.
262
-  int      cmUiBaseRow(    cmUiH_t uiH, unsigned panelId, int y );   
265
+  // 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 );   
263 268
 
264 269
   // Size:
265 270
   // 1) If a 'next rect' is set the control will be placed according
@@ -272,14 +277,18 @@ extern "C" {
272 277
 
273 278
   // Get/Set the default control width and height.
274 279
   // Set returns previous value.
275
-  int      cmUiW( cmUiH_t uiH, unsigned panelId );         
276
-  int      cmUiH( cmUiH_t uiH, unsigned panelId );
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 );
277 284
   void     cmUiSetWH(  cmUiH_t uiH, unsigned panelId, int w, int h );
278 285
 
279 286
   // Get/Set the control width and height for only the next control.
280 287
   // Set returns previous value.
281
-  int      cmUiNextW(  cmUiH_t uiH, unsigned panelId );
282
-  int      cmUiNextH(  cmUiH_t uiH, unsigned panelId );
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 );
283 292
   void     cmUiSetNextWH( cmUiH_t uiH, unsigned panelId, int w, int h );
284 293
 
285 294
   // Get/Set the default inter-control borders
@@ -301,6 +310,16 @@ extern "C" {
301 310
   // cmUiCreateXXX() call. Setting the 'next rect' overrides all
302 311
   // other layout directives.
303 312
   cmUiRC_t cmUiNextRect( cmUiH_t uiH, unsigned panelId, int x, int y, int w, int h );
313
+  
314
+  // Get the location/size of the previously created control.
315
+  // 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 );
304 323
 
305 324
 
306 325
   //

Loading…
Cancel
Save