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.5 - (show annotations) (download) (as text)
Fri Aug 5 00:16:39 2005 UTC (18 years, 7 months ago) by maloninc
Branch: MAIN
Changes since 1.4: +2 -0 lines
File MIME type: text/x-chdr
for ICONV_CONST

1 #ifndef MNMODEL_H
2 #define MNMODEL_H
3
4 #include <wx/wx.h>
5 #include <wx/treebase.h>
6
7 #include "config.h"
8
9 #define MAX_WIKI_TEXT_SIZE 10000
10 #define MAX_BUF_SIZE 1024
11 #define EXT_TAG ".txt"
12 #define DATE_TAG ":''DATE'':"
13 #define NEW_DATA DATE_TAG " %Y/%m/%d %H:%M:%S\n\n:''TYPE'': memo\n---------------------------------------------------------\n"
14
15 #define CODE_SET_EUC_JP "eucJP"
16 #ifdef __WXMAC__
17 #define CODE_SET_SYSTEM "SJIS"
18 #endif
19 #ifdef __WXCOCOA__
20 #define CODE_SET_SYSTEM "SJIS"
21 #endif
22 #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 #define CODE_SET_SYSTEM "eucJP"
30 #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 const wxString* getWikiDataDir();
78
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