From: Julian Smart Date: Sun, 14 Jun 1998 20:53:26 +0000 (+0000) Subject: Added #define wxHelpController to help.h; added wxWinHelpController::Quit code X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/e5fb7191bb31abd401e3329e50a12d333388b402 Added #define wxHelpController to help.h; added wxWinHelpController::Quit code git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@97 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/docs/msw/todo.txt b/docs/msw/todo.txt index cd04d91f92..96c0421169 100644 --- a/docs/msw/todo.txt +++ b/docs/msw/todo.txt @@ -42,17 +42,17 @@ Update manual. wxTabCtrl DONE wxNotebook wxWave DONE - wxJoystick + wxJoystick DONE wxStatusBar95 and wxFrame status bar functions wxListBox changes (for ownerdraw functionality) wxThread DONE (except for topic overview) + wxHelpController classes DONE (except for Unix ones) wxString wxTString Drag and drop (change API if required, e.g. const). wxCheckListBox wxBaseArray, other arrays (wxOwnerDrawn) - Various events Document the include file for each class Write tutorial. diff --git a/include/wx/event.h b/include/wx/event.h index 1860e4a4ec..483a2ad797 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -900,11 +900,10 @@ class WXDLLEXPORT wxSysColourChangedEvent: public wxEvent { m_eventType = wxEVT_SYS_COLOUR_CHANGED; } }; -/* TODO, apart from events for individual controls... +/* TODO wxEVT_POWER, wxEVT_CREATE, wxEVT_DESTROY, - wxEVT_SHOW, wxEVT_MOUSE_CAPTURE_CHANGED, wxEVT_SETTING_CHANGED, // WM_WININICHANGE (NT) / WM_SETTINGCHANGE (Win95) wxEVT_QUERY_NEW_PALETTE, diff --git a/include/wx/help.h b/include/wx/help.h index 9622355ff6..eb1575cd84 100644 --- a/include/wx/help.h +++ b/include/wx/help.h @@ -9,5 +9,13 @@ #include "wx/generic/helpxlp.h" #endif +#ifdef __WINDOWS__ +#define wxHelpController wxWinHelpController +#elif defined(__GTK__) +#define wxHelpController wxHTMLHelpController +#else +#define wxHelpController wxXLPHelpController +#endif + #endif // __HELPH_BASE__ diff --git a/include/wx/helpbase.h b/include/wx/helpbase.h index 24557948d1..1e7752f5c5 100644 --- a/include/wx/helpbase.h +++ b/include/wx/helpbase.h @@ -32,7 +32,8 @@ class WXDLLEXPORT wxHelpControllerBase: public wxObject // Must call this to set the filename and server name. // server is only required when implementing TCP/IP-based // help controllers. - virtual bool Initialize(const wxString& file, int server = -1) = 0; + virtual bool Initialize(const wxString& file, int server) { return FALSE; }; + virtual bool Initialize(const wxString& file) = 0; // If file is "", reloads file given in Initialize virtual bool LoadFile(const wxString& file = "") = 0; diff --git a/src/msw/helpwin.cpp b/src/msw/helpwin.cpp index 07d27cdf58..dab0ab5396 100644 --- a/src/msw/helpwin.cpp +++ b/src/msw/helpwin.cpp @@ -131,7 +131,13 @@ bool wxWinHelpController::KeywordSearch(const wxString& k) // Can't close the help window explicitly in WinHelp bool wxWinHelpController::Quit(void) { - return TRUE; + if (wxTheApp->GetTopWindow()) + { + WinHelp((HWND) wxTheApp->GetTopWindow()->GetHWND(), 0, HELP_QUIT, 0L); + return TRUE; + } + else + return FALSE; } // Don't get notified of WinHelp quitting