add:添加一个基本架子。
This commit is contained in:
parent
318a794fa3
commit
48e9b36e6c
@ -10,6 +10,10 @@ set(PSOURCES
|
||||
main.cxx
|
||||
mainframe.cxx
|
||||
mainframe.h
|
||||
design/basepanel.h
|
||||
design/basepanel.cxx
|
||||
mainpanel.h
|
||||
mainpanel.cxx
|
||||
)
|
||||
|
||||
add_executable(gtransm ${PSOURCES})
|
||||
|
21
gui/design/basepanel.cxx
Normal file
21
gui/design/basepanel.cxx
Normal file
@ -0,0 +1,21 @@
|
||||
#include "basepanel.h"
|
||||
|
||||
CBasePanel::CBasePanel(wxWindow* parent)
|
||||
{
|
||||
}
|
||||
|
||||
void CBasePanel::Init()
|
||||
{
|
||||
auto* topSizer = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
auto* szL1 = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
||||
auto* lbIp = new wxStaticText(this, wxID_ANY, _("ServerIP:"));
|
||||
edIp_ = new wxTextCtrl(this, wxID_ANY, _(""));
|
||||
auto* lbPort = new wxStaticText(this, wxID_ANY, _("Port:"));
|
||||
edPort_ = new wxTextCtrl(this, wxID_ANY, _("Port"));
|
||||
szL1->Add(lbIp, 0, wxALL, 5);
|
||||
szL1->Add(edIp_, 0, wxALL, 5);
|
||||
szL1->Add(lbPort, 0, wxALL, 5);
|
||||
szL1->Add(edPort_, 0, wxALL, 5);
|
||||
}
|
19
gui/design/basepanel.h
Normal file
19
gui/design/basepanel.h
Normal file
@ -0,0 +1,19 @@
|
||||
#ifndef BASEMAIN_H
|
||||
#define BASEMAIN_H
|
||||
|
||||
#include <wx/wx.h>
|
||||
|
||||
class CBasePanel : public wxPanel
|
||||
{
|
||||
public:
|
||||
CBasePanel(wxWindow* parent);
|
||||
|
||||
private:
|
||||
void Init();
|
||||
|
||||
protected:
|
||||
wxTextCtrl* edIp_{};
|
||||
wxTextCtrl* edPort_{};
|
||||
};
|
||||
|
||||
#endif // BASEMAIN_H
|
@ -2,6 +2,7 @@
|
||||
#define MAINFRAME_H
|
||||
|
||||
#include <wx/wx.h>
|
||||
#include "design/basepanel.h"
|
||||
|
||||
class CMainFrame : public wxApp
|
||||
{
|
||||
|
5
gui/mainpanel.cxx
Normal file
5
gui/mainpanel.cxx
Normal file
@ -0,0 +1,5 @@
|
||||
#include "mainpanel.h"
|
||||
|
||||
CMainPanel::CMainPanel(wxWindow* parent) : CBasePanel(parent)
|
||||
{
|
||||
}
|
12
gui/mainpanel.h
Normal file
12
gui/mainpanel.h
Normal file
@ -0,0 +1,12 @@
|
||||
#ifndef MAINPANEL_H
|
||||
#define MAINPANEL_H
|
||||
|
||||
#include "design/basepanel.h"
|
||||
|
||||
class CMainPanel : public CBasePanel
|
||||
{
|
||||
public:
|
||||
CMainPanel(wxWindow* parent);
|
||||
};
|
||||
|
||||
#endif // MAINPANEL_H
|
Loading…
x
Reference in New Issue
Block a user