= wxLC_REPORT | wxLC_VIRTUAL | wxLC_HRULES | wxLC_VRULES;
135 constwxValidator& validator,
139parent, id, pos,
size,
140(style & ~wxLC_MASK_TYPE) |
kDefStyle, validator, name
153: wxListView( parent, id, wxDefaultPosition, wxDefaultSize,
kDefStyle)
309 #define NO_IMAGE_ID -1 310 #define UNCHECKED_ICON_ID 0 311 #define CHECKED_ICON_ID 1 312 #define UP_ARROW_ID 2 313 #define DOWN_ARROW_ID 3 314 #define UP2_ARROW_ID 4 315 #define DOWN2_ARROW_ID 5 319 #ifdef __WXOSX_COCOA__ 320SetBackgroundStyle(wxBG_STYLE_COLOUR);
321SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
413 if( decor_model !=
NULL){
435 if( decor_model !=
NULL){
467SetSingleStyle(wxLC_NO_HEADER, flag);
471 #ifndef wxHAS_LISTCTRL_COLUMN_ORDER 475 if(col >= 0 && col < GetColumnCount() ){
484 if( anOrder >= 0 && anOrder < GetColumnCount() ){
496 for(
int i= 0;
i< GetColumnCount();
i++ ){
512 intnumCols = GetColumnCount();
513wxASSERT_MSG( col >= 0 && col < numCols,
wxT(
"Col index out of bounds") );
514wxASSERT_MSG( vis_col >= 0 && vis_col < numCols,
wxT(
"Visual col index out of bounds") );
518 if( orderArray.Count() > 0 ){
520 intold_vis_col = orderArray[col];
521 if( old_vis_col < vis_col ){
522 for(
int i= 0;
i< numCols;
i++ ){
524orderArray[
i] > old_vis_col
525&& orderArray[
i] <= vis_col
530orderArray[col] = vis_col;
532}
else if( vis_col < old_vis_col ){
533 for(
int i= 0;
i< numCols;
i++ ){
535orderArray[
i] >= vis_col
536&& orderArray[
i] < old_vis_col
541orderArray[col] = vis_col;
567index.Add( -1, GetColumnCount() );
569 for(
int i= 0;
i< GetColumnCount();
i++ ){
570index[order[
i]] =
i;
573 for(
int i= 0;
i<= aCol;
i++ ){
586 if( aColIx >= 0 && aColIx < GetColumnCount() ){
595 for(
int i= 0;
i< GetColumnCount();
i++ ){
598&& order[
i] < order[aColIx]
604 returnorder[aColIx] - hidden;
616index.Add( -1, GetColumnCount() );
618 for(
int i= 0;
i< GetColumnCount();
i++ ){
619index[order[
i]] =
i;
622 for(
int i= 0;
i<= aCol;
i++ ){
636 if( aColIx >= 0 && aColIx < GetColumnCount() ){
645 for(
int i= 0;
i< GetColumnCount();
i++ ){
648&& order[
i] < order[aColIx]
654 returnorder[aColIx] - visible;
662 if( aCol >= 0 && aCol < GetColumnCount() ){
671 if( aCol >= 0 && aCol < GetColumnCount() ){
672 if(
m_Columns[aCol].m_ModelIx == aCol ){
678 if( iter->m_ModelIx == aCol ){
758 for(
int i= 0;
i< GetColumnCount();
i++ ){
780item.SetMask( wxLIST_MASK_FORMAT );
781 if( wxListView::GetColumn( aColIx, item ) ){
782 returnitem.GetAlign();
784 returnwxLIST_FORMAT_CENTRE;
790item.SetAlign( aAlign );
791 if( wxListView::SetColumn( aColIx, item ) ){
792 m_Columns[aColIx].m_Item.SetAlign( aAlign );
800 if( aColumn.
m_Item.GetMask() & wxLIST_MASK_WIDTH ){
805aColumn.
m_Item.SetWidth( 0 );
809 if( (aColumn.
m_Item.GetMask() & wxLIST_MASK_TEXT) == 0 ){
813 if( wxListView::InsertColumn( GetColumnCount(), aColumn.
m_Item) >= 0 ){
817aColumn.
m_Width= GetColumnWidth( GetColumnCount() -1 );
834 if( decor_model !=
NULL){
843 if( aColIx >= 0 && aColIx < GetColumnCount() ){
844 boolwas_visible =
false;
845 boolwas_erased =
false;
849 m_Columns[aColIx].m_Width = GetColumnWidth( aColIx );
854SetColumnWidth( aColIx, 0 );
859 if( wxListView::DeleteColumn( aColIx ) ){
899 if( aColIx >= GetColumnCount() ){
902 if( aTargetColIx >= GetColumnCount() ){
906 if( aColIx == aTargetColIx ){
910wxListView::GetColumn( aColIx,
m_Columns[aColIx].m_Item );
913DeleteColumn( aColIx );
916InsertColumn( aTargetColIx,
column.m_Item );
955 if( aColIx >= 0 && aColIx < GetColumnCount() ){
957SetColumnWidth( aColIx,
m_Columns[aColIx].m_Width );
980 column.m_Item.SetColumn( col );
984 if( decor_model !=
NULL){
988 #if !defined(__WIN32__) || defined(__WXUNIVERSAL__) 1022 if( *iter == aRow ){
1034 return static_cast<int>(GetFocusedItem());
1052 autoitemId =
event.GetItem();
1053 if( itemId >= 0 && itemId < GetItemCount() && wxGetKeyState( WXK_SHIFT ) ){
1054wxListEvent sel_evt( event );
1055sel_evt.SetEventType(
1056IsSelected( itemId )
1057? wxEVT_COMMAND_LIST_ITEM_SELECTED
1058: wxEVT_COMMAND_LIST_ITEM_DESELECTED
1061GetEventHandler()->ProcessEvent(sel_evt);
1070 returnGetNextItem( GetItemCount(), wxLIST_NEXT_ABOVE, wxLIST_STATE_SELECTED );
1076 intnum_items = GetItemCount();
1078 for(
int i= 0;
i< num_items;
i++ ) {
1079SetItemState(
i, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED );
1086 for(
intitem = -1;
1087(item =
static_cast<int>(GetNextItem( item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED ))) != -1;) {
1088SetItemState( item, 0, wxLIST_STATE_SELECTED );
1097 for(
intitem = -1;
1098(item =
static_cast<int>(GetNextItem( item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED ))) != -1;) {
1107 for(
intitem = -1;
1108(item =
static_cast<int>(GetNextItem( item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED ))) != -1;) {
1110rows.push_back(
r);
1119 for(
size_t i= 0;
i< rows.size();
i++ ) {
1161 if( preserve_state ){
1188 for(
automRow = 0; mRow < model.
GetNumRows(); mRow++ ){
1194 for(
intmRow = 0; mRow < model.
GetNumRows(); mRow++ ){
1215 if( preserve_state ){
1260 if( colSorter !=
null){
1266 GetModel()->GetColumnType( model_ix )
1269 if( defSorter !=
NULL){
1291 intcol = sort_itr->first;
1303 if( sorter.
IsNull() ){
1304sorter = col_sorter;
1320 for(
intcol = 0; col < GetColumnCount(); col++ ){
1327SetColumn( col, item );
1338 intsorted_col = sort_itr->first;
1347 if( sorted_state ==
eNoSort){
1363SetImageList( &
m_ImageList, wxIMAGE_LIST_SMALL );
1367SetColumn( sorted_col, item );
1383 if( preserve_state ){
1453 if( preserve_state ){
1490 if( found_itr->first == col ){
1520event.GetEventType() == wxEVT_COMMAND_LIST_ITEM_SELECTED,
1521 static_cast<int>(event.GetIndex())
1535 intclick_col = anEvt.GetColumn();
1537 if( !
m_Columns[click_col].m_Sortable )
return;
1540 # if defined(NCBI_OS_DARWIN) 1541 # define CTRL_MODIFIER WXK_COMMAND 1543 # define CTRL_MODIFIER WXK_CONTROL 1590wxPoint point = anEvt.GetPoint();
1624 #if defined(__WXGTK__) || defined(__WXMAC__) 1629 if( anEvt.GetItem().GetWidth() == 0 ){
1639 intdrag_col = anEvt.GetColumn();
1641 #if defined(__WIN32__) && !defined(__WXUNIVERSAL__) 1643 if( anEvt.GetItem().GetWidth() == 0 ){
1649 m_Columns[drag_col].m_Width = GetColumnWidth( drag_col );
1664 void*
data= anEvent.GetClientData();
1665menu =
data? (wxMenu*)
data:
newwxMenu();
1670anEvent.SetClientData( menu );
1675anEvent.SetClientData(
NULL);
1685aMenu.Append( wxID_SEPARATOR,
wxT(
"Edit") );
1711PopupMenu(&menu, pos);
1739menu.AppendSeparator();
1744 if( rc != wxID_NONE ){
1756 for(
intitem = -1;; ) {
1757item =
static_cast<int>(GetNextItem(item,
1759wxLIST_STATE_SELECTED));
1767 inttopVisibleItem =
static_cast<int>(GetTopItem());
1777 for(
size_t i= 0;
i<
state->m_Selected.size(); ++
i) {
1779 if(selectedItem >= 0) {
1780SetItemState( selectedItem, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED );
1786 if( indexFocusRow != -1 ){
1790 if(
state->m_TopModelRow >= 0 ){
1793EnsureVisible( topVisibleItem );
1811 if( aSorter !=
NULL){
1823 virtual bool operator()(
constwxVariant& aAny,
constwxVariant& bAny )
const 1825 return!aAny.GetBool() && bAny.GetBool();
1834 virtual bool operator()(
constwxVariant& aAny,
constwxVariant& bAny )
const 1836 returnaAny.GetChar() < bAny.GetChar();
1845 virtual bool operator()(
constwxVariant& aAny,
constwxVariant& bAny )
const 1847 returnaAny.GetLong() < bAny.GetLong();
1856 virtual bool operator()(
constwxVariant& aAny,
constwxVariant& bAny )
const 1858 returnaAny.GetDouble() < bAny.GetDouble();
1867 virtual bool operator()(
constwxVariant& aAny,
constwxVariant& bAny )
const 1869 returnaAny.GetString().Cmp( bAny.GetString() ) < 0;
1894 boolstate_saved =
false;
1936state_saved =
true;
1944 intmInserted = mEnd - mStart + 1;
1946SetItemCount( GetItemCount() + mInserted );
1947 if( GetItemCount() ){
1948RefreshItems( mStart, GetItemCount()-1 );
1959state_saved =
true;
1967 intmDeleted = mEnd - mStart + 1;
1969SetItemCount( GetItemCount() - mDeleted );
1970 if( GetItemCount() ){
1971RefreshItems( mStart, GetItemCount()-1 );
1985RefreshItem( mStart );
1987RefreshItems( mStart, mEnd );
2009aType ==
wxT(
"short")
2010|| aType ==
wxT(
"int")
2011|| aType ==
wxT(
"long")
2012|| aType ==
wxT(
"unsigned char")
2013|| aType ==
wxT(
"float")
2014|| aType ==
wxT(
"double")
2016 returnwxLIST_FORMAT_RIGHT;
2019aType ==
wxT(
"char")
2021 returnwxLIST_FORMAT_CENTER;
2024aType ==
wxT(
"bool")
2026 returnwxLIST_FORMAT_CENTER;
2029 returnwxLIST_FORMAT_LEFT;
2035 if( anEvt.GetKeyCode() ==
'A'&& anEvt.ControlDown() ){
2055anEvt.Enable( GetFirstSelected() != -1 );
2063 boolfirst_row =
true;
2064 while( (
row= GetNextSelected(
row)) != -1 ){
2077clip_str += wxTextBuffer::GetEOL();
2079clip_str += row_str;
2082 if( !clip_str.IsEmpty() ){
2089 stringname =
"Debug";
2090 if( anEvt.GetKeyCode() == wxEVT_COMMAND_LIST_BEGIN_DRAG ){
2091name =
"BEGIN-DRAG";
2092}
else if( anEvt.GetKeyCode() == wxEVT_COMMAND_LIST_BEGIN_RDRAG ){
2093}
else if( anEvt.GetKeyCode() == wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT ){
2094}
else if( anEvt.GetKeyCode() == wxEVT_COMMAND_LIST_END_LABEL_EDIT ){
2095}
else if( anEvt.GetKeyCode() == wxEVT_COMMAND_LIST_DELETE_ITEM ){
2096}
else if( anEvt.GetKeyCode() == wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS ){
2097}
else if( anEvt.GetKeyCode() == wxEVT_COMMAND_LIST_ITEM_SELECTED ){
2098}
else if( anEvt.GetKeyCode() == wxEVT_COMMAND_LIST_ITEM_DESELECTED ){
2099}
else if( anEvt.GetKeyCode() == wxEVT_COMMAND_LIST_KEY_DOWN ){
2100}
else if( anEvt.GetKeyCode() == wxEVT_COMMAND_LIST_INSERT_ITEM ){
2101}
else if( anEvt.GetKeyCode() == wxEVT_COMMAND_LIST_COL_CLICK ){
2102}
else if( anEvt.GetKeyCode() == wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK ){
2103}
else if( anEvt.GetKeyCode() == wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK ){
2104}
else if( anEvt.GetKeyCode() == wxEVT_COMMAND_LIST_ITEM_ACTIVATED ){
2105}
else if( anEvt.GetKeyCode() == wxEVT_COMMAND_LIST_CACHE_HINT ){
2106}
else if( anEvt.GetKeyCode() == wxEVT_COMMAND_LIST_COL_RIGHT_CLICK ){
2107}
else if( anEvt.GetKeyCode() == wxEVT_COMMAND_LIST_COL_BEGIN_DRAG ){
2108name =
"COL-BEGIN-DRAG";
2109}
else if( anEvt.GetKeyCode() == wxEVT_COMMAND_LIST_COL_DRAGGING ){
2110}
else if( anEvt.GetKeyCode() == wxEVT_COMMAND_LIST_COL_END_DRAG ){
2111name =
"COL-END-DRAG";
2112}
else if( anEvt.GetKeyCode() == wxEVT_COMMAND_LIST_ITEM_FOCUSED ){
2136 inthigh = GetItemCount() - 1;
2138 while(low <= high) {
2139 intmid = (low + high) / 2;
2142GetItemRect(mid, rect);
2144 if(rect.Contains(pt))
2157 inttotal_width = 0;
2161 for(
int i= 0;
i< GetColumnCount(); ++
i) {
2162total_width += this->GetColumnWidth(
i);
2165 if(pt.x < total_width) {
2175 #if defined(__WXGTK__) 2176 if(event.Dragging()) {
2182wxPoint pt = ScreenToClient(wxGetMousePosition());
2192 m_Timer.Start(500, wxTIMER_ONE_SHOT);
2208 staticwxTipWindow* s_tipWindow =
nullptr;
2212s_tipWindow->SetTipWindowPtr(
nullptr);
2213s_tipWindow->Close();
2214s_tipWindow =
nullptr;
2223wxPoint pt = wxGetMousePosition();
2231wxClientDC dc(
this);
2237 r.SetPosition(ClientToScreen(
r.GetPosition()));
2239 #if defined(__WXGTK__) 2240s_tipWindow =
newwxTipWindow(
this,
m_ToolTipText, w, &s_tipWindow, &
r);
2241 #elif defined(__WXMAC__) 2243s_tipWindow =
newwxTipWindow(
nullptr,
m_ToolTipText, w, &s_tipWindow, &
r);
2274 const intitemCount = GetItemCount();
2275 const booldrawHRules = HasFlag(wxLC_HRULES);
2277 const booldrawVRules = HasFlag(wxLC_VRULES);
2279 if(!InReportView() || !(drawHRules || drawVRules) || !itemCount)
2285wxPaintDC dc(
this);
2287wxControl::OnPaint(anEvt);
2290dc.SetDeviceOrigin(0, 0);
2292wxPen pen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT));
2294dc.SetBrush(* wxTRANSPARENT_BRUSH);
2296wxSize clientSize = GetClientSize();
2301 inttop = GetTopItem();
2302 if( top >= itemCount ){
2304 ERR_POST(
Warning<<
"ListView_GetTopIndex() bug workaround is in action!");
2306 for(
int i= top;
i< top + GetCountPerPage() + 1;
i++ )
2308 if(GetItemRect(
i, itemRect))
2310 intcy = itemRect.GetTop();
2313dc.DrawLine(0, cy, clientSize.x, cy);
2316 if(
i== itemCount - 1)
2318cy = itemRect.GetBottom();
2319dc.DrawLine(0, cy, clientSize.x, cy);
2328wxRect firstItemRect;
2329GetItemRect(0, firstItemRect);
2331 if(GetItemRect(itemCount - 1, itemRect))
2335 static const intgap = 2;
2336dc.SetPen(*wxTRANSPARENT_PEN);
2337dc.SetBrush(wxBrush(GetBackgroundColour()));
2338dc.DrawRectangle(0, firstItemRect.GetY() - gap,
2339clientSize.GetWidth(), gap);
2342dc.SetBrush(*wxTRANSPARENT_BRUSH);
2344 const intnumCols = GetColumnCount();
2345wxVector<int> indexArray(numCols);
2346 if( !ListView_GetColumnOrderArray(GetHwnd(),
2350wxFAIL_MSG(
wxT(
"invalid column index array in OnPaint()") );
2354 intx = itemRect.GetX();
2355 for(
intcol = 0; col < numCols; col++)
2357 intcolWidth = GetColumnWidth(indexArray[col]);
2359dc.DrawLine(x-1, firstItemRect.GetY() - gap,
2360x-1, itemRect.GetBottom());
2387 if(
val.GetType() ==
wxT(
"bool") ){
2396 return val.MakeString();
2417 if(
val.GetType() ==
wxT(
"bool") ){
2424 if( decor_model !=
NULL){
2427 if( !alias.empty() ){
2433wxBitmap
bmp= wxArtProvider::GetBitmap( alias );
2446nonconst_this->SetImageList( &
m_ImageList, wxIMAGE_LIST_SMALL );
2457 staticwxListItemAttr s_attr;
2461 if( decor_model !=
NULL){
2465 if(
color.IsOk() ){
2466s_attr.SetBackgroundColour(
color);
2472wxColor fore = GetTextColour();
2473wxColor back =
const_cast<CwxTableListCtrl*
>(
this)->GetBackgroundColour();
2477 #define uch unsigned char 2499 returnIsSelected(
row);
2504 return(GetWindowStyleFlag() & wxLC_HRULES) != 0;
2509SetSingleStyle( wxLC_HRULES, show );
2542 if(model ==
NULL){
2548 inttotal_num = GetColumnCount();
2555 _ASSERT(total_num == num_vis + num_hid);
2570vector<int> sorted_cols;
2571vector<int> sorted_orders;
2574sorted_cols.push_back(coltr->first);
2575sorted_orders.push_back((
int)coltr->second);
2588 if(GetColumnCount() > 0) {
2591 for(
intix = 0; ix < total_num; ix++){
2598 intwidth = shown ? GetColumnWidth(ix) :
m_Columns[ix].m_Width;
2618 catch(std::exception& e){
2623 if(!
error.empty()){
2634 if(model ==
NULL){
2641 if(total_num == -1){
2646 else if(total_num == 0){
2654 if(total_num != num_vis + num_hid){
2661vector<bool> mod_vec(
GetModel()->GetNumColumns(),
false);
2663wxArrayInt order_array;
2664order_array.SetCount(total_num, -1);
2666 for(
intix = 0; ix < total_num; ix++){
2680 LOG_POST(
Warning<<
"No model column with such a name "<< name_str);
2683|| mod_ix >=
GetModel()->GetNumColumns()
2689 else if(new_mod != mod_ix){
2690 LOG_POST(
Warning<<
"Model index is different for the name "<< name_str);
2694mod_vec[mod_ix] =
true;
2698cur_ix = GetColumnCount();
2703SetColumnWidth(cur_ix, width);
2710 if(ix < GetColumnCount()){
2718order_array.SetCount(cur_ix + 1, -1);
2719order_array[cur_ix] = ord_ix;
2725 if(mod_vec[mod_ix]){
continue; }
2728 if(real_cur_ix == -1){
continue; }
2740 if(cur_ix == real_cur_ix){
continue; }
2750 if(!byName && GetColumnCount() == order_array.GetCount()){
2762vector<int> sorted_cols;
2763vector<int> sorted_orders;
2768 size_tcols_num = sorted_cols.size();
2769 if(sorted_orders.size() < cols_num){
2770cols_num = sorted_orders.size();
2773 for(
size_tix = 0; ix < cols_num; ix++){
2774 intsort_ix = sorted_cols[ix];
2775 if(sort_ix >= 0 && sort_ix < GetColumnCount()){
2794 catch(std::exception& e){
2799 if(!
error.empty()){
2809vector<wxString> selectedColumns;
2811 for(
int i= 0;
i< colNum; ++
i) {
2819 if(dlg.ShowModal() == wxID_OK) {
2821 if(fileName.empty())
2824unique_ptr<CNcbiOstream> os;
2827 if(os.get() ==
NULL){
2830 "File is not accessible" 2843 for(
size_t i= 0;
i< cols.size(); ++
i){
2857 int flags= selected_only ? wxLIST_STATE_SELECTED : wxLIST_STATE_DONTCARE;
2859 while((item =
static_cast<int>(GetNextItem(item, wxLIST_NEXT_ALL,
flags))) != -1){
2861 for(
size_t i= 0;
i< cols.size(); ++
i){
2880: m_ModelIx( aModelIndex )
2883, m_HidingAllowed(
true)
2884, m_Resizable(
true)
2885, m_Sortable(
true)
void Field(const string &value)
virtual void SetRegistryPath(const string &path)
void ConnectToControl(wxListCtrl &listCtrl)
static string MakeKey(const string §ion, const string &key, const string &delim=CGuiRegistry::kDecimalDot)
create a key from a section and a subkey
bool operator()(int aRowIx, int bRowIx) const
const IRowSorter & m_Sorter
CIndexSorter(const IwxTableModel &aModel, const IRowSorter &aSorter)
const IwxTableModel & m_Data
class CRegistryReadView provides a nested hierarchical view at a particular key.
int GetInt(const string &key, int default_val=0) const
access a named key at this level, with no recursion
bool GetBool(const string &key, bool default_val=false) const
void GetIntVec(const string &key, vector< int > &val) const
bool HasField(const string &key) const
Does a field with this section and key exist in this view?
string GetString(const string &key, const string &default_val=kEmptyStr) const
void Set(const string &key, int val)
access a named key at this level, with no recursion
bool DeleteField(const string &key)
delete the specified field (and any of its subfields) from this view and from its registry.
static CSimpleClipboard & Instance()
CIRef< IwxStringFormat > m_Formatter
CTableListColumn(int aModelIndex)
static CUICommandRegistry & GetInstance()
the main instance associated with the application
wxMenuItem * AppendMenuItem(wxMenu &menu, TCmdID cmd_id) const
virtual bool operator()(const wxVariant &aAny, const wxVariant &bAny) const
wxString GetFileName() const
void GetSelectedColumns(vector< int > &columns) const
Gets the columns, selected by the user.
bool GetWithHeaders() const
void SetColumnsList(const vector< wxString > &columns)
Sets the columns lists.
bool GetSelectedOnly() const
virtual bool operator()(const wxVariant &aAny, const wxVariant &bAny) const
virtual bool operator()(const wxVariant &aAny, const wxVariant &bAny) const
virtual bool operator()(const wxVariant &aAny, const wxVariant &bAny) const
virtual bool operator()(const wxVariant &aAny, const wxVariant &bAny) const
CwxTableListCtrl - generic wxListCtrl-based Table Control.
void SetDefaultSorter(wxString aType, IwxVariantSorter *aSorter)
void RemoveColumn(int col_ix, bool hide=false)
virtual int OnGetItemImage(long aRow) const
int GetColumnVisibleByName(wxString name) const
wxString m_ToolTipText
Test to put in tooltip.
void EnableHeader(bool flag)
void ApplySorting(bool preserve_state=true)
wxString GetColumnNameHidden(int col) const
const vector< TSortedCol > & GetSortedCols() const
void OnColumnEndDrag(wxListEvent &anEvt)
void OnCopy(wxCommandEvent &anEvt)
void ExportTableControlToCSV()
int RowVisibleToData(int aRow) const
/////////// Row staff /////////////////
void AssignModel(IwxTableModel *data_model)
const IRowFilter * GetFilter() const
Filter is not owned by Table control.You should manage it deletion by yourself.
bool ShowHorzLines() const
/////////// Exterior settings
int ColumnModelToIndex(int col) const
int GetColumnIndexFromOrder(int order) const
bool SetColumnOrder(int col, int order)
void SetShowHorzLines(bool show)
void x_RestoreViewState(SViewState *state)
CIRef< IRowSorter > RemoveSorter()
void OnContextMenu(wxContextMenuEvent &anEvent)
int GetNumColumnsVisible() const
int GetFocusColumn() const
int m_TipStartX
Start/stop x value of cell to which tooltip belongs.
int GetModelIndexByName(wxString name) const
wxString GetColumnTitleVisible(int col) const
int ColumnIndexToVisible(int col) const
bool SetColumnsOrder(const wxArrayInt &orders)
int x_FindRow(const wxPoint &pt) const
void ShowColumn(int col_ix)
int DoGetPopupMenuSelectionFromUser(wxMenu &menu, const wxPoint &pos)
void SetSorter(CIRef< IRowSorter > sorter)
void OnPaint(wxPaintEvent &anEvt)
IRowFilter * RemoveFilter()
int GetNumColumnsHidden() const
void CreateAllColumnsFromModel()
int ColumnModelToVisible(int col) const
void OnDebugEvent(wxListEvent &anEvt)
void SetSortedState(ESortedState sorted)
CFixGenericListCtrl m_FixGenericListCtrl
void OnColumnBeginDrag(wxListEvent &anEvt)
wxString GetColumnTitleHidden(int col) const
void OnSelectionChanged(wxListEvent &event)
int GetColumnHiddenByName(wxString name) const
int RowDataToVisible(int aRow) const
void OnSelectAll(wxCommandEvent &anEvt)
void ShiftSorting(int col=-1)
CIRef< IRowSorter > GetSorter() const
IwxTableModel * m_DataModel
int ColumnVisibleToIndex(int col) const
int ShowHeaderContextMenu(const wxPoint &pos)
TSorterMap m_DefaultSorters
virtual void x_OnSelectionChanged(bool on, int start_row, int end_row=-1)
vector< CTableListColumn > m_Columns
wxString GetColumnTitleByIndex(int col) const
void OnColumnClick(wxListEvent &anEvt)
////////////// Header management
void CreateDefaultSorters()
IwxTableModel * GetModel() const
void OnFocusChanged(wxListEvent &event)
virtual int OnGetItemColumnImage(long aRow, long aCol) const
void OnLeftDown(wxMouseEvent &anEvt)
virtual void TableChanged(const CwxTableModelNotice &aNotice)
IwxVariantSorter * GetDefaultSorter(wxString aType) const
void AddColumn(CTableListColumn &aColumn)
get/set all other column features
int x_FindColumn(const wxPoint &pt) const
wxString GetColumnNameVisible(int col) const
void ApplyFiltering(bool preserve_state=true)
void x_ShowTooltip(bool show)
void SetSorterByIndex(int col)
bool mf_ImageListInstalled
int m_CurrentCol
Last column user clicked on (tooltips are only on selected/clicked itmes)
ESortedState GetSortedState() const
CIRef< IRowSorter > GetColumnSorterByIndex(int col_ix) const
wxListColumnFormat GetAlignByType(wxString aColType)
wxString GetColumnTitleByModel(int col) const
void x_SaveViewState(SViewState *state)
void OnMouseMove(wxMouseEvent &anEvt)
void AddSorterIndex(size_t col, ESortedState state)
void LoadTableSettings(const CRegistryReadView &view, bool byName=false)
wxString GetColumnNameByIndex(int col) const
virtual ~CwxTableListCtrl()
wxArrayInt GetColumnsOrder() const
void SetFilter(IRowFilter *filter)
int ColumnHiddenToIndex(int col) const
wxArrayInt GetDataRowsSelected() const
bool IsColumnVisibleByIndex(int col) const
void InternalOnPopupMenu(wxCommandEvent &event)
void SetColumnAlign(int col_ix, wxListColumnFormat aAlign)
pair< int, ESortedState > TSortedCol
int GetColumnIndexByName(wxString name) const
virtual void AppendMenuItems(wxMenu &aMenu)
void SetSorterByColumns()
void SaveTableSettings(CRegistryWriteView &view, bool saveSorting=true) const
void MoveColumn(int col_ix, int aTargetColIx)
void OnCopyUpdate(wxUpdateUIEvent &anEvt)
void OnColumnRightClick(wxListEvent &anEvt)
void SetFocusRow(int row)
virtual wxListItemAttr * OnGetItemAttr(long aRow) const
void SetModel(IwxTableModel *data_model, bool own=false)
int ColumnVisibleToModel(int col) const
int m_CurrentRow
Last row user clicked on.
virtual wxString OnGetItemText(long aRow, long aCol) const
int ColumnIndexToHidden(int col) const
wxString GetColumnNameByModel(int col) const
vector< int > m_VisibleRows
void OnTimer(wxTimerEvent &event)
void HideColumn(int col_ix)
int GetColumnOrder(int col) const
CIRef< IRowSorter > m_Sorter
long GetLastSelected() const
wxVariant GetValueVisibleAt(int row, int col) const
bool ShouldPropagateContextMenu() const
bool IsCellSelectedAt(int row, int WXUNUSED(col)) const
vector< TSortedCol > m_SortedCols
void SetDataRowsSelected(const vector< int > &rows)
wxListColumnFormat GetColumnAlign(int col_ix) const
int GetNumRowsVisible() const
const wxString GetTypeVisibleAt(int row, int col) const
int ColumnIndexToModel(int col) const
void OnKeyDown(wxKeyEvent &anEvt)
IwxTableModel & GetSource() const
static const int HEADER_ROW
CwxTableRow(const IwxTableModel &aModel, int aRow)
virtual int GetNumColumns() const
const IwxTableModel & m_Data
virtual wxVariant GetValueAtColumn(int aCol) const
virtual CIRef< IwxStringFormat > GetColumnFormat(int) const
virtual wxColor GetBackgroundColor(int) const
virtual wxString GetImageAliasAt(int, int) const
virtual wxString Format(wxVariant &aVar) const
virtual int GetNumRows() const =0
Returns the number of rows in the model.
virtual void RemoveTMListener(IwxTableModelListener &aTMEar)=0
virtual void AddTMListener(IwxTableModelListener &aTMEar)=0
virtual wxString GetTypeAt(int, int col) const
virtual int GetNumColumns() const =0
Returns the number of columns in the model.
virtual wxString GetColumnType(int col_idx) const =0
virtual wxString GetColumnName(int col_idx) const =0
Returns the name of the column at aColIx.
virtual wxVariant GetValueAt(int row, int col) const =0
std::ofstream out("events_result.xml")
main entry point for tests
thread_local unique_ptr< FtaMsgPost > bmp
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
static const char * column
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
const string & GetMsg(void) const
Get message string.
void Warning(CExceptionArgs_Base &args)
virtual const char * what(void) const noexcept
Standard report (includes full backlog).
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.
IO_PREFIX::ofstream CNcbiOfstream
Portable alias for ofstream.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
unsigned int
A callback function used to compare two keys in a database.
constexpr bool empty(list< Ts... >) noexcept
const struct ncbi::grid::netcache::search::fields::SIZE size
static PyObject * Connect(PyObject *self, PyObject *args, PyObject *kwargs)
const GenericPointer< typename T::ValueType > T2 value
static bool Contains(const CSeq_loc &a, const CSeq_loc &b, CScope *scope)
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
wxEVT_COMMAND_MENU_SELECTED
ViewerWindowBase::OnEditMenu ViewerWindowBase::OnJustification EVT_MENU(MID_SHOW_GEOM_VLTNS, ViewerWindowBase::OnShowGeomVltns) EVT_MENU(MID_FIND_PATTERN
#define row(bind, expected)
static const char * kColNumVisTag
static const char * kColumnTag
static const char * checked_xpm[]
static const char * down2_xpm[]
#define HEADER_CONTEXT_SORT
#define wxID_HEADER_CONTEXT_MENU
#define MAX_COLNAMES_SHOWED_IN_POPUP
static const char * kColNumTag
static const char * down_xpm[]
static const long kDefStyle
static const char * kColModIndex
static const char * kColumnWidth
static const char * up_xpm[]
static int gs_popupMenuSelection
static const char * kColModelName
#define wxID_HEADER_CONTEXT_MORE
static const char * kColNumHidTag
#define INIT_MEMBERS_CwxTableListCtrl
#define HEADER_CONTEXT_MORE
static const char * kSortedOrder
static const char * kSortedGlobal
static string GetColumnSectionName(int ix)
#define UNCHECKED_ICON_ID
static const char * kColNumModTag
static const char * kColumnShown
static const char * up2_xpm[]
static const char * unchecked_xpm[]
static const char * kSortedColumn
static const char * kColVisOrder
int g(Seg_Gsm *spe, Seq_Mtf *psm, Thd_Gsm *tdg)
wxString ToWxString(const string &s)
string ToStdString(const wxString &s)
wxRect GetScreenRect(const wxWindow &win)
void CleanupSeparators(wxMenu &menu)
Removes extra separators (in the begining or at the end of the menu, ot those that precede other sepa...
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