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         // Try to figure out the absolute file path of the executable.
00078         wxString getAppPath(const wxString& argv0, const wxString& cwd);
00079 
00080 private:
00081         CHMFrame* _frame;
00082         wxLocale _loc;
00083 
00084 #ifdef WITH_LIBXMLRPC
00085         wxTimer _timer;
00086 #endif
00087         wxCmdLineParser _cmdLP;
00088 #ifdef WITH_LIBXMLRPC
00089         DECLARE_EVENT_TABLE()
00090 #endif
00091 };
00092 
00093 #endif // __CHMAPP_H_
00094 
00095 
00096 /*
00097   Local Variables:
00098   mode: c++
00099   c-basic-offset: 8
00100   tab-width: 8
00101   c-indent-comments-syntactically-p: t
00102   c-tab-always-indent: t
00103   indent-tabs-mode: t
00104   End:
00105 */
00106 
00107 // vim:shiftwidth=8:autoindent:tabstop=8:noexpandtab:softtabstop=8
00108 

Generated on Fri Nov 17 12:35:46 2006 for xCHM by  doxygen 1.4.4