示例#1
0
文件: paint.c 项目: howard5888/wineT
void
ME_RewrapRepaint(ME_TextEditor *editor)
{
  ME_MarkAllForWrapping(editor);
  ME_WrapMarkedParagraphs(editor);
  ME_UpdateScrollBar(editor);
  ME_Repaint(editor);
}
示例#2
0
文件: paint.c 项目: howard5888/wineT
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);
  }
}
示例#3
0
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);
  }
}
示例#4
0
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);
  }
}