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.28 - (show annotations) (download) (as text)
Fri Oct 7 12:49:26 2005 UTC (18 years, 6 months ago) by maloninc
Branch: MAIN
CVS Tags: dev_1_6-0005, dev_1_6-0004, dev_1_6-0003, dev_1_6-0002, dev_1_6-0001
Changes since 1.27: +6 -3 lines
File MIME type: text/x-c++src
implement TAB function perfectly.

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

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