MCPcopy Create free account
hub / github.com/cjcliffe/CubicSDR / DigitalConsoleFrame

Method DigitalConsoleFrame

src/forms/DigitalConsole/DigitalConsoleFrame.cpp:12–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10///////////////////////////////////////////////////////////////////////////
11
12DigitalConsoleFrame::DigitalConsoleFrame( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
13{
14 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
15 this->SetExtraStyle( wxWS_EX_PROCESS_UI_UPDATES );
16
17 wxBoxSizer* mainSizer;
18 mainSizer = new wxBoxSizer( wxVERTICAL );
19
20 wxBoxSizer* dataViewSizer;
21 dataViewSizer = new wxBoxSizer( wxVERTICAL );
22
23 m_dataView = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_CHARWRAP|wxTE_MULTILINE|wxTE_NOHIDESEL|wxTE_READONLY|wxTE_WORDWRAP|wxALWAYS_SHOW_SB|wxFULL_REPAINT_ON_RESIZE|wxVSCROLL|wxBORDER_SIMPLE|wxBORDER_NONE );
24 m_dataView->SetExtraStyle( wxWS_EX_PROCESS_UI_UPDATES );
25 m_dataView->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_TELETYPE, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
26
27 dataViewSizer->Add( m_dataView, 1, wxEXPAND, 5 );
28
29
30 mainSizer->Add( dataViewSizer, 1, wxEXPAND, 5 );
31
32 wxBoxSizer* buttonSizer;
33 buttonSizer = new wxBoxSizer( wxHORIZONTAL );
34
35 m_clearButton = new wxButton( this, wxID_ANY, wxT("Clear"), wxDefaultPosition, wxDefaultSize, 0 );
36 buttonSizer->Add( m_clearButton, 1, wxEXPAND, 5 );
37
38 m_copyButton = new wxButton( this, wxID_ANY, wxT("Copy"), wxDefaultPosition, wxDefaultSize, 0 );
39 buttonSizer->Add( m_copyButton, 1, wxEXPAND, 5 );
40
41 m_pauseButton = new wxButton( this, wxID_ANY, wxT("Stop"), wxDefaultPosition, wxDefaultSize, 0 );
42 buttonSizer->Add( m_pauseButton, 1, wxEXPAND, 5 );
43
44
45 mainSizer->Add( buttonSizer, 0, wxALL|wxEXPAND, 5 );
46
47
48 this->SetSizer( mainSizer );
49 this->Layout();
50 m_refreshTimer.SetOwner( this, wxID_ANY );
51 m_refreshTimer.Start( 250 );
52
53
54 this->Centre( wxBOTH );
55
56 // Connect Events
57 this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DigitalConsoleFrame::OnClose ) );
58 m_clearButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DigitalConsoleFrame::OnClear ), NULL, this );
59 m_copyButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DigitalConsoleFrame::OnCopy ), NULL, this );
60 m_pauseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DigitalConsoleFrame::OnPause ), NULL, this );
61 this->Connect( wxID_ANY, wxEVT_TIMER, wxTimerEventHandler( DigitalConsoleFrame::DoRefresh ) );
62}
63
64DigitalConsoleFrame::~DigitalConsoleFrame()
65{

Callers

nothing calls this directly

Calls 1

AddMethod · 0.80

Tested by

no test coverage detected