A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/table__listctrl_8cpp_source.html below:

NCBI C++ ToolKit: src/gui/widgets/wx/table_listctrl.cpp Source File

46 #include <wx/artprov.h> 47 #include <wx/textbuf.h> 48 #include <wx/renderer.h> 51 #define MAX_COLNAMES_SHOWED_IN_POPUP 12 52 #define wxID_HEADER_CONTEXT_MENU 2000 53 #define HEADER_CONTEXT_MORE 0 54 #define HEADER_CONTEXT_SORT 1 55 #define wxID_HEADER_CONTEXT_MORE (wxID_HEADER_CONTEXT_MENU+MAX_COLNAMES_SHOWED_IN_POPUP+HEADER_CONTEXT_MORE) 56 #define wxID_HEADER_CONTEXT_SORT (wxID_HEADER_CONTEXT_MENU+MAX_COLNAMES_SHOWED_IN_POPUP+HEADER_CONTEXT_SORT) 106 #define INIT_MEMBERS_CwxTableListCtrl \ 107  , m_ImageList( 16, 16 ) \ 109  , mf_OwnDataModel( false ) \ 110  , m_ModelImageShift( 0 ) \ 112  , m_NumColumnsVisible( 0 ) \ 113  , mf_Propagate( false ) \ 115  , m_FilterInvalid( false ) \ 117  , m_Sorted( eNoSort ) \ 118  , m_SortInvalid( false ) \ 119  , m_PrepareSortHint( false ) \ 127 static const long kDefStyle

= wxLC_REPORT | wxLC_VIRTUAL | wxLC_HRULES | wxLC_VRULES;

135  const

wxValidator& validator,

139

parent, 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__ 320

SetBackgroundStyle(wxBG_STYLE_COLOUR);

321

SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));

413  if

