|
@@ -618,7 +618,7 @@ cmUiRC_t _cmUiCreateCtl( cmUi_t* p, unsigned appId, unsigned panelId, cmUiCId_t
|
618
|
618
|
else
|
619
|
619
|
{
|
620
|
620
|
if( cmArrayIsValid(ap->ctlArrH) == false || usrId >= cmArrayCount(ap->ctlArrH) )
|
621
|
|
- ctl = cmArrayClr(cmUiCtl_t,ap->ctlArrH,usrId);
|
|
621
|
+ ctl = cmArrayClr(cmUiCtl_t,ap->ctlArrH,usrId);
|
622
|
622
|
else
|
623
|
623
|
{
|
624
|
624
|
ctl = cmArrayPtr(cmUiCtl_t,ap->ctlArrH,usrId);
|
|
@@ -1501,6 +1501,19 @@ cmUiRC_t cmUiClearPanel( cmUiH_t uiH, unsigned appId, unsigned panelId )
|
1501
|
1501
|
return rc;
|
1502
|
1502
|
}
|
1503
|
1503
|
|
|
1504
|
+cmUiRC_t cmUiSelectPanel( cmUiH_t uiH, const cmChar_t* label )
|
|
1505
|
+{
|
|
1506
|
+ cmUiRC_t rc = kOkUiRC;
|
|
1507
|
+ cmUi_t* p = _cmUiHandleToPtr(uiH);
|
|
1508
|
+
|
|
1509
|
+
|
|
1510
|
+
|
|
1511
|
+
|
|
1512
|
+ return rc;
|
|
1513
|
+
|
|
1514
|
+}
|
|
1515
|
+
|
|
1516
|
+
|
1504
|
1517
|
cmUiRC_t cmUiNextRect( cmUiH_t uiH, unsigned appId, unsigned panelId, int x, int y, int w, int h )
|
1505
|
1518
|
{
|
1506
|
1519
|
cmUi_t* p = _cmUiHandleToPtr(uiH);
|
|
@@ -2095,6 +2108,29 @@ const cmChar_t* cmUiListEleLabel( cmUiH_t uiH, unsigned appId, unsigned id, unsi
|
2095
|
2108
|
return cmArrayPtr(cmUiListEle_t, ctl->idArrH, index )->label;
|
2096
|
2109
|
}
|
2097
|
2110
|
|
|
2111
|
+unsigned cmUiListEleLabelToIndex( cmUiH_t uiH, unsigned appId, unsigned id, const cmChar_t* label )
|
|
2112
|
+{
|
|
2113
|
+ cmUi_t* p = _cmUiHandleToPtr(uiH);
|
|
2114
|
+ cmUiCtl_t* ctl;
|
|
2115
|
+ cmUiRC_t rc;
|
|
2116
|
+ unsigned i,n;
|
|
2117
|
+
|
|
2118
|
+ if( label == NULL )
|
|
2119
|
+ return cmInvalidIdx;
|
|
2120
|
+
|
|
2121
|
+ if((rc = _cmUiFastFindCtl(p,appId,id,&ctl,true)) != kOkUiRC )
|
|
2122
|
+ return cmInvalidIdx;
|
|
2123
|
+
|
|
2124
|
+ if( cmArrayIsValid( ctl->idArrH )==false || (n = cmArrayCount( ctl->idArrH))==0 )
|
|
2125
|
+ return cmInvalidIdx;
|
|
2126
|
+
|
|
2127
|
+ for(i=0; i<n; ++i)
|
|
2128
|
+ if( cmTextCmp(cmArrayPtr(cmUiListEle_t, ctl->idArrH, i )->label,label) == 0 )
|
|
2129
|
+ return i;
|
|
2130
|
+
|
|
2131
|
+ return cmInvalidIdx;
|
|
2132
|
+}
|
|
2133
|
+
|
2098
|
2134
|
|
2099
|
2135
|
|
2100
|
2136
|
cmUiRC_t cmUiLastRC( cmUiH_t uiH )
|