100 for (
i = 0, run->
nWidth = 0; i < run->num_glyphs;
i++)
156 TRACE(
"After split: %s(%ld, %ld), %s(%ld, %ld)\n",
172 if (!run->
len ||
cx <= 0)
return 0;
181 item->member.row.nBaseline = baseline;
183 return &
item->member.row;
238 int *vis_to_log =
buf, *log_to_vis, *widths, *
pos;
245 if (found_black) num_runs++;
246 if (run ==
start)
break;
249 TRACE(
"%d runs\n", num_runs);
250 if (!num_runs)
return;
253 vis_to_log =
malloc( num_runs *
sizeof(
int) * 5 );
255 log_to_vis = vis_to_log + num_runs;
256 widths = vis_to_log + 2 * num_runs;
257 pos = vis_to_log + 3 * num_runs;
271 for (
i = 1;
i < num_runs;
i++)
272 pos[
i] =
pos[
i - 1] + widths[ vis_to_log[
i - 1 ] ];
276 run->
pt.
x =
pos[ log_to_vis[
i ] ];
281 if (vis_to_log !=
buf)
free( vis_to_log );
322 bSkippingSpaces = !
len;
356 if (run ==
last)
break;
429 ME_Run *new_run, *iter = run;
456 wc->
pt = new_run->
pt;
460 wc->
pt = new_run->
pt;
484 if (new_run)
return new_run;
508 wc->
pt = new_run->
pt;
678 case 0:
sp =
ls;
break;
679 case 1:
sp = (3 *
ls) / 2;
break;
680 case 2:
sp = 2 *
ls;
break;
686 if (
c->editor->nZoomNumerator == 0)
689 return sp *
c->editor->nZoomNumerator /
c->editor->nZoomDenominator;
731 SCRIPT_STATE state = { 0,
FALSE,
FALSE,
FALSE,
FALSE,
FALSE,
FALSE,
FALSE,
FALSE, 0, 0 };
735 state.uBidiLevel = 1;
737 TRACE(
"Base embedding level %d\n",
state.uBidiLevel );
744 if (items_passed > para->
text->
nLen + 1)
break;
756 TRACE(
"got items:\n" );
757 for (cur_item = 0; cur_item < num_items; cur_item++)
759 TRACE(
"\t%d - %d RTL %d bidi level %d\n",
items[cur_item].iCharPos,
items[cur_item+1].iCharPos - 1,
760 items[cur_item].
a.fRTL,
items[cur_item].a.s.uBidiLevel );
763 TRACE(
"before splitting runs into ranges\n" );
787 TRACE(
"after splitting into ranges\n" );
810 para->
nFlags &= ~MEPF_COMPLEX;
832 if (!
c->editor->password_char
845 para->
nFlags &= ~MEPF_COMPLEX;
873 if (
c->editor->bEmulateVersion10 &&
911 para->
nFlags &= ~MEPF_REWRAP;
953 c->pt.y += borderWidth;
959 c->pt.x = cell->
pt.
x;
966 int prevHeight, nHeight, bottomBorder = 0;
990 start_row_para->
nHeight = nHeight;
991 c->pt.x = start_row_para->
pt.
x;
992 c->pt.y = cell->
pt.
y + nHeight;
993 if (prevHeight < nHeight)
1017 c->pt.y = cell->
pt.
y;
1025 c->pt.x = cell->
pt.
x;
1060 prev_width = para->
nWidth;
1062 if (prev_width == totalWidth && para->
nWidth < totalWidth)
1065 totalWidth =
max(totalWidth, para->
nWidth);
1100 return !!repaint.
start;
1124 rc.
top += start_para->
pt.
y - ofs;
1150 info.nmhdr.idFrom = 0;
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
void ls(int argc, const char *argv[])
void ME_DestroyContext(ME_Context *c)
void ME_InitContext(ME_Context *c, ME_TextEditor *editor, HDC hDC)
HRESULT WINAPI ScriptPlace(HDC hdc, SCRIPT_CACHE *psc, const WORD *pwGlyphs, int cGlyphs, const SCRIPT_VISATTR *psva, SCRIPT_ANALYSIS *psa, int *piAdvance, GOFFSET *pGoffset, ABC *pABC)
HRESULT WINAPI ScriptItemize(const WCHAR *pwcInChars, int cInChars, int cMaxItems, const SCRIPT_CONTROL *psControl, const SCRIPT_STATE *psState, SCRIPT_ITEM *pItems, int *pcItems)
HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars, int cChars, int cMaxGlyphs, SCRIPT_ANALYSIS *psa, WORD *pwOutGlyphs, WORD *pwLogClust, SCRIPT_VISATTR *psva, int *pcGlyphs)
HRESULT WINAPI ScriptLayout(int runs, const BYTE *level, int *vistolog, int *logtovis)
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
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
struct rb_node * rb_next(struct rb_node *)
int align(int length, int align)
int ME_twips2pointsY(const ME_Context *c, int y)
ME_Run * run_next(ME_Run *run)
void ME_Remove(ME_DisplayItem *diWhere)
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_Cell * cell_next(ME_Cell *cell)
int ME_CharFromPointContext(ME_Context *c, int cx, ME_Run *run, BOOL closest, BOOL visual_order)
int ME_GetParaBorderWidth(const ME_Context *c, int flags)
ME_Cell * cell_prev(ME_Cell *cell)
static ME_DisplayItem * para_get_di(ME_Paragraph *para)
ME_Run * run_prev(ME_Run *run)
void para_num_init(ME_Context *c, ME_Paragraph *para)
void run_join(ME_TextEditor *editor, ME_Run *run)
#define ITextHost_TxNotify(This, a, b)
void ME_UpdateRunFlags(ME_TextEditor *editor, ME_Run *run)
int ME_twips2pointsX(const ME_Context *c, int x)
ME_Paragraph * table_outer_para(ME_Paragraph *para)
ME_Cell * table_row_first_cell(ME_Paragraph *para)
ME_Cell * para_cell(ME_Paragraph *para)
static ME_DisplayItem * run_get_di(ME_Run *run)
ME_Paragraph * table_row_end(ME_Paragraph *para)
#define ITextHost_TxGetClientRect(This, a)
#define ITextHost_TxGetDC(This)
static int ME_IsWSpace(WCHAR ch)
static ME_DisplayItem * row_get_di(ME_Row *row)
BOOL para_in_table(ME_Paragraph *para)
SIZE ME_GetRunSizeCommon(ME_Context *c, const ME_Paragraph *para, ME_Run *run, int nLen, int startx, int *pAscent, int *pDescent)
#define ITextHost_TxReleaseDC(This, a)
void ME_InsertBefore(ME_DisplayItem *diWhere, ME_DisplayItem *diWhat)
int get_total_width(ME_TextEditor *editor)
void select_style(ME_Context *c, ME_Style *s)
ME_Run * para_first_run(ME_Paragraph *para)
BOOL ME_CanJoinRuns(const ME_Run *run1, const ME_Run *run2)
ME_Paragraph * table_row_start(ME_Paragraph *para)
ME_Paragraph * cell_end_para(ME_Cell *cell)
ME_Run * run_split(ME_TextEditor *editor, ME_Cursor *cursor)
static WCHAR * get_text(const ME_Run *run, int offset)
void ME_DestroyDisplayItem(ME_DisplayItem *item)
void ME_CheckCharOffsets(ME_TextEditor *editor)
ME_Paragraph * para_next(ME_Paragraph *para)
ME_DisplayItem * ME_MakeDI(ME_DIType type)
static const char * debugstr_run(const ME_Run *run)
GLint GLint GLsizei GLsizei GLsizei GLint border
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLenum GLuint GLenum GLsizei const GLchar * buf
GLboolean GLboolean GLboolean GLboolean a
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
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 GLint GLint j
static unsigned __int64 next
#define ENM_REQUESTRESIZE
#define WINE_RB_ENTRY_VALUE
static struct rb_entry * rb_head(struct rb_entry *iter)
union tagME_DisplayItem::@595 member
struct tagME_DisplayItem * next_para
SCRIPT_VISATTR * vis_attrs
struct tagME_Paragraph * para
SCRIPT_ANALYSIS script_analysis
SCRIPT_CACHE script_cache
struct wine_rb_tree marked_paras
unsigned int bEmulateVersion10
ME_Run * pLastSplittableRun
#define LANG_USER_DEFAULT
static int ME_GetParaLineSpace(ME_Context *c, ME_Paragraph *para)
static void calc_run_extent(ME_Context *c, const ME_Paragraph *para, int startx, ME_Run *run)
static HRESULT shape_para(ME_Context *c, ME_Paragraph *para)
static ME_Row * row_create(int height, int baseline, int width)
static void ME_WrapTextParagraph(ME_TextEditor *editor, ME_Context *c, ME_Paragraph *para)
static HRESULT itemize_para(ME_Context *c, ME_Paragraph *para)
static int reverse_find_whitespace(const WCHAR *s, int start)
static ME_Run * ME_MaximizeSplit(ME_WrapContext *wc, ME_Run *run, int i)
static int reverse_find_non_whitespace(const WCHAR *s, int start)
static void layout_row(ME_Run *start, ME_Run *last)
BOOL ME_WrapMarkedParagraphs(ME_TextEditor *editor)
static void ME_PrepareParagraphForWrapping(ME_TextEditor *editor, ME_Context *c, ME_Paragraph *para)
void ME_SendRequestResize(ME_TextEditor *editor, BOOL force)
static void update_repaint(ME_Paragraph *para, struct repaint_range *repaint)
static ME_Run * ME_SplitByBacktracking(ME_WrapContext *wc, ME_Run *run, int loc)
static ME_Run * split_run_extents(ME_WrapContext *wc, ME_Run *run, int nVChar)
static void ME_WrapEndParagraph(ME_WrapContext *wc)
BOOL wrap_marked_paras_dc(ME_TextEditor *editor, HDC hdc, BOOL invalidate)
static HRESULT shape_run(ME_Context *c, ME_Run *run)
static void ME_InsertRowStart(ME_WrapContext *wc, ME_Run *last)
static BOOL get_run_glyph_buffers(ME_Run *run)
void para_range_invalidate(ME_TextEditor *editor, ME_Paragraph *start_para, ME_Paragraph *last_para)
static void ME_WrapSizeRun(ME_WrapContext *wc, ME_Run *run)
static ME_Run * ME_WrapHandleRun(ME_WrapContext *wc, ME_Run *run)
static void adjust_para_y(ME_Paragraph *para, ME_Context *c, struct repaint_range *repaint)
struct tagME_WrapContext ME_WrapContext
static int find_non_whitespace(const WCHAR *s, int len, int start)
static void ME_BeginRow(ME_WrapContext *wc)
static int find_split_point(ME_Context *c, int cx, ME_Run *run)