Browse CVS Repository
Contents of /malonnote/mnModel.h
Parent Directory
| Revision Log
| Revision Graph
Revision 1.1.1.1 -
( show annotations)
( download)
( as text)
(vendor branch)
Thu Jul 28 03:25:06 2005 UTC
(18 years, 7 months ago)
by maloninc
Branch: vendor
CVS Tags: rel-0_9_1, dev-0_9_1-0002-merged-01, dev-0_9_1-root, dev-0_9-0001-merged-01, start, release-0_9_1, dev-0_9_1-0000, dev-0_9_1-0003, dev-0_9_1-0002, rel-0_9, dev-0_9_1, dev-1_0-0001, dev-0_9_1-merged-02, release-09, dev-0_9-merged-02
Branch point for: dev-0_9_1-0001
Changes since 1.1: +0 -0 lines
File MIME type: text/x-chdr
Init
| 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 __WXMSW__ |
| 18 |
#define CODE_SET_SYSTEM "SJIS" |
| 19 |
#endif |
| 20 |
#ifdef __WXMOTIF__ |
| 21 |
#define CODE_SET_SYSTEM "eucJP" |
| 22 |
#endif |
| 23 |
#ifdef __WXGTK__ |
| 24 |
#define CODE_SET_SYSTEM "eucJP" |
| 25 |
#endif |
| 26 |
#ifdef __WXX11__ |
| 27 |
#define CODE_SET_SYSTEM "eucJP" |
| 28 |
#endif |
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
class WikiData : wxTreeItemData{ |
| 34 |
|
| 35 |
public: |
| 36 |
WikiData(wxString* dataDir, const char* fileName, FILE* fp); |
| 37 |
WikiData(wxString* dataDir); |
| 38 |
~WikiData(); |
| 39 |
const wxString* getFileName(); |
| 40 |
const wxString* getSubject(); |
| 41 |
const wxString* getDate(); |
| 42 |
const wxString* getText(); |
| 43 |
void modText(wxString* text); |
| 44 |
void modSubject(wxString* newName); |
| 45 |
void save(); |
| 46 |
void removeDataFile(); |
| 47 |
|
| 48 |
private: |
| 49 |
wxString* subject; |
| 50 |
wxString* dataDirName; |
| 51 |
wxString* fileName; |
| 52 |
wxString* date; |
| 53 |
wxString* text; |
| 54 |
}; |
| 55 |
|
| 56 |
WX_DECLARE_LIST(WikiData, WikiList); |
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
class mnModel { |
| 61 |
|
| 62 |
public: |
| 63 |
mnModel(const char* dataDir); |
| 64 |
~mnModel(); |
| 65 |
WikiList* search(const char* searchStr); |
| 66 |
void addWikiData(WikiData* wikiData); |
| 67 |
void addSearchStr(wxString* searchStr); |
| 68 |
void removeSearchStr(wxString searchStr); |
| 69 |
void modSearchStr(wxString* oldStr, wxString* newStr); |
| 70 |
const wxArrayString* getSearchStrList(); |
| 71 |
WikiData* newWikiData(); |
| 72 |
|
| 73 |
private: |
| 74 |
wxString* wikiDataDir; |
| 75 |
wxArrayString* searchStrList; |
| 76 |
}; |
| 77 |
|
| 78 |
|
| 79 |
#endif //MNMODEL_H |
| |