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
|
//////////////////////////////////////////////////////////////////////
// This file was auto-generated by codelite's wxCrafter Plugin
// wxCrafter project file: wxCodeCompletionBox.wxcp
// Do not modify this file by hand!
//////////////////////////////////////////////////////////////////////
#include "wxCodeCompletionBoxBase.h"
#include "codelite_exports.h"
// Declare the bitmap loading function
extern void wxC9ED9AInitBitmapResources();
static bool bBitmapLoaded = false;
wxCodeCompletionBoxBase::wxCodeCompletionBoxBase(wxWindow* parent, long style)
: wxPopupWindow(parent, style)
{
if(!bBitmapLoaded) {
// We need to initialise the default bitmap handler
wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
wxC9ED9AInitBitmapResources();
bBitmapLoaded = true;
}
wxBoxSizer* mainSizer = new wxBoxSizer(wxHORIZONTAL);
this->SetSizer(mainSizer);
m_mainPanel = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxTAB_TRAVERSAL);
mainSizer->Add(m_mainPanel, 1, wxEXPAND, WXC_FROM_DIP(0));
wxBoxSizer* boxSizer43 = new wxBoxSizer(wxVERTICAL);
m_mainPanel->SetSizer(boxSizer43);
m_list = new clThemedListCtrl(m_mainPanel, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_mainPanel, wxSize(-1, -1)),
wxDV_NO_HEADER | wxDV_ROW_LINES | wxDV_SINGLE | wxBORDER_NONE);
boxSizer43->Add(m_list, 1, wxALL | wxEXPAND, WXC_FROM_DIP(1));
SetName(wxT("wxCodeCompletionBoxBase"));
SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
if(GetSizer()) {
GetSizer()->Fit(this);
}
// Connect events
m_list->Connect(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED,
wxDataViewEventHandler(wxCodeCompletionBoxBase::OnSelectionChanged), NULL, this);
m_list->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED,
wxDataViewEventHandler(wxCodeCompletionBoxBase::OnSelectionActivated), NULL, this);
}
wxCodeCompletionBoxBase::~wxCodeCompletionBoxBase()
{
m_list->Disconnect(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED,
wxDataViewEventHandler(wxCodeCompletionBoxBase::OnSelectionChanged), NULL, this);
m_list->Disconnect(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED,
wxDataViewEventHandler(wxCodeCompletionBoxBase::OnSelectionActivated), NULL, this);
}
|