Pārlūkot izejas kodu

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

master
kevin 11 gadus atpakaļ
vecāks
revīzija
3491613a50
2 mainītis faili ar 380 papildinājumiem un 249 dzēšanām
  1. 352
    240
      cmUi.c
  2. 28
    9
      cmUi.h

+ 352
- 240
cmUi.c
Failā izmaiņas netiks attēlotas, jo tās ir par lielu
Parādīt failu


+ 28
- 9
cmUi.h Parādīt failu

251
   // Note that 'place right' and 'place below' are mutually
251
   // Note that 'place right' and 'place below' are mutually
252
   // exclusive. Enabling one disables the other.
252
   // exclusive. Enabling one disables the other.
253
   void     cmUiPlaceRight( cmUiH_t uiH, unsigned panelId );          
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
   // control on the base row.
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
   // Size:
269
   // Size:
265
   // 1) If a 'next rect' is set the control will be placed according
270
   // 1) If a 'next rect' is set the control will be placed according
272
 
277
 
273
   // Get/Set the default control width and height.
278
   // Get/Set the default control width and height.
274
   // Set returns previous value.
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
   void     cmUiSetWH(  cmUiH_t uiH, unsigned panelId, int w, int h );
284
   void     cmUiSetWH(  cmUiH_t uiH, unsigned panelId, int w, int h );
278
 
285
 
279
   // Get/Set the control width and height for only the next control.
286
   // Get/Set the control width and height for only the next control.
280
   // Set returns previous value.
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
   void     cmUiSetNextWH( cmUiH_t uiH, unsigned panelId, int w, int h );
292
   void     cmUiSetNextWH( cmUiH_t uiH, unsigned panelId, int w, int h );
284
 
293
 
285
   // Get/Set the default inter-control borders
294
   // Get/Set the default inter-control borders
301
   // cmUiCreateXXX() call. Setting the 'next rect' overrides all
310
   // cmUiCreateXXX() call. Setting the 'next rect' overrides all
302
   // other layout directives.
311
   // other layout directives.
303
   cmUiRC_t cmUiNextRect( cmUiH_t uiH, unsigned panelId, int x, int y, int w, int h );
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
   //

Notiek ielāde…
Atcelt
Saglabāt