#if defined(__WXGTK20__)
// for testing
- // #define wxUSE_GENERICDATAVIEWCTRL 1
+ #define wxUSE_GENERICDATAVIEWCTRL 1
#elif defined(__WXMAC__)
#define wxUSE_GENERICDATAVIEWCTRL 1
#else
wxDATAVIEW_COL_HIDDEN = 4
};
+enum wxDataViewColumnSizing
+{
+ wxDATAVIEW_COL_WIDTH_FIXED,
+ wxDATAVIEW_COL_WIDTH_AUTO,
+ wxDATAVIEW_COL_WIDTH_GROW
+};
+
class wxDataViewColumnBase: public wxObject
{
public:
- wxDataViewColumnBase( const wxString &title, wxDataViewCell *cell, size_t model_column, int flags = 0 );
+ wxDataViewColumnBase( const wxString &title, wxDataViewCell *cell, size_t model_column,
+ int fixed_width = 80, wxDataViewColumnSizing sizing = wxDATAVIEW_COL_WIDTH_FIXED, int flags = 0 );
~wxDataViewColumnBase();
virtual void SetTitle( const wxString &title );
void SetOwner( wxDataViewCtrl *owner ) { m_owner = owner; }
wxDataViewCtrl *GetOwner() { return m_owner; }
+ virtual int GetWidth() = 0;
+
+ virtual void SetFixedWidth( int width ) = 0;
+ virtual int GetFixedWidth() = 0;
+
private:
wxDataViewCtrl *m_ctrl;
wxDataViewCell *m_cell;
// wxDataViewCtrlBase
// ---------------------------------------------------------
+#define wxDV_SINGLE 0x0000 // for convenience
+#define wxDV_MULTIPLE 0x0020 // can select multiple items
+
class wxDataViewCtrlBase: public wxControl
{
public:
#elif defined(__WXGTK20__)
#include "wx/gtk/dataview.h"
#elif defined(__WXMAC__)
- #include "wx/mac/dataview.h"
+ // TODO
+ // #include "wx/mac/dataview.h"
#else
#include "wx/generic/dataview.h"
#endif