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.27 - (show annotations) (download) (as text)
Fri Oct 7 10:19:46 2005 UTC (18 years, 5 months ago) by maloninc
Branch: MAIN
CVS Tags: dev_1_5-0004
Changes since 1.26: +6 -1 lines
File MIME type: text/x-c++src
fixed some bugs.

1 #include <wx/regex.h>
2 #include <wx/tokenzr.h>
3 #include <wx/xrc/xmlres.h>
4 #include "mnDef.h"
5 #include "mnFrame.h"
6 #include "mnNotePanel.h"
7 #include "mnNotePanelController.h"
8
9
10 mnFrame::mnFrame(wxWindow* parent)
11 {
12 wxXmlResource::Get()->LoadFrame(this, parent, wxT("mnFrame"));
13
14 #ifdef __WXMSW__
15 wxIcon icon(wxT(APP_ICON_NAME), wxBITMAP_TYPE_ICO_RESOURCE);
16 SetIcon(icon);
17 #endif
18
19 /* init members */
20 searchTextCtrl = XRCCTRL(*this, "searchTextCtrl", wxTextCtrl);
21 noteBook = XRCCTRL(*this, "noteBook", wxNotebook);
22
23
24
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 noteBook->AddPage(panel, *dirName, true);
36
37 setFocusToSearchTextCtrl();
38 }
39
40 void mnFrame::removeSelectedNotePanel()
41 {
42 noteBook->DeletePage(noteBook->GetSelection());
43 }
44
45 mnNotePanel* mnFrame::getNotePanel()
46 {
47 int selection = noteBook->GetSelection();
48
49 return (mnNotePanel*)noteBook->GetPage(selection);
50 }
51
52 wxNotebook* mnFrame::getNotebook()
53 {
54 return noteBook;
55 }

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