Added wxCHMHelpController, updated help demo. Added DisplaySection(const wxString&)
to wxHelpControllerBase. Corrected some Dialog Editor bugs. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7205 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
@@ -253,6 +253,7 @@ gaugemsw.cpp M 16
|
||||
gdiimage.cpp M
|
||||
gdiobj.cpp M
|
||||
glcanvas.cpp M
|
||||
helpchm.cpp M 32
|
||||
helpwin.cpp M
|
||||
icon.cpp M
|
||||
imaglist.cpp M 32
|
||||
@@ -618,6 +619,7 @@ hash.h W B
|
||||
help.h W
|
||||
helpbase.h W
|
||||
helphtml.h W
|
||||
helpchm.h W
|
||||
helpwin.h W
|
||||
helpxlp.h W
|
||||
icon.h W
|
||||
@@ -903,6 +905,7 @@ gaugemsw.h 9
|
||||
gdiimage.h 9
|
||||
gdiobj.h 9
|
||||
glcanvas.h 9
|
||||
helpchm.h 9
|
||||
helpwin.h 9
|
||||
icon.h 9
|
||||
imaglist.h 9
|
||||
|
@@ -31,6 +31,8 @@ There are currently the following help controller classes defined:
|
||||
|
||||
\begin{itemize}\itemsep=0pt
|
||||
\item wxWinHelpController, for controlling Windows Help.
|
||||
\item wxCHMHelpController, for controlling MS HTML Help. To use this, you need to set wxUSE\_MS\_HTML\_HELP
|
||||
to 0 in setup.h, and link your application with Microsoft's htmlhelp.lib. Currently VC++ only.
|
||||
\item wxExtHelpController, for controlling external browsers under Unix.
|
||||
The default browser is Netscape Navigator. The 'help' sample shows its use.
|
||||
\item wxHelpControllerHtml, using \helpref{wxHTML}{wxhtml} to display help. See {\tt wx/helpwxht.h} for
|
||||
@@ -51,6 +53,7 @@ wxHelpControllerBase\\
|
||||
<wx/help.h> (wxWindows chooses the appropriate help controller class)\\
|
||||
<wx/helpbase.h> (wxHelpControllerBase class)\\
|
||||
<wx/helpwin.h> (Windows Help controller)\\
|
||||
<wx/msw/helpchm.h> (MS HTML Help controller)\\
|
||||
<wx/generic/helpext.h> (external HTML browser controller)\\
|
||||
<wx/generic/helpwxht.h> (simple wxHTML-based help controller)\\
|
||||
<wx/html/helpctrl.h> (advanced wxHTML based help controller: wxHtmlHelpController)
|
||||
@@ -111,11 +114,20 @@ contents.
|
||||
|
||||
\membersection{wxHelpController::DisplaySection}\label{wxhelpcontrollerdisplaysection}
|
||||
|
||||
\func{virtual bool}{DisplaySection}{\param{const wxString\&}{ section}}
|
||||
|
||||
If the help viewer is not running, runs it and displays the given section.
|
||||
|
||||
The interpretation of {\it section} differs between help viewers. For most viewers,
|
||||
this call is equivalent to KeywordSearch. For MS HTML Help, if {\it section} has a .htm
|
||||
or .html extension, that HTML file within the .chm file will be displayed; otherwise
|
||||
a keyword search is done.
|
||||
|
||||
\func{virtual bool}{DisplaySection}{\param{int}{ sectionNo}}
|
||||
|
||||
If the help viewer is not running, runs it and displays the given section.
|
||||
|
||||
{\it WinHelp:} {\it sectionNo} is a context id.
|
||||
{\it WinHelp, MS HTML Help:} {\it sectionNo} is a context id.
|
||||
|
||||
{\it External HTML help/wxHTML based help:} wxExtHelpController and wxHelpControllerHtml implement {\it sectionNo} as an id in a map file, which is of the form:
|
||||
|
||||
@@ -127,6 +139,8 @@ If the help viewer is not running, runs it and displays the given section.
|
||||
|
||||
{\it wxHtmlHelpController:} {\it sectionNo} is an identifier as specified in the {\tt .hhc} file. See \helpref{Help files format}{helpformat}.
|
||||
|
||||
See also the help sample for notes on how to specify section numbers for various help file formats.
|
||||
|
||||
\membersection{wxHelpController::GetFrameParameters}\label{wxhelpcontrollergetframeparameters}
|
||||
|
||||
\func{virtual wxFrame *}{GetFrameParameters}{\param{const wxSize * }{size = NULL}, \param{const wxPoint * }{pos = NULL},
|
||||
@@ -159,7 +173,7 @@ that the viewer is a variant of Netscape Navigator.}
|
||||
If the help viewer is not running, runs it, and searches for sections matching the given keyword. If one
|
||||
match is found, the file is displayed at this section.
|
||||
|
||||
{\it WinHelp:} If more than one match is found,
|
||||
{\it WinHelp, MS HTML Help:} If more than one match is found,
|
||||
the first topic is displayed.
|
||||
|
||||
{\it External HTML help:} If more than one match is found,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
[OPTIONS]
|
||||
BMROOT=d:\wx2\wxWind~1\docs/latex/wx ; Assume that bitmaps are where the source is
|
||||
BMROOT=d:\wx2\wxWindows\docs\latex\wx ; Assume that bitmaps are where the source is
|
||||
TITLE=wxWindows Manual
|
||||
CONTENTS=Contents
|
||||
COMPRESS=HIGH
|
||||
|
@@ -49,6 +49,10 @@ class WXDLLEXPORT wxHelpControllerBase: public wxObject
|
||||
virtual bool LoadFile(const wxString& file = "") = 0;
|
||||
virtual bool DisplayContents(void) = 0;
|
||||
virtual bool DisplaySection(int sectionNo) = 0;
|
||||
|
||||
// By default, uses KeywordSection to display a topic. Implementations
|
||||
// may override this for more specific behaviour.
|
||||
virtual bool DisplaySection(const wxString& section) { return KeywordSearch(section); };
|
||||
virtual bool DisplayBlock(long blockNo) = 0;
|
||||
virtual bool KeywordSearch(const wxString& k) = 0;
|
||||
/// Allows one to override the default settings for the help frame.
|
||||
|
@@ -70,6 +70,7 @@ class WXDLLEXPORT wxHtmlHelpController : public wxHelpControllerBase // wxEvtHan
|
||||
virtual void SetViewer(const wxString& WXUNUSED(viewer), long WXUNUSED(flags) = 0) {}
|
||||
virtual bool LoadFile(const wxString& file = "");
|
||||
virtual bool DisplaySection(int sectionNo);
|
||||
virtual bool DisplaySection(const wxString& section) { return Display(section); }
|
||||
virtual bool DisplayBlock(long blockNo) { return DisplaySection(blockNo); }
|
||||
virtual void SetFrameParameters(const wxString& title,
|
||||
const wxSize& size,
|
||||
|
57
include/wx/msw/helpchm.h
Normal file
@@ -0,0 +1,57 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: helpchm.h
|
||||
// Purpose: Help system: MS HTML Help implementation
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 16/04/2000
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_HELPCHM_H_
|
||||
#define _WX_HELPCHM_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "helpchm.h"
|
||||
#endif
|
||||
|
||||
#include "wx/wx.h"
|
||||
|
||||
#if wxUSE_HELP
|
||||
|
||||
#include "wx/helpbase.h"
|
||||
|
||||
class WXDLLEXPORT wxCHMHelpController: public wxHelpControllerBase
|
||||
{
|
||||
DECLARE_CLASS(wxCHMHelpController)
|
||||
|
||||
public:
|
||||
wxCHMHelpController() {}
|
||||
~wxCHMHelpController() {}
|
||||
|
||||
// Must call this to set the filename
|
||||
virtual bool Initialize(const wxString& file);
|
||||
|
||||
// If file is "", reloads file given in Initialize
|
||||
virtual bool LoadFile(const wxString& file = wxEmptyString);
|
||||
virtual bool DisplayContents();
|
||||
virtual bool DisplaySection(int sectionNo);
|
||||
virtual bool DisplaySection(const wxString& section);
|
||||
virtual bool DisplayBlock(long blockNo);
|
||||
virtual bool KeywordSearch(const wxString& k);
|
||||
virtual bool Quit();
|
||||
|
||||
inline wxString GetHelpFile() const { return m_helpFile; }
|
||||
|
||||
protected:
|
||||
// Append extension if necessary.
|
||||
wxString GetValidFilename(const wxString& file) const;
|
||||
|
||||
protected:
|
||||
wxString m_helpFile;
|
||||
};
|
||||
|
||||
#endif // wxUSE_HELP
|
||||
#endif
|
||||
// _WX_HELPCHM_H_
|
@@ -27,25 +27,27 @@ class WXDLLEXPORT wxWinHelpController: public wxHelpControllerBase
|
||||
DECLARE_CLASS(wxWinHelpController)
|
||||
|
||||
public:
|
||||
wxWinHelpController(void);
|
||||
~wxWinHelpController(void);
|
||||
wxWinHelpController() {};
|
||||
~wxWinHelpController() {};
|
||||
|
||||
// Must call this to set the filename and server name
|
||||
// Must call this to set the filename
|
||||
virtual bool Initialize(const wxString& file);
|
||||
|
||||
// If file is "", reloads file given in Initialize
|
||||
virtual bool LoadFile(const wxString& file = "");
|
||||
virtual bool DisplayContents(void);
|
||||
virtual bool LoadFile(const wxString& file = wxEmptyString);
|
||||
virtual bool DisplayContents();
|
||||
virtual bool DisplaySection(int sectionNo);
|
||||
virtual bool DisplayBlock(long blockNo);
|
||||
virtual bool KeywordSearch(const wxString& k);
|
||||
virtual bool Quit();
|
||||
|
||||
virtual bool Quit(void);
|
||||
virtual void OnQuit(void);
|
||||
|
||||
inline wxString GetHelpFile(void) const { return m_helpFile; }
|
||||
inline wxString GetHelpFile() const { return m_helpFile; }
|
||||
|
||||
protected:
|
||||
// Append extension if necessary.
|
||||
wxString GetValidFilename(const wxString& file) const;
|
||||
|
||||
private:
|
||||
wxString m_helpFile;
|
||||
};
|
||||
|
||||
|
@@ -445,9 +445,10 @@
|
||||
|
||||
#define wxUSE_IPC 1
|
||||
// 0 for no interprocess comms
|
||||
// Note: wxHELP uses IPC under X so these are interdependent!
|
||||
#define wxUSE_HELP 1
|
||||
// 0 for no help facility
|
||||
#define wxUSE_MS_HTML_HELP 0
|
||||
// 0 for no MS HTML Help
|
||||
#define wxUSE_RESOURCES 1
|
||||
// 0 for no wxGetResource/wxWriteResource
|
||||
#define wxUSE_CONSTRAINTS 1
|
||||
@@ -605,8 +606,8 @@
|
||||
// disable the settings which don't work for some compilers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// These don't work as expected for mingw32 and cygwin32
|
||||
#if defined(__GNUWIN32__)
|
||||
// These don't work as expected for mingw32 and cygwin32
|
||||
#undef wxUSE_MEMORY_TRACING
|
||||
#define wxUSE_MEMORY_TRACING 0
|
||||
|
||||
@@ -615,6 +616,9 @@
|
||||
|
||||
#undef wxUSE_DEBUG_NEW_ALWAYS
|
||||
#define wxUSE_DEBUG_NEW_ALWAYS 0
|
||||
|
||||
#undef wxUSE_MS_HTML_HELP
|
||||
#define wxUSE_MS_HTML_HELP 0
|
||||
#endif // __GNUWIN32__
|
||||
|
||||
// MFC duplicates these operators
|
||||
@@ -691,6 +695,12 @@
|
||||
#define wxUSE_LIBJPEG 0
|
||||
#endif
|
||||
|
||||
#if defined(__BORLANDC__)
|
||||
// Need a BC++-specific htmlhelp.lib before we can enable this
|
||||
#undef wxUSE_MS_HTML_HELP
|
||||
#define wxUSE_MS_HTML_HELP 0
|
||||
#endif
|
||||
|
||||
#if defined(__WXMSW__) && defined(__WATCOMC__)
|
||||
#undef wxUSE_LIBJPEG
|
||||
#define wxUSE_LIBJPEG 0
|
||||
@@ -700,6 +710,9 @@
|
||||
|
||||
#undef wxUSE_GLCANVAS
|
||||
#define wxUSE_GLCANVAS 0
|
||||
|
||||
#undef wxUSE_MS_HTML_HELP
|
||||
#define wxUSE_MS_HTML_HELP 0
|
||||
#endif
|
||||
|
||||
#if defined(__WXMSW__) && !defined(__WIN32__)
|
||||
@@ -740,6 +753,8 @@
|
||||
#undef wxUSE_GLCANVAS
|
||||
#define wxUSE_GLCANVAS 0
|
||||
|
||||
#undef wxUSE_MS_HTML_HELP
|
||||
#define wxUSE_MS_HTML_HELP 0
|
||||
#endif // Win16
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -36,9 +36,13 @@
|
||||
// Extended styles: for resource usage only
|
||||
|
||||
// Use dialog units instead of pixels
|
||||
#define wxRESOURCE_DIALOG_UNITS 1
|
||||
#define wxRESOURCE_DIALOG_UNITS 0x0001
|
||||
// Use default system colour and font
|
||||
#define wxRESOURCE_USE_DEFAULTS 2
|
||||
#define wxRESOURCE_USE_DEFAULTS 0x0002
|
||||
// Old-style vertical label
|
||||
#define wxRESOURCE_VERTICAL_LABEL 0x0004
|
||||
// Old-style horizontal label
|
||||
#define wxRESOURCE_HORIZONTAL_LABEL 0x0008
|
||||
|
||||
// Macros to help use dialog units
|
||||
#define wxDLG_POINT(x, y, parent, useDlgUnits) (useDlgUnits ? parent->ConvertDialogToPixel(wxPoint(x, y)) : wxPoint(x, y))
|
||||
|
Before Width: | Height: | Size: 225 B After Width: | Height: | Size: 978 B |
Before Width: | Height: | Size: 231 B After Width: | Height: | Size: 996 B |
@@ -48,7 +48,6 @@
|
||||
#endif
|
||||
|
||||
#if USE_HTML_HELP
|
||||
|
||||
#include <wx/filesys.h>
|
||||
#include <wx/fs_zip.h>
|
||||
|
||||
@@ -59,6 +58,10 @@
|
||||
#include "wx/html/helpctrl.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_MS_HTML_HELP
|
||||
#include "wx/msw/helpchm.h"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// ressources
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -99,12 +102,16 @@ public:
|
||||
#endif
|
||||
wxHtmlHelpController& GetAdvancedHtmlHelpController() { return m_advancedHtmlHelp; }
|
||||
#endif
|
||||
#if wxUSE_MS_HTML_HELP
|
||||
wxCHMHelpController& GetMSHtmlHelpController() { return m_msHtmlHelp; }
|
||||
#endif
|
||||
|
||||
// event handlers (these functions should _not_ be virtual)
|
||||
void OnQuit(wxCommandEvent& event);
|
||||
void OnHelp(wxCommandEvent& event);
|
||||
void OnHtmlHelp(wxCommandEvent& event);
|
||||
void OnAdvancedHtmlHelp(wxCommandEvent& event);
|
||||
void OnMSHtmlHelp(wxCommandEvent& event);
|
||||
|
||||
void ShowHelp(int commandId, wxHelpControllerBase& helpController);
|
||||
|
||||
@@ -118,6 +125,10 @@ private:
|
||||
wxHtmlHelpController m_advancedHtmlHelp;
|
||||
#endif
|
||||
|
||||
#if wxUSE_MS_HTML_HELP
|
||||
wxCHMHelpController m_msHtmlHelp;
|
||||
#endif
|
||||
|
||||
// any class wishing to process wxWindows events must use this macro
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
@@ -149,6 +160,12 @@ enum
|
||||
HelpDemo_Advanced_Html_Help_Help,
|
||||
HelpDemo_Advanced_Html_Help_Search,
|
||||
|
||||
HelpDemo_MS_Html_Help_Index,
|
||||
HelpDemo_MS_Html_Help_Classes,
|
||||
HelpDemo_MS_Html_Help_Functions,
|
||||
HelpDemo_MS_Html_Help_Help,
|
||||
HelpDemo_MS_Html_Help_Search,
|
||||
|
||||
HelpDemo_Help_KDE,
|
||||
HelpDemo_Help_GNOME,
|
||||
HelpDemo_Help_Netscape,
|
||||
@@ -183,6 +200,12 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||
EVT_MENU(HelpDemo_Advanced_Html_Help_Help, MyFrame::OnAdvancedHtmlHelp)
|
||||
EVT_MENU(HelpDemo_Advanced_Html_Help_Search, MyFrame::OnAdvancedHtmlHelp)
|
||||
|
||||
EVT_MENU(HelpDemo_MS_Html_Help_Index, MyFrame::OnMSHtmlHelp)
|
||||
EVT_MENU(HelpDemo_MS_Html_Help_Classes, MyFrame::OnMSHtmlHelp)
|
||||
EVT_MENU(HelpDemo_MS_Html_Help_Functions, MyFrame::OnMSHtmlHelp)
|
||||
EVT_MENU(HelpDemo_MS_Html_Help_Help, MyFrame::OnMSHtmlHelp)
|
||||
EVT_MENU(HelpDemo_MS_Html_Help_Search, MyFrame::OnMSHtmlHelp)
|
||||
|
||||
EVT_MENU(HelpDemo_Help_KDE, MyFrame::OnHelp)
|
||||
EVT_MENU(HelpDemo_Help_GNOME, MyFrame::OnHelp)
|
||||
EVT_MENU(HelpDemo_Help_Netscape, MyFrame::OnHelp)
|
||||
@@ -237,9 +260,9 @@ bool MyApp::OnInit()
|
||||
}
|
||||
|
||||
#if USE_HTML_HELP
|
||||
#if USE_OLD_HTML_HELP
|
||||
// initialise the standard HTML help system: this means that the HTML docs are in the
|
||||
// subdirectory doc for platforms using HTML help
|
||||
#if USE_OLD_HTML_HELP
|
||||
if ( !frame->GetHtmlHelpController().Initialize("doc") )
|
||||
{
|
||||
wxLogError("Cannot initialize the HTML help system, aborting.");
|
||||
@@ -258,6 +281,15 @@ bool MyApp::OnInit()
|
||||
}
|
||||
#endif
|
||||
|
||||
#if wxUSE_MS_HTML_HELP
|
||||
if ( !frame->GetMSHtmlHelpController().Initialize("doc") )
|
||||
{
|
||||
wxLogError("Cannot initialize the MS HTML help system, aborting.");
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -297,6 +329,15 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
|
||||
menuFile->Append(HelpDemo_Advanced_Html_Help_Search, "Advanced HTML &Search help...");
|
||||
#endif
|
||||
|
||||
#if wxUSE_MS_HTML_HELP
|
||||
menuFile->AppendSeparator();
|
||||
menuFile->Append(HelpDemo_MS_Html_Help_Index, "MS HTML &Help Index...");
|
||||
menuFile->Append(HelpDemo_MS_Html_Help_Classes, "MS HTML &Help on Classes...");
|
||||
menuFile->Append(HelpDemo_MS_Html_Help_Functions, "MS HTML &Help on Functions...");
|
||||
menuFile->Append(HelpDemo_MS_Html_Help_Help, "MS HTML &About Help Demo...");
|
||||
menuFile->Append(HelpDemo_MS_Html_Help_Search, "MS HTML &Search help...");
|
||||
#endif
|
||||
|
||||
#ifndef __WXMSW__
|
||||
#if !wxUSE_HTML
|
||||
menuFile->AppendSeparator();
|
||||
@@ -357,38 +398,111 @@ void MyFrame::OnAdvancedHtmlHelp(wxCommandEvent& event)
|
||||
#endif
|
||||
}
|
||||
|
||||
void MyFrame::OnMSHtmlHelp(wxCommandEvent& event)
|
||||
{
|
||||
#if wxUSE_MS_HTML_HELP
|
||||
ShowHelp(event.GetId(), m_msHtmlHelp);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
Notes: ShowHelp uses section ids for displaying particular topics,
|
||||
but you might want to use a unique keyword to display a topic, instead.
|
||||
|
||||
Section ids are specified as follows for the different formats.
|
||||
|
||||
WinHelp
|
||||
|
||||
The [MAP] section specifies the topic to integer id mapping, e.g.
|
||||
|
||||
[MAP]
|
||||
#define intro 100
|
||||
#define functions 1
|
||||
#define classes 2
|
||||
#define about 3
|
||||
|
||||
The identifier name corresponds to the label used for that topic.
|
||||
You could also put these in a .h file and #include it in both the MAP
|
||||
section and your C++ source.
|
||||
|
||||
Note that Tex2RTF doesn't currently generate the MAP section automatically.
|
||||
|
||||
MS HTML Help
|
||||
|
||||
The [MAP] section specifies the HTML filename root to integer id mapping, e.g.
|
||||
|
||||
[MAP]
|
||||
#define doc1 100
|
||||
#define doc3 1
|
||||
#define doc2 2
|
||||
#define doc4 3
|
||||
|
||||
The identifier name corresponds to the HTML filename used for that topic.
|
||||
You could also put these in a .h file and #include it in both the MAP
|
||||
section and your C++ source.
|
||||
|
||||
Note that Tex2RTF doesn't currently generate the MAP section automatically.
|
||||
|
||||
Simple wxHTML Help and External HTML Help
|
||||
|
||||
A wxhelp.map file is used, for example:
|
||||
|
||||
0 wx.htm ; wxWindows: Help index; additional keywords like overview
|
||||
1 wx204.htm ; wxWindows Function Reference
|
||||
2 wx34.htm ; wxWindows Class Reference
|
||||
|
||||
Note that Tex2RTF doesn't currently generate the MAP section automatically.
|
||||
|
||||
Advanced HTML Help
|
||||
|
||||
An extension to the .hhc file format is used, specifying a new parameter
|
||||
with name="ID":
|
||||
|
||||
<OBJECT type="text/sitemap">
|
||||
<param name="Local" value="doc2.htm#classes">
|
||||
<param name="Name" value="Classes">
|
||||
<param name="ID" value=2>
|
||||
</OBJECT>
|
||||
|
||||
Again, this is not generated automatically by Tex2RTF, though it could
|
||||
be added quite easily.
|
||||
|
||||
Unfortunately adding the ID parameters appears to interfere with MS HTML Help,
|
||||
so you should not try to compile a .chm file from a .hhc file with
|
||||
this extension, or the contents will be messed up.
|
||||
*/
|
||||
|
||||
void MyFrame::ShowHelp(int commandId, wxHelpControllerBase& helpController)
|
||||
{
|
||||
switch(commandId)
|
||||
{
|
||||
|
||||
// Note: For WinHelp, these ids are specified in the map session, mapping
|
||||
// topic names to numbers.
|
||||
// For HTML and external help, a wxhelp.map file is used.
|
||||
|
||||
case HelpDemo_Help_Classes:
|
||||
case HelpDemo_Html_Help_Classes:
|
||||
case HelpDemo_Advanced_Html_Help_Classes:
|
||||
case HelpDemo_MS_Html_Help_Classes:
|
||||
helpController.DisplaySection(2);
|
||||
|
||||
// if (helpController.IsKindOf(CLASSINFO(wxHtmlHelpController)))
|
||||
// ((wxHtmlHelpController&)helpController).Display("Classes"); // An alternative form for this controller
|
||||
//helpController.DisplaySection("Classes"); // An alternative form for most controllers
|
||||
|
||||
break;
|
||||
case HelpDemo_Help_Functions:
|
||||
case HelpDemo_Html_Help_Functions:
|
||||
case HelpDemo_Advanced_Html_Help_Functions:
|
||||
case HelpDemo_MS_Html_Help_Functions:
|
||||
helpController.DisplaySection(1);
|
||||
//helpController.DisplaySection("Functions"); // An alternative form for most controllers
|
||||
break;
|
||||
case HelpDemo_Help_Help:
|
||||
case HelpDemo_Html_Help_Help:
|
||||
case HelpDemo_Advanced_Html_Help_Help:
|
||||
case HelpDemo_MS_Html_Help_Help:
|
||||
helpController.DisplaySection(3);
|
||||
//helpController.DisplaySection("About"); // An alternative form for most controllers
|
||||
break;
|
||||
|
||||
case HelpDemo_Help_Search:
|
||||
case HelpDemo_Html_Help_Search:
|
||||
case HelpDemo_Advanced_Html_Help_Search:
|
||||
case HelpDemo_MS_Html_Help_Search:
|
||||
{
|
||||
wxString key = wxGetTextFromUser("Search for?",
|
||||
"Search help for keyword",
|
||||
@@ -402,6 +516,7 @@ void MyFrame::ShowHelp(int commandId, wxHelpControllerBase& helpController)
|
||||
case HelpDemo_Help_Index:
|
||||
case HelpDemo_Html_Help_Index:
|
||||
case HelpDemo_Advanced_Html_Help_Index:
|
||||
case HelpDemo_MS_Html_Help_Index:
|
||||
helpController.DisplayContents();
|
||||
break;
|
||||
|
||||
|
BIN
samples/help/doc.chm
Normal file
35
samples/help/doc.hhc
Normal file
@@ -0,0 +1,35 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<meta name="GENERATOR" content="tex2rtf">
|
||||
<!-- Sitemap 1.0 -->
|
||||
</HEAD><BODY>
|
||||
<OBJECT type="text/site properties">
|
||||
<param name="ImageType" value="Folder">
|
||||
</OBJECT>
|
||||
<UL>
|
||||
<LI> <OBJECT type="text/sitemap">
|
||||
<param name="Local" value="doc.htm">
|
||||
<param name="Name" value="Contents">
|
||||
</OBJECT>
|
||||
<LI> <OBJECT type="text/sitemap">
|
||||
<param name="Local" value="doc1.htm#intro">
|
||||
<param name="Name" value="Introduction">
|
||||
</OBJECT>
|
||||
<UL> <LI> <OBJECT type="text/sitemap">
|
||||
<param name="Local" value="doc2.htm#classes">
|
||||
<param name="Name" value="Classes">
|
||||
</OBJECT>
|
||||
<LI> <OBJECT type="text/sitemap">
|
||||
<param name="Local" value="doc3.htm#functions">
|
||||
<param name="Name" value="Functions">
|
||||
</OBJECT>
|
||||
<LI> <OBJECT type="text/sitemap">
|
||||
<param name="Local" value="doc4.htm#about">
|
||||
<param name="Name" value="About">
|
||||
</OBJECT>
|
||||
</UL> <LI> <OBJECT type="text/sitemap">
|
||||
<param name="Local" value="doc5.htm#chapter2">
|
||||
<param name="Name" value="Chapter 2">
|
||||
</OBJECT>
|
||||
</UL>
|
31
samples/help/doc.hhk
Normal file
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<meta name="GENERATOR" content="tex2rtf">
|
||||
<!-- Sitemap 1.0 -->
|
||||
</HEAD><BODY>
|
||||
<OBJECT type="text/site properties">
|
||||
<param name="ImageType" value="Folder">
|
||||
</OBJECT>
|
||||
<UL>
|
||||
<LI> <OBJECT type="text/sitemap">
|
||||
<param name="Local" value="doc4.htm#about">
|
||||
<param name="Name" value="About">
|
||||
</OBJECT>
|
||||
<LI> <OBJECT type="text/sitemap">
|
||||
<param name="Local" value="doc1.htm#intro">
|
||||
<param name="Name" value="Introduction">
|
||||
</OBJECT>
|
||||
<LI> <OBJECT type="text/sitemap">
|
||||
<param name="Local" value="doc2.htm#classes">
|
||||
<param name="Name" value="Classes">
|
||||
</OBJECT>
|
||||
<LI> <OBJECT type="text/sitemap">
|
||||
<param name="Local" value="doc5.htm#chapter2">
|
||||
<param name="Name" value="Chapter 2">
|
||||
</OBJECT>
|
||||
<LI> <OBJECT type="text/sitemap">
|
||||
<param name="Local" value="doc3.htm#functions">
|
||||
<param name="Name" value="Functions">
|
||||
</OBJECT>
|
||||
</UL>
|
27
samples/help/doc.hhp
Normal file
@@ -0,0 +1,27 @@
|
||||
[OPTIONS]
|
||||
Compatibility=1.1
|
||||
Full-text search=Yes
|
||||
Contents file=doc.hhc
|
||||
Compiled file=doc.chm
|
||||
Default Window=docHelp
|
||||
Default topic=doc.htm
|
||||
Index file=doc.hhk
|
||||
Title=Help Demo
|
||||
|
||||
[WINDOWS]
|
||||
docHelp=,"doc.hhc","doc.hhk","doc.htm",,,,,,0x2420,,0x380e,,,,,0,,,
|
||||
|
||||
[FILES]
|
||||
doc.htm
|
||||
doc1.htm
|
||||
doc2.htm
|
||||
doc3.htm
|
||||
doc4.htm
|
||||
doc5.htm
|
||||
|
||||
[MAP]
|
||||
#define doc1 100
|
||||
#define doc3 1
|
||||
#define doc2 2
|
||||
#define doc4 3
|
||||
|
Before Width: | Height: | Size: 164 B After Width: | Height: | Size: 959 B |
@@ -10,6 +10,7 @@
|
||||
WXDIR = $(WXWIN)
|
||||
|
||||
TARGET=demo
|
||||
#EXTRALIBS=htmlhelp.lib
|
||||
OBJECTS = $(TARGET).obj
|
||||
|
||||
!include $(WXDIR)\src\makeprog.b32
|
||||
|
Before Width: | Height: | Size: 137 B After Width: | Height: | Size: 998 B |
@@ -692,6 +692,12 @@ wxItemResource *wxResourceInterpretDialog(wxResourceTable& table, wxExpr *expr,
|
||||
dialogItem->SetTitle(title);
|
||||
dialogItem->SetSize(x, y, width, height);
|
||||
|
||||
// Check for wxWin 1.68-style specifications
|
||||
if (style.Find(wxT("VERTICAL_LABEL")) != -1)
|
||||
dialogItem->SetResourceStyle(dialogItem->GetResourceStyle() | wxRESOURCE_VERTICAL_LABEL);
|
||||
else if (style.Find(wxT("HORIZONTAL_LABEL")) != -1)
|
||||
dialogItem->SetResourceStyle(dialogItem->GetResourceStyle() | wxRESOURCE_HORIZONTAL_LABEL);
|
||||
|
||||
if (backColourHex != wxT(""))
|
||||
{
|
||||
int r = 0;
|
||||
@@ -853,6 +859,12 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, wxExpr *expr)
|
||||
controlItem->SetType(controlType);
|
||||
controlItem->SetId(id);
|
||||
|
||||
// Check for wxWin 1.68-style specifications
|
||||
if (style.Find(wxT("VERTICAL_LABEL")) != -1)
|
||||
controlItem->SetResourceStyle(controlItem->GetResourceStyle() | wxRESOURCE_VERTICAL_LABEL);
|
||||
else if (style.Find(wxT("HORIZONTAL_LABEL")) != -1)
|
||||
controlItem->SetResourceStyle(controlItem->GetResourceStyle() | wxRESOURCE_HORIZONTAL_LABEL);
|
||||
|
||||
if (controlType == wxT("wxButton"))
|
||||
{
|
||||
// Check for bitmap resource name (in case loading old-style resource file)
|
||||
|
156
src/msw/helpchm.cpp
Normal file
@@ -0,0 +1,156 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: helpchm.cpp
|
||||
// Purpose: Help system: MS HTML Help implementation
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 16/04/2000
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "helpchm.h"
|
||||
#endif
|
||||
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/defs.h"
|
||||
#endif
|
||||
|
||||
#include "wx/filefn.h"
|
||||
|
||||
#if wxUSE_HELP && wxUSE_MS_HTML_HELP && defined(__WIN95__)
|
||||
#include "wx/msw/helpchm.h"
|
||||
|
||||
// This is found in the HTML Help Workshop installation,
|
||||
// along with htmlhelp.lib.
|
||||
#include <htmlhelp.h>
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#ifdef __WXMSW__
|
||||
#include "wx/msw/private.h"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
static HWND GetSuitableHWND()
|
||||
{
|
||||
if (wxTheApp->GetTopWindow())
|
||||
return (HWND) wxTheApp->GetTopWindow()->GetHWND();
|
||||
else
|
||||
return GetDesktopWindow();
|
||||
}
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxCHMHelpController, wxHelpControllerBase)
|
||||
|
||||
bool wxCHMHelpController::Initialize(const wxString& filename)
|
||||
{
|
||||
m_helpFile = filename;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool wxCHMHelpController::LoadFile(const wxString& file)
|
||||
{
|
||||
m_helpFile = file;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool wxCHMHelpController::DisplayContents()
|
||||
{
|
||||
if (m_helpFile.IsEmpty()) return FALSE;
|
||||
|
||||
wxString str = GetValidFilename(m_helpFile);
|
||||
|
||||
HtmlHelp(GetSuitableHWND(), (const wxChar*) str, HH_HELP_FINDER, 0L);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// Use topic or HTML filename
|
||||
bool wxCHMHelpController::DisplaySection(const wxString& section)
|
||||
{
|
||||
if (m_helpFile.IsEmpty()) return FALSE;
|
||||
|
||||
wxString str = GetValidFilename(m_helpFile);
|
||||
|
||||
bool isFilename = TRUE;
|
||||
|
||||
// Is this an HTML file or a keyword?
|
||||
wxString path, filename, ext;
|
||||
wxSplitPath(section, & path, & filename, & ext);
|
||||
if (ext != wxT("htm") && ext != wxT("html"))
|
||||
isFilename = FALSE;
|
||||
|
||||
if (isFilename)
|
||||
HtmlHelp(GetSuitableHWND(), (const wxChar*) str, HH_DISPLAY_TOPIC, (DWORD) (const wxChar*) section);
|
||||
else
|
||||
KeywordSearch(section);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// Use context number
|
||||
bool wxCHMHelpController::DisplaySection(int section)
|
||||
{
|
||||
if (m_helpFile.IsEmpty()) return FALSE;
|
||||
|
||||
wxString str = GetValidFilename(m_helpFile);
|
||||
|
||||
HtmlHelp(GetSuitableHWND(), (const wxChar*) str, HH_HELP_CONTEXT, (DWORD)section);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool wxCHMHelpController::DisplayBlock(long block)
|
||||
{
|
||||
return DisplaySection(block);
|
||||
}
|
||||
|
||||
bool wxCHMHelpController::KeywordSearch(const wxString& k)
|
||||
{
|
||||
if (m_helpFile.IsEmpty()) return FALSE;
|
||||
|
||||
wxString str = GetValidFilename(m_helpFile);
|
||||
|
||||
HH_AKLINK link;
|
||||
link.cbStruct = sizeof(HH_AKLINK) ;
|
||||
link.fReserved = FALSE ;
|
||||
link.pszKeywords = k.c_str() ;
|
||||
link.pszUrl = NULL ;
|
||||
link.pszMsgText = NULL ;
|
||||
link.pszMsgTitle = NULL ;
|
||||
link.pszWindow = NULL ;
|
||||
link.fIndexOnFail = TRUE ;
|
||||
|
||||
HtmlHelp(GetSuitableHWND(), (const wxChar*) str, HH_KEYWORD_LOOKUP, (DWORD)& link);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool wxCHMHelpController::Quit()
|
||||
{
|
||||
HtmlHelp(GetSuitableHWND(), 0, HH_CLOSE_ALL, 0L);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// Append extension if necessary.
|
||||
wxString wxCHMHelpController::GetValidFilename(const wxString& file) const
|
||||
{
|
||||
wxString path, name, ext;
|
||||
wxSplitPath(file, & path, & name, & ext);
|
||||
|
||||
wxString fullName;
|
||||
if (path.IsEmpty())
|
||||
fullName = name + wxT(".chm");
|
||||
else if (path.Last() == wxT('\\'))
|
||||
fullName = path + name + wxT(".chm");
|
||||
else
|
||||
fullName = path + wxT("\\") + name + wxT(".chm");
|
||||
return fullName;
|
||||
}
|
||||
|
||||
#endif // wxUSE_HELP
|
@@ -24,9 +24,11 @@
|
||||
#include "wx/defs.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_HELP
|
||||
|
||||
#include "wx/filefn.h"
|
||||
#include "wx/msw/helpwin.h"
|
||||
|
||||
#if wxUSE_HELP
|
||||
#include <time.h>
|
||||
|
||||
#ifdef __WXMSW__
|
||||
@@ -35,23 +37,16 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
// MAX path length
|
||||
#define _MAXPATHLEN 500
|
||||
|
||||
// MAX length of Help descriptor
|
||||
#define _MAX_HELP_LEN 500
|
||||
static HWND GetSuitableHWND()
|
||||
{
|
||||
if (wxTheApp->GetTopWindow())
|
||||
return (HWND) wxTheApp->GetTopWindow()->GetHWND();
|
||||
else
|
||||
return GetDesktopWindow();
|
||||
}
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxWinHelpController, wxHelpControllerBase)
|
||||
|
||||
wxWinHelpController::wxWinHelpController(void)
|
||||
{
|
||||
m_helpFile = "";
|
||||
}
|
||||
|
||||
wxWinHelpController::~wxWinHelpController(void)
|
||||
{
|
||||
}
|
||||
|
||||
bool wxWinHelpController::Initialize(const wxString& filename)
|
||||
{
|
||||
m_helpFile = filename;
|
||||
@@ -66,93 +61,66 @@ bool wxWinHelpController::LoadFile(const wxString& file)
|
||||
|
||||
bool wxWinHelpController::DisplayContents(void)
|
||||
{
|
||||
if (m_helpFile == wxT("")) return FALSE;
|
||||
if (m_helpFile.IsEmpty()) return FALSE;
|
||||
|
||||
wxString str = m_helpFile;
|
||||
size_t len = str.Length();
|
||||
if (!(str[(size_t)(len-1)] == wxT('p') && str[(size_t)(len-2)] == wxT('l') && str[(size_t)(len-3)] == wxT('h') && str[(size_t)(len-4)] == wxT('.')))
|
||||
str += wxT(".hlp");
|
||||
wxString str = GetValidFilename(m_helpFile);
|
||||
|
||||
if (wxTheApp->GetTopWindow())
|
||||
{
|
||||
#if defined(__WIN95__)
|
||||
WinHelp((HWND) wxTheApp->GetTopWindow()->GetHWND(), (const wxChar*) str, HELP_FINDER, 0L);
|
||||
WinHelp(GetSuitableHWND(), (const wxChar*) str, HELP_FINDER, 0L);
|
||||
#else
|
||||
WinHelp((HWND) wxTheApp->GetTopWindow()->GetHWND(), (const wxChar*) str, HELP_CONTENTS, 0L);
|
||||
WinHelp(GetSuitableHWND(), (const wxChar*) str, HELP_CONTENTS, 0L);
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool wxWinHelpController::DisplaySection(int section)
|
||||
{
|
||||
// Use context number
|
||||
if (m_helpFile == wxT("")) return FALSE;
|
||||
if (m_helpFile.IsEmpty()) return FALSE;
|
||||
|
||||
wxString str = m_helpFile;
|
||||
size_t len = str.Length();
|
||||
if (!(str[(size_t)(len-1)] == wxT('p') && str[(size_t)(len-2)] == wxT('l') && str[(size_t)(len-3)] == wxT('h') && str[(size_t)(len-4)] == wxT('.')))
|
||||
str += wxT(".hlp");
|
||||
wxString str = GetValidFilename(m_helpFile);
|
||||
|
||||
if (wxTheApp->GetTopWindow())
|
||||
{
|
||||
WinHelp((HWND) wxTheApp->GetTopWindow()->GetHWND(), (const wxChar*) str, HELP_CONTEXT, (DWORD)section);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool wxWinHelpController::DisplayBlock(long block)
|
||||
{
|
||||
// Use context number -- a very rough equivalent to block id!
|
||||
if (m_helpFile == wxT("")) return FALSE;
|
||||
|
||||
wxString str = m_helpFile;
|
||||
size_t len = str.Length();
|
||||
if (!(str[(size_t)(len-1)] == 'p' && str[(size_t)(len-2)] == 'l' && str[(size_t)(len-3)] == 'h' && str[(size_t)(len-4)] == '.'))
|
||||
str += wxT(".hlp");
|
||||
|
||||
if (wxTheApp->GetTopWindow())
|
||||
{
|
||||
WinHelp((HWND) wxTheApp->GetTopWindow()->GetHWND(), (const wxChar*) str, HELP_CONTEXT, (DWORD)block);
|
||||
DisplaySection(block);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool wxWinHelpController::KeywordSearch(const wxString& k)
|
||||
{
|
||||
if (m_helpFile == wxT("")) return FALSE;
|
||||
if (m_helpFile.IsEmpty()) return FALSE;
|
||||
|
||||
wxString str = m_helpFile;
|
||||
size_t len = str.Length();
|
||||
if (!(str[(size_t)(len-1)] == wxT('p') && str[(size_t)(len-2)] == wxT('l') && str[(size_t)(len-3)] == wxT('h') && str[(size_t)(len-4)] == wxT('.')))
|
||||
str += wxT(".hlp");
|
||||
wxString str = GetValidFilename(m_helpFile);
|
||||
|
||||
if (wxTheApp->GetTopWindow())
|
||||
{
|
||||
WinHelp((HWND) wxTheApp->GetTopWindow()->GetHWND(), (const wxChar*) str, HELP_PARTIALKEY, (DWORD)(const wxChar*) k);
|
||||
WinHelp(GetSuitableHWND(), (const wxChar*) str, HELP_PARTIALKEY, (DWORD)(const wxChar*) k);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Can't close the help window explicitly in WinHelp
|
||||
bool wxWinHelpController::Quit(void)
|
||||
{
|
||||
if (wxTheApp->GetTopWindow())
|
||||
{
|
||||
WinHelp((HWND) wxTheApp->GetTopWindow()->GetHWND(), 0, HELP_QUIT, 0L);
|
||||
WinHelp(GetSuitableHWND(), 0, HELP_QUIT, 0L);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Don't get notified of WinHelp quitting
|
||||
void wxWinHelpController::OnQuit(void)
|
||||
// Append extension if necessary.
|
||||
wxString wxWinHelpController::GetValidFilename(const wxString& file) const
|
||||
{
|
||||
wxString path, name, ext;
|
||||
wxSplitPath(file, & path, & name, & ext);
|
||||
|
||||
wxString fullName;
|
||||
if (path.IsEmpty())
|
||||
fullName = name + wxT(".hlp");
|
||||
else if (path.Last() == wxT('\\'))
|
||||
fullName = path + name + wxT(".hlp");
|
||||
else
|
||||
fullName = path + wxT("\\") + name + wxT(".hlp");
|
||||
return fullName;
|
||||
}
|
||||
|
||||
#endif // wxUSE_HELP
|
||||
|
@@ -264,6 +264,7 @@ MSWOBJS = $(MSWDIR)\accel.obj \
|
||||
$(MSWDIR)\gsocket.obj \
|
||||
$(MSWDIR)\gsockmsw.obj \
|
||||
$(MSWDIR)\helpwin.obj \
|
||||
$(MSWDIR)\helpchm.obj \
|
||||
$(MSWDIR)\icon.obj \
|
||||
$(MSWDIR)\imaglist.obj \
|
||||
$(MSWDIR)\joystick.obj \
|
||||
@@ -480,6 +481,8 @@ $(MSWDIR)\gsocket.obj: $(MSWDIR)\gsocket.c
|
||||
|
||||
$(MSWDIR)\gsockmsw.obj: $(MSWDIR)\gsockmsw.c
|
||||
|
||||
$(MSWDIR)\helpchm.obj: $(MSWDIR)\helpchm.$(SRCSUFF)
|
||||
|
||||
$(MSWDIR)\helpwin.obj: $(MSWDIR)\helpwin.$(SRCSUFF)
|
||||
|
||||
$(MSWDIR)\icon.obj: $(MSWDIR)\icon.$(SRCSUFF)
|
||||
|
@@ -261,6 +261,7 @@ MSWOBJS = \
|
||||
$(MSWDIR)/glcanvas.$(OBJSUFF) \
|
||||
$(MSWDIR)/gsocket.$(OBJSUFF) \
|
||||
$(MSWDIR)/gsockmsw.$(OBJSUFF) \
|
||||
$(MSWDIR)/helpchm.$(OBJSUFF) \
|
||||
$(MSWDIR)/helpwin.$(OBJSUFF) \
|
||||
$(MSWDIR)/icon.$(OBJSUFF) \
|
||||
$(MSWDIR)/imaglist.$(OBJSUFF) \
|
||||
|
@@ -280,6 +280,7 @@ MSWOBJS = ..\msw\$D\accel.obj \
|
||||
..\msw\$D\glcanvas.obj \
|
||||
..\msw\$D\gsocket.obj \
|
||||
..\msw\$D\gsockmsw.obj \
|
||||
..\msw\$D\helpchm.obj \
|
||||
..\msw\$D\helpwin.obj \
|
||||
..\msw\$D\icon.obj \
|
||||
..\msw\$D\imaglist.obj \
|
||||
|
@@ -236,6 +236,7 @@ MSWOBJS = accel.obj &
|
||||
glcanvas.obj &
|
||||
gsocket.obj &
|
||||
gsockmsw.obj &
|
||||
helpchm.obj &
|
||||
helpwin.obj &
|
||||
icon.obj &
|
||||
imaglist.obj &
|
||||
|
@@ -883,6 +883,10 @@ SOURCE=.\msw\gsockmsw.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\msw\helpchm.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\msw\helpwin.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@@ -885,6 +885,10 @@ SOURCE=.\msw\gsockmsw.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\msw\helpchm.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\msw\helpwin.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@@ -1081,6 +1081,9 @@ void wxResourceEditorControlHandler::OnDragEnd(int x, int y, int WXUNUSED(keys),
|
||||
int x2 = (int)(x1 + (x - dragOffsetX) - xpos);
|
||||
int y2 = (int)(y1 + (y - dragOffsetY) - ypos);
|
||||
|
||||
resourceX = x2;
|
||||
resourceY = y2;
|
||||
|
||||
// Update the associated resource
|
||||
resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(item);
|
||||
if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS)
|
||||
|
@@ -420,7 +420,7 @@ bool wxResourceManager::New(bool loadFromFile, const wxString& filename)
|
||||
wxString str = filename;
|
||||
if (str == wxString(""))
|
||||
{
|
||||
wxString f(wxFileSelector("Open resource file", NULL, NULL, "wxr", "*.wxr", 0, wxTheApp->GetTopWindow()));
|
||||
wxString f(wxFileSelector("Open resource file", wxGetCwd(), wxEmptyString, "wxr", "*.wxr", 0, wxTheApp->GetTopWindow()));
|
||||
if (!f.IsNull() && f != "")
|
||||
str = f;
|
||||
else
|
||||
|