#include "HeaderControl.h" #include "InterfaceDefine.hpp" HeaderControl::HeaderControl(wxWindow* parent) : wxPanel(parent) { Init(); } HeaderControl::~HeaderControl() { } 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(); }