wxWidgets: wxDataViewItem Class Reference

| Version: 3.1.5

Loading...
Searching...
No Matches
Public Member Functions | List of all members
wxDataViewItem Class Reference
Class List by Category » wxDataViewCtrl Related Classes

`#include </cygdrive/c/Users/Hamis/Cygwin-packaging/wxWidgets3.1/wxWidgets3.1-3.1.5-3.x86_64/src/wxWidgets-3.1.5/interface/wx/dataview.h>`

## Detailed Description

wxDataViewItem is a small opaque class that represents an item in a wxDataViewCtrl in a persistent way, i.e.

independent of the position of the item in the control or changes to its contents.

It must hold a unique ID of type void* in its only field and can be converted to and from it.

If the ID is NULL the wxDataViewItem is invalid and wxDataViewItem::IsOk will return false which used in many places in the API of wxDataViewCtrl to indicate that e.g. no item was found. An ID of NULL is also used to indicate the invisible root. Examples for this are wxDataViewModel::GetParent and wxDataViewModel::GetChildren.

##

Library: wxCore

<>< =''>:</>&;&;< =''>\ </></>

## Public Member Functions
| wxDataViewItem ()
| Constructor.
| wxDataViewItem (const wxDataViewItem &item)
| wxDataViewItem (void *id)
void * | GetID () const
| Returns the ID.
bool | IsOk () const
| Returns true if the ID is not NULL.

## Constructor & Destructor Documentation

## ◆ wxDataViewItem() [1/3]

wxDataViewItem::wxDataViewItem | ( |  | ) |

Constructor.

## ◆ wxDataViewItem() [2/3]

wxDataViewItem::wxDataViewItem | ( | const wxDataViewItem & | item | ) |

## ◆ wxDataViewItem() [3/3]

wxDataViewItem::wxDataViewItem | ( | void * | id | ) |
| explicit

## Member Function Documentation

## ◆ GetID()

void * wxDataViewItem::GetID | ( |  | ) | const

Returns the ID.

## ◆ IsOk()

bool wxDataViewItem::IsOk | ( |  | ) | const

Returns true if the ID is not NULL.