////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // // copyright : (C) 2008 by Eran Ifrah // file name : newkeyshortcutbasedlg.cpp // // ------------------------------------------------------------------------- // A // _____ _ _ _ _ // / __ \ | | | | (_) | // | / \/ ___ __| | ___| | _| |_ ___ // | | / _ \ / _ |/ _ \ | | | __/ _ ) // | \__/\ (_) | (_| | __/ |___| | || __/ // \____/\___/ \__,_|\___\_____/_|\__\___| // // F i l e // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// // C++ code generated with wxFormBuilder (version Mar 19 2008) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// #include "newkeyshortcutbasedlg.h" /////////////////////////////////////////////////////////////////////////// NewKeyShortcutBaseDlg::NewKeyShortcutBaseDlg( 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* bSizer3; bSizer3 = new wxBoxSizer( wxVERTICAL ); m_panel1 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); wxBoxSizer* bSizer5; bSizer5 = new wxBoxSizer( wxVERTICAL ); m_staticTextAction = new wxStaticText( m_panel1, wxID_ANY, wxT("Action:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextAction->Wrap( -1 ); bSizer5->Add( m_staticTextAction, 1, wxALL|wxEXPAND, 5 ); m_staticText = new wxStaticText( m_panel1, wxID_ANY, wxT("Hit any key combination:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText->Wrap( -1 ); bSizer5->Add( m_staticText, 0, wxALL|wxEXPAND, 5 ); wxBoxSizer* bSizer6; bSizer6 = new wxBoxSizer( wxHORIZONTAL ); m_textCtrl1 = new wxTextCtrl( m_panel1, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER|wxTE_PROCESS_TAB|wxTE_READONLY ); bSizer6->Add( m_textCtrl1, 1, wxALL|wxEXPAND, 5 ); m_buttonClear = new wxButton( m_panel1, wxID_ANY, wxT("Clear"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer6->Add( m_buttonClear, 0, wxALL, 5 ); bSizer5->Add( bSizer6, 0, wxEXPAND, 5 ); m_panel1->SetSizer( bSizer5 ); m_panel1->Layout(); bSizer5->Fit( m_panel1 ); bSizer3->Add( m_panel1, 1, wxEXPAND | wxALL, 5 ); m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); bSizer3->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 ); wxBoxSizer* bSizer4; bSizer4 = new wxBoxSizer( wxHORIZONTAL ); m_buttonOk = new wxButton( this, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonOk->SetDefault(); bSizer4->Add( m_buttonOk, 0, wxALL, 5 ); m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer4->Add( m_buttonCancel, 0, wxALL, 5 ); bSizer3->Add( bSizer4, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); this->SetSizer( bSizer3 ); this->Layout(); // Connect Events m_textCtrl1->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( NewKeyShortcutBaseDlg::OnKeyDown ), NULL, this ); m_buttonClear->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( NewKeyShortcutBaseDlg::OnButtonClear ), NULL, this ); } NewKeyShortcutBaseDlg::~NewKeyShortcutBaseDlg() { // Disconnect Events m_textCtrl1->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( NewKeyShortcutBaseDlg::OnKeyDown ), NULL, this ); m_buttonClear->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( NewKeyShortcutBaseDlg::OnButtonClear ), NULL, this ); }