bool openTextBox::ShowText(int _x, int _y, int Width) { unsigned int StartSel, EndSel; x = _x; y = _y; Font_ChattingOutput->write(getTypedText(), x, y, 0xFF000000); if(isCursorOnRange(x, y, Width, Height)) { setFocus(); SendMessageA(TextBox_Edit, EM_GETSEL, (WPARAM)&StartSel, (LPARAM)&EndSel); //캐럿위치 얻기 TotalNowTyped = strlen(getTypedText()); NowPos = StartSel; PosArray[strlen(getTypedText())] = Font_ChattingOutput->getRect().right; if(timeGetTime() % 1000 >= 500) { if(StartSel == EndSel) { //x + 6 * StartSel //Font_ChattingOutput->getRect().right + 2 Render_DrawLine(PosArray[NowPos], y - 3, PosArray[NowPos], y + Height + 3, 0xFF00FFFF); } else { } } else void(); if(KeyPressed == VK_RETURN) return true; } else outFocus(); return false; }
void NCRDSqlTextEdit::focusOutEvent(QFocusEvent * event) { QTextEdit::focusOutEvent( event ); if ( event->reason() == Qt::MouseFocusReason ) { } emit outFocus(); }
void GcOverlayWidget::focusOutEvent(QFocusEvent *) { if (!m_isEditing) return; if (m_showMenu) return; mode = none; emit outFocus(false); m_infocus = false; }