File: CodeLiteDiff_UI.cpp

package info (click to toggle)
codelite 14.0+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 112,816 kB
  • sloc: cpp: 483,662; ansic: 150,144; php: 9,569; lex: 4,186; python: 3,417; yacc: 2,820; sh: 1,147; makefile: 52; xml: 13
file content (120 lines) | stat: -rw-r--r-- 4,859 bytes parent folder | download | duplicates (3)
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
//////////////////////////////////////////////////////////////////////
// This file was auto-generated by codelite's wxCrafter Plugin
// wxCrafter project file: CodeLiteDiff_UI.wxcp
// Do not modify this file by hand!
//////////////////////////////////////////////////////////////////////

#include "CodeLiteDiff_UI.h"


// Declare the bitmap loading function
extern void wxC847InitBitmapResources();

static bool bBitmapLoaded = false;


NewFileComparisonBase::NewFileComparisonBase(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);
        wxC847InitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* boxSizer6 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer6);
    
    wxFlexGridSizer* flexGridSizer23 = new wxFlexGridSizer(0, 3, 0, 0);
    flexGridSizer23->SetFlexibleDirection( wxBOTH );
    flexGridSizer23->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    flexGridSizer23->AddGrowableCol(1);
    
    boxSizer6->Add(flexGridSizer23, 0, wxEXPAND, 5);
    
    m_staticText27 = new wxStaticText(this, wxID_ANY, _("Left FIle:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer23->Add(m_staticText27, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlLeftFile = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0);
    m_textCtrlLeftFile->Enable(false);
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlLeftFile->SetHint(wxT(""));
    #endif
    
    flexGridSizer23->Add(m_textCtrlLeftFile, 0, wxALL|wxEXPAND, 5);
    
    flexGridSizer23->Add(0, 0, 1, wxALL, 5);
    
    m_staticText25 = new wxStaticText(this, wxID_ANY, _("Right File:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer23->Add(m_staticText25, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlFileName = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0);
    m_textCtrlFileName->SetFocus();
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlFileName->SetHint(wxT(""));
    #endif
    m_textCtrlFileName->AutoCompleteFileNames();
    
    flexGridSizer23->Add(m_textCtrlFileName, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    m_button22 = new wxButton(this, wxID_ANY, _("..."), wxDefaultPosition, wxSize(-1,-1), wxBU_EXACTFIT);
    m_button22->SetToolTip(_("Choose a file..."));
    
    flexGridSizer23->Add(m_button22, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    m_staticText33 = new wxStaticText(this, wxID_ANY, _("Opened files:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer6->Add(m_staticText33, 0, wxALL|wxALIGN_LEFT, 5);
    
    wxArrayString m_listBox16Arr;
    m_listBox16 = new wxListBox(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), m_listBox16Arr, wxLB_SINGLE);
    
    boxSizer6->Add(m_listBox16, 1, wxALL|wxEXPAND, 5);
    
    m_stdBtnSizer8 = new wxStdDialogButtonSizer();
    
    boxSizer6->Add(m_stdBtnSizer8, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 10);
    
    m_button10 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_button10->SetDefault();
    m_stdBtnSizer8->AddButton(m_button10);
    
    m_button12 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_stdBtnSizer8->AddButton(m_button12);
    m_stdBtnSizer8->Realize();
    
    SetName(wxT("NewFileComparisonBase"));
    SetMinClientSize(wxSize(500,300));
    SetSize(-1,-1);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    m_button22->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(NewFileComparisonBase::OnBrowse), NULL, this);
    m_listBox16->Connect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(NewFileComparisonBase::OnFileSelected), NULL, this);
    m_button10->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(NewFileComparisonBase::OnOKUI), NULL, this);
    
}

NewFileComparisonBase::~NewFileComparisonBase()
{
    m_button22->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(NewFileComparisonBase::OnBrowse), NULL, this);
    m_listBox16->Disconnect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(NewFileComparisonBase::OnFileSelected), NULL, this);
    m_button10->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(NewFileComparisonBase::OnOKUI), NULL, this);
    
}