1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
|
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//
// copyright : (C) 2014 The CodeLite Team
// 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.
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
// This file was auto-generated by codelite's wxCrafter Plugin
// wxCrafter project file: NewKeyShortcutBaseDlg.wxcp
// Do not modify this file by hand!
//////////////////////////////////////////////////////////////////////
#include "NewKeyShortcutBaseDlg.h"
// Declare the bitmap loading function
extern void wxC8418InitBitmapResources();
static bool bBitmapLoaded = false;
NewKeyShortcutBaseDlg::NewKeyShortcutBaseDlg(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
: wxDialog(parent, id, title, pos, size, style)
{
if ( !bBitmapLoaded ) {
// We need to initialise the default bitmap handler
wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
wxC8418InitBitmapResources();
bBitmapLoaded = true;
}
wxBoxSizer* bSizer3 = new wxBoxSizer(wxVERTICAL);
this->SetSizer(bSizer3);
m_panel1 = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
bSizer3->Add(m_panel1, 1, wxALL|wxEXPAND, 5);
wxBoxSizer* bSizer5 = new wxBoxSizer(wxVERTICAL);
m_panel1->SetSizer(bSizer5);
wxFlexGridSizer* flexGridSizer8 = new wxFlexGridSizer(0, 3, 0, 0);
flexGridSizer8->SetFlexibleDirection( wxBOTH );
flexGridSizer8->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
flexGridSizer8->AddGrowableCol(1);
bSizer5->Add(flexGridSizer8, 1, wxALL|wxEXPAND, 5);
m_staticTextActionLabel = new wxStaticText(m_panel1, wxID_ANY, _("Action:"), wxDefaultPosition, wxSize(-1, -1), 0);
flexGridSizer8->Add(m_staticTextActionLabel, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
m_staticTextAction = new wxStaticText(m_panel1, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0);
flexGridSizer8->Add(m_staticTextAction, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
flexGridSizer8->Add(0, 0, 1, wxALL, 5);
m_staticText10 = new wxStaticText(m_panel1, wxID_ANY, _("Key:"), wxDefaultPosition, wxSize(-1,-1), 0);
flexGridSizer8->Add(m_staticText10, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
m_textCtrl1 = new wxTextCtrl(m_panel1, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), wxTE_PROCESS_TAB|wxTE_PROCESS_ENTER);
m_textCtrl1->SetToolTip(_("Hit any keyboard key. Don't use the modifier keys (e.g. 'Shift') here, use the checkboxes below"));
m_textCtrl1->SetFocus();
flexGridSizer8->Add(m_textCtrl1, 0, wxALL|wxEXPAND, 5);
m_buttonClear = new wxButton(m_panel1, wxID_CLEAR, _("Clear"), wxDefaultPosition, wxSize(-1,-1), 0);
m_buttonClear->SetToolTip(_("Clear the keyboard shortcut"));
flexGridSizer8->Add(m_buttonClear, 0, wxALL, 5);
m_staticText12 = new wxStaticText(m_panel1, wxID_ANY, _("Modifiers:"), wxDefaultPosition, wxSize(-1,-1), 0);
flexGridSizer8->Add(m_staticText12, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
wxBoxSizer* bSizer6 = new wxBoxSizer(wxHORIZONTAL);
flexGridSizer8->Add(bSizer6, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
m_checkBoxCtrl = new wxCheckBox(m_panel1, wxID_ANY, _("Ctrl/Cmd"), wxDefaultPosition, wxSize(-1,-1), 0);
m_checkBoxCtrl->SetValue(false);
bSizer6->Add(m_checkBoxCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
m_checkBoxAlt = new wxCheckBox(m_panel1, wxID_ANY, _("Alt"), wxDefaultPosition, wxSize(-1,-1), 0);
m_checkBoxAlt->SetValue(false);
bSizer6->Add(m_checkBoxAlt, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
m_checkBoxShift = new wxCheckBox(m_panel1, wxID_ANY, _("Shift"), wxDefaultPosition, wxSize(-1,-1), 0);
m_checkBoxShift->SetValue(false);
bSizer6->Add(m_checkBoxShift, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
wxBoxSizer* bSizer4 = new wxBoxSizer(wxHORIZONTAL);
bSizer3->Add(bSizer4, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
m_buttonOk = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1, -1), 0);
m_buttonOk->SetDefault();
bSizer4->Add(m_buttonOk, 0, wxALL, 5);
m_buttonCancel = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize(-1, -1), 0);
bSizer4->Add(m_buttonCancel, 0, wxALL, 5);
SetSizeHints(-1,-1);
if ( GetSizer() ) {
GetSizer()->Fit(this);
}
Centre();
// Connect events
m_textCtrl1->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(NewKeyShortcutBaseDlg::OnKeyDown), NULL, this);
m_buttonClear->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(NewKeyShortcutBaseDlg::OnClear), NULL, this);
m_buttonClear->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(NewKeyShortcutBaseDlg::OnClearUI), NULL, this);
}
NewKeyShortcutBaseDlg::~NewKeyShortcutBaseDlg()
{
m_textCtrl1->Disconnect(wxEVT_KEY_DOWN, wxKeyEventHandler(NewKeyShortcutBaseDlg::OnKeyDown), NULL, this);
m_buttonClear->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(NewKeyShortcutBaseDlg::OnClear), NULL, this);
m_buttonClear->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(NewKeyShortcutBaseDlg::OnClearUI), NULL, this);
}
|