wxWidgets: wxDataViewColumn Class Reference

| Version: 3.1.5

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

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

Inheritance diagram for wxDataViewColumn:
[legend]

## Detailed Description

This class represents a column in a wxDataViewCtrl.

One wxDataViewColumn is bound to one column in the data model to which the wxDataViewCtrl has been associated.

An instance of wxDataViewRenderer is used by this class to render its data.

Note
  In wxGTK, setting the width of the column doesn't happen immediately when SetWidth() is called, but only slightly later and GetWidth() will return the old width (0 initially) until this happens. If the column widths are set before wxDataViewCtrl is initially shown, they will only be effectively set when it becomes visible.

##

Library: wxCore

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

## Public Member Functions
| wxDataViewColumn (const wxString &title, wxDataViewRenderer *renderer, unsigned int model_column, int width=wxDVC_DEFAULT_WIDTH, wxAlignment align=wxALIGN_CENTER, int flags=wxDATAVIEW_COL_RESIZABLE)
| Constructs a text column.
| wxDataViewColumn (const wxBitmap &bitmap, wxDataViewRenderer *renderer, unsigned int model_column, int width=wxDVC_DEFAULT_WIDTH, wxAlignment align=wxALIGN_CENTER, int flags=wxDATAVIEW_COL_RESIZABLE)
| Constructs a bitmap column.
unsigned int | GetModelColumn () const
| Returns the index of the column of the model, which this wxDataViewColumn is displaying.
wxDataViewCtrl * | GetOwner () const
| Returns the owning wxDataViewCtrl.
wxDataViewRenderer * | GetRenderer () const
| Returns the renderer of this wxDataViewColumn.
Public Member Functions inherited from wxSettableHeaderColumn
virtual void | SetTitle (const wxString &title)=0
| Set the text to display in the column header.
virtual void | SetBitmap (const wxBitmap &bitmap)=0
| Set the bitmap to be displayed in the column header.
virtual void | SetWidth (int width)=0
| Set the column width.
virtual void | SetMinWidth (int minWidth)=0
| Set the minimal column width.
virtual void | SetAlignment (wxAlignment align)=0
| Set the alignment of the column header.
virtual void | SetFlags (int flags)=0
| Set the column flags.
void | ChangeFlag (int flag, bool set)
| Set or clear the given flag.
void | SetFlag (int flag)
| Set the specified flag for the column.
void | ClearFlag (int flag)
| Clear the specified flag for the column.
void | ToggleFlag (int flag)
| Toggle the specified flag for the column.
virtual void | SetResizeable (bool resizable)
| Call this to enable or disable interactive resizing of the column by the user.
virtual void | SetSortable (bool sortable)
| Allow clicking the column to sort the control contents by the field in this column.
virtual void | SetReorderable (bool reorderable)
| Allow changing the column order by dragging it.
virtual void | SetHidden (bool hidden)
| Hide or show the column.
void | UnsetAsSortKey ()
| Don't use this column for sorting.
virtual void | SetSortOrder (bool ascending)=0
| Sets this column as the sort key for the associated control.
void | ToggleSortOrder ()
| Inverses the sort order.
Public Member Functions inherited from wxHeaderColumn
virtual wxString | GetTitle () const =0
| Get the text shown in the column header.
virtual wxBitmap | GetBitmap () const =0
| Returns the bitmap in the header of the column, if any.
virtual int | GetWidth () const =0
| Returns the current width of the column.
virtual int | GetMinWidth () const =0
| Return the minimal column width.
virtual wxAlignment | GetAlignment () const =0
| Returns the current column alignment.
virtual int | GetFlags () const =0
| Get the column flags.
bool | HasFlag (int flag) const
| Return true if the specified flag is currently set for this column.
virtual bool | IsResizeable () const
| Return true if the column can be resized by the user.
virtual bool | IsSortable () const
| Returns true if the column can be clicked by user to sort the control contents by the field in this column.
virtual bool | IsReorderable () const
| Returns true if the column can be dragged by user to change its order.
virtual bool | IsHidden () const
| Returns true if the column is currently hidden.
bool | IsShown () const
| Returns true if the column is currently shown.
virtual bool | IsSortKey () const =0
| Returns true if the column is currently used for sorting.
virtual bool | IsSortOrderAscending () const =0
| Returns true, if the sort order is ascending.

## Constructor & Destructor Documentation

## ◆ wxDataViewColumn() [1/2]

wxDataViewColumn::wxDataViewColumn | ( | const wxString & | title,
|  | wxDataViewRenderer * | renderer,
|  | unsigned int | model_column,
|  | int | width = wxDVC_DEFAULT_WIDTH,
|  | wxAlignment | align = wxALIGN_CENTER,
|  | int | flags = wxDATAVIEW_COL_RESIZABLE )

Constructs a text column.

Parameters

  title | The title of the column.
  renderer | The class which will render the contents of this column.
  model_column | The index of the model's column which is associated with this object.
  width | The width of the column. The `wxDVC_DEFAULT_WIDTH` value is the fixed default value.
  align | The alignment of the column title.
  flags | One or more flags of the wxDataViewColumnFlags enumeration.

## ◆ wxDataViewColumn() [2/2]

wxDataViewColumn::wxDataViewColumn | ( | const wxBitmap & | bitmap,
|  | wxDataViewRenderer * | renderer,
|  | unsigned int | model_column,
|  | int | width = wxDVC_DEFAULT_WIDTH,
|  | wxAlignment | align = wxALIGN_CENTER,
|  | int | flags = wxDATAVIEW_COL_RESIZABLE )

Constructs a bitmap column.

Parameters

  bitmap | The bitmap of the column.
  renderer | The class which will render the contents of this column.
  model_column | The index of the model's column which is associated with this object.
  width | The width of the column. The `wxDVC_DEFAULT_WIDTH` value is the fixed default value.
  align | The alignment of the column title.
  flags | One or more flags of the wxDataViewColumnFlags enumeration.

## Member Function Documentation

## ◆ GetModelColumn()

unsigned int wxDataViewColumn::GetModelColumn | ( |  | ) | const

Returns the index of the column of the model, which this wxDataViewColumn is displaying.

## ◆ GetOwner()

wxDataViewCtrl * wxDataViewColumn::GetOwner | ( |  | ) | const

Returns the owning wxDataViewCtrl.

## ◆ GetRenderer()

wxDataViewRenderer * wxDataViewColumn::GetRenderer | ( |  | ) | const

Returns the renderer of this wxDataViewColumn.

See also
  wxDataViewRenderer.