Go to the SVN repository for this file.
42 static const long kDefStyle= wxLC_REPORT | wxLC_VIRTUAL | wxLC_HRULES | wxLC_VRULES;
50 constwxValidator& validator,
53parent, id, pos,
size,
54(style & ~wxLC_MASK_TYPE) |
kDefStyle, validator, name)
55, m_ImageList(16, 16,
TRUE)
63 if(style & wxLC_ALIGN_LEFT) {
70wxIcon ico = provider->GetIcon(
wxT(
"tablelist_import::checked"));
75ico = provider->GetIcon(
wxT(
"tablelist_import::skipped"));
93m_TableData.Reset(&table_data);
98 if(m_TableData.IsNull()) {
103 intnum_rows = (
int)m_TableData->GetRowsCount();
109wxFont
f= GetFont();
110wxClientDC dc(
this);
112m_FontWidth = dc.GetCharWidth();
114SetItemCount(num_rows);
117 size_twidth_calc_rows =
std::min(num_rows, 100);
120 for(
size_tcol=0; col<m_TableData->GetColsCount(); ++col) {
123 for(
size_t row=0;
row<width_calc_rows; ++
row) {
124m_TableData->GetStringValue(
row, col, s);
125width =
std::max(width, (
int)s.length());
135width = (width+2) * m_FontWidth;
139 if(GetColumnCount() <= (
int)col) {
140InsertColumn(
int(col),
141wxString(
ToWxString(m_TableData->GetColumnLabel(col))),
147GetColumn(
int(col), item);
148item.SetWidth(width);
149item.SetText(
ToWxString(m_TableData->GetColumnLabel(col)));
150SetColumn(
int(col), item);
188wxString tabstr(
" ", 1);
190 for(
size_t i=0;
i<
str.size(); ++
i) {
191 if(
str[
i] !=
'\t') {
194 else result.append(tabstr);
212 returnwxString(
"");
CIRef< ITableData > m_TableData
Data table to be rendered in the list.
wxImageList m_ImageList
Holds column icons (shows whether column currently selected or not)
CTableDataListCtrl()
ctor
wxString OnGetItemText(long row, long col) const
Get the requested field.
int GetColumnImageID(int col) const
Returns image ID for column headers.
static wxString x_ToWxStringWithTabs(const string &str)
Convert strings with tab characters to wxStrings with 4 spaces for each tab.
virtual void RegisterFileAlias(const wxArtID &anId, const wxArtClient &aClient, const wxSize &aSize, const wxString &aName, long aType=wxBITMAP_TYPE_ANY, int anIndex=-1)
static const char * str(char *buf, int n)
bool IsNull(void) const THROWS_NONE
Check if pointer is null â same effect as Empty().
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
unsigned int
A callback function used to compare two keys in a database.
const struct ncbi::grid::netcache::search::fields::SIZE size
const GenericPointer< typename T::ValueType > T2 value
#define TRUE
bool replacment for C indicating true.
#define row(bind, expected)
static const long kDefStyle
wxFileArtProvider * GetDefaultFileArtProvider()
wxString ToWxString(const string &s)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4