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

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