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
90bb481c
Commit
90bb481c
authored
Aug 03, 2005
by
James Hawkins
Committed by
Alexandre Julliard
Aug 03, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a tab control to the navigation pane.
parent
07f86907
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
1 deletion
+65
-1
En.rc
dlls/hhctrl.ocx/En.rc
+8
-0
help.c
dlls/hhctrl.ocx/help.c
+32
-1
hhctrl.rc
dlls/hhctrl.ocx/hhctrl.rc
+1
-0
resource.h
dlls/hhctrl.ocx/resource.h
+24
-0
No files found.
dlls/hhctrl.ocx/En.rc
View file @
90bb481c
...
...
@@ -23,6 +23,14 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
STRINGTABLE
BEGIN
IDS_CONTENTS "&Contents"
IDS_INDEX "I&ndex"
IDS_SEARCH "&Search"
IDS_FAVORITES "Favor&ites"
END
STRINGTABLE
BEGIN
IDTB_EXPAND "Show"
IDTB_CONTRACT "Hide"
IDTB_STOP "Stop"
...
...
dlls/hhctrl.ocx/help.c
View file @
90bb481c
...
...
@@ -30,6 +30,8 @@
#include "ole2.h"
#include "wine/unicode.h"
#include "resource.h"
/* Window type defaults */
#define WINTYPE_DEFAULT_X 280
...
...
@@ -44,6 +46,7 @@ typedef struct tagHHInfo
HINSTANCE
hInstance
;
LPCWSTR
szCmdLine
;
DWORD
dwNumTBButtons
;
HWND
hwndTabCtrl
;
HFONT
hFont
;
}
HHInfo
;
...
...
@@ -251,12 +254,25 @@ static void NP_GetNavigationRect(HHInfo *pHHInfo, RECT *rc)
rc
->
right
=
WINTYPE_DEFAULT_NAVWIDTH
;
}
static
void
NP_CreateTab
(
HINSTANCE
hInstance
,
HWND
hwndTabCtrl
,
DWORD
dwStrID
,
DWORD
dwIndex
)
{
TCITEMW
tie
;
LPWSTR
tabText
=
HH_LoadString
(
dwStrID
);
tie
.
mask
=
TCIF_TEXT
;
tie
.
pszText
=
tabText
;
TabCtrl_InsertItemW
(
hwndTabCtrl
,
dwIndex
,
&
tie
);
HeapFree
(
GetProcessHeap
(),
0
,
tabText
);
}
static
BOOL
HH_AddNavigationPane
(
HHInfo
*
pHHInfo
)
{
HWND
hWnd
;
HWND
hWnd
,
hwndTabCtrl
;
HWND
hwndParent
=
pHHInfo
->
pHHWinType
->
hwndHelp
;
DWORD
dwStyles
=
WS_CHILDWINDOW
|
WS_VISIBLE
;
DWORD
dwExStyles
=
WS_EX_LEFT
|
WS_EX_LTRREADING
|
WS_EX_RIGHTSCROLLBAR
;
DWORD
dwIndex
=
0
;
RECT
rc
;
NP_GetNavigationRect
(
pHHInfo
,
&
rc
);
...
...
@@ -267,6 +283,21 @@ static BOOL HH_AddNavigationPane(HHInfo *pHHInfo)
if
(
!
hWnd
)
return
FALSE
;
hwndTabCtrl
=
CreateWindowExW
(
dwExStyles
,
WC_TABCONTROLW
,
szEmpty
,
dwStyles
,
0
,
0
,
rc
.
right
,
rc
.
bottom
,
hWnd
,
NULL
,
pHHInfo
->
hInstance
,
NULL
);
if
(
!
hwndTabCtrl
)
return
FALSE
;
/* FIXME: Check which tabs to include when we read the CHM file */
NP_CreateTab
(
pHHInfo
->
hInstance
,
hwndTabCtrl
,
IDS_CONTENTS
,
dwIndex
++
);
NP_CreateTab
(
pHHInfo
->
hInstance
,
hwndTabCtrl
,
IDS_INDEX
,
dwIndex
++
);
NP_CreateTab
(
pHHInfo
->
hInstance
,
hwndTabCtrl
,
IDS_SEARCH
,
dwIndex
++
);
NP_CreateTab
(
pHHInfo
->
hInstance
,
hwndTabCtrl
,
IDS_FAVORITES
,
dwIndex
++
);
SendMessageW
(
hwndTabCtrl
,
WM_SETFONT
,
(
WPARAM
)
pHHInfo
->
hFont
,
TRUE
);
pHHInfo
->
hwndTabCtrl
=
hwndTabCtrl
;
pHHInfo
->
pHHWinType
->
hwndNavigation
=
hWnd
;
return
TRUE
;
}
...
...
dlls/hhctrl.ocx/hhctrl.rc
View file @
90bb481c
...
...
@@ -23,6 +23,7 @@
#include "wingdi.h"
#include "winnls.h"
#include "htmlhelp.h"
#include "resource.h"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
...
...
dlls/hhctrl.ocx/resource.h
0 → 100644
View file @
90bb481c
/*
* HTML Help resource definitions
*
* Copyright 2005 James Hawkins
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define IDS_CONTENTS 1
#define IDS_INDEX 2
#define IDS_SEARCH 3
#define IDS_FAVORITES 4
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