Develop and Download Open Source Software

Browse CVS Repository

Contents of /malonnote/mnModel.h

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


Revision 1.4 - (show annotations) (download) (as text)
Thu Aug 4 05:10:02 2005 UTC (18 years, 7 months ago) by maloninc
Branch: MAIN
CVS Tags: dev-1_0-0012, dev-1_0-0013
Changes since 1.3: +1 -0 lines
File MIME type: text/x-chdr
implemented clickable item.
And, v1.0 buggy version has complete

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

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