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

#include "wxcrafter.h"

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

namespace
{
// return the wxBORDER_SIMPLE that matches the current application theme
wxBorder get_border_simple_theme_aware_bit()
{
#if wxVERSION_NUMBER >= 3300 && defined(__WXMSW__)
    return wxSystemSettings::GetAppearance().IsDark() ? wxBORDER_SIMPLE : wxBORDER_DEFAULT;
#else
    return wxBORDER_DEFAULT;
#endif
} // DoGetBorderSimpleBit
bool bBitmapLoaded = false;
} // namespace

SpellCheckerSettings_base::SpellCheckerSettings_base(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);
        wxC9A94InitBitmapResources();
        bBitmapLoaded = true;
    }

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

    m_panel34 = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxTAB_TRAVERSAL);

    bSizer5->Add(m_panel34, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer35 = new wxBoxSizer(wxVERTICAL);
    m_panel34->SetSizer(boxSizer35);

    wxBoxSizer* bSizer51 = new wxBoxSizer(wxHORIZONTAL);

    boxSizer35->Add(bSizer51, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText2 = new wxStaticText(m_panel34, wxID_ANY, _("Dictionary path:"), wxDefaultPosition,
                                     wxDLG_UNIT(m_panel34, wxSize(-1, -1)), 0);

    bSizer51->Add(m_staticText2, 0, wxALL | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_pDirPicker =
        new wxDirPickerCtrl(m_panel34, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition,
                            wxDLG_UNIT(m_panel34, wxSize(-1, -1)), wxDIRP_DEFAULT_STYLE | wxDIRP_USE_TEXTCTRL);
    m_pDirPicker->SetToolTip(_("Select the location of the installed dictionaries"));

    bSizer51->Add(m_pDirPicker, 1, wxALL, WXC_FROM_DIP(2));

    m_pHyperlink = new wxHyperlinkCtrl(m_panel34, wxID_ANY, _("Find dictionaries on the web.."),
                                       wxT("http://wiki.services.openoffice.org/wiki/Dictionaries"), wxDefaultPosition,
                                       wxDLG_UNIT(m_panel34, wxSize(-1, -1)), wxHL_DEFAULT_STYLE);

    boxSizer35->Add(m_pHyperlink, 0, wxBOTTOM | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));

    wxBoxSizer* bSizer6 = new wxBoxSizer(wxHORIZONTAL);

    boxSizer35->Add(bSizer6, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer9 = new wxBoxSizer(wxVERTICAL);

    bSizer6->Add(boxSizer9, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    wxBoxSizer* bSizer7 = new wxBoxSizer(wxHORIZONTAL);

    boxSizer9->Add(bSizer7, 0, wxEXPAND, WXC_FROM_DIP(5));

    m_staticText4 = new wxStaticText(m_panel34, wxID_ANY, _("Dictionary base name:"), wxDefaultPosition,
                                     wxDLG_UNIT(m_panel34, wxSize(-1, -1)), 0);

    bSizer7->Add(m_staticText4, 0, wxALL, WXC_FROM_DIP(5));

    m_pCurrentLanguage = new wxTextCtrl(m_panel34, wxID_ANY, wxT(""), wxDefaultPosition,
                                        wxDLG_UNIT(m_panel34, wxSize(-1, -1)), wxTE_READONLY | wxTE_CENTRE);
#if wxVERSION_NUMBER >= 3000
    m_pCurrentLanguage->SetHint(wxT(""));
#endif

    bSizer7->Add(m_pCurrentLanguage, 1, wxLEFT | wxRIGHT | wxTOP | wxEXPAND, WXC_FROM_DIP(3));

    wxArrayString m_pLanguageListArr;
    m_pLanguageList = new wxListBox(m_panel34, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panel34, wxSize(-1, -1)),
                                    m_pLanguageListArr, wxLB_SINGLE);

    boxSizer9->Add(m_pLanguageList, 1, wxALL | wxEXPAND, WXC_FROM_DIP(3));

    m_pCaseSensitiveUserDictionary =
        new wxCheckBox(m_panel34, wxID_ANY, _("User dictionary and ignored words are case sensitive"),
                       wxDefaultPosition, wxDLG_UNIT(m_panel34, wxSize(-1, -1)), 0);
    m_pCaseSensitiveUserDictionary->SetValue(true);

    boxSizer35->Add(m_pCaseSensitiveUserDictionary, 0, wxALL, WXC_FROM_DIP(5));

    m_buttonClearIgnoreList = new wxButton(m_panel34, wxID_CLEAR, _("Clear ignore list"), wxDefaultPosition,
                                           wxDLG_UNIT(m_panel34, wxSize(-1, -1)), 0);
    m_buttonClearIgnoreList->SetToolTip(_("Clear the ignore list"));

    boxSizer35->Add(m_buttonClearIgnoreList, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_stdBtnSizer12 = new wxStdDialogButtonSizer();

    bSizer5->Add(m_stdBtnSizer12, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));

    m_buttonOK = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_buttonOK->SetDefault();
    m_stdBtnSizer12->AddButton(m_buttonOK);

    m_buttonCancel = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_stdBtnSizer12->AddButton(m_buttonCancel);
    m_stdBtnSizer12->Realize();

    SetName(wxT("SpellCheckerSettings_base"));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    if(GetSizer()) {
        GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent();
    } else {
        CentreOnScreen();
    }
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
    // Connect events
    this->Bind(wxEVT_INIT_DIALOG, &SpellCheckerSettings_base::OnInitDialog, this);
    m_pDirPicker->Bind(wxEVT_COMMAND_DIRPICKER_CHANGED, &SpellCheckerSettings_base::OnDirChanged, this);
    m_pLanguageList->Bind(wxEVT_COMMAND_LISTBOX_SELECTED, &SpellCheckerSettings_base::OnLanguageSelected, this);
    m_buttonClearIgnoreList->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &SpellCheckerSettings_base::OnClearIgnoreList, this);
    m_buttonOK->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &SpellCheckerSettings_base::OnOk, this);
    m_buttonOK->Bind(wxEVT_UPDATE_UI, &SpellCheckerSettings_base::OnUpdateOk, this);
}

