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

Method Selected

DuiLib/Control/UIOption.cpp:66–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64 }
65
66 void COptionUI::Selected(bool bSelected)
67 {
68 if( m_bSelected == bSelected ) return;
69 m_bSelected = bSelected;
70 if( m_bSelected ) m_uButtonState |= UISTATE_SELECTED;
71 else m_uButtonState &= ~UISTATE_SELECTED;
72
73 if( m_pManager != NULL ) {
74 if( !m_sGroupName.IsEmpty() ) {
75 if( m_bSelected ) {
76 CStdPtrArray* aOptionGroup = m_pManager->GetOptionGroup(m_sGroupName);
77 for( int i = 0; i < aOptionGroup->GetSize(); i++ ) {
78 COptionUI* pControl = static_cast<COptionUI*>(aOptionGroup->GetAt(i));
79 if( pControl != this ) {
80 pControl->Selected(false);
81 }
82 }
83 m_pManager->SendNotify(this, DUI_MSGTYPE_SELECTCHANGED);
84 }
85 }
86 else {
87 m_pManager->SendNotify(this, DUI_MSGTYPE_SELECTCHANGED);
88 }
89 }
90
91 Invalidate();
92 }
93
94 bool COptionUI::Activate()
95 {

Callers 8

CheckBoxSelectedMethod · 0.80
OnDBClickItemMethod · 0.80
SetItemCheckBoxMethod · 0.80
OnSelectChangedMethod · 0.80
OnKeyAddMethod · 0.80
OnKeyVerboseMethod · 0.80
OnMenuClickMethod · 0.80

Calls 5

IsEmptyMethod · 0.80
GetOptionGroupMethod · 0.80
GetAtMethod · 0.80
SendNotifyMethod · 0.80
GetSizeMethod · 0.45

Tested by

no test coverage detected