Added parent window parameter to wxHelpController constructor
and added SetParentWindow/GetParentWindow. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36017 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -55,7 +55,7 @@ class WXDLLIMPEXP_ADV wxExtHelpController : public wxHelpControllerBase
|
||||
{
|
||||
DECLARE_CLASS(wxExtHelpController)
|
||||
public:
|
||||
wxExtHelpController();
|
||||
wxExtHelpController(wxWindow* parentWindow = NULL);
|
||||
~wxExtHelpController();
|
||||
|
||||
/** Tell it which browser to use.
|
||||
|
@@ -35,7 +35,7 @@ enum wxHelpSearchMode
|
||||
class WXDLLEXPORT wxHelpControllerBase: public wxObject
|
||||
{
|
||||
public:
|
||||
inline wxHelpControllerBase() {}
|
||||
inline wxHelpControllerBase(wxWindow* parentWindow = NULL) { m_parentWindow = parentWindow; }
|
||||
inline ~wxHelpControllerBase() {}
|
||||
|
||||
// Must call this to set the filename and server name.
|
||||
@@ -88,6 +88,14 @@ public:
|
||||
virtual bool Quit() = 0;
|
||||
virtual void OnQuit() {}
|
||||
|
||||
/// Set the window that can optionally be used for the help window's parent.
|
||||
virtual void SetParentWindow(wxWindow* win) { m_parentWindow = win; }
|
||||
|
||||
/// Get the window that can optionally be used for the help window's parent.
|
||||
virtual wxWindow* GetParentWindow() const { return m_parentWindow; }
|
||||
|
||||
protected:
|
||||
wxWindow* m_parentWindow;
|
||||
private:
|
||||
DECLARE_CLASS(wxHelpControllerBase)
|
||||
};
|
||||
|
@@ -26,7 +26,7 @@ class WXDLLIMPEXP_HTML wxHtmlHelpController : public wxHelpControllerBase // wxE
|
||||
DECLARE_DYNAMIC_CLASS(wxHtmlHelpController)
|
||||
|
||||
public:
|
||||
wxHtmlHelpController(int style = wxHF_DEFAULT_STYLE);
|
||||
wxHtmlHelpController(int style = wxHF_DEFAULT_STYLE, wxWindow* parentWindow = NULL);
|
||||
virtual ~wxHtmlHelpController();
|
||||
|
||||
void SetTitleFormat(const wxString& format);
|
||||
|
@@ -20,8 +20,8 @@
|
||||
class WXDLLIMPEXP_HTML wxBestHelpController: public wxHelpControllerBase
|
||||
{
|
||||
public:
|
||||
wxBestHelpController()
|
||||
: m_helpControllerType( wxUseNone ),
|
||||
wxBestHelpController(wxWindow* parentWindow = NULL)
|
||||
: wxHelpControllerBase( parentWindow ), m_helpControllerType( wxUseNone ),
|
||||
m_helpController( NULL )
|
||||
{
|
||||
}
|
||||
@@ -98,6 +98,12 @@ public:
|
||||
newFrameEachTime );
|
||||
}
|
||||
|
||||
/// Set the window that can optionally be used for the help window's parent.
|
||||
virtual void SetParentWindow(wxWindow* win) { m_helpController->SetParentWindow(win); }
|
||||
|
||||
/// Get the window that can optionally be used for the help window's parent.
|
||||
virtual wxWindow* GetParentWindow() const { return m_helpController->GetParentWindow(); }
|
||||
|
||||
protected:
|
||||
// Append/change extension if necessary.
|
||||
wxString GetValidFilename(const wxString& file) const;
|
||||
|
@@ -19,7 +19,7 @@
|
||||
class WXDLLEXPORT wxCHMHelpController : public wxHelpControllerBase
|
||||
{
|
||||
public:
|
||||
wxCHMHelpController() { }
|
||||
wxCHMHelpController(wxWindow* parentWindow = NULL): wxHelpControllerBase(parentWindow) { }
|
||||
virtual ~wxCHMHelpController();
|
||||
|
||||
// Must call this to set the filename
|
||||
|
@@ -23,7 +23,7 @@ class WXDLLEXPORT wxWinHelpController: public wxHelpControllerBase
|
||||
DECLARE_CLASS(wxWinHelpController)
|
||||
|
||||
public:
|
||||
wxWinHelpController() {}
|
||||
wxWinHelpController(wxWindow* parentWindow = NULL): wxHelpControllerBase(parentWindow) {}
|
||||
~wxWinHelpController() {}
|
||||
|
||||
// Must call this to set the filename
|
||||
|
@@ -19,7 +19,7 @@
|
||||
class WXDLLEXPORT wxWinceHelpController : public wxHelpControllerBase
|
||||
{
|
||||
public:
|
||||
wxWinceHelpController() {}
|
||||
wxWinceHelpController(wxWindow* parentWindow): wxHelpControllerBase(parentWindow) {}
|
||||
virtual ~wxWinceHelpController() {}
|
||||
|
||||
// Must call this to set the filename
|
||||
|
Reference in New Issue
Block a user