SpellCheckerSettings_base::~SpellCheckerSettings_base()
{
    this->Unbind(wxEVT_INIT_DIALOG, &SpellCheckerSettings_base::OnInitDialog, this);
    m_pDirPicker->Unbind(wxEVT_COMMAND_DIRPICKER_CHANGED, &SpellCheckerSettings_base::OnDirChanged, this);
    m_pLanguageList->Unbind(wxEVT_COMMAND_LISTBOX_SELECTED, &SpellCheckerSettings_base::OnLanguageSelected, this);
    m_buttonClearIgnoreList->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &SpellCheckerSettings_base::OnClearIgnoreList, this);
    m_buttonOK->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &SpellCheckerSettings_base::OnOk, this);
    m_buttonOK->Unbind(wxEVT_UPDATE_UI, &SpellCheckerSettings_base::OnUpdateOk, this);
}

CorrectSpellingDlg_base::CorrectSpellingDlg_base(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);
        wxC9A94InitBitmapResources();
        bBitmapLoaded = true;
    }

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

    wxBoxSizer* bSizer6 = new wxBoxSizer(wxHORIZONTAL);

    bSizer5->Add(bSizer6, 0, wxEXPAND, WXC_FROM_DIP(5));

    m_staticText1 =
        new wxStaticText(this, wxID_ANY, _("Misspelling:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    bSizer6->Add(m_staticText1, 0, wxLEFT | wxTOP | wxBOTTOM | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_pMisspelling = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
#if wxVERSION_NUMBER >= 3000
    m_pMisspelling->SetHint(wxT(""));
#endif

    bSizer6->Add(m_pMisspelling, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    wxBoxSizer* bSizer7 = new wxBoxSizer(wxHORIZONTAL);

    bSizer5->Add(bSizer7, 1, wxEXPAND, WXC_FROM_DIP(5));

    wxBoxSizer* bSizer2 = new wxBoxSizer(wxVERTICAL);

    bSizer7->Add(bSizer2, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText2 = new wxStaticText(this, wxID_ANY, _("Suggestions:"), wxDefaultPosition,
                                     wxDLG_UNIT(this, wxSize(-1, -1)), wxBORDER_STATIC);

    bSizer2->Add(m_staticText2, 0, wxLEFT | wxRIGHT | wxTOP | wxEXPAND, WXC_FROM_DIP(3));

    wxArrayString m_pSuggestionsArr;
    m_pSuggestions =
        new wxListBox(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(200, -1)), m_pSuggestionsArr, 0);

    bSizer2->Add(m_pSuggestions, 1, wxLEFT | wxRIGHT | wxBOTTOM | wxEXPAND, WXC_FROM_DIP(3));

    wxBoxSizer* bSizer12 = new wxBoxSizer(wxVERTICAL);

    bSizer7->Add(bSizer12, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

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

    bSizer12->Add(fgSizer4, 1, wxEXPAND, WXC_FROM_DIP(5));

    m_button1 = new wxButton(this, wxID_ANY, _("Change"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_button1->SetDefault();

    fgSizer4->Add(m_button1, 0, wxALL, WXC_FROM_DIP(3));

    m_button2 = new wxButton(this, wxID_ANY, _("Ignore"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    fgSizer4->Add(m_button2, 0, wxALL, WXC_FROM_DIP(3));

    m_button4 = new wxButton(this, wxID_ANY, _("Add"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    fgSizer4->Add(m_button4, 0, wxALL, WXC_FROM_DIP(3));

    m_button5 = new wxButton(this, wxID_ANY, _("Suggest"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    fgSizer4->Add(m_button5, 0, wxALL, WXC_FROM_DIP(3));

    m_button3 = new wxButton(this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    bSizer12->Add(m_button3, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));

    SetName(wxT("CorrectSpellingDlg_base"));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    if(GetSizer()) {
        GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent();
    } else {
        CentreOnScreen();
    }
    // Connect events
    this->Bind(wxEVT_INIT_DIALOG, &CorrectSpellingDlg_base::OnInitDialog, this);
    m_pSuggestions->Bind(wxEVT_COMMAND_LISTBOX_SELECTED, &CorrectSpellingDlg_base::OnSuggestionSelected, this);
    m_pSuggestions->Bind(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, &CorrectSpellingDlg_base::OnDblClickSuggestions, this);
    m_button1->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &CorrectSpellingDlg_base::OnChangeClick, this);
    m_button2->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &CorrectSpellingDlg_base::OnIgnoreClick, this);
    m_button4->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &CorrectSpellingDlg_base::OnAddClick, this);
    m_button5->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &CorrectSpellingDlg_base::OnSuggestClick, this);
}

CorrectSpellingDlg_base::~CorrectSpellingDlg_base()
{
    this->Unbind(wxEVT_INIT_DIALOG, &CorrectSpellingDlg_base::OnInitDialog, this);
    m_pSuggestions->Unbind(wxEVT_COMMAND_LISTBOX_SELECTED, &CorrectSpellingDlg_base::OnSuggestionSelected, this);
    m_pSuggestions->Unbind(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, &CorrectSpellingDlg_base::OnDblClickSuggestions, this);
    m_button1->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &CorrectSpellingDlg_base::OnChangeClick, this);
    m_button2->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &CorrectSpellingDlg_base::OnIgnoreClick, this);
    m_button4->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &CorrectSpellingDlg_base::OnAddClick, this);
    m_button5->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &CorrectSpellingDlg_base::OnSuggestClick, this);
}
