Develop and Download Open Source Software

Browse CVS Repository

Annotation of /malonnote/mnModel.h

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.7 - (hide annotations) (download) (as text)
Wed Aug 10 05:35:03 2005 UTC (18 years, 7 months ago) by maloninc
Branch: MAIN
CVS Tags: dev-1_1-0005, dev-1_1-0006, dev-1_1-0007, dev-1_1-0001, dev-1_1-0002, dev-1_1-0003
Changes since 1.6: +1 -1 lines
File MIME type: text/x-chdr
implement regluar expression searching.

1 maloninc 1.1 #ifndef MNMODEL_H
2     #define MNMODEL_H
3    
4     #include <wx/wx.h>
5     #include <wx/treebase.h>
6    
7 maloninc 1.5 #include "config.h"
8    
9 maloninc 1.1 #define MAX_WIKI_TEXT_SIZE 10000
10     #define MAX_BUF_SIZE 1024
11     #define EXT_TAG ".txt"
12     #define DATE_TAG ":''DATE'':"
13 maloninc 1.3 #define NEW_DATA DATE_TAG " %Y/%m/%d %H:%M:%S\n\n:''TYPE'': memo\n---------------------------------------------------------\n"
14 maloninc 1.1
15 maloninc 1.7 #define CODE_SET_EUC_JP "euc-jp"
16 maloninc 1.1 #ifdef __WXMAC__
17     #define CODE_SET_SYSTEM "SJIS"
18     #endif
19 maloninc 1.2 #ifdef __WXCOCOA__
20     #define CODE_SET_SYSTEM "SJIS"
21     #endif
22 maloninc 1.1 #ifdef __WXMSW__
23     #define CODE_SET_SYSTEM "SJIS"
24     #endif
25     #ifdef __WXMOTIF__
26     #define CODE_SET_SYSTEM "eucJP"
27     #endif
28     #ifdef __WXGTK__
29 maloninc 1.6 #define CODE_SET_SYSTEM "euc-jp"
30 maloninc 1.1 #endif
31     #ifdef __WXX11__
32     #define CODE_SET_SYSTEM "eucJP"
33     #endif
34    
35    
36    
37    
38     class WikiData : wxTreeItemData{
39    
40     public:
41     WikiData(wxString* dataDir, const char* fileName, FILE* fp);
42     WikiData(wxString* dataDir);
43     ~WikiData();
44     const wxString* getFileName();
45     const wxString* getSubject();
46     const wxString* getDate();
47     const wxString* getText();
48     void modText(wxString* text);
49     void modSubject(wxString* newName);
50     void save();
51     void removeDataFile();
52    
53     private:
54     wxString* subject;
55     wxString* dataDirName;
56     wxString* fileName;
57     wxString* date;
58     wxString* text;
59     };
60    
61     WX_DECLARE_LIST(WikiData, WikiList);
62    
63    
64    
65     class mnModel {
66    
67     public:
68     mnModel(const char* dataDir);
69     ~mnModel();
70     WikiList* search(const char* searchStr);
71     void addWikiData(WikiData* wikiData);
72     void addSearchStr(wxString* searchStr);
73     void removeSearchStr(wxString searchStr);
74     void modSearchStr(wxString* oldStr, wxString* newStr);
75     const wxArrayString* getSearchStrList();
76     WikiData* newWikiData();
77 maloninc 1.4 const wxString* getWikiDataDir();
78 maloninc 1.1
79     private:
80     wxString* wikiDataDir;
81     wxArrayString* searchStrList;
82     };
83    
84    
85     #endif //MNMODEL_H

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26