( decor_model !=

NULL

){

435  if

( decor_model !=

NULL

){

467

SetSingleStyle(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  int

numCols = GetColumnCount();

513

wxASSERT_MSG( col >= 0 && col < numCols,

wxT

(

"Col index out of bounds"

) );

514

wxASSERT_MSG( vis_col >= 0 && vis_col < numCols,

wxT

(

"Visual col index out of bounds"

) );

518  if

( orderArray.Count() > 0 ){

520  int

old_vis_col = orderArray[col];

521  if

( old_vis_col < vis_col ){

522  for

(

int i

= 0;

i

< numCols;

i

++ ){

524

orderArray[

i

] > old_vis_col

525

&& orderArray[

i

] <= vis_col

530

orderArray[col] = vis_col;

532

}

else if

( vis_col < old_vis_col ){

533  for

(

int i

= 0;

i

< numCols;

i

++ ){

535

orderArray[

i

] >= vis_col

536

&& orderArray[

i

] < old_vis_col

541

orderArray[col] = vis_col;

567

index.Add( -1, GetColumnCount() );

569  for

(

int i

= 0;

i

< GetColumnCount();

i

++ ){

570

index[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  return

order[aColIx] - hidden;

616

index.Add( -1, GetColumnCount() );

618  for

(

int i

= 0;

i

< GetColumnCount();

i

++ ){

619

index[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  return

order[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

++ ){

780

item.SetMask( wxLIST_MASK_FORMAT );

781  if

( wxListView::GetColumn( aColIx, item ) ){

782  return

item.GetAlign();

784  return

wxLIST_FORMAT_CENTRE;

790

item.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 ){

805

aColumn.

m_Item

.SetWidth( 0 );

809  if

( (aColumn.

m_Item

.GetMask() & wxLIST_MASK_TEXT) == 0 ){

813  if

( wxListView::InsertColumn( GetColumnCount(), aColumn.

m_Item

) >= 0 ){

817

aColumn.

m_Width

= GetColumnWidth( GetColumnCount() -1 );

834  if

( decor_model !=

NULL

){

843  if

( aColIx >= 0 && aColIx < GetColumnCount() ){

844  bool

was_visible =

false

;

845  bool

was_erased =

false

;

849  m_Columns

[aColIx].m_Width = GetColumnWidth( aColIx );

854

SetColumnWidth( aColIx, 0 );

859  if

( wxListView::DeleteColumn( aColIx ) ){

899  if

( aColIx >= GetColumnCount() ){

902  if

( aTargetColIx >= GetColumnCount() ){

906  if

( aColIx == aTargetColIx ){

910

wxListView::GetColumn( aColIx,

m_Columns

[aColIx].m_Item );

913

DeleteColumn( aColIx );

916

InsertColumn( aTargetColIx,

column

.m_Item );

955  if

( aColIx >= 0 && aColIx < GetColumnCount() ){

957

SetColumnWidth( 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  auto

itemId =

event

.GetItem();

1053  if

( itemId >= 0 && itemId < GetItemCount() && wxGetKeyState( WXK_SHIFT ) ){

1054

wxListEvent sel_evt( event );

1055

sel_evt.SetEventType(

1056

IsSelected( itemId )

1057

? wxEVT_COMMAND_LIST_ITEM_SELECTED

1058

: wxEVT_COMMAND_LIST_ITEM_DESELECTED

1061

GetEventHandler()->ProcessEvent(sel_evt);

1070  return

GetNextItem( GetItemCount(), wxLIST_NEXT_ABOVE, wxLIST_STATE_SELECTED );

1076  int

num_items = GetItemCount();

1078  for

(

int i

= 0;

i

< num_items;

i

++ ) {

1079

SetItemState(

i

, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED );

1086  for

(

int

item = -1;

1087

(item =

static_cast<int>

(GetNextItem( item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED ))) != -1;) {

1088

SetItemState( item, 0, wxLIST_STATE_SELECTED );

1097  for

(

int

item = -1;

1098

(item =

static_cast<int>

(GetNextItem( item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED ))) != -1;) {

1107  for

(

int

item = -1;

1108

(item =

static_cast<int>

(GetNextItem( item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED ))) != -1;) {

1110

rows.push_back(

r

);

1119  for

(

size_t i

= 0;

i

< rows.size();

i

++ ) {

1161  if

( preserve_state ){

1188  for

(

auto

mRow = 0; mRow < model.

GetNumRows

(); mRow++ ){

1194  for

(

int

mRow = 0; mRow < model.

GetNumRows

(); mRow++ ){

1215  if

( preserve_state ){

1260  if

( colSorter !=

null

){

1266  GetModel

()->GetColumnType( model_ix )

1269  if

( defSorter !=

NULL

){

1291  int

col = sort_itr->first;

1303  if

( sorter.

IsNull

() ){

1304

sorter = col_sorter;

1320  for

(

int

col = 0; col < GetColumnCount(); col++ ){

1327

SetColumn( col, item );

1338  int

sorted_col = sort_itr->first;

1347  if

( sorted_state ==

eNoSort

){

1363

SetImageList( &

m_ImageList

, wxIMAGE_LIST_SMALL );

1367

SetColumn( sorted_col, item );

1383  if

( preserve_state ){

1453  if

( preserve_state ){

1490  if

( found_itr->first == col ){

1520

event.GetEventType() == wxEVT_COMMAND_LIST_ITEM_SELECTED,

1521  static_cast<int>

(event.GetIndex())

1535  int

click_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 1590

wxPoint point = anEvt.GetPoint();

1624 #if defined(__WXGTK__) || defined(__WXMAC__) 1629  if

( anEvt.GetItem().GetWidth() == 0 ){

1639  int

drag_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();

1665

menu =

data

? (wxMenu*)

data

:

new

wxMenu();

1670

anEvent.SetClientData( menu );

1675

anEvent.SetClientData(

NULL

);

1685

aMenu.Append( wxID_SEPARATOR,

wxT

(

"Edit"

) );

1711

PopupMenu(&menu, pos);

1739

menu.AppendSeparator();

1744  if

( rc != wxID_NONE ){

1756  for

(

int

item = -1;; ) {

1757

item =

static_cast<int>

(GetNextItem(item,

1759

wxLIST_STATE_SELECTED));

1767  int

topVisibleItem =

static_cast<int>

(GetTopItem());

1777  for

(

size_t i

= 0;

i

<

state

->m_Selected.size(); ++

i

) {

1779  if

(selectedItem >= 0) {

1780

SetItemState( selectedItem, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED );

1786  if

( indexFocusRow != -1 ){

1790  if

(

state

->m_TopModelRow >= 0 ){

1793

EnsureVisible( topVisibleItem );

1811  if

( aSorter !=

NULL

){

1823  virtual bool operator()

(

const

wxVariant& aAny,

const

wxVariant& bAny )

const 1825  return

!aAny.GetBool() && bAny.GetBool();

1834  virtual bool operator()

(

const

wxVariant& aAny,

const

wxVariant& bAny )

const 1836  return

aAny.GetChar() < bAny.GetChar();

1845  virtual bool operator()

(

const

wxVariant& aAny,

const

wxVariant& bAny )

const 1847  return

aAny.GetLong() < bAny.GetLong();

1856  virtual bool operator()

(

const

wxVariant& aAny,

const

wxVariant& bAny )

const 1858  return

aAny.GetDouble() < bAny.GetDouble();

1867  virtual bool operator()

(

const

wxVariant& aAny,

const

wxVariant& bAny )

const 1869  return

aAny.GetString().Cmp( bAny.GetString() ) < 0;

1894  bool

state_saved =

false

;

1936

state_saved =

true

;

1944  int

mInserted = mEnd - mStart + 1;

1946

SetItemCount( GetItemCount() + mInserted );

1947  if

( GetItemCount() ){

1948

RefreshItems( mStart, GetItemCount()-1 );

1959

state_saved =

true

;

1967  int

mDeleted = mEnd - mStart + 1;

1969

SetItemCount( GetItemCount() - mDeleted );

1970  if

( GetItemCount() ){

1971

RefreshItems( mStart, GetItemCount()-1 );

1985

RefreshItem( mStart );

1987

RefreshItems( mStart, mEnd );

2009

aType ==

wxT

(

"short"

)

2010

|| aType ==

wxT

(

"int"

)

2011

|| aType ==

wxT

(

"long"

)

2012

|| aType ==

wxT

(

"unsigned char"

)

2013

|| aType ==

wxT

(

"float"

)

2014

|| aType ==

wxT

(

"double"

)

2016  return

wxLIST_FORMAT_RIGHT;

2019

aType ==

wxT

(

"char"

)

2021  return

wxLIST_FORMAT_CENTER;

2024

aType ==

wxT

(

"bool"

)

2026  return

wxLIST_FORMAT_CENTER;

2029  return

wxLIST_FORMAT_LEFT;

2035  if

( anEvt.GetKeyCode() ==

'A'

&& anEvt.ControlDown() ){

2055

anEvt.Enable( GetFirstSelected() != -1 );

2063  bool

first_row =

true

;

2064  while

( (

row

= GetNextSelected(

row

)) != -1 ){

2077

clip_str += wxTextBuffer::GetEOL();

2079

clip_str += row_str;

2082  if

( !clip_str.IsEmpty() ){

2089  string

name =

"Debug"

;

2090  if

( anEvt.GetKeyCode() == wxEVT_COMMAND_LIST_BEGIN_DRAG ){

2091

name =

"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 ){

2108

name =

"COL-BEGIN-DRAG"

;

2109

}

else if

( anEvt.GetKeyCode() == wxEVT_COMMAND_LIST_COL_DRAGGING ){

2110

}

else if

( anEvt.GetKeyCode() == wxEVT_COMMAND_LIST_COL_END_DRAG ){

2111

name =

"COL-END-DRAG"

;

2112

}

else if

( anEvt.GetKeyCode() == wxEVT_COMMAND_LIST_ITEM_FOCUSED ){

2136  int

high = GetItemCount() - 1;

2138  while

(low <= high) {

2139  int

mid = (low + high) / 2;

2142

GetItemRect(mid, rect);

2144  if

(rect.Contains(pt))

2157  int

total_width = 0;

2161  for

(

int i

= 0;

i

< GetColumnCount(); ++

i

) {

2162

total_width += this->GetColumnWidth(

i

);

2165  if

(pt.x < total_width) {

2175 #if defined(__WXGTK__) 2176  if

(event.Dragging()) {

2182

wxPoint pt = ScreenToClient(wxGetMousePosition());

2192  m_Timer

.Start(500, wxTIMER_ONE_SHOT);

2208  static

wxTipWindow* s_tipWindow =

nullptr

;

2212

s_tipWindow->SetTipWindowPtr(

nullptr

);

2213

s_tipWindow->Close();

2214

s_tipWindow =

nullptr

;

2223

wxPoint pt = wxGetMousePosition();

2231

wxClientDC dc(

this

);

2237  r

.SetPosition(ClientToScreen(

r

.GetPosition()));

2239 #if defined(__WXGTK__) 2240

s_tipWindow =

new

wxTipWindow(

this

,

m_ToolTipText

, w, &s_tipWindow, &

r

);

2241 #elif defined(__WXMAC__) 2243

s_tipWindow =

new

wxTipWindow(

nullptr

,

m_ToolTipText

, w, &s_tipWindow, &

r

);

2274  const int

itemCount = GetItemCount();

2275  const bool

drawHRules = HasFlag(wxLC_HRULES);

2277  const bool

drawVRules = HasFlag(wxLC_VRULES);

2279  if

(!InReportView() || !(drawHRules || drawVRules) || !itemCount)

2285

wxPaintDC dc(

this

);

2287

wxControl::OnPaint(anEvt);

2290

dc.SetDeviceOrigin(0, 0);

2292

wxPen pen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT));

2294

dc.SetBrush(* wxTRANSPARENT_BRUSH);

2296

wxSize clientSize = GetClientSize();

2301  int

top = 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  int

cy = itemRect.GetTop();

2313

dc.DrawLine(0, cy, clientSize.x, cy);

2316  if

(

i

== itemCount - 1)

2318

cy = itemRect.GetBottom();

2319

dc.DrawLine(0, cy, clientSize.x, cy);

2328

wxRect firstItemRect;

2329

GetItemRect(0, firstItemRect);

2331  if

(GetItemRect(itemCount - 1, itemRect))

2335  static const int

gap = 2;

2336

dc.SetPen(*wxTRANSPARENT_PEN);

2337

dc.SetBrush(wxBrush(GetBackgroundColour()));

2338

dc.DrawRectangle(0, firstItemRect.GetY() - gap,

2339

clientSize.GetWidth(), gap);

2342

dc.SetBrush(*wxTRANSPARENT_BRUSH);

2344  const int

numCols = GetColumnCount();

2345

wxVector<int> indexArray(numCols);

2346  if

( !ListView_GetColumnOrderArray(GetHwnd(),

2350

wxFAIL_MSG(

wxT

(

"invalid column index array in OnPaint()"

) );

2354  int

x = itemRect.GetX();

2355  for

(

int

col = 0; col < numCols; col++)

2357  int

colWidth = GetColumnWidth(indexArray[col]);

2359

dc.DrawLine(x-1, firstItemRect.GetY() - gap,

2360

x-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() ){

2433

wxBitmap

bmp

= wxArtProvider::GetBitmap( alias );

2446

nonconst_this->SetImageList( &

m_ImageList

, wxIMAGE_LIST_SMALL );

2457  static

wxListItemAttr s_attr;

2461  if

( decor_model !=

NULL

){

2465  if

(

color

.IsOk() ){

2466

s_attr.SetBackgroundColour(

color

);

2472

wxColor fore = GetTextColour();

2473

wxColor back =

const_cast<CwxTableListCtrl

*

>

(

this

)->GetBackgroundColour();

2477  #define uch unsigned char 2499  return

IsSelected(

row

);

2504  return

(GetWindowStyleFlag() & wxLC_HRULES) != 0;

2509

SetSingleStyle( wxLC_HRULES, show );

2542  if

(model ==

NULL

){

2548  int

total_num = GetColumnCount();

2555  _ASSERT

(total_num == num_vis + num_hid);

2570

vector<int> sorted_cols;

2571

vector<int> sorted_orders;

2574

sorted_cols.push_back(coltr->first);

2575

sorted_orders.push_back((

int

)coltr->second);

2588  if

(GetColumnCount() > 0) {

2591  for

(

int

ix = 0; ix < total_num; ix++){

2598  int

width = 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){

2661

vector<bool> mod_vec(

GetModel

()->GetNumColumns(),

false

);

2663

wxArrayInt order_array;

2664

order_array.SetCount(total_num, -1);

2666  for

(

int

ix = 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);

2694

mod_vec[mod_ix] =

true

;

2698

cur_ix = GetColumnCount();

2703

SetColumnWidth(cur_ix, width);

2710  if

(ix < GetColumnCount()){

2718

order_array.SetCount(cur_ix + 1, -1);

2719

order_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()){

2762

vector<int> sorted_cols;

2763

vector<int> sorted_orders;

2768  size_t

cols_num = sorted_cols.size();

2769  if

(sorted_orders.size() < cols_num){

2770

cols_num = sorted_orders.size();

2773  for

(

size_t

ix = 0; ix < cols_num; ix++){

2774  int

sort_ix = sorted_cols[ix];

2775  if

(sort_ix >= 0 && sort_ix < GetColumnCount()){

2794  catch

(std::exception& e){

2799  if

(!

error

.empty()){

2809

vector<wxString> selectedColumns;

2811  for

(

int i

= 0;

i

< colNum; ++

i

) {

2819  if

(dlg.ShowModal() == wxID_OK) {

2821  if

(fileName.empty())

2824

unique_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 &section, 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