File: wxCodeCompletionBoxBase.cpp

package info (click to toggle)
codelite 12.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 95,112 kB
  • sloc: cpp: 424,040; ansic: 18,284; php: 9,569; lex: 4,186; yacc: 2,820; python: 2,294; sh: 312; makefile: 51; xml: 13
file content (58 lines) | stat: -rw-r--r-- 2,052 bytes parent folder | download | duplicates (2)
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
//////////////////////////////////////////////////////////////////////
// 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;
    }
    
    mainSizer = new wxBoxSizer(wxHORIZONTAL);
    this->SetSizer(mainSizer);
    
    m_panelComposite = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    
    mainSizer->Add(m_panelComposite, 1, wxEXPAND, 5);
    
    boxSizer = new wxBoxSizer(wxHORIZONTAL);
    m_panelComposite->SetSizer(boxSizer);
    
    m_canvas = new wxPanel(m_panelComposite, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    
    boxSizer->Add(m_canvas, 1, wxALL|wxEXPAND, 0);
    
    SetName(wxT("wxCodeCompletionBoxBase"));
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    CentreOnParent(wxBOTH);
    // Connect events
    m_canvas->Connect(wxEVT_PAINT, wxPaintEventHandler(wxCodeCompletionBoxBase::OnPaint), NULL, this);
    m_canvas->Connect(wxEVT_ERASE_BACKGROUND, wxEraseEventHandler(wxCodeCompletionBoxBase::OnEraseBackground), NULL, this);
    
}

wxCodeCompletionBoxBase::~wxCodeCompletionBoxBase()
{
    m_canvas->Disconnect(wxEVT_PAINT, wxPaintEventHandler(wxCodeCompletionBoxBase::OnPaint), NULL, this);
    m_canvas->Disconnect(wxEVT_ERASE_BACKGROUND, wxEraseEventHandler(wxCodeCompletionBoxBase::OnEraseBackground), NULL, this);
    
}