00001
00013 #ifndef _History_h
00014 #define _History_h
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 class History
00030 {
00031 public:
00032
00033
00036 History(void);
00037
00038
00041 ~History(void);
00042
00043
00044
00045
00046
00047
00057 void InsertUserString(const wxString& string);
00058
00067 void InsertPermanentString(const wxString& string);
00068
00069 void Save(wxConfigBase* pConfig) const;
00070
00071 void Load(wxConfigBase* pConfig);
00072
00073
00074
00077 wxArrayString Strings() const;
00078
00079
00080
00081 protected:
00082 private:
00087 typedef std::pair<wxString, bool> HistoryItem;
00088 typedef std::vector<HistoryItem> HistoryItems;
00089
00090 HistoryItems mHistoryItems;
00091
00093 static const unsigned mMaxUserEntries;
00094
00095
00104 unsigned CountAndFindLast(HistoryItems::iterator& rLast);
00105
00106
00109
00110 static bool CompareString(const HistoryItem historyItem,
00111 const wxString string);
00112 };
00113
00114
00115
00116
00117
00118
00119
00120 #endif // _History_h