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

#ifndef _CODELITE_FORMBUILDER_LISTCTRLPANEL_BASE_CLASSES_H
#define _CODELITE_FORMBUILDER_LISTCTRLPANEL_BASE_CLASSES_H

#include "clThemedListCtrl.h"
#include <map>
#include <wx/artprov.h>
#include <wx/bitmap.h>
#include <wx/dataview.h>
#include <wx/icon.h>
#include <wx/imaglist.h>
#include <wx/panel.h>
#include <wx/settings.h>
#include <wx/sizer.h>
#include <wx/xrc/xh_bmp.h>
#include <wx/xrc/xmlres.h>
#if wxVERSION_NUMBER >= 2900
#include <wx/persist.h>
#include <wx/persist/bookctrl.h>
#include <wx/persist/toplevel.h>
#include <wx/persist/treebook.h>
#endif

#ifdef WXC_FROM_DIP
#undef WXC_FROM_DIP
#endif
#if wxVERSION_NUMBER >= 3100
#define WXC_FROM_DIP(x) wxWindow::FromDIP(x, NULL)
#else
#define WXC_FROM_DIP(x) x
#endif

class ListCtrlPanelBase : public wxPanel
{
protected:
    clThemedListCtrl* m_dvListCtrl;

protected:
    virtual void OnItemActivated(wxDataViewEvent& event) { event.Skip(); }
    virtual void OnMenu(wxDataViewEvent& event) { event.Skip(); }

public:
    clThemedListCtrl* GetDvListCtrl() { return m_dvListCtrl; }
    ListCtrlPanelBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition,
                      const wxSize& size = wxSize(500, 300), long style = wxTAB_TRAVERSAL);
    virtual ~ListCtrlPanelBase();
};

class DebuggerBtImgList : public wxImageList
{
protected:
    // Maintain a map of all bitmaps representd by their name
    std::map<wxString, wxBitmap> m_bitmaps;
    // The requested image resolution (can be one of @2x, @1.5x, @1.25x or an empty string (the default)
    wxString m_resolution;
    int m_imagesWidth;
    int m_imagesHeight;

protected:
public:
    DebuggerBtImgList();
    const wxBitmap& Bitmap(const wxString& name) const
    {
        if(!m_bitmaps.count(name + m_resolution)) return wxNullBitmap;
        return m_bitmaps.find(name + m_resolution)->second;
    }

    void SetBitmapResolution(const wxString& res = wxEmptyString) { m_resolution = res; }

    virtual ~DebuggerBtImgList();
};

#endif
