RelayFile/UserInterface/HeaderControl.cxx

29 lines
725 B
C++
Raw Normal View History

2025-05-08 21:44:16 +08:00
#include "HeaderControl.h"
2025-05-08 22:11:39 +08:00
#include "InterfaceDefine.hpp"
2025-05-08 21:44:16 +08:00
HeaderControl::HeaderControl(wxWindow* parent) : wxPanel(parent)
{
2025-05-08 22:11:39 +08:00
Init();
2025-05-08 21:44:16 +08:00
}
HeaderControl::~HeaderControl()
{
}
2025-05-08 22:11:39 +08:00
void HeaderControl::Init()
{
auto* topSizer = new wxBoxSizer(wxHORIZONTAL);
textIP_ = new wxTextCtrl(this, wxID_ANY);
textPort_ = new wxTextCtrl(this, wxID_ANY);
btnConnect_ = new wxButton(this, wxID_ANY, _("Connect"));
btnDisconnect_ = new wxButton(this, wxID_ANY, _("Disconnect"));
topSizer->Add(textIP_, 0, wxALL, gBorder);
topSizer->Add(textPort_, 0, wxALL, gBorder);
topSizer->Add(btnConnect_, 0, wxALL, gBorder);
topSizer->Add(btnDisconnect_, 0, wxALL, gBorder);
SetSizer(topSizer);
Layout();
}