Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members

chmapp.h

00001 /*
00002 
00003   Copyright (C) 2003  Razvan Cojocaru <razvanco@gmx.net>
00004  
00005   This program is free software; you can redistribute it and/or modify
00006   it under the terms of the GNU General Public License as published by
00007   the Free Software Foundation; either version 2 of the License, or
00008   (at your option) any later version.
00009   
00010   This program is distributed in the hope that it will be useful,
00011   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013   GNU General Public License for more details.
00014   
00015   You should have received a copy of the GNU General Public License
00016   along with this program; if not, write to the Free Software
00017   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018 
00019 */
00020 
00021 
00022 #ifndef __CHMAPP_H_
00023 #define __CHMAPP_H_
00024 
00025 #include <config.h>
00026 #include <wx/wx.h>
00027 #include <wx/intl.h>
00028 #include <wx/cmdline.h>
00029 
00030 #ifdef WITH_LIBXMLRPC
00031 #       define TIMER_ID wxID_HIGHEST + 1
00032 #       include <XmlRpc.h>
00033 using namespace XmlRpc;
00034 #endif
00035 
00036 
00037 // Forward declaration.
00038 class CHMFrame;
00039 
00040 
00046 
00047 #ifdef WITH_LIBXMLRPC
00048 class CHMApp : public wxApp, public XmlRpcServerMethod {
00049 #else
00050 class CHMApp : public wxApp {
00051 #endif
00052 
00053 #ifdef WITH_LIBXMLRPC
00054 public:
00056         CHMApp();
00057 #endif
00058 
00059         virtual bool OnInit();
00060 
00061 #ifdef __WXMAC__
00062 
00063         virtual void MacOpenFile(const wxString& filename);
00064 #endif
00065 
00066 protected:
00067 
00068 #ifdef WITH_LIBXMLRPC
00069 
00070         void execute(XmlRpcValue& params, XmlRpcValue& result);
00071 
00073         void WatchForXMLRPC( wxTimerEvent& event );
00074 #endif
00075 
00076 private:
00077         CHMFrame* _frame;
00078         wxLocale _loc;
00079 
00080 #ifdef WITH_LIBXMLRPC
00081         wxTimer _timer;
00082 #endif
00083         wxCmdLineParser _cmdLP;
00084 #ifdef WITH_LIBXMLRPC
00085         DECLARE_EVENT_TABLE()
00086 #endif
00087 };
00088 
00089 #endif // __CHMAPP_H_

Generated on Mon Feb 21 11:08:37 2005 for xCHM by  doxygen 1.4.0