ReDOS-ified project files
Added menubar for wxHTML help viewer on Mac Added some Mac-specific code for HelpView git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18768 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
#include "wx/filename.h"
|
||||
#include "wx/image.h"
|
||||
#include "wx/wxhtml.h"
|
||||
#include "wx/fs_zip.h"
|
||||
@@ -60,6 +61,10 @@ bool hvApp::OnInit()
|
||||
|
||||
wxArtProvider::PushProvider(new AlternateArtProvider);
|
||||
|
||||
#ifdef __WXMAC__
|
||||
wxFileName::MacRegisterDefaultTypeAndCreator( "htb" , 'HTBD' , 'HTBA' ) ;
|
||||
#endif
|
||||
|
||||
int istyle = wxHF_DEFAULT_STYLE;
|
||||
|
||||
wxString service, windowName, book[10], titleFormat, argStr;
|
||||
@@ -138,7 +143,9 @@ bool hvApp::OnInit()
|
||||
}
|
||||
}
|
||||
|
||||
//no book - query user
|
||||
// No book - query user; but not on Mac, since there
|
||||
// may be an AppleEvent to open a document on the way
|
||||
#ifndef __WXMAC__
|
||||
if ( bookCount < 1 )
|
||||
{
|
||||
wxString s = wxFileSelector( wxT("Open help file"),
|
||||
@@ -157,7 +164,8 @@ bool hvApp::OnInit()
|
||||
bookCount = 1;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if hvUSE_IPC
|
||||
|
||||
if ( createServer ) {
|
||||
@@ -267,6 +275,18 @@ bool hvApp::OpenBook(wxHtmlHelpController* controller)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#ifdef __WXMAC__
|
||||
/// Respond to Apple Event for opening a document
|
||||
void hvApp::MacOpenFile(const wxString& filename)
|
||||
{
|
||||
wxBusyCursor bcur;
|
||||
wxFileName fileName(filename);
|
||||
m_helpController->AddBook(fileName);
|
||||
m_helpController->DisplayContents();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Art provider class
|
||||
*/
|
||||
|
Reference in New Issue
Block a user