Files
wxWidgets/utils/helpview/src/helpview.h
Dimitri Schoolwerth ee7553e935 Added NSApplicationDelegate's openFiles for wxOSX-Cocoa.
openFiles (available since OS X 10.3) replaces using the openFile method. It allows for more convenient handling of multiple drops and knowing in advance how much files/folders are dropped instead of openFile with which you only get to respond to a single file/folder drop at a time. By default openFiles calls the newly added MacOpenFiles which calls MacOpenFile multiple times, so ordinarily the behaviour is backwards compatible (both on wxOSX Cocoa and Carbon).

The openFile instance method has been removed because it doesn't seem to be called anymore: neither when dropping a single file on the application in the dock or Finder nor when passed as a command-line argument.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68617 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-09 22:17:12 +00:00

89 lines
1.8 KiB
C++

/////////////////////////////////////////////////////////////////////////////
// Name: helpview.h
// Purpose: HelpView application class
// Author: Vaclav Slavik, Julian Smart
// Modified by:
// Created: 2002-07-09
// RCS-ID: $Id$
// Copyright: (c) 2002 Vaclav Slavik, Julian Smart and others
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_HELPVIEW_H_
#define _WX_HELPVIEW_H_
#define hvVERSION 1.04
#if wxUSE_IPC
#include <wx/ipc.h>
class hvServer;
#endif
/*!
* The helpview application class.
*/
class hvApp : public wxApp
{
public:
hvApp();
/// Initialise the application.
virtual bool OnInit();
/// Clean up the application's data.
virtual int OnExit();
#ifdef __WXMAC__
/// Respond to Apple Event for opening a document
virtual void MacOpenFiles(const wxArrayString& fileNames);
#endif
/// Prompt the user for a book to open
bool OpenBook(wxHtmlHelpController* controller);
/// Returns the help controller.
wxHtmlHelpController* GetHelpController() { return m_helpController; }
#if wxUSE_IPC
/// Returns the list of connections.
wxList& GetConnections() { return m_connections; }
#endif
private:
wxHtmlHelpController* m_helpController;
#if wxUSE_IPC
wxList m_connections;
hvServer* m_server;
#endif
};
#if wxUSE_IPC
class hvConnection : public wxConnection
{
public:
hvConnection();
virtual ~hvConnection();
bool OnExec(const wxString& topic, const wxString& data);
bool OnPoke(const wxString& topic, const wxString& item,
const void *data, size_t size, wxIPCFormat format);
private:
};
class hvServer: public wxServer
{
public:
wxConnectionBase *OnAcceptConnection(const wxString& topic);
};
#endif
#endif
// _WX_HELPVIEW_H_