helpview.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: helpview.h
  3. // Purpose: HelpView application class
  4. // Author: Vaclav Slavik, Julian Smart
  5. // Modified by:
  6. // Created: 2002-07-09
  7. // Copyright: (c) 2002 Vaclav Slavik, Julian Smart and others
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_HELPVIEW_H_
  11. #define _WX_HELPVIEW_H_
  12. #define hvVERSION 1.04
  13. #if wxUSE_IPC
  14. #include <wx/ipc.h>
  15. class hvServer;
  16. #endif
  17. /*!
  18. * The helpview application class.
  19. */
  20. class hvApp : public wxApp
  21. {
  22. public:
  23. hvApp();
  24. /// Initialise the application.
  25. virtual bool OnInit();
  26. /// Clean up the application's data.
  27. virtual int OnExit();
  28. #ifdef __WXMAC__
  29. /// Respond to Apple Event for opening a document
  30. virtual void MacOpenFiles(const wxArrayString& fileNames);
  31. #endif
  32. /// Prompt the user for a book to open
  33. bool OpenBook(wxHtmlHelpController* controller);
  34. /// Returns the help controller.
  35. wxHtmlHelpController* GetHelpController() { return m_helpController; }
  36. #if wxUSE_IPC
  37. /// Returns the list of connections.
  38. wxList& GetConnections() { return m_connections; }
  39. #endif
  40. private:
  41. wxHtmlHelpController* m_helpController;
  42. #if wxUSE_IPC
  43. wxList m_connections;
  44. hvServer* m_server;
  45. #endif
  46. };
  47. #if wxUSE_IPC
  48. class hvConnection : public wxConnection
  49. {
  50. public:
  51. hvConnection();
  52. virtual ~hvConnection();
  53. bool OnExec(const wxString& topic, const wxString& data);
  54. bool OnPoke(const wxString& topic, const wxString& item,
  55. const void *data, size_t size, wxIPCFormat format);
  56. private:
  57. };
  58. class hvServer: public wxServer
  59. {
  60. public:
  61. wxConnectionBase *OnAcceptConnection(const wxString& topic);
  62. };
  63. #endif
  64. #endif
  65. // _WX_HELPVIEW_H_