//////////////////////////////////////////////////////////////////////
// This file was auto-generated by codelite's wxCrafter Plugin
// wxCrafter project file: BuildTabSettings.wxcp
// Do not modify this file by hand!
//////////////////////////////////////////////////////////////////////

#include "buildsettingstabbase.h"

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

static bool bBitmapLoaded = false;

BuildTabSettingsBase::BuildTabSettingsBase(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
                                           long style)
    : wxPanel(parent, id, pos, size, style)
{
    if(!bBitmapLoaded) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxCraftertNJGa9InitBitmapResources();
        bBitmapLoaded = true;
    }

    wxBoxSizer* bSizer1 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(bSizer1);

    wxFlexGridSizer* flexGridSizer29 = new wxFlexGridSizer(0, 2, 0, 0);
    flexGridSizer29->SetFlexibleDirection(wxBOTH);
    flexGridSizer29->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
    flexGridSizer29->AddGrowableCol(1);

    bSizer1->Add(flexGridSizer29, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_checkBoxSkipWarnings =
        new wxCheckBox(this, wxID_ANY, _("Skip warnings"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_checkBoxSkipWarnings->SetValue(false);
    m_checkBoxSkipWarnings->SetToolTip(_("When using the menu to jump between errors/warnings,\nignore warnings"));

    flexGridSizer29->Add(m_checkBoxSkipWarnings, 0, wxALL | wxEXPAND | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_checkBoxScrollToError = new wxCheckBox(this, wxID_ANY, _("When build completes, scroll to the first error line"),
                                             wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_checkBoxScrollToError->SetValue(true);

    flexGridSizer29->Add(m_checkBoxScrollToError, 0, wxALL | wxEXPAND | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_staticText37 =
        new wxStaticText(this, wxID_ANY, _("Marker style:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    flexGridSizer29->Add(m_staticText37, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    wxArrayString m_choiceMarkerStyleArr;
    m_choiceMarkerStyleArr.Add(_("Red arrow"));
    m_choiceMarkerStyleArr.Add(_("Annotation box"));
    m_choiceMarkerStyleArr.Add(_("None"));
    m_choiceMarkerStyle =
        new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), m_choiceMarkerStyleArr, 0);
    m_choiceMarkerStyle->SetSelection(0);

    flexGridSizer29->Add(m_choiceMarkerStyle, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    SetName(wxT("BuildTabSettingsBase"));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    if(GetSizer()) {
        GetSizer()->Fit(this);
    }
    // Connect events
    m_checkBoxSkipWarnings->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &BuildTabSettingsBase::OnChange, this);
    m_checkBoxScrollToError->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &BuildTabSettingsBase::OnChange, this);
}

BuildTabSettingsBase::~BuildTabSettingsBase()
{
    m_checkBoxSkipWarnings->Unbind(wxEVT_COMMAND_CHECKBOX_CLICKED, &BuildTabSettingsBase::OnChange, this);
    m_checkBoxScrollToError->Unbind(wxEVT_COMMAND_CHECKBOX_CLICKED, &BuildTabSettingsBase::OnChange, this);
}
