NCBI C++ ToolKit
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
CTableDataListCtrl Class Reference

Search Toolkit Book for CTableDataListCtrl

CTableDataListCtrl -. More...

#include <gui/widgets/loaders/table_data_listctrl.hpp>

+ Inheritance diagram for CTableDataListCtrl:
+ Collaboration diagram for CTableDataListCtrl:

Public Member Functions

 CTableDataListCtrl ()
 ctor More...
 
 CTableDataListCtrl (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxLC_REPORT|wxLC_VIRTUAL, const wxValidator &validator=wxDefaultValidator, const wxString &name=wxListCtrlNameStr)
 ctor More...
 
virtual ~CTableDataListCtrl ()
 dtor More...
 
void InitDataSource (ITableData &table_data)
 Set/update data source. More...
 
int GetColumnImageID (int col) const
 Returns image ID for column headers. More...
 

Protected Member Functions

wxString OnGetItemText (long row, long col) const
 Get the requested field. More...
 
virtual int OnGetItemColumnImage (long item, long column) const
 Required function if I want to put icons in column headers (but this function indicates what icon to put in list items (so I return -1) More...
 

Static Protected Member Functions

static wxString x_ToWxStringWithTabs (const string &str)
 Convert strings with tab characters to wxStrings with 4 spaces for each tab. More...
 

Protected Attributes

CIRef< ITableDatam_TableData
 Data table to be rendered in the list. More...
 
wxImageList m_ImageList
 Holds column icons (shows whether column currently selected or not) More...
 
int m_FontWidth
 Need font width for calculating how many chars fit in a column. More...
 

Detailed Description

CTableDataListCtrl -.

This class is a specialized version of wxListCtrl....

Definition at line 54 of file table_data_listctrl.hpp.

Constructor & Destructor Documentation

◆ CTableDataListCtrl() [1/2]

CTableDataListCtrl::CTableDataListCtrl ( )
inline

ctor

Definition at line 59 of file table_data_listctrl.hpp.

◆ CTableDataListCtrl() [2/2]

CTableDataListCtrl::CTableDataListCtrl ( wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = wxLC_REPORT | wxLC_VIRTUAL,
const wxValidator &  validator = wxDefaultValidator,
const wxString &  name = wxListCtrlNameStr 
)

◆ ~CTableDataListCtrl()

virtual CTableDataListCtrl::~CTableDataListCtrl ( )
inlinevirtual

dtor

Definition at line 73 of file table_data_listctrl.hpp.

Member Function Documentation

◆ GetColumnImageID()

int CTableDataListCtrl::GetColumnImageID ( int  col) const

Returns image ID for column headers.

Definition at line 166 of file table_data_listctrl.cpp.

◆ InitDataSource()

void CTableDataListCtrl::InitDataSource ( ITableData table_data)

Set/update data source.

Definition at line 91 of file table_data_listctrl.cpp.

References f(), int, max(), min(), row, and ToWxString().

Referenced by CTableXformPanel::Show().

◆ OnGetItemColumnImage()

virtual int CTableDataListCtrl::OnGetItemColumnImage ( long  item,
long  column 
) const
inlineprotectedvirtual

Required function if I want to put icons in column headers (but this function indicates what icon to put in list items (so I return -1)

Definition at line 87 of file table_data_listctrl.hpp.

◆ OnGetItemText()

wxString CTableDataListCtrl::OnGetItemText ( long  row,
long  col 
) const
protected

Get the requested field.

Definition at line 204 of file table_data_listctrl.cpp.

References CRef< C, Locker >::IsNull(), m_TableData, row, ToWxString(), and rapidjson::value.

◆ x_ToWxStringWithTabs()

wxString CTableDataListCtrl::x_ToWxStringWithTabs ( const string str)
staticprotected

Convert strings with tab characters to wxStrings with 4 spaces for each tab.

Gets around bug/issue in windows where wxListCtrl ignores tabs

Definition at line 182 of file table_data_listctrl.cpp.

References i, result, str(), and ToWxString().

Member Data Documentation

◆ m_FontWidth

int CTableDataListCtrl::m_FontWidth
protected

Need font width for calculating how many chars fit in a column.

Definition at line 102 of file table_data_listctrl.hpp.

◆ m_ImageList

wxImageList CTableDataListCtrl::m_ImageList
protected

Holds column icons (shows whether column currently selected or not)

Definition at line 99 of file table_data_listctrl.hpp.

Referenced by CTableDataListCtrl().

◆ m_TableData

CIRef<ITableData> CTableDataListCtrl::m_TableData
protected

Data table to be rendered in the list.

Definition at line 96 of file table_data_listctrl.hpp.

Referenced by OnGetItemText().


The documentation for this class was generated from the following files:
Modified on Fri Apr 12 17:19:10 2024 by modify_doxy.py rev. 669887