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
c11d931e
Commit
c11d931e
authored
Oct 10, 2016
by
Huw Davies
Committed by
Alexandre Julliard
Oct 10, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wordpad: Add list labelling menu.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0df058d8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
11 deletions
+49
-11
wordpad.c
programs/wordpad/wordpad.c
+31
-7
wordpad.h
programs/wordpad/wordpad.h
+9
-3
wordpad.rc
programs/wordpad/wordpad.rc
+9
-1
No files found.
programs/wordpad/wordpad.c
View file @
c11d931e
...
...
@@ -79,6 +79,8 @@ static WCHAR units_inW[MAX_STRING_LEN];
static
WCHAR
units_inchW
[
MAX_STRING_LEN
];
static
WCHAR
units_ptW
[
MAX_STRING_LEN
];
static
int
last_bullet
=
PFN_BULLET
;
static
LRESULT
OnSize
(
HWND
hWnd
,
WPARAM
wParam
,
LPARAM
lParam
);
typedef
enum
...
...
@@ -1886,7 +1888,7 @@ static LRESULT OnCreate( HWND hWnd )
AddButton
(
hFormatBarWnd
,
5
,
ID_ALIGN_CENTER
);
AddButton
(
hFormatBarWnd
,
6
,
ID_ALIGN_RIGHT
);
AddSeparator
(
hFormatBarWnd
);
AddButton
(
hFormatBarWnd
,
7
,
ID_BULLET
);
AddButton
(
hFormatBarWnd
,
7
,
ID_BULLET
ONOFF
);
SendMessageW
(
hFormatBarWnd
,
TB_AUTOSIZE
,
0
,
0
);
...
...
@@ -1994,7 +1996,7 @@ static LRESULT OnUser( HWND hWnd )
SendMessageW
(
hwndFormatBar
,
TB_CHECKBUTTON
,
ID_ALIGN_CENTER
,
(
pf
.
wAlignment
==
PFA_CENTER
));
SendMessageW
(
hwndFormatBar
,
TB_CHECKBUTTON
,
ID_ALIGN_RIGHT
,
(
pf
.
wAlignment
==
PFA_RIGHT
));
SendMessageW
(
hwndFormatBar
,
TB_CHECKBUTTON
,
ID_BULLET
,
(
pf
.
wNumbering
&
PFN_BULLET
)
);
SendMessageW
(
hwndFormatBar
,
TB_CHECKBUTTON
,
ID_BULLET
ONOFF
,
pf
.
wNumbering
?
TRUE
:
FALSE
);
return
0
;
}
...
...
@@ -2351,30 +2353,45 @@ static LRESULT OnCommand( HWND hWnd, WPARAM wParam, LPARAM lParam)
SendMessageW
(
hwndEditor
,
EM_REDO
,
0
,
0
);
return
0
;
case
ID_BULLETONOFF
:
case
ID_BULLET
:
case
ID_NUMBERING
:
case
ID_LCLETTER
:
case
ID_UCLETTER
:
case
ID_LCROMAN
:
case
ID_UCROMAN
:
{
PARAFORMAT2
pf
;
WORD
new_number
=
LOWORD
(
wParam
)
-
ID_BULLET
+
PFN_BULLET
;
pf
.
cbSize
=
sizeof
(
pf
);
pf
.
dwMask
=
PFM_NUMBERING
;
SendMessageW
(
hwndEditor
,
EM_GETPARAFORMAT
,
0
,
(
LPARAM
)
&
pf
);
pf
.
dwMask
=
PFM_NUMBERING
|
PFM_NUMBERINGSTART
|
PFM_NUMBERINGTAB
|
PFM_OFFSET
|
PFM_OFFSETINDENT
;
pf
.
dwMask
=
PFM_NUMBERING
|
PFM_NUMBERINGSTART
|
PFM_NUMBERING
STYLE
|
PFM_NUMBERING
TAB
|
PFM_OFFSET
|
PFM_OFFSETINDENT
;
if
(
pf
.
wNumbering
==
PFN_BULLET
)
if
(
pf
.
wNumbering
&&
((
pf
.
wNumbering
==
new_number
)
||
(
LOWORD
(
wParam
)
==
ID_BULLETONOFF
))
)
{
pf
.
wNumbering
=
0
;
pf
.
wNumberingStart
=
0
;
pf
.
wNumberingStyle
=
0
;
pf
.
wNumberingTab
=
0
;
pf
.
dxOffset
=
0
;
pf
.
dxStartIndent
=
-
360
;
}
else
{
pf
.
wNumbering
=
PFN_BULLET
;
pf
.
dxStartIndent
=
pf
.
wNumbering
?
0
:
360
;
if
(
LOWORD
(
wParam
)
==
ID_BULLETONOFF
)
pf
.
wNumbering
=
last_bullet
;
else
{
pf
.
wNumbering
=
new_number
;
last_bullet
=
pf
.
wNumbering
;
}
pf
.
wNumberingStart
=
1
;
pf
.
wNumberingStyle
=
PFNS_PERIOD
;
pf
.
wNumberingTab
=
360
;
pf
.
dxOffset
=
360
;
pf
.
dxStartIndent
=
360
;
}
SendMessageW
(
hwndEditor
,
EM_SETPARAFORMAT
,
0
,
(
LPARAM
)
&
pf
);
...
...
@@ -2502,7 +2519,14 @@ static LRESULT OnInitPopupMenu( HWND hWnd, WPARAM wParam )
CheckMenuItem
(
hMenu
,
ID_ALIGN_LEFT
,
(
nAlignment
==
PFA_LEFT
)
?
MF_CHECKED
:
MF_UNCHECKED
);
CheckMenuItem
(
hMenu
,
ID_ALIGN_CENTER
,
(
nAlignment
==
PFA_CENTER
)
?
MF_CHECKED
:
MF_UNCHECKED
);
CheckMenuItem
(
hMenu
,
ID_ALIGN_RIGHT
,
(
nAlignment
==
PFA_RIGHT
)
?
MF_CHECKED
:
MF_UNCHECKED
);
CheckMenuItem
(
hMenu
,
ID_BULLET
,
((
pf
.
wNumbering
==
PFN_BULLET
)
?
MF_CHECKED
:
MF_UNCHECKED
));
CheckMenuItem
(
hMenu
,
ID_NUMBERING
,
((
pf
.
wNumbering
==
PFN_ARABIC
)
?
MF_CHECKED
:
MF_UNCHECKED
));
CheckMenuItem
(
hMenu
,
ID_LCLETTER
,
((
pf
.
wNumbering
==
PFN_LCLETTER
)
?
MF_CHECKED
:
MF_UNCHECKED
));
CheckMenuItem
(
hMenu
,
ID_UCLETTER
,
((
pf
.
wNumbering
==
PFN_UCLETTER
)
?
MF_CHECKED
:
MF_UNCHECKED
));
CheckMenuItem
(
hMenu
,
ID_LCROMAN
,
((
pf
.
wNumbering
==
PFN_LCROMAN
)
?
MF_CHECKED
:
MF_UNCHECKED
));
CheckMenuItem
(
hMenu
,
ID_UCROMAN
,
((
pf
.
wNumbering
==
PFN_UCROMAN
)
?
MF_CHECKED
:
MF_UNCHECKED
));
EnableMenuItem
(
hMenu
,
ID_EDIT_UNDO
,
SendMessageW
(
hwndEditor
,
EM_CANUNDO
,
0
,
0
)
?
MF_ENABLED
:
MF_GRAYED
);
EnableMenuItem
(
hMenu
,
ID_EDIT_REDO
,
SendMessageW
(
hwndEditor
,
EM_CANREDO
,
0
,
0
)
?
...
...
programs/wordpad/wordpad.h
View file @
c11d931e
...
...
@@ -73,9 +73,15 @@
#define ID_EDIT_CUT 1311
#define ID_EDIT_PASTE 1312
#define ID_EDIT_CLEAR 1313
#define ID_BULLET 1314
#define ID_FONTSETTINGS 1315
#define ID_BULLETONOFF 1314
#define ID_BULLET 1315
#define ID_NUMBERING 1316
#define ID_LCLETTER 1317
#define ID_UCLETTER 1318
#define ID_LCROMAN 1319
#define ID_UCROMAN 1320
#define ID_FONTSETTINGS 1330
#define ID_FORMAT_BOLD 1400
#define ID_FORMAT_ITALIC 1401
...
...
programs/wordpad/wordpad.rc
View file @
c11d931e
...
...
@@ -81,7 +81,15 @@ BEGIN
POPUP "F&ormat"
BEGIN
MENUITEM "&Font...", ID_FONTSETTINGS
MENUITEM "&Bullet points" ID_BULLET
POPUP "&Lists"
BEGIN
MENUITEM "&Bullet points" ID_BULLET
MENUITEM "Numbers" ID_NUMBERING
MENUITEM "Letters - lower case" ID_LCLETTER
MENUITEM "Letters - upper case" ID_UCLETTER
MENUITEM "Roman numerals - lower case" ID_LCROMAN
MENUITEM "Roman numerals - upper case" ID_UCROMAN
END
MENUITEM "&Paragraph..." ID_PARAFORMAT
MENUITEM "&Tabs..." ID_TABSTOPS
POPUP "Backgroun&d"
...
...
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