2006-02-21 17:35:19 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/gtk/dataview.h
|
|
|
|
// Purpose: wxDataViewCtrl GTK+2 implementation header
|
|
|
|
// Author: Robert Roebling
|
|
|
|
// Id: $Id$
|
|
|
|
// Copyright: (c) 1998 Robert Roebling
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef __GTKDATAVIEWCTRLH__
|
|
|
|
#define __GTKDATAVIEWCTRLH__
|
|
|
|
|
|
|
|
#include "wx/defs.h"
|
|
|
|
#include "wx/object.h"
|
|
|
|
#include "wx/list.h"
|
|
|
|
#include "wx/control.h"
|
|
|
|
|
|
|
|
// ---------------------------------------------------------
|
|
|
|
// classes
|
|
|
|
// ---------------------------------------------------------
|
|
|
|
|
2007-07-09 10:09:52 +00:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxDataViewCtrl;
|
2007-07-17 22:01:47 +00:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxDataViewCtrlInternal;
|
2006-02-21 17:35:19 +00:00
|
|
|
|
2007-02-17 12:32:38 +00:00
|
|
|
|
2006-02-23 02:04:46 +00:00
|
|
|
// ---------------------------------------------------------
|
2006-10-03 15:24:03 +00:00
|
|
|
// wxDataViewRenderer
|
2006-02-23 02:04:46 +00:00
|
|
|
// ---------------------------------------------------------
|
|
|
|
|
2006-10-03 15:24:03 +00:00
|
|
|
class wxDataViewRenderer: public wxDataViewRendererBase
|
2006-02-23 02:04:46 +00:00
|
|
|
{
|
|
|
|
public:
|
2007-02-17 12:32:38 +00:00
|
|
|
wxDataViewRenderer( const wxString &varianttype,
|
2007-02-23 07:57:46 +00:00
|
|
|
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
|
|
|
|
int align = wxDVR_DEFAULT_ALIGNMENT );
|
2006-02-23 02:04:46 +00:00
|
|
|
|
2007-02-23 07:57:46 +00:00
|
|
|
virtual void SetMode( wxDataViewCellMode mode );
|
|
|
|
virtual wxDataViewCellMode GetMode() const;
|
|
|
|
|
|
|
|
virtual void SetAlignment( int align );
|
|
|
|
virtual int GetAlignment() const;
|
2006-02-23 02:04:46 +00:00
|
|
|
|
2007-08-25 21:05:51 +00:00
|
|
|
// implementation
|
|
|
|
GtkCellRenderer* GetGtkHandle() { return m_renderer; }
|
|
|
|
void GtkInitHandlers();
|
|
|
|
|
2006-02-23 02:04:46 +00:00
|
|
|
protected:
|
2007-05-09 10:38:15 +00:00
|
|
|
GtkCellRenderer *m_renderer;
|
2006-02-23 02:04:46 +00:00
|
|
|
|
|
|
|
protected:
|
2006-10-03 15:24:03 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewRenderer)
|
2006-02-23 02:04:46 +00:00
|
|
|
};
|
2007-02-23 07:57:46 +00:00
|
|
|
|
2006-02-23 02:04:46 +00:00
|
|
|
// ---------------------------------------------------------
|
2006-10-03 15:24:03 +00:00
|
|
|
// wxDataViewTextRenderer
|
2006-02-23 02:04:46 +00:00
|
|
|
// ---------------------------------------------------------
|
|
|
|
|
2006-10-03 15:24:03 +00:00
|
|
|
class wxDataViewTextRenderer: public wxDataViewRenderer
|
2006-02-23 02:04:46 +00:00
|
|
|
{
|
|
|
|
public:
|
2006-10-03 15:24:03 +00:00
|
|
|
wxDataViewTextRenderer( const wxString &varianttype = wxT("string"),
|
2007-02-23 07:57:46 +00:00
|
|
|
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
|
|
|
|
int align = wxDVR_DEFAULT_ALIGNMENT );
|
2006-02-23 02:04:46 +00:00
|
|
|
|
2006-02-23 03:04:15 +00:00
|
|
|
bool SetValue( const wxVariant &value );
|
2007-02-23 07:57:46 +00:00
|
|
|
bool GetValue( wxVariant &value ) const;
|
|
|
|
|
|
|
|
void SetAlignment( int align );
|
|
|
|
|
2006-02-23 02:04:46 +00:00
|
|
|
protected:
|
2006-10-03 15:24:03 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewTextRenderer)
|
2006-02-23 02:04:46 +00:00
|
|
|
};
|
|
|
|
|
2006-09-26 22:17:00 +00:00
|
|
|
// ---------------------------------------------------------
|
2006-10-03 15:24:03 +00:00
|
|
|
// wxDataViewBitmapRenderer
|
2006-09-26 22:17:00 +00:00
|
|
|
// ---------------------------------------------------------
|
|
|
|
|
2006-10-03 15:24:03 +00:00
|
|
|
class wxDataViewBitmapRenderer: public wxDataViewRenderer
|
2006-09-26 22:17:00 +00:00
|
|
|
{
|
|
|
|
public:
|
2006-10-03 15:24:03 +00:00
|
|
|
wxDataViewBitmapRenderer( const wxString &varianttype = wxT("wxBitmap"),
|
2007-02-23 07:57:46 +00:00
|
|
|
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
|
|
|
|
int align = wxDVR_DEFAULT_ALIGNMENT );
|
2006-09-26 22:17:00 +00:00
|
|
|
|
|
|
|
bool SetValue( const wxVariant &value );
|
2007-02-23 07:57:46 +00:00
|
|
|
bool GetValue( wxVariant &value ) const;
|
2006-09-26 22:17:00 +00:00
|
|
|
|
|
|
|
protected:
|
2006-10-03 15:24:03 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewBitmapRenderer)
|
2006-09-26 22:17:00 +00:00
|
|
|
};
|
|
|
|
|
2006-02-24 13:19:23 +00:00
|
|
|
// ---------------------------------------------------------
|
2006-10-03 15:24:03 +00:00
|
|
|
// wxDataViewToggleRenderer
|
2006-02-24 13:19:23 +00:00
|
|
|
// ---------------------------------------------------------
|
|
|
|
|
2006-10-03 15:24:03 +00:00
|
|
|
class wxDataViewToggleRenderer: public wxDataViewRenderer
|
2006-02-24 13:19:23 +00:00
|
|
|
{
|
|
|
|
public:
|
2006-10-03 15:24:03 +00:00
|
|
|
wxDataViewToggleRenderer( const wxString &varianttype = wxT("bool"),
|
2007-02-23 07:57:46 +00:00
|
|
|
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
|
|
|
|
int align = wxDVR_DEFAULT_ALIGNMENT );
|
2006-02-24 13:19:23 +00:00
|
|
|
|
|
|
|
bool SetValue( const wxVariant &value );
|
2007-02-23 07:57:46 +00:00
|
|
|
bool GetValue( wxVariant &value ) const;
|
2006-02-24 13:19:23 +00:00
|
|
|
|
|
|
|
protected:
|
2006-10-03 15:24:03 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewToggleRenderer)
|
2006-02-24 13:19:23 +00:00
|
|
|
};
|
|
|
|
|
2006-02-24 18:19:55 +00:00
|
|
|
// ---------------------------------------------------------
|
2006-10-03 15:24:03 +00:00
|
|
|
// wxDataViewCustomRenderer
|
2006-02-24 18:19:55 +00:00
|
|
|
// ---------------------------------------------------------
|
|
|
|
|
2006-10-03 15:24:03 +00:00
|
|
|
class wxDataViewCustomRenderer: public wxDataViewRenderer
|
2006-02-24 18:19:55 +00:00
|
|
|
{
|
|
|
|
public:
|
2006-10-03 15:24:03 +00:00
|
|
|
wxDataViewCustomRenderer( const wxString &varianttype = wxT("string"),
|
|
|
|
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
|
2007-02-23 07:57:46 +00:00
|
|
|
int align = wxDVR_DEFAULT_ALIGNMENT,
|
2006-10-03 15:24:03 +00:00
|
|
|
bool no_init = false );
|
|
|
|
virtual ~wxDataViewCustomRenderer();
|
2007-02-23 07:57:46 +00:00
|
|
|
|
|
|
|
|
2006-02-24 18:19:55 +00:00
|
|
|
virtual bool Render( wxRect cell, wxDC *dc, int state ) = 0;
|
2007-02-23 07:57:46 +00:00
|
|
|
virtual wxSize GetSize() const = 0;
|
|
|
|
|
2006-02-26 15:48:42 +00:00
|
|
|
virtual bool Activate( wxRect cell,
|
2007-07-05 00:13:28 +00:00
|
|
|
wxDataViewModel *model, const wxDataViewItem &item, unsigned int col )
|
2006-02-26 15:48:42 +00:00
|
|
|
{ return false; }
|
2007-02-23 07:57:46 +00:00
|
|
|
|
2006-02-26 15:48:42 +00:00
|
|
|
virtual bool LeftClick( wxPoint cursor, wxRect cell,
|
2007-07-05 00:13:28 +00:00
|
|
|
wxDataViewModel *model, const wxDataViewItem &item, unsigned int col )
|
2006-02-26 15:48:42 +00:00
|
|
|
{ return false; }
|
|
|
|
virtual bool RightClick( wxPoint cursor, wxRect cell,
|
2007-07-05 00:13:28 +00:00
|
|
|
wxDataViewModel *model, const wxDataViewItem &item, unsigned int col )
|
2006-02-26 15:48:42 +00:00
|
|
|
{ return false; }
|
|
|
|
virtual bool StartDrag( wxPoint cursor, wxRect cell,
|
2007-07-05 00:13:28 +00:00
|
|
|
wxDataViewModel *model, const wxDataViewItem &item, unsigned int col )
|
2006-02-26 15:48:42 +00:00
|
|
|
{ return false; }
|
2006-02-24 18:19:55 +00:00
|
|
|
|
|
|
|
// Create DC on request
|
|
|
|
virtual wxDC *GetDC();
|
|
|
|
|
2007-02-23 07:57:46 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
bool Init(wxDataViewCellMode mode, int align);
|
|
|
|
|
2006-02-24 18:19:55 +00:00
|
|
|
private:
|
|
|
|
wxDC *m_dc;
|
|
|
|
|
|
|
|
protected:
|
2006-10-03 15:24:03 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewCustomRenderer)
|
2006-02-24 18:19:55 +00:00
|
|
|
};
|
|
|
|
|
2006-02-25 13:13:05 +00:00
|
|
|
// ---------------------------------------------------------
|
2006-10-03 15:24:03 +00:00
|
|
|
// wxDataViewProgressRenderer
|
2006-02-25 13:13:05 +00:00
|
|
|
// ---------------------------------------------------------
|
|
|
|
|
2006-10-03 15:24:03 +00:00
|
|
|
class wxDataViewProgressRenderer: public wxDataViewCustomRenderer
|
2006-02-25 13:13:05 +00:00
|
|
|
{
|
|
|
|
public:
|
2006-10-03 15:24:03 +00:00
|
|
|
wxDataViewProgressRenderer( const wxString &label = wxEmptyString,
|
|
|
|
const wxString &varianttype = wxT("long"),
|
2007-02-23 07:57:46 +00:00
|
|
|
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
|
|
|
|
int align = wxDVR_DEFAULT_ALIGNMENT );
|
2006-10-03 15:24:03 +00:00
|
|
|
virtual ~wxDataViewProgressRenderer();
|
2006-02-25 13:13:05 +00:00
|
|
|
|
|
|
|
bool SetValue( const wxVariant &value );
|
2007-02-23 07:57:46 +00:00
|
|
|
bool GetValue( wxVariant &value ) const;
|
2006-02-25 13:13:05 +00:00
|
|
|
|
|
|
|
virtual bool Render( wxRect cell, wxDC *dc, int state );
|
2007-02-23 07:57:46 +00:00
|
|
|
virtual wxSize GetSize() const;
|
2006-02-25 13:13:05 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
wxString m_label;
|
|
|
|
int m_value;
|
|
|
|
|
|
|
|
protected:
|
2006-10-03 15:24:03 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewProgressRenderer)
|
2006-02-25 13:13:05 +00:00
|
|
|
};
|
|
|
|
|
2007-08-29 11:48:12 +00:00
|
|
|
// ---------------------------------------------------------
|
|
|
|
// wxDataViewIconTextRenderer
|
|
|
|
// ---------------------------------------------------------
|
|
|
|
|
|
|
|
class wxDataViewIconTextRenderer: public wxDataViewCustomRenderer
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxDataViewIconTextRenderer( const wxString &varianttype = wxT("wxDataViewIconText"),
|
|
|
|
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
|
|
|
|
int align = wxDVR_DEFAULT_ALIGNMENT );
|
|
|
|
virtual ~wxDataViewIconTextRenderer();
|
|
|
|
|
|
|
|
bool SetValue( const wxVariant &value );
|
|
|
|
bool GetValue( wxVariant &value ) const;
|
|
|
|
|
|
|
|
virtual bool Render( wxRect cell, wxDC *dc, int state );
|
|
|
|
virtual wxSize GetSize() const;
|
|
|
|
|
|
|
|
virtual bool HasEditorCtrl() { return true; }
|
|
|
|
virtual wxControl* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value );
|
|
|
|
virtual bool GetValueFromEditorCtrl( wxControl* editor, wxVariant &value );
|
|
|
|
|
|
|
|
private:
|
|
|
|
wxDataViewIconText m_value;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewIconTextRenderer)
|
|
|
|
};
|
|
|
|
|
2006-02-26 15:48:42 +00:00
|
|
|
// ---------------------------------------------------------
|
2006-10-03 15:24:03 +00:00
|
|
|
// wxDataViewDateRenderer
|
2006-02-26 15:48:42 +00:00
|
|
|
// ---------------------------------------------------------
|
|
|
|
|
2006-10-03 15:24:03 +00:00
|
|
|
class wxDataViewDateRenderer: public wxDataViewCustomRenderer
|
2006-02-26 15:48:42 +00:00
|
|
|
{
|
|
|
|
public:
|
2006-10-03 15:24:03 +00:00
|
|
|
wxDataViewDateRenderer( const wxString &varianttype = wxT("datetime"),
|
2007-02-23 07:57:46 +00:00
|
|
|
wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE,
|
|
|
|
int align = wxDVR_DEFAULT_ALIGNMENT );
|
2006-02-26 15:48:42 +00:00
|
|
|
|
|
|
|
bool SetValue( const wxVariant &value );
|
2007-02-23 07:57:46 +00:00
|
|
|
bool GetValue( wxVariant &value ) const;
|
2006-02-26 15:48:42 +00:00
|
|
|
|
|
|
|
virtual bool Render( wxRect cell, wxDC *dc, int state );
|
2007-02-23 07:57:46 +00:00
|
|
|
virtual wxSize GetSize() const;
|
2006-02-26 15:48:42 +00:00
|
|
|
virtual bool Activate( wxRect cell,
|
2007-07-05 00:13:28 +00:00
|
|
|
wxDataViewModel *model, const wxDataViewItem &item, unsigned int col );
|
2006-02-26 15:48:42 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
wxDateTime m_date;
|
|
|
|
|
|
|
|
protected:
|
2006-10-03 15:24:03 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewDateRenderer)
|
2006-02-26 15:48:42 +00:00
|
|
|
};
|
|
|
|
|
2006-02-22 00:19:04 +00:00
|
|
|
// ---------------------------------------------------------
|
|
|
|
// wxDataViewColumn
|
|
|
|
// ---------------------------------------------------------
|
|
|
|
|
|
|
|
class WXDLLIMPEXP_CORE wxDataViewColumn: public wxDataViewColumnBase
|
|
|
|
{
|
|
|
|
public:
|
2007-02-17 12:32:38 +00:00
|
|
|
wxDataViewColumn( const wxString &title, wxDataViewRenderer *renderer,
|
|
|
|
unsigned int model_column, int width = wxDVC_DEFAULT_WIDTH,
|
|
|
|
wxAlignment align = wxALIGN_CENTER,
|
|
|
|
int flags = wxDATAVIEW_COL_RESIZABLE );
|
|
|
|
wxDataViewColumn( const wxBitmap &bitmap, wxDataViewRenderer *renderer,
|
|
|
|
unsigned int model_column, int width = wxDVC_DEFAULT_WIDTH,
|
|
|
|
wxAlignment align = wxALIGN_CENTER,
|
|
|
|
int flags = wxDATAVIEW_COL_RESIZABLE );
|
|
|
|
|
2006-02-22 00:19:04 +00:00
|
|
|
virtual ~wxDataViewColumn();
|
|
|
|
|
2007-02-23 07:57:46 +00:00
|
|
|
|
|
|
|
// setters:
|
|
|
|
|
2006-02-22 00:19:04 +00:00
|
|
|
virtual void SetTitle( const wxString &title );
|
2006-10-05 19:06:21 +00:00
|
|
|
virtual void SetBitmap( const wxBitmap &bitmap );
|
2006-10-05 19:35:23 +00:00
|
|
|
|
2006-11-01 15:24:48 +00:00
|
|
|
virtual void SetOwner( wxDataViewCtrl *owner );
|
|
|
|
|
2006-10-05 19:35:23 +00:00
|
|
|
virtual void SetAlignment( wxAlignment align );
|
2006-10-06 09:50:45 +00:00
|
|
|
|
|
|
|
virtual void SetSortable( bool sortable );
|
2006-10-05 19:35:23 +00:00
|
|
|
virtual void SetSortOrder( bool ascending );
|
|
|
|
|
2007-02-23 07:57:46 +00:00
|
|
|
virtual void SetResizeable( bool resizeable );
|
|
|
|
virtual void SetHidden( bool hidden );
|
|
|
|
|
|
|
|
virtual void SetMinWidth( int minWidth );
|
|
|
|
virtual void SetWidth( int width );
|
|
|
|
|
|
|
|
|
|
|
|
// getters:
|
|
|
|
|
|
|
|
virtual wxString GetTitle() const;
|
|
|
|
virtual wxAlignment GetAlignment() const;
|
|
|
|
|
2007-02-17 12:32:38 +00:00
|
|
|
virtual bool IsSortable() const;
|
|
|
|
virtual bool IsSortOrderAscending() const;
|
2007-02-23 07:57:46 +00:00
|
|
|
virtual bool IsResizeable() const;
|
|
|
|
virtual bool IsHidden() const;
|
2007-02-17 12:32:38 +00:00
|
|
|
|
|
|
|
virtual int GetWidth() const;
|
2007-02-23 07:57:46 +00:00
|
|
|
virtual int GetMinWidth() const;
|
|
|
|
|
2006-02-22 00:19:04 +00:00
|
|
|
// implementation
|
2007-02-23 07:57:46 +00:00
|
|
|
GtkWidget* GetGtkHandle() { return m_column; }
|
2006-02-22 00:19:04 +00:00
|
|
|
|
|
|
|
private:
|
2006-02-23 02:04:46 +00:00
|
|
|
// holds the GTK handle
|
2007-02-23 07:57:46 +00:00
|
|
|
GtkWidget *m_column;
|
2006-10-06 09:50:45 +00:00
|
|
|
|
|
|
|
// delayed connection to mouse events
|
|
|
|
friend class wxDataViewCtrl;
|
|
|
|
void OnInternalIdle();
|
2007-02-23 07:57:46 +00:00
|
|
|
bool m_isConnected;
|
|
|
|
|
|
|
|
void Init(wxAlignment align, int flags, int width);
|
|
|
|
|
2006-02-22 00:19:04 +00:00
|
|
|
protected:
|
|
|
|
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewColumn)
|
|
|
|
};
|
|
|
|
|
2007-08-26 10:05:16 +00:00
|
|
|
WX_DECLARE_LIST(wxDataViewColumn, wxDataViewColumnList );
|
|
|
|
|
2006-02-21 17:35:19 +00:00
|
|
|
// ---------------------------------------------------------
|
|
|
|
// wxDataViewCtrl
|
|
|
|
// ---------------------------------------------------------
|
|
|
|
|
|
|
|
class WXDLLIMPEXP_CORE wxDataViewCtrl: public wxDataViewCtrlBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxDataViewCtrl()
|
|
|
|
{
|
|
|
|
Init();
|
|
|
|
}
|
|
|
|
|
|
|
|
wxDataViewCtrl( wxWindow *parent, wxWindowID id,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize, long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator )
|
|
|
|
{
|
|
|
|
Create(parent, id, pos, size, style, validator );
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual ~wxDataViewCtrl();
|
|
|
|
|
|
|
|
void Init();
|
|
|
|
|
|
|
|
bool Create(wxWindow *parent, wxWindowID id,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize, long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator );
|
|
|
|
|
2007-07-05 00:13:28 +00:00
|
|
|
virtual bool AssociateModel( wxDataViewModel *model );
|
2007-08-26 10:05:16 +00:00
|
|
|
|
2006-02-25 14:07:06 +00:00
|
|
|
virtual bool AppendColumn( wxDataViewColumn *col );
|
2007-08-26 10:05:16 +00:00
|
|
|
virtual unsigned int GetColumnCount() const;
|
|
|
|
virtual wxDataViewColumn* GetColumn( unsigned int pos ) const;
|
|
|
|
virtual bool DeleteColumn( wxDataViewColumn *column );
|
|
|
|
virtual bool ClearColumns();
|
2007-07-14 13:54:14 +00:00
|
|
|
|
2007-09-13 12:57:40 +00:00
|
|
|
virtual wxDataViewColumn *GetSortingColumn() const;
|
|
|
|
|
2007-08-24 11:21:52 +00:00
|
|
|
virtual wxDataViewItem GetSelection() const;
|
2007-08-19 20:11:34 +00:00
|
|
|
virtual int GetSelections( wxDataViewItemArray & sel ) const;
|
|
|
|
virtual void SetSelections( const wxDataViewItemArray & sel );
|
|
|
|
virtual void Select( const wxDataViewItem & item );
|
|
|
|
virtual void Unselect( const wxDataViewItem & item );
|
|
|
|
virtual bool IsSelected( const wxDataViewItem & item ) const;
|
|
|
|
virtual void SelectAll();
|
|
|
|
virtual void UnselectAll();
|
|
|
|
|
2007-08-24 11:21:52 +00:00
|
|
|
virtual void EnsureVisible( const wxDataViewItem& item,
|
|
|
|
const wxDataViewColumn *column = NULL );
|
2007-08-20 17:26:11 +00:00
|
|
|
virtual void HitTest( const wxPoint &point,
|
2007-08-24 11:21:52 +00:00
|
|
|
wxDataViewItem &item,
|
2007-08-24 20:00:32 +00:00
|
|
|
wxDataViewColumn *&column ) const;
|
2007-08-20 17:26:11 +00:00
|
|
|
virtual wxRect GetItemRect( const wxDataViewItem &item,
|
2007-08-24 11:21:52 +00:00
|
|
|
const wxDataViewColumn *column = NULL ) const;
|
2007-08-20 17:26:11 +00:00
|
|
|
|
2007-08-25 21:05:51 +00:00
|
|
|
virtual void Expand( const wxDataViewItem & item );
|
|
|
|
virtual void Collapse( const wxDataViewItem & item );
|
2007-08-20 17:26:11 +00:00
|
|
|
|
2006-11-01 15:24:48 +00:00
|
|
|
static wxVisualAttributes
|
|
|
|
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
2006-10-03 11:39:08 +00:00
|
|
|
|
2007-04-17 12:08:10 +00:00
|
|
|
wxWindow *GetMainWindow() { return (wxWindow*) this; }
|
2007-07-17 22:01:47 +00:00
|
|
|
|
|
|
|
GtkWidget *GtkGetTreeView() { return m_treeview; }
|
|
|
|
wxDataViewCtrlInternal* GtkGetInternal() { return m_internal; }
|
2007-07-12 12:58:28 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void DoSetExpanderColumn();
|
|
|
|
virtual void DoSetIndent();
|
|
|
|
|
2006-02-25 14:07:06 +00:00
|
|
|
private:
|
|
|
|
friend class wxDataViewCtrlDC;
|
2006-10-06 09:50:45 +00:00
|
|
|
friend class wxDataViewColumn;
|
2007-07-05 00:13:28 +00:00
|
|
|
friend class wxGtkDataViewModelNotifier;
|
|
|
|
GtkWidget *m_treeview;
|
|
|
|
wxDataViewModelNotifier *m_notifier;
|
2007-07-17 22:01:47 +00:00
|
|
|
wxDataViewCtrlInternal *m_internal;
|
2007-08-26 10:05:16 +00:00
|
|
|
wxDataViewColumnList m_cols;
|
2007-07-12 12:58:28 +00:00
|
|
|
|
2006-02-21 17:35:19 +00:00
|
|
|
|
2006-10-06 09:50:45 +00:00
|
|
|
virtual void OnInternalIdle();
|
|
|
|
|
2007-05-30 20:31:53 +00:00
|
|
|
void GtkEnableSelectionEvents();
|
|
|
|
void GtkDisableSelectionEvents();
|
|
|
|
|
2006-02-21 17:35:19 +00:00
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxDataViewCtrl)
|
|
|
|
DECLARE_NO_COPY_CLASS(wxDataViewCtrl)
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // __GTKDATAVIEWCTRLH__
|