Develop and Download Open Source Software

Browse CVS Repository

Annotation of /malonnote/mnFrame.cpp

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


Revision 1.26 - (hide annotations) (download) (as text)
Thu Oct 6 05:29:01 2005 UTC (18 years, 6 months ago) by maloninc
Branch: MAIN
Changes since 1.25: +3 -0 lines
File MIME type: text/x-c++src
fixed for mac

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

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