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
|
//////////////////////////////////////////////////////////////////////
// This file was auto-generated by codelite's wxCrafter Plugin
// wxCrafter project file: UI.wxcp
// Do not modify this file by hand!
//////////////////////////////////////////////////////////////////////
#include "UI.h"
#include "WordCompletionSettings.h"
// Declare the bitmap loading function
extern void wxC69AFInitBitmapResources();
static bool bBitmapLoaded = false;
WordCompletionSettingsBaseDlg::WordCompletionSettingsBaseDlg(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);
wxC69AFInitBitmapResources();
bBitmapLoaded = true;
}
wxBoxSizer* boxSizer2 = new wxBoxSizer(wxVERTICAL);
this->SetSizer(boxSizer2);
wxArrayString m_pgMgrArr;
wxUnusedVar(m_pgMgrArr);
wxArrayInt m_pgMgrIntArr;
wxUnusedVar(m_pgMgrIntArr);
m_pgMgr = new wxPropertyGridManager(this, wxID_ANY, wxDefaultPosition, wxSize(300,300), wxPG_DESCRIPTION|wxPG_SPLITTER_AUTO_CENTER|wxPG_BOLD_MODIFIED);
boxSizer2->Add(m_pgMgr, 1, wxALL|wxEXPAND, 5);
m_pgPropEnabled = m_pgMgr->Append( new wxBoolProperty( _("Enabled"), wxPG_LABEL, 1) );
m_pgPropEnabled->SetHelpString(_("Enable Word Completion plugin?"));
m_pgMgrArr.Clear();
m_pgMgrIntArr.Clear();
m_pgMgrArr.Add(_("Starts With"));
m_pgMgrArr.Add(_("Contains"));
m_pgPropComparisonMethod = m_pgMgr->Append( new wxEnumProperty( _("Comparison Method"), wxPG_LABEL, m_pgMgrArr, m_pgMgrIntArr, 0) );
m_pgPropComparisonMethod->SetHelpString(_("Select the word completion comparison method:\n\"Starts With\" - suggest all words that starts with the partial word that the user typed\n\"Contains\" - suggest all words that contains the partial word that the user typed"));
m_stdBtnSizer4 = new wxStdDialogButtonSizer();
boxSizer2->Add(m_stdBtnSizer4, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
m_button6 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
m_button6->SetDefault();
m_stdBtnSizer4->AddButton(m_button6);
m_button8 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
m_stdBtnSizer4->AddButton(m_button8);
m_stdBtnSizer4->Realize();
SetName(wxT("WordCompletionSettingsBaseDlg"));
SetMinSize( wxSize(300,300) );
SetSizeHints(-1,-1);
if ( GetSizer() ) {
GetSizer()->Fit(this);
}
CentreOnParent(wxBOTH);
#if wxVERSION_NUMBER >= 2900
if(!wxPersistenceManager::Get().Find(this)) {
wxPersistenceManager::Get().RegisterAndRestore(this);
} else {
wxPersistenceManager::Get().Restore(this);
}
#endif
// Connect events
m_pgMgr->Connect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(WordCompletionSettingsBaseDlg::OnValueChanged), NULL, this);
m_button6->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(WordCompletionSettingsBaseDlg::OnOk), NULL, this);
m_button6->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(WordCompletionSettingsBaseDlg::OnOkUI), NULL, this);
}
WordCompletionSettingsBaseDlg::~WordCompletionSettingsBaseDlg()
{
m_pgMgr->Disconnect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(WordCompletionSettingsBaseDlg::OnValueChanged), NULL, this);
m_button6->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(WordCompletionSettingsBaseDlg::OnOk), NULL, this);
m_button6->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(WordCompletionSettingsBaseDlg::OnOkUI), NULL, this);
}
WordCompletionImages::WordCompletionImages()
: wxImageList(16, 16, true)
{
if ( !bBitmapLoaded ) {
// We need to initialise the default bitmap handler
wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
wxC69AFInitBitmapResources();
bBitmapLoaded = true;
}
{
wxBitmap bmp;
wxIcon icn;
bmp = wxXmlResource::Get()->LoadBitmap(wxT("m_bmpWord"));
icn.CopyFromBitmap( bmp );
this->Add( icn );
m_bitmaps.insert( std::make_pair(wxT("m_bmpWord"), bmp ) );
}
}
WordCompletionImages::~WordCompletionImages()
{
}
|