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

Method DoEvent

DuiLib/Control/UITreeView.cpp:99–143  ·  view source on GitHub ↗

��������: DoEvent ��������: void ������Ϣ: TEventUI & event ����˵��:

Source from the content-addressed store, hash-verified

97 // ����˵��:
98 //************************************
99 void CTreeNodeUI::DoEvent( TEventUI& event )
100 {
101 if( !IsMouseEnabled() && event.Type > UIEVENT__MOUSEBEGIN && event.Type < UIEVENT__MOUSEEND ) {
102 if( m_pOwner != NULL ) m_pOwner->DoEvent(event);
103 else CContainerUI::DoEvent(event);
104 return;
105 }
106
107 CListContainerElementUI::DoEvent(event);
108
109 if( event.Type == UIEVENT_DBLCLICK )
110 {
111 if( IsEnabled() ) {
112 m_pManager->SendNotify(this, _T("itemdbclick"));
113 Invalidate();
114 }
115 return;
116 }
117 if( event.Type == UIEVENT_MOUSEENTER )
118 {
119 if( IsEnabled()) {
120 if(m_bSelected && GetSelItemHotTextColor())
121 pItemButton->SetTextColor(GetSelItemHotTextColor());
122 else
123 pItemButton->SetTextColor(GetItemHotTextColor());
124 }
125 else
126 pItemButton->SetTextColor(pItemButton->GetDisabledTextColor());
127
128 return;
129 }
130 if( event.Type == UIEVENT_MOUSELEAVE )
131 {
132 if( IsEnabled()) {
133 if(m_bSelected && GetSelItemTextColor())
134 pItemButton->SetTextColor(GetSelItemTextColor());
135 else if(!m_bSelected)
136 pItemButton->SetTextColor(GetItemTextColor());
137 }
138 else
139 pItemButton->SetTextColor(pItemButton->GetDisabledTextColor());
140
141 return;
142 }
143 }
144
145 //************************************
146 // ��������: Invalidate

Callers

nothing calls this directly

Calls 3

SendNotifyMethod · 0.80
GetDisabledTextColorMethod · 0.80
SetTextColorMethod · 0.45

Tested by

no test coverage detected