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.10 - (show annotations) (download) (as text)
Tue Sep 13 04:22:15 2005 UTC (18 years, 6 months ago) by maloninc
Branch: MAIN
CVS Tags: dev_1_3-0003
Changes since 1.9: +4 -1 lines
File MIME type: text/x-chdr
implement searching all memo

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 TYPE_TAG ":''TYPE'':"
14 #define NEW_DATA DATE_TAG " %Y/%m/%d %H:%M:%S\n\n" TYPE_TAG " memo\n---------------------------------------------------------\n"
15
16 #define ALLMEMO_TAG "malon-all"
17
18 #define CODE_SET_EUC_JP "euc-jp"
19 #ifdef __WXMAC__
20 #define CODE_SET_SYSTEM "CP932"
21 #endif
22 #ifdef __WXCOCOA__
23 #define CODE_SET_SYSTEM "CP932"
24 #endif
25 #ifdef __WXMSW__
26 #define CODE_SET_SYSTEM "CP932"
27 #endif
28 #ifdef __WXMOTIF__
29 #define CODE_SET_SYSTEM "eucJP"
30 #endif
31 #ifdef __WXGTK__
32 #define CODE_SET_SYSTEM "euc-jp"
33 #endif
34 #ifdef __WXX11__
35 #define CODE_SET_SYSTEM "eucJP"
36 #endif
37
38 #define MAC_BACKSLASH 0x80
39
40
41 class WikiData : wxTreeItemData{
42
43 public:
44 WikiData(wxString* dataDir, const char* fileName, FILE* fp);
45 WikiData(wxString* dataDir);
46 ~WikiData();
47 const wxString* getFileName();
48 const wxString* getSubject();
49 const wxString* getDate();
50 const wxString* getText();
51 void modText(wxString* text);
52 void modSubject(wxString* newName);
53 void save();
54 void removeDataFile();
55
56 private:
57 wxString* subject;
58 wxString* dataDirName;
59 wxString* fileName;
60 wxString* date;
61 wxString* text;
62 };
63
64 WX_DECLARE_LIST(WikiData, WikiList);
65
66
67
68 class mnModel {
69
70 public:
71 mnModel(const char* dataDir);
72 ~mnModel();
73 WikiList* search(const char* searchStr);
74 void addWikiData(WikiData* wikiData);
75 void addSearchStr(wxString* searchStr);
76 void removeSearchStr(wxString searchStr);
77 void modSearchStr(wxString* oldStr, wxString* newStr);
78 const wxArrayString* getSearchStrList();
79 WikiData* newWikiData();
80 const wxString* getWikiDataDir();
81
82 private:
83 wxString* wikiDataDir;
84 wxArrayString* searchStrList;
85 };
86
87
88 #endif //MNMODEL_H

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