void ME_RewrapRepaint(ME_TextEditor *editor) { ME_MarkAllForWrapping(editor); ME_WrapMarkedParagraphs(editor); ME_UpdateScrollBar(editor); ME_Repaint(editor); }
void ME_Repaint(ME_TextEditor *editor) { ME_Cursor *pCursor = &editor->pCursors[0]; if (ME_WrapMarkedParagraphs(editor)) { ME_UpdateScrollBar(editor); } if (editor->bRedraw) { ME_EnsureVisible(editor, pCursor->pRun); UpdateWindow(editor->hWnd); } }
void ME_MoveCaret(ME_TextEditor *editor) { int x, y, height; if (ME_WrapMarkedParagraphs(editor)) ME_UpdateScrollBar(editor); ME_GetCursorCoordinates(editor, &editor->pCursors[0], &x, &y, &height); if(editor->bHaveFocus) { CreateCaret(editor->hWnd, NULL, 0, height); SetCaretPos(x, y); } }
void ME_MoveCaret(ME_TextEditor *editor) { int x, y, height; if (ME_WrapMarkedParagraphs(editor)) ME_UpdateScrollBar(editor); ME_GetCursorCoordinates(editor, &editor->pCursors[0], &x, &y, &height); if(editor->bHaveFocus && !ME_IsSelection(editor)) { x = min(x, editor->rcFormat.right-1); CreateCaret(editor->hWnd, NULL, 0, height); SetCaretPos(x, y); } }