| 1 |
maloninc |
1.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 |
maloninc |
1.4 |
wikiPlainTextCtrl = new wxTextCtrl(this, -1, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxHSCROLL); |
| 13 |
maloninc |
1.2 |
okButton = new wxButton(this, wxID_OK, wxT("OK")); |
| 14 |
|
|
cancelButton = new wxButton(this, wxID_CANCEL, wxT("Cancel")); |
| 15 |
maloninc |
1.1 |
|
| 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 |
maloninc |
1.3 |
wikiPlainTextCtrl->SetFocus(); |
| 30 |
maloninc |
1.1 |
// end wxGlade |
| 31 |
|
|
} |
| 32 |
|
|
|
| 33 |
|
|
|
| 34 |
|
|
void mnWikiDataEntryDialog::do_layout() |
| 35 |
|
|
{ |
| 36 |
|
|
// begin wxGlade: mnWikiDataEntryDialog::do_layout |
| 37 |
|
|
wxBoxSizer* sizer_1 = new wxBoxSizer(wxVERTICAL); |
| 38 |
|
|
wxGridSizer* grid_sizer_1 = new wxGridSizer(1, 2, 5, 5); |
| 39 |
|
|
wxBoxSizer* sizer_5 = new wxBoxSizer(wxHORIZONTAL); |
| 40 |
|
|
sizer_5->Add(label_3, 0, wxLEFT|wxRIGHT|wxTOP|wxFIXED_MINSIZE, 6); |
| 41 |
|
|
sizer_5->Add(subjectTextCtrl, 0, wxTOP|wxEXPAND|wxALIGN_RIGHT|wxFIXED_MINSIZE, 3); |
| 42 |
|
|
sizer_1->Add(sizer_5, 1, wxEXPAND, 0); |
| 43 |
|
|
sizer_1->Add(wikiPlainTextCtrl, 0, wxALL|wxEXPAND|wxFIXED_MINSIZE, 5); |
| 44 |
|
|
grid_sizer_1->Add(okButton, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxFIXED_MINSIZE, 0); |
| 45 |
|
|
grid_sizer_1->Add(cancelButton, 0, wxALIGN_CENTER_VERTICAL|wxFIXED_MINSIZE, 0); |
| 46 |
|
|
sizer_1->Add(grid_sizer_1, 1, wxEXPAND, 0); |
| 47 |
|
|
SetAutoLayout(true); |
| 48 |
|
|
SetSizer(sizer_1); |
| 49 |
|
|
Layout(); |
| 50 |
|
|
Centre(); |
| 51 |
|
|
// end wxGlade |
| 52 |
|
|
} |
| 53 |
|
|
|
| 54 |
maloninc |
1.2 |
void mnWikiDataEntryDialog::setSubject(const wxString& subject) |
| 55 |
|
|
{ |
| 56 |
|
|
subjectTextCtrl->Clear(); |
| 57 |
|
|
subjectTextCtrl->AppendText(subject); |
| 58 |
|
|
} |
| 59 |
|
|
|
| 60 |
|
|
wxString mnWikiDataEntryDialog::getSubject() |
| 61 |
|
|
{ |
| 62 |
|
|
return subjectTextCtrl->GetValue(); |
| 63 |
|
|
} |
| 64 |
|
|
|
| 65 |
|
|
|
| 66 |
|
|
void mnWikiDataEntryDialog::setPlainText(const wxString& subject) |
| 67 |
|
|
{ |
| 68 |
|
|
wikiPlainTextCtrl->Clear(); |
| 69 |
|
|
wikiPlainTextCtrl->AppendText(subject); |
| 70 |
|
|
} |
| 71 |
|
|
|
| 72 |
|
|
wxString mnWikiDataEntryDialog::getPlainText() |
| 73 |
|
|
{ |
| 74 |
|
|
return wikiPlainTextCtrl->GetValue(); |
| 75 |
|
|
} |
| 76 |
|
|
|
| 77 |
|
|
|