Develop and Download Open Source Software

Browse CVS Repository

Contents of /malonnote/mnFrame.cpp

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


Revision 1.29 - (show annotations) (download) (as text)
Mon Jan 23 13:37:10 2006 UTC (18 years, 1 month ago) by maloninc
Branch: MAIN
CVS Tags: rel_1_7_1, HEAD
Changes since 1.28: +0 -1 lines
File MIME type: text/x-c++src
fixing bug about MNDOC without double quotation.

1 #include <wx/wx.h>
2 #include <wx/regex.h>
3 #include <wx/tokenzr.h>
4 #include <wx/xrc/xmlres.h>
5 #include "mnDef.h"
6 #include "mnFrame.h"
7 #include "mnNotePanel.h"
8 #include "mnNotePanelController.h"
9
10
11 mnFrame::mnFrame(wxWindow* parent)
12 {
13 wxXmlResource::Get()->LoadFrame(this, parent, wxT("mnFrame"));
14
15 #ifdef __WXMSW__
16 wxIcon icon(wxT(APP_ICON_NAME), wxBITMAP_TYPE_ICO_RESOURCE);
17 SetIcon(icon);
18 #endif
19
20 /* init members */
21 searchTextCtrl = XRCCTRL(*this, "searchTextCtrl", wxTextCtrl);
22 noteBook = XRCCTRL(*this, "noteBook", wxNotebook);
23
24 CreateStatusBar();
25 }
26
27 void mnFrame::setFocusToSearchTextCtrl()
28 {
29 searchTextCtrl->SetFocus();
30 }
31
32 void mnFrame::addNotePanel(wxString* dirName)
33 {
34 mnNotePanel* panel = new mnNotePanel(noteBook, dirName);
35 wxFileName fileName(*dirName);
36
37 noteBook->AddPage(panel, fileName.GetName(), true); // only filename as page title
38
39 setFocusToSearchTextCtrl();
40 }
41
42 void mnFrame::removeSelectedNotePanel()
43 {
44 noteBook->DeletePage(noteBook->GetSelection());
45 }
46
47 mnNotePanel* mnFrame::getNotePanel()
48 {
49 int selection = noteBook->GetSelection();
50
51 return (mnNotePanel*)noteBook->GetPage(selection);
52 }
53
54 wxNotebook* mnFrame::getNotebook()
55 {
56 return noteBook;
57 }

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