69 ys =
c.pt.y + para->
pt.
y;
82 if (ys < update->
bottom && ye > update->
top)
91 rc.
left =
c.rcView.left;
100 rc.
top =
c.rcView.top;
126 FIXME(
"ME_Repaint had to call ME_WrapMarkedParagraphs\n");
135 BOOL wrappedParagraphs;
138 if (wrappedParagraphs)
173 if (
c->editor->nZoomNumerator == 0)
174 return x *
c->dpi.cx / 1440;
176 return x *
c->dpi.cx *
c->editor->nZoomNumerator / 1440 /
c->editor->nZoomDenominator;
181 if (
c->editor->nZoomNumerator == 0)
182 return y *
c->dpi.cy / 1440;
184 return y *
c->dpi.cy *
c->editor->nZoomNumerator / 1440 /
c->editor->nZoomDenominator;
190 int offs = 0, twips = 0;
193 twips =
style->fmt.yOffset;
245 switch (
style->fmt.bUnderlineType)
254 FIXME(
"Unknown underline type (%u)\n",
style->fmt.bUnderlineType );
299 if (
c->editor->bEmulateVersion10)
333 if (old_style_selected)
360 if (
c->editor->password_char)
367 if (paint_bg) old_back =
SetBkColor(
c->hDC, back_color );
387 int nSelFrom,
int nSelTo,
int ymin,
int cy )
392 && nSelFrom < nSelTo && !
c->editor->bHideSelection &&
405 if (
c->editor->bEmulateVersion10)
407 old_style_selected =
TRUE;
447 if (old_style_selected)
466 LONG nSelFrom, nSelTo;
476 if (runofs >= nSelFrom && runofs < nSelTo)
479 c->pt.y + run->
para->pt.y +
row->pt.y,
row->nHeight );
489 c->pt.y + run->
para->pt.y +
row->pt.y,
row->nHeight );
494 draw_ole(
c,
x,
y, run, (runofs >= nSelFrom) && (runofs < nSelTo) );
518 RGB(0x00, 0x00, 0x00),
RGB(0x00, 0x00, 0xFF),
519 RGB(0x00, 0xFF, 0xFF),
RGB(0x00, 0xFF, 0x00),
520 RGB(0xFF, 0x00, 0xFF),
RGB(0xFF, 0x00, 0x00),
521 RGB(0xFF, 0xFF, 0x00),
RGB(0xFF, 0xFF, 0xFF),
522 RGB(0x00, 0x00, 0x80),
RGB(0x00, 0x80, 0x80),
523 RGB(0x00, 0x80, 0x80),
RGB(0x80, 0x00, 0x80),
524 RGB(0x80, 0x00, 0x00),
RGB(0x80, 0x80, 0x00),
525 RGB(0x80, 0x80, 0x80),
RGB(0xc0, 0xc0, 0xc0),
535 if (
c->editor->nZoomNumerator != 0)
548 FIXME(
"Unsupported border value %d\n",
idx);
558 int idx, border_width, top_border, bottom_border;
565 border_width = top_border = bottom_border = 0;
567 hasParaBorder = (!(
c->editor->bEmulateVersion10 &&
602 if (para->
fmt.
wBorders & 4) top_border = border_width;
603 if (para->
fmt.
wBorders & 8) bottom_border = border_width;
611 rc.
left =
c->rcView.left;
612 rc.
right =
c->rcView.right;
624 rc.
left =
c->rcView.left;
625 rc.
right =
c->rcView.right;
635 int pen_width, rightEdge;
646 rightEdge =
c->pt.x +
max(
c->editor->sizeWindow.cx,
647 c->editor->nTotalWidth);
657#define DD(x) ((para->fmt.wBorders & (x)) ? (pen_width + 1) : 0)
664 rc.
left =
c->pt.x + 1;
672 bounds->
left += border_width;
679 rc.
left = rightEdge - pen_width - 1;
687 bounds->
right += border_width;
695 LineTo(
c->hDC, rightEdge -
DD(2),
y + bounds->
top + pen_width + 1);
697 bounds->
top += border_width;
707 bounds->
bottom += border_width;
719 if (!
c->editor->bEmulateVersion10)
734 int top =
c->pt.y + (atTop ? cell->
pt.
y : para->
pt.
y);
804 int oldLeft = rc.
left;
864 int i, firstX, startX, endX, rowY, rowBottom, nHeight;
876 rowY =
c->pt.y + para->
pt.
y;
880 rowBottom = rowY + nHeight;
895 LineTo(
c->hDC, endX, rowBottom);
900 LineTo(
c->hDC, firstX, rowBottom);
903 int rightBoundary = para->
fmt.
rgxTabs[
i] & 0x00ffffff;
906 LineTo(
c->hDC, endX, rowBottom);
947 rc.
right =
c->rcView.right;
949 y =
c->pt.y + para->
pt.
y;
971 +
max(
c->editor->sizeWindow.cx,
972 c->editor->nTotalWidth));
987 rc.
bottom =
y +
p->member.row.nHeight;
998 after_bdr.
right =
c->rcView.right;
1012 height =
p->member.row.nHeight;
1013 baseline =
p->member.row.nBaseline;
1017 run = &
p->member.run;
1040 pt.x =
c->pt.x + run->
pt.
x;
1041 pt.y =
c->pt.y + para->
pt.
y + run->
pt.
y;
1079 if (max_pos > 0xffff)
1093 int scrollX = 0, scrollY = 0;
1158 FIXME(
"ME_UpdateScrollBar had to call ME_WrapMarkedParagraphs\n");
1241 yheight =
row->nHeight;
1243 if (y < editor->vert_si.nPos)
1278 if (nStart < editor->nLastSelStart)
1280 repaint_start = sel_start;
1286 repaint_end = sel_start;
1290 if (nEnd < editor->nLastSelEnd)
1292 if (!repaint_start) repaint_start = sel_end;
1298 repaint_end = sel_end;
1314 if (numerator == 0 && denominator == 0)
1319 if (numerator <= 0 || denominator <= 0)
1321 if (numerator * 64 <= denominator || numerator / denominator >= 64)
static const char * wine_dbgstr_rect(const RECT *prc)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static char selected[MAX_PATH+1]
static WCHAR no[MAX_STRING_RESOURCE_LEN]
void ME_SendSelChange(ME_TextEditor *editor)
int ME_GetSelectionOfs(ME_TextEditor *editor, LONG *from, LONG *to)
int ME_GetTextLength(ME_TextEditor *editor)
void update_caret(ME_TextEditor *editor)
void ME_DestroyContext(ME_Context *c)
void ME_InitContext(ME_Context *c, ME_TextEditor *editor, HDC hDC)
ME_Paragraph * editor_first_para(ME_TextEditor *editor)
ME_Paragraph * editor_end_para(ME_TextEditor *editor)
void ME_InvalidateSelection(ME_TextEditor *editor)
void ME_RewrapRepaint(ME_TextEditor *editor)
static void ME_DebugWrite(HDC hDC, const POINT *pt, LPCWSTR szText)
int ME_twips2pointsY(const ME_Context *c, int y)
void ME_ScrollRight(ME_TextEditor *editor, int cx)
void editor_draw(ME_TextEditor *editor, HDC hDC, const RECT *update)
static int ME_GetBorderPenWidth(const ME_Context *c, int idx)
void ME_ScrollLeft(ME_TextEditor *editor, int cx)
static COLORREF get_back_color(ME_Context *c, ME_Style *style, BOOL highlight)
int ME_GetParaBorderWidth(const ME_Context *c, int flags)
BOOL ME_SetZoom(ME_TextEditor *editor, int numerator, int denominator)
static COLORREF get_text_color(ME_Context *c, ME_Style *style, BOOL highlight)
static const struct @597 border_details[]
static void draw_space(ME_Context *c, ME_Run *run, int x, int y, BOOL selected, BOOL actually_draw, int ymin, int cy)
static void get_selection_rect(ME_Context *c, ME_Run *run, int from, int to, int cy, RECT *r)
void ME_UpdateScrollBar(ME_TextEditor *editor)
static void draw_text_with_style(ME_Context *c, ME_Run *run, int x, int y, int nSelFrom, int nSelTo, int ymin, int cy)
void ME_Repaint(ME_TextEditor *editor)
void scroll_h_abs(ME_TextEditor *editor, int x, BOOL notify)
void ME_UpdateRepaint(ME_TextEditor *editor, BOOL update_now)
int ME_twips2pointsX(const ME_Context *c, int x)
static const COLORREF pen_colors[16]
void ME_ScrollDown(ME_TextEditor *editor, int cy)
static void draw_paragraph(ME_Context *c, ME_Paragraph *para)
static BOOL editor_opaque(ME_TextEditor *editor)
static void draw_para_number(ME_Context *c, ME_Paragraph *para)
static void draw_run(ME_Context *c, int x, int y, ME_Cursor *cursor)
void scroll_v_abs(ME_TextEditor *editor, int y, BOOL notify)
static void ME_DrawParaDecoration(ME_Context *c, ME_Paragraph *para, int y, RECT *bounds)
static void draw_table_borders(ME_Context *c, ME_Paragraph *para)
static void enable_show_scrollbar(ME_TextEditor *editor, INT bar, BOOL enable)
static int calc_y_offset(const ME_Context *c, ME_Style *style)
static void draw_text(ME_Context *c, ME_Run *run, int x, int y, BOOL selected, RECT *sel_rect)
static HPEN get_underline_pen(ME_Style *style, COLORREF color)
static void set_scroll_range_pos(ME_TextEditor *editor, INT bar, SCROLLINFO *info, BOOL set_range, BOOL notify)
void ME_ScrollUp(ME_TextEditor *editor, int cy)
void scroll_abs(ME_TextEditor *editor, int x, int y, BOOL notify)
static void draw_underline(ME_Context *c, ME_Run *run, int x, int y, COLORREF color)
void editor_ensure_visible(ME_TextEditor *editor, ME_Cursor *cursor)
HRESULT WINAPI ScriptTextOut(const HDC hdc, SCRIPT_CACHE *psc, int x, int y, UINT fuOptions, const RECT *lprc, const SCRIPT_ANALYSIS *psa, const WCHAR *pwcReserved, int iReserved, const WORD *pwGlyphs, int cGlyphs, const int *piAdvance, const int *piJustify, const GOFFSET *pGoffset)
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
int align(int length, int align)
#define ITextHost_TxShowScrollBar(This, a, b)
#define ITextHost_TxSetScrollRange(This, a, b, c, d)
ME_Row * para_first_row(ME_Paragraph *para)
ME_Cell * table_row_end_cell(ME_Paragraph *para)
int ME_PointFromCharContext(ME_Context *c, ME_Run *pRun, int nOffset, BOOL visual_order)
#define ITextHost_TxInvalidateRect(This, a, b)
ME_Paragraph * cell_first_para(ME_Cell *cell)
ME_Cell * cell_next(ME_Cell *cell)
void ME_DestroyString(ME_String *s)
int run_char_ofs(ME_Run *run, int ofs)
ME_Row * row_from_cursor(ME_Cursor *cursor)
static ME_DisplayItem * para_get_di(ME_Paragraph *para)
BOOL ME_WrapMarkedParagraphs(ME_TextEditor *editor)
#define ITextHost_TxSetScrollPos(This, a, b, c)
#define ITextHost_TxGetSysColor(This, a)
#define ITextHost_TxNotify(This, a, b)
void ME_SendRequestResize(ME_TextEditor *editor, BOOL force)
void draw_ole(ME_Context *c, int x, int y, ME_Run *run, BOOL selected)
ME_Cell * table_row_first_cell(ME_Paragraph *para)
ME_Cell * para_cell(ME_Paragraph *para)
ME_Paragraph * table_row_end(ME_Paragraph *para)
void editor_get_selection_paras(ME_TextEditor *editor, ME_Paragraph **para, ME_Paragraph **para_end)
#define ITextHost_TxViewChange(This, a)
BOOL para_in_table(ME_Paragraph *para)
int ME_PointFromChar(ME_TextEditor *editor, ME_Run *pRun, int nOffset, BOOL visual_order)
void editor_mark_rewrap_all(ME_TextEditor *editor)
void para_range_invalidate(ME_TextEditor *editor, ME_Paragraph *start_para, ME_Paragraph *last_para)
#define ITextHost_TxEnableScrollBar(This, a, b)
void select_style(ME_Context *c, ME_Style *s)
ME_Run * para_first_run(ME_Paragraph *para)
ME_Paragraph * para_prev(ME_Paragraph *para)
ME_String * ME_MakeStringR(WCHAR cRepeat, int nMaxChars)
ME_Paragraph * cell_end_para(ME_Cell *cell)
#define ITextHost_TxScrollWindowEx(This, a, b, c, d, e, f, g)
static WCHAR * get_text(const ME_Run *run, int offset)
ME_Paragraph * para_next(ME_Paragraph *para)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLint GLint GLsizei GLsizei height
GLdouble GLdouble GLdouble r
GLint GLint GLsizei width
GLdouble GLdouble GLdouble GLdouble top
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
_Out_opt_ int _Out_opt_ int * cy
static unsigned __int64 next
#define CFU_UNDERLINEDOUBLE
#define CFU_UNDERLINEWORD
#define ES_DISABLENOSCROLL
#define CFE_AUTOBACKCOLOR
#define CFU_UNDERLINENONE
#define CFU_UNDERLINEDOTTED
struct tagME_Paragraph * para
SCRIPT_ANALYSIS script_analysis
SCRIPT_CACHE script_cache
unsigned int horz_sb_enabled
unsigned int vert_sb_enabled
ME_Paragraph * last_sel_end_para
ME_Paragraph * last_sel_start_para
unsigned int in_place_active
#define TXTBIT_HIDESELECTION
HGDIOBJ WINAPI GetStockObject(_In_ int)
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
HRGN WINAPI CreateRectRgn(_In_ int, _In_ int, _In_ int, _In_ int)
HPEN WINAPI ExtCreatePen(_In_ DWORD iPenStyle, _In_ DWORD cWidth, _In_ const LOGBRUSH *plbrush, _In_ DWORD cStyle, _In_reads_opt_(cStyle) const DWORD *pstyle)
UINT WINAPI SetTextAlign(_In_ HDC, _In_ UINT)
BOOL WINAPI RectVisible(_In_ HDC, _In_ LPCRECT)
int WINAPI IntersectClipRect(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
BOOL WINAPI MoveToEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
int WINAPI GetClipRgn(_In_ HDC, _In_ HRGN)
BOOL WINAPI ExtTextOutW(_In_ HDC hdc, _In_ int x, _In_ int y, _In_ UINT options, _In_opt_ const RECT *lprect, _In_reads_opt_(c) LPCWSTR lpString, _In_ UINT c, _In_reads_opt_(c) const INT *lpDx)
BOOL WINAPI PatBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
BOOL WINAPI TextOutW(_In_ HDC hdc, _In_ int x, _In_ int y, _In_reads_(c) LPCWSTR lpString, _In_ int c)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
int WINAPI SetBkMode(_In_ HDC, _In_ int)
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
HRGN WINAPI CreateRectRgnIndirect(_In_ LPCRECT)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
HPEN WINAPI CreatePen(_In_ int, _In_ int, _In_ COLORREF)
int WINAPI SelectClipRgn(_In_ HDC, _In_opt_ HRGN)
BOOL WINAPI LineTo(_In_ HDC, _In_ int, _In_ int)
int WINAPI ExtSelectClipRgn(_In_ HDC, _In_opt_ HRGN, _In_ int)
int WINAPI FrameRect(_In_ HDC, _In_ LPCRECT, _In_ HBRUSH)
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
HBRUSH WINAPI GetSysColorBrush(_In_ int)
BOOL WINAPI IntersectRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)
#define COLOR_HIGHLIGHTTEXT
BOOL WINAPI SetRectEmpty(_Out_ LPRECT)
BOOL WINAPI OffsetRect(_Inout_ LPRECT, _In_ int, _In_ int)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)