MCPcopy Create free account
hub / github.com/cinience/RedisStudio / SetAttribute

Method SetAttribute

DuiLib/Core/UIContainer.cpp:551–579  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

549 }
550
551 void CContainerUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)
552 {
553 if( _tcscmp(pstrName, _T("inset")) == 0 ) {
554 RECT rcInset = { 0 };
555 LPTSTR pstr = NULL;
556 rcInset.left = _tcstol(pstrValue, &pstr, 10); ASSERT(pstr);
557 rcInset.top = _tcstol(pstr + 1, &pstr, 10); ASSERT(pstr);
558 rcInset.right = _tcstol(pstr + 1, &pstr, 10); ASSERT(pstr);
559 rcInset.bottom = _tcstol(pstr + 1, &pstr, 10); ASSERT(pstr);
560 SetInset(rcInset);
561 }
562 else if( _tcscmp(pstrName, _T("mousechild")) == 0 ) SetMouseChildEnabled(_tcscmp(pstrValue, _T("true")) == 0);
563 else if( _tcscmp(pstrName, _T("vscrollbar")) == 0 ) {
564 EnableScrollBar(_tcscmp(pstrValue, _T("true")) == 0, GetHorizontalScrollBar() != NULL);
565 }
566 else if( _tcscmp(pstrName, _T("vscrollbarstyle")) == 0 ) {
567 EnableScrollBar(true, GetHorizontalScrollBar() != NULL);
568 if( GetVerticalScrollBar() ) GetVerticalScrollBar()->ApplyAttributeList(pstrValue);
569 }
570 else if( _tcscmp(pstrName, _T("hscrollbar")) == 0 ) {
571 EnableScrollBar(GetVerticalScrollBar() != NULL, _tcscmp(pstrValue, _T("true")) == 0);
572 }
573 else if( _tcscmp(pstrName, _T("hscrollbarstyle")) == 0 ) {
574 EnableScrollBar(GetVerticalScrollBar() != NULL, true);
575 if( GetHorizontalScrollBar() ) GetHorizontalScrollBar()->ApplyAttributeList(pstrValue);
576 }
577 else if( _tcscmp(pstrName, _T("childpadding")) == 0 ) SetChildPadding(_ttoi(pstrValue));
578 else CControlUI::SetAttribute(pstrName, pstrValue);
579 }
580
581 void CContainerUI::SetManager(CPaintManagerUI* pManager, CControlUI* pParent, bool bInit)
582 {

Callers

nothing calls this directly

Calls 1

ApplyAttributeListMethod · 0.80

Tested by

no test coverage detected