Mercurial > mercurial > hgweb_qlipbrd.cgi
comparison src/adddialog.cpp @ 0:cb3403ca39b1
First release.
author | pyon@macmini |
---|---|
date | Sun, 30 Aug 2015 21:53:19 +0900 |
parents | |
children | e4aa0e7a07ad |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:cb3403ca39b1 |
---|---|
1 // Filename: adddialog.cpp | |
2 // Last Change: 2015-08-30 Sun 16:02:17. | |
3 // | |
4 | |
5 #include "adddialog.h" | |
6 | |
7 AddDialog::AddDialog( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) | |
8 : wxDialog( parent, id, title, pos, size, style ) | |
9 { | |
10 this->SetSizeHints( wxDefaultSize, wxDefaultSize ); | |
11 | |
12 wxBoxSizer* bSizerTop = new wxBoxSizer( wxVERTICAL ); | |
13 | |
14 m_staticText = new wxStaticText( this, wxID_ANY, wxT("Specify Empty text to use User input(Ctrl-c).\nDescription is option."), wxDefaultPosition, wxDefaultSize, 0 ); | |
15 bSizerTop->Add( m_staticText, 0, wxALL|wxEXPAND, 10 ); | |
16 | |
17 wxFlexGridSizer* fgSizer = new wxFlexGridSizer( 0, 3, 0, 0 ); | |
18 fgSizer->SetFlexibleDirection( wxBOTH ); | |
19 fgSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); | |
20 | |
21 // text | |
22 m_staticTextText = new wxStaticText( this, wxID_ANY, wxT("Text"), wxDefaultPosition, wxDefaultSize, 0 ); | |
23 fgSizer->Add( m_staticTextText, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); | |
24 | |
25 m_textCtrlText = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); | |
26 fgSizer->Add( m_textCtrlText, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); | |
27 | |
28 m_staticTextText2 = new wxStaticText( this, wxID_ANY, wxT("Strings to paste"), wxDefaultPosition, wxDefaultSize, 0 ); | |
29 fgSizer->Add( m_staticTextText2, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); | |
30 | |
31 // type | |
32 m_staticTextType = new wxStaticText( this, wxID_ANY, wxT("Type"), wxDefaultPosition, wxDefaultSize, 0 ); | |
33 fgSizer->Add( m_staticTextType, 0, wxALL|wxALIGN_RIGHT, 5 ); | |
34 | |
35 wxString m_choiceTypeChoices[] = { wxT("a"), wxT("ab"), wxT("cc"), }; | |
36 int m_choiceTypeNChoices = sizeof( m_choiceTypeChoices ) / sizeof( wxString ); | |
37 m_choiceType = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceTypeNChoices, m_choiceTypeChoices, 0 ); | |
38 fgSizer->Add( m_choiceType, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); | |
39 | |
40 m_staticTextType2 = new wxStaticText( this, wxID_ANY, wxT("Ring / Queue / Stack"), wxDefaultPosition, wxDefaultSize, 0 ); | |
41 fgSizer->Add( m_staticTextType2, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); | |
42 | |
43 // time | |
44 m_staticTextTime = new wxStaticText( this, wxID_ANY, wxT("Time"), wxDefaultPosition, wxDefaultSize, 0 ); | |
45 fgSizer->Add( m_staticTextTime, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); | |
46 | |
47 m_textCtrlTime = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); | |
48 fgSizer->Add( m_textCtrlTime, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); | |
49 | |
50 m_staticTextTime2 = new wxStaticText( this, wxID_ANY, wxT("interval"), wxDefaultPosition, wxDefaultSize, 0 ); | |
51 fgSizer->Add( m_staticTextTime2, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); | |
52 | |
53 // desc | |
54 m_staticTextDesc = new wxStaticText( this, wxID_ANY, wxT("Desc"), wxDefaultPosition, wxDefaultSize, 0 ); | |
55 fgSizer->Add( m_staticTextDesc, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); | |
56 | |
57 m_textCtrlDesc = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); | |
58 fgSizer->Add( m_textCtrlDesc, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); | |
59 | |
60 m_staticTextDesc2 = new wxStaticText( this, wxID_ANY, wxT("Description"), wxDefaultPosition, wxDefaultSize, 0 ); | |
61 fgSizer->Add( m_staticTextDesc2, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); | |
62 | |
63 bSizerTop->Add( fgSizer, 1, wxEXPAND, 5 ); | |
64 | |
65 wxBoxSizer* bSizerBtn = new wxBoxSizer( wxHORIZONTAL ); | |
66 | |
67 m_buttonAdd = new wxButton( this, wxID_OK, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 ); | |
68 m_buttonAdd->SetDefault(); | |
69 bSizerBtn->Add( m_buttonAdd, 0, wxALL, 5 ); | |
70 | |
71 m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); | |
72 bSizerBtn->Add( m_buttonCancel, 0, wxALL, 5 ); | |
73 | |
74 bSizerTop->Add( bSizerBtn, 0, wxALIGN_RIGHT, 5 ); | |
75 | |
76 this->SetSizer( bSizerTop ); | |
77 this->Layout(); | |
78 bSizerTop->Fit( this ); | |
79 | |
80 this->Centre( wxBOTH ); | |
81 } | |
82 | |
83 AddDialog::~AddDialog() | |
84 { | |
85 } | |
86 |