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

Method DoEvent

DuiLib/Control/UIRichEdit.cpp:1826–1893  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1824}
1825
1826void CRichEditUI::DoEvent(TEventUI& event)
1827{
1828 if( !IsMouseEnabled() && event.Type > UIEVENT__MOUSEBEGIN && event.Type < UIEVENT__MOUSEEND ) {
1829 if( m_pParent != NULL ) m_pParent->DoEvent(event);
1830 else CControlUI::DoEvent(event);
1831 return;
1832 }
1833
1834 if( event.Type == UIEVENT_SETCURSOR && IsEnabled() )
1835 {
1836 if( m_pTwh && m_pTwh->DoSetCursor(NULL, &event.ptMouse) ) {
1837 return;
1838 }
1839 }
1840 if( event.Type == UIEVENT_SETFOCUS ) {
1841 if( m_pTwh ) {
1842 m_pTwh->OnTxInPlaceActivate(NULL);
1843 m_pTwh->GetTextServices()->TxSendMessage(WM_SETFOCUS, 0, 0, 0);
1844 }
1845 m_bFocused = true;
1846 Invalidate();
1847 return;
1848 }
1849 if( event.Type == UIEVENT_KILLFOCUS ) {
1850 if( m_pTwh ) {
1851 m_pTwh->OnTxInPlaceActivate(NULL);
1852 m_pTwh->GetTextServices()->TxSendMessage(WM_KILLFOCUS, 0, 0, 0);
1853 }
1854 m_bFocused = false;
1855 Invalidate();
1856 return;
1857 }
1858 if( event.Type == UIEVENT_TIMER ) {
1859 if( m_pTwh ) {
1860 m_pTwh->GetTextServices()->TxSendMessage(WM_TIMER, event.wParam, event.lParam, 0);
1861 }
1862 }
1863 if( event.Type == UIEVENT_SCROLLWHEEL ) {
1864 if( (event.wKeyState & MK_CONTROL) != 0 ) {
1865 return;
1866 }
1867 }
1868 if( event.Type == UIEVENT_BUTTONDOWN || event.Type == UIEVENT_DBLCLICK )
1869 {
1870 return;
1871 }
1872 if( event.Type == UIEVENT_MOUSEMOVE )
1873 {
1874 return;
1875 }
1876 if( event.Type == UIEVENT_BUTTONUP )
1877 {
1878 return;
1879 }
1880 if( event.Type == UIEVENT_MOUSEENTER )
1881 {
1882 return;
1883 }

Callers

nothing calls this directly

Calls 4

DoSetCursorMethod · 0.80
OnTxInPlaceActivateMethod · 0.80
TxSendMessageMethod · 0.80
GetTextServicesMethod · 0.80

Tested by

no test coverage detected