#include "wx/control.h"
#include "wx/dynarray.h"
+#include "wx/withimages.h"
WX_DEFINE_EXPORTED_ARRAY_PTR(wxWindow *, wxArrayPages);
// wxBookCtrlBase
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_CORE wxBookCtrlBase : public wxControl
+class WXDLLIMPEXP_CORE wxBookCtrlBase : public wxControl,
+ public wxWithImages
{
public:
// construction
long style = 0,
const wxString& name = wxEmptyString);
- // dtor
- virtual ~wxBookCtrlBase();
-
// accessors
// ---------
}
// get the currently selected page or wxNOT_FOUND if none
- int GetSelection() const { return m_selection; }
+ virtual int GetSelection() const { return m_selection; }
// set/get the title of a page
virtual bool SetPageText(size_t n, const wxString& strText) = 0;
// images belong to the same image list)
// ---------------------------------------------------------------------
- // sets the image list to use, it is *not* deleted by the control
- virtual void SetImageList(wxImageList *imageList);
-
- // as SetImageList() but we will delete the image list ourselves
- void AssignImageList(wxImageList *imageList);
-
- // get pointer (may be NULL) to the associated image list
- wxImageList* GetImageList() const { return m_imageList; }
-
// sets/returns item's image index in the current image list
virtual int GetPageImage(size_t n) const = 0;
virtual bool SetPageImage(size_t n, int imageId) = 0;
virtual bool AddPage(wxWindow *page,
const wxString& text,
bool bSelect = false,
- int imageId = -1)
+ int imageId = NO_IMAGE)
{
DoInvalidateBestSize();
return InsertPage(GetPageCount(), page, text, bSelect, imageId);
wxWindow *page,
const wxString& text,
bool bSelect = false,
- int imageId = -1) = 0;
+ int imageId = NO_IMAGE) = 0;
// set the currently selected page, return the index of the previously
// selected one (or wxNOT_FOUND on error)
// the array of all pages of this control
wxArrayPages m_pages;
- // the associated image list or NULL
- wxImageList *m_imageList;
-
- // true if we must delete m_imageList
- bool m_ownsImageList;
-
// get the page area
virtual wxRect GetPageRect() const;