GtkOL Reference Manual |
---|
<ctreeview selection="single|multiple|browse|none" selected="[UInt32[,UInt32]]" expanded="[UInt32[,UInt32]]"> <ctreeview-model> <ctreeview-field name="string" tag="signature"> [ <ctreeview-field name="string" tag="signature"> ... ] </ctreeview-model> ... </ctreeview> <ctreeviewitem> <fields> ... </fields> </ctreeviewitem> |
DECLARE_DYNAMIC_METACLASS ('trvw', CTreeView, CContainer); DECLARE_GENERIC_METACLASS ('_trw', CTreeViewListener, CWidgetListener); DECLARE_DYNAMIC_METACLASS ('trwi', CTreeViewItem, CControl); DECLARE_DYNAMIC_METACLASS ('_tpi', CTreeViewItemFieldValueAPIListener, CItemFieldValueAPIListener); |
#include "ccontainer.h" #include "citemfieldvalue.h" class CTreeView; class CTreeViewListener; class CTreeViewItem; typedef NServices::TBuffer <CTreeViewItem *> CTreeViewItems; class CTreeViewListener : public CWidgetListener { public : CTreeViewListener (); virtual ~CTreeViewListener () =0; public : virtual void OnItemQuerySelect (CObject *inSender, CObject *inItem, const Bool inCurrent, Bool &ioDoToggle) { } virtual void OnItemSelectionChanged (CObject *inSender) { } virtual void OnItemActivated (CObject *inSender, CObject *inItem) { } virtual void OnItemQueryExpand (CObject *inSender, CObject *inItem, Bool &ioExpand) { } virtual void OnItemExpanded (CObject *inSender, CObject *inItem) { } virtual void OnItemQueryCollapse (CObject *inSender, CObject *inItem, Bool &ioCollapse) { } virtual void OnItemCollapsed (CObject *inSender, CObject *inItem) { } virtual void OnItemToggled (CObject *inSender, CObject *inItem, const size_t inIndex, Bool &ioDoChange) { } virtual void OnItemEdited (CObject *inSender, CObject *inItem, const size_t inIndex, CString &ioNewString, Bool &ioDoChange) { } SECTION_GENERIC_METACLASS; }; class CTreeView : public CContainer { public : CTreeView (CContainer *inOwner=NULL, const CMetaClasses &inModel=_IFVString_, const CTreeViewListener *inListener=NULL) THROWABLE; virtual ~CTreeView (); protected : virtual GtkWidget * PerformWidgetInstanciate (); virtual void PerformWidgetInitialize (); public : virtual const CMetaClass * ListenerMustBe () const; virtual CMetaClasses OwnerMustBe () const; virtual CMetaClasses ChildMustBe () const; virtual CControl * GetControlAtPoint (const TPoint &inRelativePoint) const; Bool SetModel (const CMetaClasses &inModel); CMetaClasses GetModel () const; virtual void SetSelectionMode (const GtkSelectionMode inSelectionMode); GtkSelectionMode GetSelectionMode () const; CTreeViewItems GetSelection () const; virtual void Serialize (CXMLElementNode *&ioXMLElementNode, const int inMode) THROWABLE; protected : CMetaClasses m_Model; CStrings m_ColumnsTitle; static void OnItemEdited (GtkCellRendererText *, const gchar *, const gchar *, gpointer); static void OnItemToggled (GtkCellRendererToggle *, gchar *, gpointer); static void OnItemActivated (GtkTreeView *, GtkTreePath *, GtkTreeViewColumn *, gpointer); static gboolean OnItemQueryExpand (GtkTreeView *, GtkTreeIter *, GtkTreePath *, gpointer); static gboolean OnItemQueryCollapse (GtkTreeView *, GtkTreeIter *, GtkTreePath *, gpointer); static void OnItemExpanded (GtkTreeView *, GtkTreeIter *, GtkTreePath *, gpointer); static void OnItemCollapsed (GtkTreeView *, GtkTreeIter *, GtkTreePath *, gpointer); static gboolean OnItemQuerySelect (GtkTreeSelection *, GtkTreeModel *, GtkTreePath *, gboolean, gpointer); static void OnItemSelectionChanged (GtkTreeSelection *, gpointer); SECTION_DYNAMIC_METACLASS; }; class CTreeViewItem : public CControl { public : CTreeViewItem (CTreeView *inOwner=NULL, const CItemFieldValues &inFieldValues=CItemFieldValues(), const CObjectListener *inListener=NULL); CTreeViewItem (CTreeViewItem *inOwner, const CItemFieldValues &inFieldValues=CItemFieldValues(), const CObjectListener *inListener=NULL); virtual ~CTreeViewItem (); public : GtkTreeIter * GetGtkTreeIter () const; static CTreeViewItem * GetTreeViewItem (const GtkTreeIter *inGtkTreeIter); virtual CMetaClasses OwnerMustBe () const; virtual CMetaClasses ChildMustBe () const; virtual bool SetOwner (CComponent *inOwner, const SInt16 inIndex=-1); virtual TBounds GetBounds () const; virtual CPixbuf * GetControlPixbuf () const; virtual Bool SetItemFieldValues (const CItemFieldValues &inItemFieldValues); CItemFieldValues GetItemFieldValues () const; CItemFieldValue & operator [] (const size_t inIndex) const; virtual void Select (const bool inSelect=true); virtual bool IsSelected () const; virtual void Expand (const bool inAll=false); virtual void Collapse (); virtual Bool IsExpanded () const; virtual void Serialize (CXMLElementNode *&ioXMLElementNode, const int inMode) THROWABLE; protected : GtkTreeIter m_GtkTreeIter; CItemFieldValues m_ItemFieldValues; friend class CTreeView; SECTION_DYNAMIC_METACLASS; }; class CTreeViewItemFieldValueAPIListener : public CItemFieldValueAPIListener { public : virtual void OnStateChange (CObject *); SECTION_DYNAMIC_METACLASS; }; |
virtual
void
CTreeViewListener::OnItemQuerySelect (CObject *inSender, CObject *inItem, const Bool inCurrent, Bool &ioDoToggle); |
virtual void CTreeViewListener::OnItemSelectionChanged (CObject *inSender); |
virtual
void
CTreeViewListener::OnItemActivated
(CObject *inSender, CObject *inItem); |
virtual
void
CTreeViewListener::OnItemQueryExpand (CObject *inSender, CObject *inItem, Bool &ioExpand); |
virtual
void
CTreeViewListener::OnItemExpanded
(CObject *inSender, CObject *inItem); |
virtual void CTreeViewListener::OnItemQueryCollapse (CObject *inSender, CObject *inItem, Bool &ioCollapse); |
virtual
void
CTreeViewListener::OnItemCollapsed
(CObject *inSender, CObject *inItem); |
virtual
void
CTreeViewListener::OnItemToggled
(CObject *inSender, CObject *inItem, const size_t inIndex, Bool &ioDoChange); |
virtual
void
CTreeViewListener::OnItemEdited
(CObject *inSender, CObject *inItem, const size_t inIndex, CString &ioNewString, Bool &ioDoChange); |
CTreeViewItem::CTreeViewItem (CTreeView *inOwner=NULL, const CItemFieldValues &inFieldValues=CItemFieldValues(), const CObjectListener *inListener=NULL); |
CTreeViewItem::CTreeViewItem
(CTreeViewItem
*inOwner, const CItemFieldValues &inFieldValues=CItemFieldValues(), const CObjectListener *inListener=NULL); |
virtual CTreeViewItem::~CTreeViewItem (); |
GtkTreeIter
*
CTreeViewItem::GetGtkTreeIter
() const; |
static CTreeViewItem * CTreeViewItem::GetTreeViewItem (const GtkTreeIter *inGtkTreeIter); |
virtual CMetaClasses CTreeViewItem::OwnerMustBe () const; |
virtual CMetaClasses CTreeViewItem::ChildMustBe () const; |
virtual
bool
CTreeViewItem::SetOwner
(CComponent *inOwner, const SInt16 inIndex=-1); |
virtual
TBounds
CTreeViewItem::GetBounds
() const; |
virtual CPixbuf * CTreeViewItem::GetControlPixbuf () const; |
virtual Bool CTreeViewItem::SetItemFieldValues (const CItemFieldValues &inItemFieldValues); |
CItemFieldValues CTreeViewItem::GetItemFieldValues () const; |
CItemFieldValue & CTreeViewItem::operator [] (const size_t inIndex) const; |
virtual
void
CTreeViewItem::Select
(const bool inSelect=true); |
virtual
bool
CTreeViewItem::IsSelected
() const; |
virtual
void
CTreeViewItem::Expand
(const bool inAll=false); |
virtual
void
CTreeViewItem::Collapse
(); |
virtual
Bool
CTreeViewItem::IsExpanded
() const; |
virtual
void
CTreeViewItem::Serialize
(CXMLElementNode *&ioXMLElementNode, const int inMode) THROWABLE; |
GtkTreeIter CTreeViewItem::m_GtkTreeIter; |
CItemFieldValues CTreeViewItem::m_ItemFieldValues; |
CTreeView::CTreeView (CContainer *inOwner=NULL, const CMetaClasses &inModel=_IFVString_, const CTreeViewListener *inListener=NULL) THROWABLE; |
virtual CTreeView::~CTreeView (); |
virtual GtkWidget * CTreeView::PerformWidgetInstanciate (); |
virtual void CTreeView::PerformWidgetInitialize (); |
virtual const CMetaClass * CTreeView::ListenerMustBe
() const; |
virtual CMetaClasses CTreeView::OwnerMustBe () const; |
virtual CMetaClasses CTreeView::ChildMustBe () const; |
virtual CControl * CTreeView::GetControlAtPoint (const TPoint &inRelativePoint) const; |
Bool
CTreeView::SetModel
(const CMetaClasses &inModel); |
CMetaClasses
CTreeView::GetModel
() const; |
virtual
void
CTreeView::SetSelectionMode
(const GtkSelectionMode inSelectionMode); |
GtkSelectionMode CTreeView::GetSelectionMode () const; |
CTreeViewItems
CTreeView::GetSelection
() const; |
virtual
void
CTreeView::Serialize
(CXMLElementNode *&ioXMLElementNode, const int inMode) THROWABLE; |
CMetaClasses CTreeView::m_Model; |
CStrings
CTreeView::m_ColumnsTitle; |
static
void
CTreeView::OnItemEdited
(GtkCellRendererText *, const gchar *, const gchar *, gpointer); |
static
void
CTreeView::OnItemToggled
(GtkCellRendererToggle *, gchar *, gpointer); |
static
void
CTreeView::OnItemActivated
(GtkTreeView *, GtkTreePath *, GtkTreeViewColumn *, gpointer); |
static
gboolean
CTreeView::OnItemQueryExpand (GtkTreeView *, GtkTreeIter *, GtkTreePath *, gpointer); |
static gboolean CTreeView::OnItemQueryCollapse (GtkTreeView *, GtkTreeIter *, GtkTreePath *, gpointer); |
static
void
CTreeView::OnItemExpanded
(GtkTreeView *, GtkTreeIter *, GtkTreePath *, gpointer); |
static
void
CTreeView::OnItemCollapsed
(GtkTreeView *, GtkTreeIter *, GtkTreePath *, gpointer); |
static
gboolean
CTreeView::OnItemQuerySelect (GtkTreeSelection *, GtkTreeModel *, GtkTreePath *, gboolean, gpointer); |
static void CTreeView::OnItemSelectionChanged (GtkTreeSelection *, gpointer); |
virtual
void
CTreeViewItemFieldValueAPIListener::OnStateChange
(CObject *); |