void Ctrl::SyncCaret() { GuiLock __; if(focusCtrl != caretCtrl) { LLOG("SyncCaret DO " << Upp::Name(caretCtrl) << " -> " << Upp::Name(focusCtrl)); RefreshCaret(); caretCtrl = focusCtrl; RefreshCaret(); } }
void Ctrl::SetCaret(int x, int y, int cx, int cy) { GuiLock __; LLOG("SetCaret " << Name() << " " << RectC(x, y, cx, cy)); if(this == caretCtrl) RefreshCaret(); caretx = x; carety = y; caretcx = cx; caretcy = cy; if(this == caretCtrl) { WndCaretTime = GetTickCount(); RefreshCaret(); AnimateCaret(); } }
void Ctrl::AnimateCaret() { GuiLock __; bool v = !(((GetTickCount() - WndCaretTime) / GetCaretBlinkTime()) & 1); if(v != WndCaretVisible) { WndCaretVisible = v; RefreshCaret(); } }
void Ctrl::AnimateCaret() { GuiLock __; int v = !(((GetTickCount() - WndCaretTime) / 500) & 1); if(v != WndCaretVisible) { WndCaretVisible = v; RefreshCaret(); } }
void Ctrl::WndScrollView(const Rect& r, int dx, int dy) { GuiLock __; LLOG("WndScrollView " << UPP::Name(this)); if(caretCtrl && caretCtrl->GetTopCtrl() == this) { #if WINCARET WndDestroyCaret(); #else RefreshCaret(); #endif caretRect.Clear(); } #ifdef PLATFORM_WINCE ::ScrollWindowEx(GetHWND(), dx, dy, r, r, NULL, NULL, 0); #else ::ScrollWindow(GetHWND(), dx, dy, r, r); #endif SyncCaret(); }