Mercurial > mercurial > hgweb_qlipbrd.cgi
view src/adddialog.cpp @ 0:cb3403ca39b1
First release.
author | pyon@macmini |
---|---|
date | Sun, 30 Aug 2015 21:53:19 +0900 |
parents | |
children | e4aa0e7a07ad |
line wrap: on
line source
// Filename: adddialog.cpp // Last Change: 2015-08-30 Sun 16:02:17. // #include "adddialog.h" AddDialog::AddDialog( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); wxBoxSizer* bSizerTop = new wxBoxSizer( wxVERTICAL ); m_staticText = new wxStaticText( this, wxID_ANY, wxT("Specify Empty text to use User input(Ctrl-c).\nDescription is option."), wxDefaultPosition, wxDefaultSize, 0 ); bSizerTop->Add( m_staticText, 0, wxALL|wxEXPAND, 10 ); wxFlexGridSizer* fgSizer = new wxFlexGridSizer( 0, 3, 0, 0 ); fgSizer->SetFlexibleDirection( wxBOTH ); fgSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); // text m_staticTextText = new wxStaticText( this, wxID_ANY, wxT("Text"), wxDefaultPosition, wxDefaultSize, 0 ); fgSizer->Add( m_staticTextText, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); m_textCtrlText = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizer->Add( m_textCtrlText, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_staticTextText2 = new wxStaticText( this, wxID_ANY, wxT("Strings to paste"), wxDefaultPosition, wxDefaultSize, 0 ); fgSizer->Add( m_staticTextText2, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); // type m_staticTextType = new wxStaticText( this, wxID_ANY, wxT("Type"), wxDefaultPosition, wxDefaultSize, 0 ); fgSizer->Add( m_staticTextType, 0, wxALL|wxALIGN_RIGHT, 5 ); wxString m_choiceTypeChoices[] = { wxT("a"), wxT("ab"), wxT("cc"), }; int m_choiceTypeNChoices = sizeof( m_choiceTypeChoices ) / sizeof( wxString ); m_choiceType = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceTypeNChoices, m_choiceTypeChoices, 0 ); fgSizer->Add( m_choiceType, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_staticTextType2 = new wxStaticText( this, wxID_ANY, wxT("Ring / Queue / Stack"), wxDefaultPosition, wxDefaultSize, 0 ); fgSizer->Add( m_staticTextType2, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); // time m_staticTextTime = new wxStaticText( this, wxID_ANY, wxT("Time"), wxDefaultPosition, wxDefaultSize, 0 ); fgSizer->Add( m_staticTextTime, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); m_textCtrlTime = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizer->Add( m_textCtrlTime, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_staticTextTime2 = new wxStaticText( this, wxID_ANY, wxT("interval"), wxDefaultPosition, wxDefaultSize, 0 ); fgSizer->Add( m_staticTextTime2, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); // desc m_staticTextDesc = new wxStaticText( this, wxID_ANY, wxT("Desc"), wxDefaultPosition, wxDefaultSize, 0 ); fgSizer->Add( m_staticTextDesc, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); m_textCtrlDesc = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizer->Add( m_textCtrlDesc, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_staticTextDesc2 = new wxStaticText( this, wxID_ANY, wxT("Description"), wxDefaultPosition, wxDefaultSize, 0 ); fgSizer->Add( m_staticTextDesc2, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); bSizerTop->Add( fgSizer, 1, wxEXPAND, 5 ); wxBoxSizer* bSizerBtn = new wxBoxSizer( wxHORIZONTAL ); m_buttonAdd = new wxButton( this, wxID_OK, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonAdd->SetDefault(); bSizerBtn->Add( m_buttonAdd, 0, wxALL, 5 ); m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); bSizerBtn->Add( m_buttonCancel, 0, wxALL, 5 ); bSizerTop->Add( bSizerBtn, 0, wxALIGN_RIGHT, 5 ); this->SetSizer( bSizerTop ); this->Layout(); bSizerTop->Fit( this ); this->Centre( wxBOTH ); } AddDialog::~AddDialog() { }