Mercurial > mercurial > hgweb_qlipbrd.cgi
diff src/adddialog.cpp @ 3:fd4361d2cbbd default tip
add remember function.
author | pyon@macmini |
---|---|
date | Thu, 24 Sep 2015 07:45:26 +0900 |
parents | e4aa0e7a07ad |
children |
line wrap: on
line diff
--- a/src/adddialog.cpp Mon Sep 14 19:25:51 2015 +0900 +++ b/src/adddialog.cpp Thu Sep 24 07:45:26 2015 +0900 @@ -1,5 +1,5 @@ // Filename: adddialog.cpp -// Last Change: 2015-09-13 Sun 14:34:28. +// Last Change: 2015-09-23 Wed 19:59:41. // #include <wx/valgen.h> #include <wx/valtext.h> @@ -16,10 +16,12 @@ 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, 5 ); + // 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 ); @@ -29,6 +31,7 @@ m_staticTextText2 = new wxStaticText( this, wxID_ANY, wxT("Strings to paste"), wxDefaultPosition, wxDefaultSize, 0 ); fgSizer->Add( m_staticTextText2, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + // Overwrite m_staticTextOverwrite = new wxStaticText( this, wxID_ANY, wxT("Overwrite"), wxDefaultPosition, wxDefaultSize, 0 ); fgSizer->Add( m_staticTextOverwrite, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 ); @@ -38,6 +41,7 @@ m_staticTextOverwrite2 = new wxStaticText( this, wxID_ANY, wxT("Check if allow change by user"), wxDefaultPosition, wxDefaultSize, 0 ); fgSizer->Add( m_staticTextOverwrite2, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + // Max Live Time m_staticTextMaxLive = new wxStaticText( this, wxID_ANY, wxT("Max LT"), wxDefaultPosition, wxDefaultSize, 0 ); fgSizer->Add( m_staticTextMaxLive, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); @@ -47,6 +51,7 @@ m_staticTextMaxLive2 = new wxStaticText( this, wxID_ANY, wxT("Maximum live time"), wxDefaultPosition, wxDefaultSize, 0 ); fgSizer->Add( m_staticTextMaxLive2, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + // Max Active Time m_staticTextMaxActive = new wxStaticText( this, wxID_ANY, wxT("Max AT"), wxDefaultPosition, wxDefaultSize, 0 ); fgSizer->Add( m_staticTextMaxActive, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); @@ -56,6 +61,17 @@ m_staticTextMaxActive2 = new wxStaticText( this, wxID_ANY, wxT("Maximum active time"), wxDefaultPosition, wxDefaultSize, 0 ); fgSizer->Add( m_staticTextMaxActive2, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + // Remember + m_staticTextRemember = new wxStaticText( this, wxID_ANY, wxT("Remember"), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer->Add( m_staticTextRemember, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBoxRemember = new wxCheckBox( this, ID_CKOW, wxT("reserve text"), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer->Add( m_checkBoxRemember, 0, wxALL, 5 ); + + m_staticTextRemember2 = new wxStaticText( this, wxID_ANY, wxT("Check if add text to history"), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer->Add( m_staticTextRemember2, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + // Description m_staticTextDesc = new wxStaticText( this, wxID_ANY, wxT("Desc"), wxDefaultPosition, wxDefaultSize, 0 ); fgSizer->Add( m_staticTextDesc, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); @@ -67,6 +83,7 @@ bSizerTop->Add( fgSizer, 1, wxEXPAND, 5 ); + // Buttons wxBoxSizer* bSizerBtn = new wxBoxSizer( wxHORIZONTAL ); m_buttonAdd = new wxButton( this, wxID_OK, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -121,6 +138,7 @@ m_owrite = false; m_maxat = 5; m_maxlt = 20; + m_remember = false; m_desc = wxEmptyString; m_spinCtrlMaxLive->Enable( false ); } @@ -131,6 +149,7 @@ m_checkBoxOverwrite->SetValidator( wxGenericValidator( &m_owrite ) ); m_spinCtrlMaxLive->SetValidator( wxGenericValidator( &m_maxlt ) ); m_spinCtrlMaxActive->SetValidator( wxGenericValidator( &m_maxat ) ); + m_checkBoxRemember->SetValidator( wxGenericValidator( &m_remember ) ); m_textCtrlDesc->SetValidator( wxTextValidator( wxFILTER_NONE, &m_desc ) ); }