richedit: Remove some unused structure fields.
This commit is contained in:
parent
18986ee013
commit
2ebfd01b51
|
@ -22,12 +22,10 @@
|
||||||
|
|
||||||
void ME_InitContext(ME_Context *c, ME_TextEditor *editor, HDC hDC)
|
void ME_InitContext(ME_Context *c, ME_TextEditor *editor, HDC hDC)
|
||||||
{
|
{
|
||||||
c->nSequence = editor->nSequence++;
|
|
||||||
c->hDC = hDC;
|
c->hDC = hDC;
|
||||||
c->editor = editor;
|
c->editor = editor;
|
||||||
c->pt.x = 0;
|
c->pt.x = 0;
|
||||||
c->pt.y = 0;
|
c->pt.y = 0;
|
||||||
c->hbrMargin = CreateSolidBrush(RGB(224,224,224));
|
|
||||||
c->rcView = editor->rcFormat;
|
c->rcView = editor->rcFormat;
|
||||||
if (hDC) {
|
if (hDC) {
|
||||||
c->dpi.cx = GetDeviceCaps(hDC, LOGPIXELSX);
|
c->dpi.cx = GetDeviceCaps(hDC, LOGPIXELSX);
|
||||||
|
@ -44,5 +42,4 @@ void ME_InitContext(ME_Context *c, ME_TextEditor *editor, HDC hDC)
|
||||||
void ME_DestroyContext(ME_Context *c)
|
void ME_DestroyContext(ME_Context *c)
|
||||||
{
|
{
|
||||||
if (c->hDC) ITextHost_TxReleaseDC(c->editor->texthost, c->hDC);
|
if (c->hDC) ITextHost_TxReleaseDC(c->editor->texthost, c->hDC);
|
||||||
DeleteObject(c->hbrMargin);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2687,7 +2687,6 @@ ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10)
|
||||||
ed->nLastTotalLength = ed->nTotalLength = 0;
|
ed->nLastTotalLength = ed->nTotalLength = 0;
|
||||||
ed->nLastTotalWidth = ed->nTotalWidth = 0;
|
ed->nLastTotalWidth = ed->nTotalWidth = 0;
|
||||||
ed->nUDArrowX = -1;
|
ed->nUDArrowX = -1;
|
||||||
ed->nSequence = 0;
|
|
||||||
ed->rgbBackColor = -1;
|
ed->rgbBackColor = -1;
|
||||||
ed->hbrBackground = GetSysColorBrush(COLOR_WINDOW);
|
ed->hbrBackground = GetSysColorBrush(COLOR_WINDOW);
|
||||||
ed->bCaretAtEnd = FALSE;
|
ed->bCaretAtEnd = FALSE;
|
||||||
|
|
|
@ -67,7 +67,6 @@ typedef struct tagME_Style
|
||||||
HFONT hFont; /* cached font for the style */
|
HFONT hFont; /* cached font for the style */
|
||||||
TEXTMETRICW tm; /* cached font metrics for the style */
|
TEXTMETRICW tm; /* cached font metrics for the style */
|
||||||
int nRefs; /* reference count */
|
int nRefs; /* reference count */
|
||||||
int nSequence; /* incremented when cache needs to be rebuilt, ie. every screen redraw */
|
|
||||||
} ME_Style;
|
} ME_Style;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
@ -186,7 +185,6 @@ typedef struct tagME_Paragraph
|
||||||
int nFlags;
|
int nFlags;
|
||||||
POINT pt;
|
POINT pt;
|
||||||
int nHeight, nWidth;
|
int nHeight, nWidth;
|
||||||
int nLastPaintYPos, nLastPaintHeight;
|
|
||||||
int nRows;
|
int nRows;
|
||||||
struct tagME_DisplayItem *prev_para, *next_para;
|
struct tagME_DisplayItem *prev_para, *next_para;
|
||||||
} ME_Paragraph;
|
} ME_Paragraph;
|
||||||
|
@ -335,7 +333,6 @@ typedef struct tagME_TextEditor
|
||||||
int nTotalWidth, nLastTotalWidth;
|
int nTotalWidth, nLastTotalWidth;
|
||||||
int nAvailWidth; /* 0 = wrap to client area, else wrap width in twips */
|
int nAvailWidth; /* 0 = wrap to client area, else wrap width in twips */
|
||||||
int nUDArrowX;
|
int nUDArrowX;
|
||||||
int nSequence;
|
|
||||||
COLORREF rgbBackColor;
|
COLORREF rgbBackColor;
|
||||||
HBRUSH hbrBackground;
|
HBRUSH hbrBackground;
|
||||||
BOOL bCaretAtEnd;
|
BOOL bCaretAtEnd;
|
||||||
|
@ -385,16 +382,12 @@ typedef struct tagME_Context
|
||||||
{
|
{
|
||||||
HDC hDC;
|
HDC hDC;
|
||||||
POINT pt;
|
POINT pt;
|
||||||
POINT ptRowOffset;
|
|
||||||
RECT rcView;
|
RECT rcView;
|
||||||
HBRUSH hbrMargin;
|
|
||||||
SIZE dpi;
|
SIZE dpi;
|
||||||
int nAvailWidth;
|
int nAvailWidth;
|
||||||
|
|
||||||
/* those are valid inside ME_WrapTextParagraph and related */
|
/* those are valid inside ME_WrapTextParagraph and related */
|
||||||
POINT ptFirstRun;
|
|
||||||
ME_TextEditor *editor;
|
ME_TextEditor *editor;
|
||||||
int nSequence;
|
|
||||||
} ME_Context;
|
} ME_Context;
|
||||||
|
|
||||||
typedef struct tagME_WrapContext
|
typedef struct tagME_WrapContext
|
||||||
|
|
|
@ -41,7 +41,6 @@ void ME_PaintContent(ME_TextEditor *editor, HDC hDC, const RECT *rcUpdate)
|
||||||
IntersectClipRect(hDC, rcUpdate->left, rcUpdate->top,
|
IntersectClipRect(hDC, rcUpdate->left, rcUpdate->top,
|
||||||
rcUpdate->right, rcUpdate->bottom);
|
rcUpdate->right, rcUpdate->bottom);
|
||||||
|
|
||||||
editor->nSequence++;
|
|
||||||
ME_InitContext(&c, editor, hDC);
|
ME_InitContext(&c, editor, hDC);
|
||||||
SetBkMode(hDC, TRANSPARENT);
|
SetBkMode(hDC, TRANSPARENT);
|
||||||
ME_MoveCaret(editor);
|
ME_MoveCaret(editor);
|
||||||
|
|
|
@ -145,7 +145,6 @@ ME_Style *ME_MakeStyle(CHARFORMAT2W *style)
|
||||||
|
|
||||||
assert(style->cbSize == sizeof(CHARFORMAT2W));
|
assert(style->cbSize == sizeof(CHARFORMAT2W));
|
||||||
s->fmt = *style;
|
s->fmt = *style;
|
||||||
s->nSequence = -2;
|
|
||||||
s->nRefs = 1;
|
s->nRefs = 1;
|
||||||
s->hFont = NULL;
|
s->hFont = NULL;
|
||||||
memset(&s->tm, 0, sizeof(s->tm));
|
memset(&s->tm, 0, sizeof(s->tm));
|
||||||
|
|
Loading…
Reference in New Issue