Skyscraper 2.0
textwindow.cpp
Go to the documentation of this file.
1/*
2 Skyscraper 2.0 Alpha - Text Dialog
3 Copyright (C)2003-2024 Ryan Thoryk
4 https://www.skyscrapersim.net
5 https://sourceforge.net/projects/skyscraper/
6 Contact - ryan@skyscrapersim.net
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21*/
22
23#include "textwindow.h"
24
25//(*InternalHeaders(TextWindow)
26#include <wx/intl.h>
27#include <wx/string.h>
28//*)
29
30namespace Skyscraper {
31
32//(*IdInit(TextWindow)
33const long TextWindow::ID_tMain = wxNewId();
34const long TextWindow::ID_bOK = wxNewId();
35//*)
36
37BEGIN_EVENT_TABLE(TextWindow,wxDialog)
38 //(*EventTable(TextWindow)
39 //*)
40END_EVENT_TABLE()
41
42TextWindow::TextWindow(wxWindow* parent,wxWindowID id,const wxPoint& pos,const wxSize& size)
43{
44 //(*Initialize(TextWindow)
45 wxBoxSizer* BoxSizer1;
46 wxFlexGridSizer* FlexGridSizer1;
47
48 Create(parent, id, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T("id"));
49 SetClientSize(wxDefaultSize);
50 Move(wxDefaultPosition);
51 BoxSizer1 = new wxBoxSizer(wxVERTICAL);
52 FlexGridSizer1 = new wxFlexGridSizer(2, 1, 0, 0);
53 tMain = new wxTextCtrl(this, ID_tMain, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY, wxDefaultValidator, _T("ID_tMain"));
54 tMain->SetMinSize(wxSize(400,400));
55 FlexGridSizer1->Add(tMain, 1, wxALL|wxEXPAND, 5);
56 bOK = new wxButton(this, ID_bOK, _("OK"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_bOK"));
57 FlexGridSizer1->Add(bOK, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
58 BoxSizer1->Add(FlexGridSizer1, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
59 SetSizer(BoxSizer1);
60 BoxSizer1->Fit(this);
61 BoxSizer1->SetSizeHints(this);
62 Center();
63
64 Connect(ID_bOK,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&TextWindow::On_bOK_Click);
65 //*)
66}
67
69{
70 //(*Destroy(TextWindow)
71 //*)
72}
73
74
75void TextWindow::On_bOK_Click(wxCommandEvent& event)
76{
77 this->Close();
78}
79
80}
static const long ID_tMain
Definition textwindow.h:52
void On_bOK_Click(wxCommandEvent &event)
static const long ID_bOK
Definition textwindow.h:53