| 11 |
mnNotePanel::mnNotePanel(wxWindow* parent, wxString* dirName) |
mnNotePanel::mnNotePanel(wxWindow* parent, wxString* dirName) |
| 12 |
{ |
{ |
| 13 |
wxXmlResource::Get()->LoadPanel(this, parent, wxT("notePanel")); |
wxXmlResource::Get()->LoadPanel(this, parent, wxT("notePanel")); |
| 14 |
wxSplitterWindow* spWindow = XRCCTRL(*this, "splitWindow", wxSplitterWindow); |
searchTree = XRCCTRL(*this, "searchTree", wxTreeCtrl); |
|
searchTree = XRCCTRL(*spWindow, "searchTree", wxTreeCtrl); |
|
| 15 |
|
|
| 16 |
#ifdef __WXMAC__ |
#ifdef __WXMAC__ |
| 17 |
|
wxSplitterWindow* spWindow = XRCCTRL(*this, "splitWindow", wxSplitterWindow); |
| 18 |
wikiHtmlTextCtrl = new mnHtmlWindow(spWindow, -1, wxT(""), wxDefaultPosition, wxSize(200, 200)); |
wikiHtmlTextCtrl = new mnHtmlWindow(spWindow, -1, wxT(""), wxDefaultPosition, wxSize(200, 200)); |
| 19 |
spWindow->SplitVertically(searchTree, wikiHtmlTextCtrl, 250); |
spWindow->SplitVertically(searchTree, wikiHtmlTextCtrl, 250); |
| 20 |
#else |
#else |
| 21 |
/* init members */ |
/* init members */ |
| 22 |
wikiHtmlTextCtrl = XRCCTRL(*spWindow, "wikiHtmlTextCtrl", mnHtmlWindow); |
wikiHtmlTextCtrl = XRCCTRL(*this, "wikiHtmlTextCtrl", mnHtmlWindow); |
| 23 |
#endif |
#endif |
| 24 |
|
|
| 25 |
/* create search tree */ |
/* create search tree */ |
| 131 |
exp02.Replace(&htmlText, wxT("\\> ")); |
exp02.Replace(&htmlText, wxT("\\> ")); |
| 132 |
|
|
| 133 |
/* http:// */ |
/* http:// */ |
| 134 |
wxRegEx exp2(wxT("(http://[-_.!~*'a-zA-Z0-9;/?:@&=+$,%#]+)"), wxRE_NEWLINE|wxRE_DEFAULT); |
wxRegEx exp2(wxT("((http|https|ftp)://[-_.!~*'a-zA-Z0-9;/?:@&=+$,%#]+)"), wxRE_NEWLINE|wxRE_DEFAULT); |
| 135 |
exp2.Replace(&htmlText, wxT("<a href=\\1>\\1</a>")); |
exp2.Replace(&htmlText, wxT("<a href=\\1>\\1</a>")); |
| 136 |
|
|
| 137 |
/* [[ ]] */ |
/* [[ ]] */ |