Develop and Download Open Source Software

Browse CVS Repository

Contents of /malonnote/mnDialog.cpp

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


Revision 1.2 - (show annotations) (download) (as text)
Sun Jul 31 06:54:12 2005 UTC (18 years, 7 months ago) by maloninc
Branch: MAIN
CVS Tags: dev-1_0-0007
Changes since 1.1: +26 -2 lines
File MIME type: text/x-c++src
implement data edit dialog, but not data entry dialog.

1 // -*- C++ -*- generated by wxGlade 0.3.5.1 on Sat Jul 30 19:30:39 2005
2
3 #include "mnDialog.h"
4
5
6 mnWikiDataEntryDialog::mnWikiDataEntryDialog(wxWindow* parent, int id, const wxString& title, const wxPoint& pos, const wxSize& size, long style):
7 wxDialog(parent, id, title, pos, size, wxDEFAULT_DIALOG_STYLE)
8 {
9 // begin wxGlade: mnWikiDataEntryDialog::mnWikiDataEntryDialog
10 label_3 = new wxStaticText(this, -1, wxT("Subject: "));
11 subjectTextCtrl = new wxTextCtrl(this, -1, wxT(""));
12 wikiPlainTextCtrl = new wxTextCtrl(this, -1, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE);
13 okButton = new wxButton(this, wxID_OK, wxT("OK"));
14 cancelButton = new wxButton(this, wxID_CANCEL, wxT("Cancel"));
15
16 set_properties();
17 do_layout();
18 // end wxGlade
19 }
20
21
22 void mnWikiDataEntryDialog::set_properties()
23 {
24 // begin wxGlade: mnWikiDataEntryDialog::set_properties
25 SetTitle(wxT("MalonNote"));
26 SetSize(wxSize(728, 521));
27 subjectTextCtrl->SetSize(wxSize(650, -1));
28 wikiPlainTextCtrl->SetSize(wxSize(513, 430));
29 // end wxGlade
30 }
31
32
33 void mnWikiDataEntryDialog::do_layout()
34 {
35 // begin wxGlade: mnWikiDataEntryDialog::do_layout
36 wxBoxSizer* sizer_1 = new wxBoxSizer(wxVERTICAL);
37 wxGridSizer* grid_sizer_1 = new wxGridSizer(1, 2, 5, 5);
38 wxBoxSizer* sizer_5 = new wxBoxSizer(wxHORIZONTAL);
39 sizer_5->Add(label_3, 0, wxLEFT|wxRIGHT|wxTOP|wxFIXED_MINSIZE, 6);
40 sizer_5->Add(subjectTextCtrl, 0, wxTOP|wxEXPAND|wxALIGN_RIGHT|wxFIXED_MINSIZE, 3);
41 sizer_1->Add(sizer_5, 1, wxEXPAND, 0);
42 sizer_1->Add(wikiPlainTextCtrl, 0, wxALL|wxEXPAND|wxFIXED_MINSIZE, 5);
43 grid_sizer_1->Add(okButton, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxFIXED_MINSIZE, 0);
44 grid_sizer_1->Add(cancelButton, 0, wxALIGN_CENTER_VERTICAL|wxFIXED_MINSIZE, 0);
45 sizer_1->Add(grid_sizer_1, 1, wxEXPAND, 0);
46 SetAutoLayout(true);
47 SetSizer(sizer_1);
48 Layout();
49 Centre();
50 // end wxGlade
51 }
52
53 void mnWikiDataEntryDialog::setSubject(const wxString& subject)
54 {
55 subjectTextCtrl->Clear();
56 subjectTextCtrl->AppendText(subject);
57 }
58
59 wxString mnWikiDataEntryDialog::getSubject()
60 {
61 return subjectTextCtrl->GetValue();
62 }
63
64
65 void mnWikiDataEntryDialog::setPlainText(const wxString& subject)
66 {
67 wikiPlainTextCtrl->Clear();
68 wikiPlainTextCtrl->AppendText(subject);
69 }
70
71 wxString mnWikiDataEntryDialog::getPlainText()
72 {
73 return wikiPlainTextCtrl->GetValue();
74 }
75
76

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