Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
baf25fc8
Commit
baf25fc8
authored
Feb 04, 2006
by
Phil Krylov
Committed by
Alexandre Julliard
Feb 04, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Simplified ME_InsertGraphicsFromCursor() function.
parent
65fdee73
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
34 deletions
+16
-34
caret.c
dlls/riched20/caret.c
+16
-34
No files found.
dlls/riched20/caret.c
View file @
baf25fc8
...
...
@@ -312,40 +312,6 @@ void ME_DeleteTextAtCursor(ME_TextEditor *editor, int nCursor,
ME_InternalDeleteText
(
editor
,
ME_GetCursorOfs
(
editor
,
nCursor
),
nChars
);
}
static
const
WCHAR
wszSpace
[]
=
{
' '
,
0
};
/* FIXME this is temporary, just to have something to test how bad graphics handler is */
void
ME_InsertGraphicsFromCursor
(
ME_TextEditor
*
editor
,
int
nCursor
)
{
ME_Cursor
*
pCursor
=
&
editor
->
pCursors
[
nCursor
];
ME_DisplayItem
*
pItem
=
NULL
;
ME_DisplayItem
*
pNewRun
=
NULL
;
ME_Style
*
pStyle
=
ME_GetInsertStyle
(
editor
,
nCursor
);
ME_UndoItem
*
pUndo
;
/* FIXME no no no */
if
(
ME_IsSelection
(
editor
))
ME_DeleteSelection
(
editor
);
pUndo
=
ME_AddUndoItem
(
editor
,
diUndoDeleteRun
,
NULL
);
if
(
pUndo
)
{
pUndo
->
nStart
=
pCursor
->
nOffset
+
pCursor
->
pRun
->
member
.
run
.
nCharOfs
+
ME_GetParagraph
(
pCursor
->
pRun
)
->
member
.
para
.
nCharOfs
;
pUndo
->
nLen
=
1
;
}
if
(
pCursor
->
nOffset
)
{
ME_SplitRunSimple
(
editor
,
pCursor
->
pRun
,
pCursor
->
nOffset
);
}
pItem
=
pCursor
->
pRun
;
pNewRun
=
ME_MakeRun
(
pStyle
,
ME_MakeStringN
(
wszSpace
,
1
),
MERF_GRAPHICS
);
pNewRun
->
member
.
run
.
nCharOfs
=
pCursor
->
pRun
->
member
.
run
.
nCharOfs
;
ME_InsertBefore
(
pCursor
->
pRun
,
pNewRun
);
ME_PropagateCharOffset
(
pItem
,
1
);
ME_CheckCharOffsets
(
editor
);
ME_SendSelChange
(
editor
);
}
static
void
ME_InternalInsertTextFromCursor
(
ME_TextEditor
*
editor
,
int
nCursor
,
const
WCHAR
*
str
,
int
len
,
ME_Style
*
style
,
...
...
@@ -361,6 +327,22 @@ ME_InternalInsertTextFromCursor(ME_TextEditor *editor, int nCursor,
}
/* FIXME this is temporary, just to have something to test how bad graphics handler is */
void
ME_InsertGraphicsFromCursor
(
ME_TextEditor
*
editor
,
int
nCursor
)
{
ME_Style
*
pStyle
=
ME_GetInsertStyle
(
editor
,
nCursor
);
WCHAR
space
=
' '
;
/* FIXME no no no */
if
(
ME_IsSelection
(
editor
))
ME_DeleteSelection
(
editor
);
ME_InternalInsertTextFromCursor
(
editor
,
nCursor
,
&
space
,
1
,
pStyle
,
MERF_GRAPHICS
);
ME_SendSelChange
(
editor
);
}
void
ME_InsertTextFromCursor
(
ME_TextEditor
*
editor
,
int
nCursor
,
const
WCHAR
*
str
,
int
len
,
ME_Style
*
style
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment