Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

SherpaEvent.h

Go to the documentation of this file.
00001 
00002 // Name:        SherpaEvent.h
00003 // Purpose:     
00004 // Author:      Joe Yates
00005 // Modified by:
00006 // Created:     11/10/2004
00007 // RCS-ID:      $Id: SherpaEvent.h,v 1.1.1.1 2006/01/24 22:13:19 titusd Exp $
00008 // Copyright:   (c) BID Snc
00009 // License:     BSD license (see the file 'LICENSE.txt')
00011 
00012 #ifndef __SherpaEvent_h__
00013 #define __SherpaEvent_h__
00014 
00015 // Event IDs
00016 enum
00017   {
00018   // Menu Ids
00019   shMENUID_FILE_EXIT,
00020   shMENUID_FILE_EMPTY_WASTEBIN,
00021   shMENUID_EDIT_UNDO,
00022   shMENUID_EDIT_REDO,
00023   shMENUID_EDIT_PREFERENCES,
00024   shMENUID_VIEW_SHOWHIDDEN,
00025   shMENUID_DEBUG_WASTEBIN,
00026   shMENUID_DEBUG_UNDO,
00027   shMENUID_DELETE,
00028   shMENUID_TOWASTEBIN,
00029   shMENUID_NEW_DIRECTORY,
00030   shMENUID_NEW_FILE
00031   };
00032 
00033 extern wxEventType shEVT_SET_PATH;
00034 extern wxEventType shEVT_RENAME;
00035 extern wxEventType shEVT_DELETE;
00036 extern wxEventType shEVT_TOWASTEBIN;
00037 extern wxEventType shEVT_RESTORE;
00038 extern wxEventType shEVT_CREATE;
00039 
00040 class shSetPathEvent: public wxCommandEvent
00041   {
00042   public:
00043     shSetPathEvent(const wxString& sPath);
00044   
00045   public:
00046     // accessors
00047     wxString GetPath()
00048       {return m_sPath;}
00049   
00050   private:
00051     wxString m_sPath;
00052   };
00053 
00054 class shRenameEvent: public wxCommandEvent
00055   {
00056   public:
00057     shRenameEvent(const wxString& sOldPathName, const wxString& sNewPathName);
00058   
00059   public:
00060     // accessors
00061     wxString GetOldPathName()
00062       {return m_sOldPathName;}
00063     wxString GetNewPathName()
00064       {return m_sNewPathName;}
00065   
00066   private:
00067     wxString m_sOldPathName;
00068     wxString m_sNewPathName;
00069   };
00070 
00071 class shDeleteEvent: public wxCommandEvent
00072   {
00073   public:
00074     shDeleteEvent(const wxString& sPathName);
00075   
00076   public:
00077     // accessors
00078     wxString GetPathName()
00079       {return m_sPathName;}
00080   
00081   private:
00082     wxString m_sPathName;
00083   };
00084 
00085 class shToWastebinEvent: public wxCommandEvent
00086   {
00087   public:
00088     shToWastebinEvent(const wxString& sPathName);
00089   
00090   public:
00091     // accessors
00092     wxString GetPathName()
00093       {return m_sPathName;}
00094   
00095   private:
00096     wxString m_sPathName;
00097   };
00098 
00099 class shRestoreEvent: public wxCommandEvent
00100   {
00101   public:
00102     shRestoreEvent(const wxString& sPathName);
00103   
00104   public:
00105     // accessors
00106     wxString GetPathName()
00107       {return m_sPathName;}
00108   
00109   private:
00110     wxString m_sPathName;
00111   };
00112 
00113 class shCreateEvent: public wxCommandEvent
00114   {
00115   public:
00116     shCreateEvent(const wxString& sPath, const wxString& sFileType);
00117   
00118   public:
00119     // accessors
00120     wxString GetPath()
00121       {return m_sPath;}
00122     wxString GetFileType()
00123       {return m_sFileType;}
00124   
00125   private:
00126     wxString m_sPath;
00127     wxString m_sFileType;
00128   };
00129 
00130 typedef void (wxEvtHandler::*shSetPathEventFunction)(shSetPathEvent&);
00131 typedef void (wxEvtHandler::*shRenameEventFunction)(shRenameEvent&);
00132 typedef void (wxEvtHandler::*shDeleteEventFunction)(shDeleteEvent&);
00133 typedef void (wxEvtHandler::*shToWastebinEventFunction)(shToWastebinEvent&);
00134 typedef void (wxEvtHandler::*shRestoreEventFunction)(shRestoreEvent&);
00135 typedef void (wxEvtHandler::*shCreateEventFunction)(shCreateEvent&);
00136 
00137 #define EVT_SET_PATH(fn) \
00138   wxEventTableEntry(shEVT_SET_PATH, -1, -1, \
00139   (wxObjectEventFunction) (wxEventFunction) (shSetPathEventFunction) &fn, (wxObject *) NULL ),
00140 
00141 #define EVT_RENAME(fn) \
00142   wxEventTableEntry(shEVT_RENAME, -1, -1, \
00143   (wxObjectEventFunction) (wxEventFunction) (shRenameEventFunction) &fn, (wxObject *) NULL ),
00144 
00145 #define EVT_DELETE(fn) \
00146   wxEventTableEntry(shEVT_DELETE, -1, -1, \
00147   (wxObjectEventFunction) (wxEventFunction) (shDeleteEventFunction) &fn, (wxObject *) NULL ),
00148 
00149 #define EVT_TOWASTEBIN(fn) \
00150   wxEventTableEntry(shEVT_TOWASTEBIN, -1, -1, \
00151   (wxObjectEventFunction) (wxEventFunction) (shToWastebinEventFunction) &fn, (wxObject *) NULL ),
00152 
00153 #define EVT_RESTORE(fn) \
00154   wxEventTableEntry(shEVT_RESTORE, -1, -1, \
00155   (wxObjectEventFunction) (wxEventFunction) (shRestoreEventFunction) &fn, (wxObject *) NULL ),
00156 
00157 #define EVT_CREATE(fn) \
00158   wxEventTableEntry(shEVT_CREATE, -1, -1, \
00159   (wxObjectEventFunction) (wxEventFunction) (shCreateEventFunction) &fn, (wxObject *) NULL ),
00160 
00161 #endif // ndef __SherpaEvent_h__

Generated on Wed Jan 25 08:14:45 2006 for Sherpa by doxygen 1.3.6