cwIo.h/cpp, cwUi.h/cpp : Added emptyParent().
This commit is contained in:
parent
def7727d23
commit
4f2174c82d
10
cwIo.cpp
10
cwIo.cpp
@ -3844,6 +3844,16 @@ cw::rc_t cw::io::uiSetLogLine( handle_t h, unsigned uuId, const char* text )
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cw::rc_t cw::io::uiEmptyParent( handle_t h, unsigned uuId)
|
||||||
|
{
|
||||||
|
rc_t rc;
|
||||||
|
ui::handle_t uiH;
|
||||||
|
if((rc = _handleToUiHandle(h,uiH)) == kOkRC )
|
||||||
|
rc = ui::emptyParent(uiH,uuId);
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
cw::rc_t cw::io::uiSetClickable( handle_t h, unsigned uuId, bool clickableFl )
|
cw::rc_t cw::io::uiSetClickable( handle_t h, unsigned uuId, bool clickableFl )
|
||||||
{
|
{
|
||||||
rc_t rc;
|
rc_t rc;
|
||||||
|
3
cwIo.h
3
cwIo.h
@ -386,7 +386,8 @@ namespace cw
|
|||||||
|
|
||||||
rc_t uiSetNumbRange( handle_t h, unsigned uuId, double minValue, double maxValue, double stepValue, unsigned decPl, double value );
|
rc_t uiSetNumbRange( handle_t h, unsigned uuId, double minValue, double maxValue, double stepValue, unsigned decPl, double value );
|
||||||
rc_t uiSetProgRange( handle_t h, unsigned uuId, double minValue, double maxValue, double value );
|
rc_t uiSetProgRange( handle_t h, unsigned uuId, double minValue, double maxValue, double value );
|
||||||
rc_t uiSetLogLine( handle_t h, unsigned uuId, const char* text );
|
rc_t uiSetLogLine( handle_t h, unsigned uuId, const char* text );
|
||||||
|
rc_t uiEmptyParent( handle_t h, unsigned uuId); // empty a list or select of all children
|
||||||
|
|
||||||
rc_t uiSetClickable( handle_t h, unsigned uuId, bool clickableFl=true );
|
rc_t uiSetClickable( handle_t h, unsigned uuId, bool clickableFl=true );
|
||||||
rc_t uiClearClickable( handle_t h, unsigned uuId );
|
rc_t uiClearClickable( handle_t h, unsigned uuId );
|
||||||
|
27
cwUi.cpp
27
cwUi.cpp
@ -1951,6 +1951,33 @@ cw::rc_t cw::ui::setLogLine( handle_t h, unsigned uuId, const char* text )
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cw::rc_t cw::ui::emptyParent( handle_t h, unsigned uuId )
|
||||||
|
{
|
||||||
|
|
||||||
|
ui_t* p = _handleToPtr(h);
|
||||||
|
rc_t rc = kOkRC;
|
||||||
|
|
||||||
|
const char* mFmt = "{ \"op\":\"empty\", \"uuId\":%i }";
|
||||||
|
const int mbufN = 256;
|
||||||
|
char mbuf[mbufN];
|
||||||
|
|
||||||
|
if( snprintf(mbuf,mbufN,mFmt,uuId) >= mbufN-1 )
|
||||||
|
{
|
||||||
|
rc = cwLogError(kBufTooSmallRC,"The msg buffer is too small for 'empty' msg.");
|
||||||
|
goto errLabel;
|
||||||
|
}
|
||||||
|
|
||||||
|
if((rc = _websockSend(p,kInvalidId,mbuf)) != kOkRC )
|
||||||
|
{
|
||||||
|
cwLogError(rc,"'empty' msg transmit failed.");
|
||||||
|
goto errLabel;
|
||||||
|
}
|
||||||
|
|
||||||
|
errLabel:
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
cw::rc_t cw::ui::setClickable( handle_t h, unsigned uuId, bool clickableFl )
|
cw::rc_t cw::ui::setClickable( handle_t h, unsigned uuId, bool clickableFl )
|
||||||
{ return _setPropertyFlag( h, UI_CLICKABLE_LABEL, uuId, clickableFl ); }
|
{ return _setPropertyFlag( h, UI_CLICKABLE_LABEL, uuId, clickableFl ); }
|
||||||
|
|
||||||
|
1
cwUi.h
1
cwUi.h
@ -130,6 +130,7 @@ namespace cw
|
|||||||
rc_t setNumbRange( handle_t h, unsigned uuId, double minValue, double maxValue, double stepValue, unsigned decPl, double value );
|
rc_t setNumbRange( handle_t h, unsigned uuId, double minValue, double maxValue, double stepValue, unsigned decPl, double value );
|
||||||
rc_t setProgRange( handle_t h, unsigned uuId, double minValue, double maxValue, double value );
|
rc_t setProgRange( handle_t h, unsigned uuId, double minValue, double maxValue, double value );
|
||||||
rc_t setLogLine( handle_t h, unsigned uuId, const char* text );
|
rc_t setLogLine( handle_t h, unsigned uuId, const char* text );
|
||||||
|
rc_t emptyParent( handle_t h, unsigned uuId );
|
||||||
|
|
||||||
rc_t setClickable( handle_t h, unsigned uuId, bool clickableFl=true );
|
rc_t setClickable( handle_t h, unsigned uuId, bool clickableFl=true );
|
||||||
rc_t clearClickable( handle_t h, unsigned uuId );
|
rc_t clearClickable( handle_t h, unsigned uuId );
|
||||||
|
Loading…
Reference in New Issue
Block a user