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/seq__table__grid_8cpp_source.html below:

NCBI C++ ToolKit: src/gui/packages/pkg_sequence_edit/seq_table_grid.cpp Source File

32 #include <wx/msgdlg.h> 34 #include <wx/settings.h> 35 #include <wx/dcclient.h> 37 #include <wx/textdlg.h> 38 #include <wx/tokenzr.h> 39 #include <wx/clipbrd.h> 75

wxGridCellAttr *attr =

NULL

;

79  case

(wxGridCellAttr::Any):

82  auto

it =

m_cache

.find(make_pair(

row

, col));

91  case

(wxGridCellAttr::Col):

92

attr = wxGridCellAttrProvider::GetAttr(

row

, col, kind);

95  case

(wxGridCellAttr::Row):

96

attr = wxGridCellAttrProvider::GetAttr(

row

, col, kind);

108  auto

it =

m_cache

.find(make_pair(

row

, col));

119

it->second->DecRef();

137  const

wxString& name)

140

wxGrid::Create(parent,

id

, pos,

size

, style, name);

145  if

( wxGrid::m_rowHeights.IsEmpty() )

148

wxGrid::InitRowHeights();

151  m_diffs

.resize( m_numRows, 0);

164

wxASSERT_MSG( sizeNew == -1, wxS(

"New size must be positive or -1."

) );

167  if

( sizeCurrent >= 0 )

171

sizeCurrent = -sizeCurrent;

176  else if

( sizeNew == 0 )

181  if

( sizeCurrent <= 0 )

186

sizeCurrent = -sizeCurrent;

194  const int

sizeOld = sizeCurrent < 0 ? 0 : sizeCurrent;

196

sizeCurrent = sizeNew;

198  return

sizeCurrent - sizeOld;

211  for

(

int i

= 0;

i

< m_numRows;

i

++ )

214

wxGrid::m_rowBottoms[

i

] += diff;

217

InvalidateBestSize();

224  const

wxGridCellAttr& attr,

228

dc.SetBackgroundMode( wxBRUSHSTYLE_TRANSPARENT );

233  if

(

grid

.IsThisEnabled() )

238  if

(

grid

.HasFocus() )

239

clr =

grid

.GetSelectionBackground();

241

clr = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW);

242

dc.SetTextBackground( clr );

243

dc.SetTextForeground(

grid

.GetSelectionForeground() );

247

dc.SetTextBackground( attr.GetBackgroundColour() );

248

dc.SetTextForeground( attr.GetTextColour() );

253

dc.SetTextBackground(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));

254

dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT));

257

dc.SetFont( attr.GetFont() );

261

wxGridCellAttr& attr,

263  const

wxRect& rectCell,

268

wxGridCellRenderer::Draw(

grid

, attr, dc, rectCell,

row

, col, isSelected);

273  int

horizAlign, vertAlign;

274

attr.GetAlignment(&horizAlign, &vertAlign);

276

wxRect rect = rectCell;

281  grid

.DrawTextRectangle(dc,

text

, rect, horizAlign, vertAlign);

287

dc.SetFont(attr.GetFont());

289

wxCoord w, h, lineHeight;

290

dc.GetMultiLineTextExtent(

text

, &w, &h, &lineHeight);

296  const size_t

chunk = 40;

298  for

(

size_t i

= 0;

i

<

text

.Length();

i

+= chunk)

309

: m_ValuesTable(values_table)

320  return static_cast<int>

(

m_ValuesTable

->GetColumns().size()) - 1;

329  size_t

pos = col + 1;

330  size_t

row_num =

row

;

334  if

(

column

->GetData().IsString()) {

335  val

=

column

->GetData().GetString()[row_num];

337  else if

(

column

->GetData().IsId()) {

340  else if

(

column

->GetData().IsInt()) {

343  return

wxString(

val

);

346  return

wxEmptyString;

352  size_t

vcol = vis_col + 1;

353  size_t

vrow = vis_row;

356  if

(col->GetData().IsString()) {

357  while

(col->GetData().GetSize() <= vrow) {

358

col->SetData().SetString().push_back(

""

);

360

col->SetData().SetString()[vrow] =

value

.ToStdString();

362  else if

(col->GetData().IsInt()) {

366

col->SetData().SetString()[vrow] =

value

.ToStdString();

374

objects::CSeq_table::TColumns::iterator it =

m_ValuesTable

->SetColumns().begin();

375  while

(it !=

m_ValuesTable

->SetColumns().end() && skip < pos + 1) {

380  for

(

size_t i

= 0;

i

< numCols;

i

++) {

382

last_col->SetData().SetString();

387

wxGridTableMessage

msg

(

this

,

388

wxGRIDTABLE_NOTIFY_COLS_INSERTED,

389  static_cast<int>

(pos),

390  static_cast<int>

(numCols));

392

GetView()->ProcessTableMessage(

msg

);

399  for

(

size_t i

= 0;

i

< numCols;

i

++) {

401

last_col->SetData().SetString();

407

wxGridTableMessage

msg

(

this

,

408

wxGRIDTABLE_NOTIFY_COLS_APPENDED,

409  static_cast<int>

(numCols),

410  static_cast<int>

(numCols));

412

GetView()->ProcessTableMessage(

msg

);

419  if

(pos + numCols < m_ValuesTable->SetColumns().

size

())

425

wxGridTableMessage

msg

(

this

,

426

wxGRIDTABLE_NOTIFY_COLS_DELETED,

427  static_cast<int>

(pos),

428  static_cast<int>

(numCols));

430

GetView()->ProcessTableMessage(

msg

);

441  if

(id_col && id_col->GetData().GetSize() >

r

) {

447  return

wxString(

label

);

456  if

(

column

->IsSetHeader()) {

457  if

(

column

->GetHeader().IsSetTitle()) {

460  else if

(

column

->GetHeader().IsSetField_name()) {

521

wxWindowID

id

,

const

wxPoint& pos,

const

wxSize&

size

,

long

style )

522

: m_Table(values_table), m_Choices(choices), m_Copied (

NULL

), m_CollapseGlyphCol(glyph_col)

536 

wxPanel::Create( parent,

id

, pos,

size

, style );

541

GetSizer()->SetSizeHints(

this

);

591

wxBoxSizer* itemBoxSizer2 =

new

wxBoxSizer(wxVERTICAL);

592

itemPanel1->SetSizer(itemBoxSizer2);

595

itemGrid3->SetDefaultColSize(50);

596

itemGrid3->SetDefaultRowSize(25);

597

itemGrid3->SetColLabelSize(25);

598

itemGrid3->SetRowLabelSize(100);

600

itemGrid3->CreateGrid(5, 5, wxGrid::wxGridSelectCells);

601

itemBoxSizer2->Add(itemGrid3, 0, wxGROW|wxALL, 5);

606  m_Grid

->SetTable(gridAdapter,

true

);

610  m_Grid

->SetTabBehaviour(wxGrid::Tab_Leave);

616  m_Grid

->AutoSizeRows(

false

);

624  if

(pos < m_Grid->GetNumberCols()) {

625  for

(

int i

= 0;

i

<

m_Grid

->GetNumberRows();

i

++) {

626  m_Grid

->GetOrCreateCellAttr(

i

, pos)->SetReadOnly(

val

);

638  int

pos =

m_Grid

->GetNumberCols();

639  for

(

int i

= 0;

i

<

m_Grid

->GetNumberCols();

i

++) {

652  for

(

int

c = 0; c <

m_Grid

->GetNumberCols(); c++) {

669  int

problem_pos =

m_Grid

->GetNumberCols();

670  for

(

int i

= 0;

i

<

m_Grid

->GetNumberCols();

i

++) {

683  for

(

int i

= 0;

i

<

m_Grid

->GetNumberCols();

i

++) {

686  int

lines_this_column = 1;

687  while

(pos != string::npos) {

691  if

(lines_this_column > lines) {

692

lines = lines_this_column;

695  int

l_height =

m_Grid

->GetColLabelSize();

696  m_Grid

->SetColLabelSize( lines * l_height );

703  if

(choices.empty()) {

712  while

(pos >=

m_Choices

->GetColumns().size()) {

716  m_Choices

->SetColumns()[pos]->ResetData();

717  if

(!choices.empty()) {

719  ITERATE

(vector<string>, it, choices) {

720

col->SetData().SetString().push_back(*it);

722

wxArrayString val_list;

724

wxClientDC dc(

this

);

725  for

(

size_t

j = 0; j < col->GetData().GetString().

size

(); j++) {

726  string val

= col->GetData().GetString()[j];

728

wxSize text_size = dc.GetTextExtent(

val

);

729  size_t

this_len = text_size.GetWidth();

730  if

(this_len > max_len) {

734  if

(col->GetData().GetString().size() == 2

737

wxGridCellBoolEditor::UseStringValues(

wxT

(

"true"

), wxEmptyString);

739  m_Grid

->SetCellEditor(

row

, pos,

new

wxGridCellBoolEditor ());

741  m_Grid

->AutoSizeColLabelSize(pos);

744  m_Grid

->SetCellEditor(

row

, pos,

new

wxGridCellChoiceEditor (val_list,

false

));

746  m_Grid

->SetColMinimalWidth(pos,

static_cast<int>

(max_len + wxSYS_VSCROLL_X));

747  m_Grid

->SetColSize(pos,

static_cast<int>

(max_len + wxSYS_VSCROLL_X));

751  m_Grid

->SetCellEditor(

row

, pos,

new

wxGridCellTextEditor ());

753  m_Grid

->AutoSizeColLabelSize(pos);

755  m_Grid

->AutoSizeRows(

false

);

766

wxArrayString val_list;

768

wxClientDC dc(

this

);

769  for

(

size_t

j = 0; j < col->

GetData

().GetString().

size

(); j++) {

772

wxSize text_size = dc.GetTextExtent(

val

);

773  size_t

this_len = text_size.GetWidth();

774  if

(this_len > max_len) {

781

wxGridCellBoolEditor::UseStringValues(

wxT

(

"true"

), wxEmptyString);

783  m_Grid

->SetCellEditor(

row

,

i

,

new

wxGridCellBoolEditor ());

785  m_Grid

->AutoSizeColLabelSize(

i

);

788  m_Grid

->SetCellEditor(

row

,

i

,

new

wxGridCellChoiceEditor (val_list,

false

));

790  m_Grid

->SetColMinimalWidth(

i

,

static_cast<int>

(max_len + wxSYS_VSCROLL_X));

791  m_Grid

->SetColSize(

i

,

static_cast<int>

(max_len + wxSYS_VSCROLL_X));

794  m_Grid

->AutoSizeColLabelSize(

i

);

797  while

(i < m_Grid->GetNumberCols()) {

802  m_Grid

->AutoSizeColLabelSize(

i

);

807  m_Grid

->AutoSizeColumns();

817  int

sum =

m_Grid

->GetRowLabelSize();

818  for

(

int i

= 0;

i

<

m_Grid

->GetNumberCols();

i

++) {

819

sum +=

m_Grid

->GetColSize(

i

);

830

wxSize current_size =

m_Grid

->GetSize();

831  if

(sum > current_size.x) {

832

current_size.x = sum;

833  m_Grid

->SetMinClientSize(current_size);

881  for

(

int i

= 0;

i

<

m_Grid

->GetNumberRows();

i

++)

893  if

( !gridAdapter ) {

908  m_Grid

->SetTable(gridAdapter,

true

);

917  static bool

registered =

false

;

927  "Copy cell or cells"

);

933  "Paste cell or cells"

);

939  "Append to cell or cells"

);

945  "Paste to cell or cells from SeqId"

);

998

m_MenuCol = evt.GetCol();

999

m_Grid->PopupMenu(menu, evt.GetPosition());

1007  if

( !gridAdapter ) {

1011  for

(

int i

=0;

i

<num_rows;

i

++)

1019 bool cmpTableValues

(

const

pair< pair<string,int>,

int

> &

a

,

const

pair< pair<string,int>,

int

> &

b

)

1022  if

(

a

.first.first ==

b

.first.first)

return a

.first.second <

b

.first.second;

1026  return a

.first.first <

b

.first.first;

1041  int

col =

m_Grid

->GetSortingColumn();

1047  bool

ascend =

m_Grid

->IsSortOrderAscending();

1060  if

( !gridAdapter ) {

1066  if

(!

column

->IsSetData() || !

column

->GetData().IsString())

1072  int

num_cols =

static_cast<int>

(values_table->GetColumns().size());

1074  for

(

int

j=0; j<num_cols; j++)

1076  switch

(values_table->GetColumns()[j]->GetData().Which())

1079  if

(values_table->SetColumns()[j]->SetData().SetId().size() > num_rows)

1080

num_rows =

static_cast<int>

(values_table->SetColumns()[j]->SetData().SetId().size());

1083  if

(values_table->SetColumns()[j]->SetData().SetString().size() > num_rows)

1084

num_rows =

static_cast<int>

(values_table->SetColumns()[j]->SetData().SetString().size());

1091

vector<vector<bool> > selection(num_rows, vector<bool>(num_cols,

false

));

1092  for

(

int i

=0;

i

<num_rows;

i

++)

1093  for

(

int

j=0; j<num_cols; j++)

1094  if

(

m_Grid

->IsInSelection(

i

,j))

1095

selection[

i

][j] =

true

;

1097  for

(

int

j=0; j<num_cols; j++)

1099  switch

(values_table->GetColumns()[j]->GetData().Which())

1102

values_table->SetColumns()[j]->SetData().SetId().resize(num_rows);

1105

values_table->SetColumns()[j]->SetData().SetString().resize(num_rows);

1112

old_table->Assign(*values_table);

1114

vector < pair< pair<string,int>,

int

> > sorted;

1115  for

(

int i

=0;

i

<num_rows;

i

++)

1117  string

s1 =

column

->GetData().GetString()[

i

];

1120

sorted.push_back(pair< pair<string,int>,

int

>(p,

i

));

1125

std::reverse(sorted.begin(),sorted.end());

1126  m_Grid

->ClearSelection();

1127  for

(

int i

=0;

i

<num_rows;

i

++)

1129  int

old_i = sorted[

i

].second;

1130  for

(

int

j=0; j<num_cols; j++)

1132  switch

(values_table->GetColumns()[j]->GetData().Which())

1135

values_table->SetColumns()[j]->SetData().SetId()[

i

] = old_table->SetColumns()[j]->GetData().GetId()[old_i];

1138

values_table->SetColumns()[j]->SetData().SetString()[

i

] = old_table->SetColumns()[j]->GetData().GetString()[old_i];

1143  if

(selection[old_i][j])

1144  m_Grid

->SelectBlock(

i

,j,

i

,j,

true

);

1153

unordered_map<int, int>::iterator it =

m_CollapseCell

.find(expand_row);

1156  for

(

unsigned int

j = 0; j < num_cols; j++)

1159  if

(it->second == 1)

1161

wxString

val

=

m_Grid

->GetCellValue(expand_row,j);

1162  if

(

val

!=

_

(

"All present, mixed"

) &&

val

!=

_

(

"Some missing, one unique"

) &&

val

!=

_

(

"Some missing, mixed"

) &&

1163

!(all_present[j] && all_same[j]))

1167  if

(all_present[j] && !all_same[j])

1169  m_Grid

->SetCellValue(expand_row,j,

_

(

"All present, mixed"

));

1170  m_Grid

->GetOrCreateCellAttr(expand_row,j)->SetReadOnly(

true

);

1172  if

(!all_present[j] && all_same[j] && !values[j].IsEmpty())

1174  m_Grid

->SetCellValue(expand_row,j,

_

(

"Some missing, one unique"

));

1175  m_Grid

->GetOrCreateCellAttr(expand_row,j)->SetReadOnly(

true

);

1177  if

(!all_present[j] && !all_same[j])

1179  m_Grid

->SetCellValue(expand_row,j,

_

(

"Some missing, mixed"

));

1180  m_Grid

->GetOrCreateCellAttr(expand_row,j)->SetReadOnly(

true

);

1185

wxString

val

=

m_Grid

->GetCellValue(expand_row,j);

1186  if

(

val

==

_

(

"All present, mixed"

) ||

val

==

_

(

"Some missing, one unique"

) ||

val

==

_

(

"Some missing, mixed"

))

1189  m_Grid

->GetOrCreateCellAttr(expand_row,j)->SetReadOnly(

false

);

1192

all_present[j] =

true

;

1193

all_same[j] =

true

;

1195  if

(it->second == 1)

1208  m_Grid

->SetRowMinimalAcceptableHeight(0);

1214  unsigned int

num_cols =

m_Grid

->GetNumberCols();

1215  unsigned int

num_rows =

m_Grid

->GetNumberRows();

1217  bool

collapse =

false

;

1218

vector<bool> all_present(num_cols,

true

),all_same(num_cols,

true

);

1219

vector<wxString> values(num_cols);

1220  int

expand_row = -1;

1222  for

(

unsigned int i

= 0;

i

< num_rows;

i

++)

1230  if

(expand_row >=0 && !

m_Grid

->IsRowShown(

i

))

1232  for

(

unsigned int

j = 0; j < num_cols; j++)

1233  if

(!

m_Grid

->IsReadOnly(expand_row,j))

1234  m_Grid

->SetCellValue(

i

,j,

m_Grid

->GetCellValue(expand_row,j));

1242  for

(

unsigned int i

= 0;

i

< num_rows;

i

++)

1248  for

(

unsigned

j = 0; j < num_cols; j++)

1251  if

(

m_Grid

->GetCellValue(

i

-1,j).IsEmpty())

1252

all_present[j] =

false

;

1253

values[j] =

m_Grid

->GetCellValue(

i

-1,j);

1271  for

(

unsigned

j = 0; j < num_cols; j++)

1274  if

(

m_Grid

->GetCellValue(

i

,j).IsEmpty())

1275

all_present[j] =

false

;

1278  if

(values[j].IsEmpty())

1279

values[j] =

m_Grid

->GetCellValue(

i

,j);

1280  if

(

m_Grid

->GetCellValue(

i

,j) != values[j])

1281

all_same[j] =

false

;

1284

unordered_map<int, int>::iterator it =

m_CollapseCell

.find(expand_row);

1291  int

row_size =

m_Grid

->GetRowSize(expand_row);

1299  if

(collapse && num_rows > 0)

1301  unsigned int i

= num_rows-1;

1304

unordered_map<int, int>::iterator it =

m_CollapseCell

.find(expand_row);

1311  int

row_size =

m_Grid

->GetRowSize(expand_row);

1324  unsigned int

num_cols =

m_Grid

->GetNumberCols();

1325  unsigned int

num_rows =

m_Grid

->GetNumberRows();

1327  int

expand_row = -1;

1328

vector<bool> all_present(num_cols,

true

),all_same(num_cols,

true

);

1329

vector<wxString> values(num_cols);

1332  for

(

unsigned int i

= 0;

i

< num_rows;

i

++)

1340  if

(expand_row >=0 && !

m_Grid

->IsRowShown(

i

))

1342  for

(

unsigned

j = 0; j < num_cols; j++)

1343  if

(!

m_Grid

->IsReadOnly(expand_row,j))

1344  m_Grid

->SetCellValue(

i

,j,

m_Grid

->GetCellValue(expand_row,j));

1345  int

row_size =

m_Grid

->GetRowSize(expand_row);

1348  else if

(

m_Grid

->IsRowShown(

i

))

1352  for

(

unsigned int i

= 0;

i

< num_rows;

i

++)

1367

wxWindow* w = this->GetParent();

1368  while

(w !=

NULL

) {

1388  if

(!

m_Grid

->IsSelection())

1391

wxMessageBox(

wxT

(

"Please select a single column to rename"

),

wxT

(

"Error"

), wxOK | wxICON_ERROR,

this

);

1395  const

wxGridCellCoordsArray& selected_blocks =

m_Grid

->GetSelectionBlockTopLeft();

1396  size_t

num_blocks = selected_blocks.size();

1398  const

wxArrayInt& cols =

m_Grid

->GetSelectedCols();

1399  size_t

num_cols = cols.size();

1401  const

wxGridCellCoordsArray& selected_block_right =

m_Grid

->GetSelectionBlockBottomRight();

1402  if

(num_blocks != selected_block_right.size()) {

1404

wxMessageBox(

wxT

(

"Selection is too complex"

),

wxT

(

"Error"

), wxOK | wxICON_ERROR,

this

);

1409  if

(num_blocks == 1)

1411  int

left_col = selected_blocks[0].GetCol();

1412  int

right_col = selected_block_right[0].GetCol();

1413

num_cols = right_col - left_col + 1;

1417  else if

(num_cols == 1)

1422

wxArrayString srcModNameStrings;

1425  if

(choice.ShowModal() == wxID_OK)

1429  if

(!qual.IsEmpty())

1432  m_Grid

->GetTable()->SetColLabelValue(col, qual);

1440

wxMessageBox(

wxT

(

"Please select a single column to rename"

),

wxT

(

"Error"

), wxOK | wxICON_ERROR,

this

);

1449

wxMessageBox(

wxT

(

"This table was not set as collapsible"

),

wxT

(

"Error"

), wxOK | wxICON_ERROR,

this

);

1461

wxMessageBox(

wxT

(

"Please select a single editable column to collapse"

),

wxT

(

"Error"

), wxOK | wxICON_ERROR,

this

);

1470

wxMessageBox(

wxT

(

"This table does not have a collapsed column"

),

wxT

(

"Error"

), wxOK | wxICON_ERROR,

this

);

1501  if

(!

m_Grid

->IsSelection()) {

1506  if

( !gridAdapter ) {

1511  const

wxGridCellCoordsArray& selected_blocks =

m_Grid

->GetSelectionBlockTopLeft();

1512  size_t

num_blocks = selected_blocks.size();

1514  const

wxArrayInt& cols =

m_Grid

->GetSelectedCols();

1515  size_t

num_cols = cols.size();

1517  if

(num_blocks == 0 && num_cols == 0) {

1518

wxMessageBox(

wxT

(

"Nothing selected!"

),

wxT

(

"Error"

), wxOK | wxICON_ERROR,

this

);

1520

}

else if

(num_blocks > 1) {

1521

wxMessageBox(

wxT

(

"Selection is too complex"

),

wxT

(

"Error"

), wxOK | wxICON_ERROR,

this

);

1524  const

wxGridCellCoordsArray& selected_block_right =

m_Grid

->GetSelectionBlockBottomRight();

1525  if

(num_blocks != selected_block_right.size()) {

1526

wxMessageBox(

wxT

(

"Selection is too complex"

),

wxT

(

"Error"

), wxOK | wxICON_ERROR,

this

);

1533  int

shift_glyph = 0;

1535  if

(num_blocks == 1)

1537  int

left_col = selected_blocks[0].GetCol();

1538  int

right_col = selected_block_right[0].GetCol();

1539  for

(

int i

= left_col;

i

<= right_col;

i

++)

1544  if

(collapse_col ==

i

)

1548  if

(

i

< collapse_col)

1553  else if

(num_cols > 0)

1555  for

(

unsigned int i

= 0;

i

< num_cols;

i

++)

1560  if

(collapse_col == cols[

i

])

1564  if

(cols[

i

] < collapse_col)

1596  if

(!

m_Grid

->IsSelection()) {

1600  const

wxGridCellCoordsArray& selected_blocks =

m_Grid

->GetSelectionBlockTopLeft();

1601  size_t

num_blocks = selected_blocks.size();

1603  const

wxArrayInt& rows =

m_Grid

->GetSelectedRows();

1604  int

num_rows =

static_cast<int>

(rows.size());

1606  const

wxArrayInt& cols =

m_Grid

->GetSelectedCols();

1607  size_t

num_cols = cols.size();

1609  if

(num_blocks == 0 && num_rows == 0 && num_cols == 0) {

1610

wxMessageBox(

wxT

(

"Nothing selected!"

),

wxT

(

"Error"

), wxOK | wxICON_ERROR,

this

);

1612

}

else if

(num_blocks > 1

1613

|| (num_blocks > 0 && num_rows > 0)

1614

|| (num_blocks > 0 && num_cols > 0)

1615

|| (num_rows > 0 && num_cols > 0)) {

1616

wxMessageBox(

wxT

(

"Selection is too complex"

),

wxT

(

"Error"

), wxOK | wxICON_ERROR,

this

);

1619  const

wxGridCellCoordsArray& selected_block_right =

m_Grid

->GetSelectionBlockBottomRight();

1620  if

(num_blocks != selected_block_right.size()) {

1621

wxMessageBox(

wxT

(

"Selection is too complex"

),

wxT

(

"Error"

), wxOK | wxICON_ERROR,

this

);

1626  if

( !gridAdapter ) {

1634  int

bot_row = values_table->GetNum_rows() - 1;

1635  int

right_col =

static_cast<int>

(values_table->GetColumns().size()) - 1;

1636  if

(num_blocks == 1) {

1637

top_row = selected_blocks[0].GetRow();

1638

left_col = selected_blocks[0].GetCol();

1639

bot_row = selected_block_right[0].GetRow();

1640

right_col = selected_block_right[0].GetCol();

1641

num_rows = bot_row - top_row + 1;

1642

num_cols = right_col - left_col + 1;

1644  for

(

unsigned int i

= 0;

i

< num_cols;

i

++) {

1647

new_column->SetHeader().Assign(old_column->GetHeader());

1649  if

(old_column->IsSetData() && old_column->GetData().IsString())

1650  for

(j = (

unsigned

)top_row; j <= (unsigned)bot_row && j < old_column->GetData().GetString().size(); j++) {

1651  if

(j < old_column->GetData().GetString().size()) {

1652

new_column->SetData().SetString().push_back(old_column->GetData().GetString()[j]);

1654

new_column->SetData().SetString().push_back(

""

);

1657  m_Copied

->SetColumns().push_back(new_column);

1660

}

else if

(num_cols > 0) {

1661  for

(

unsigned int i

= 0;

i

< num_cols;

i

++) {

1664

new_column->Assign(*old_column);

1665  if

(old_column->IsSetData() && old_column->GetData().IsString())

1666  while

(new_column->GetData().GetString().size() < values_table->GetNum_rows()) {

1667

new_column->SetData().SetString().push_back(

""

);

1669  m_Copied

->SetColumns().push_back(new_column);

1671  m_Copied

->SetNum_rows(values_table->GetNum_rows());

1672

}

else if

(num_rows > 0) {

1673  for

(

unsigned int i

= 1;

i

< values_table->GetColumns().

size

();

i

++) {

1676

new_column->SetHeader().Assign(old_column->GetHeader());

1677  for

(

unsigned int

j = 0; j < (unsigned)num_rows; j++) {

1678  if

(j<rows.size() && old_column->IsSetData() && old_column->GetData().IsString() && rows[j] < old_column->GetData().GetString().size()) {

1679  string str

= old_column->GetData().GetString()[rows[j]];

1680

new_column->SetData().SetString().push_back(

str

);

1682

new_column->SetData().SetString().push_back(

""

);

1685  m_Copied

->SetColumns().push_back(new_column);

1698  for

(j = top; j <= bot; j++) {

1699  while

(dst->SetData().SetInt().size() <= j) {

1700

dst->SetData().SetInt().push_back(0);

1702  if

(src->GetData().IsInt()) {

1703

dst->SetData().SetInt()[j] = src->GetData().GetInt()[k];

1704

}

else if

(src->GetData().IsString()) {

1710  if

(k >= src->GetData().GetSize()) {

1722  bool append

,

string

delim)

1725  for

(j = top; j <= bot; j++) {

1726  while

(dst->SetData().SetString().size() <= j) {

1727

dst->SetData().SetString().push_back(

""

);

1731  if

(src->GetData().IsString()) {

1732  val

= src->GetData().GetString()[k];

1733

}

else if

(src->GetData().IsInt()) {

1737

dst->SetData().SetString()[j] =

val

;

1739

dst->SetData().SetString()[j] += delim +

val

;

1743  if

(k >= src->GetData().GetSize()) {

1754  bool append

,

string

delim)

1756  if

(dst->GetData().IsInt()) {

1758

}

else if

(dst->GetData().IsString()) {

1761

wxMessageBox(

wxT

(

"Bad column type!"

),

wxT

(

"Error"

), wxOK | wxICON_ERROR,

NULL

);

1770  int

left,

int

right,

int

src_row,

int

dst_row,

1771  bool append

,

string

delim)

1775  for

(j = left; j <= right; j++) {

1778  while

(dst_col->SetData().SetString().size() <= dst_row) {

1779

dst_col->SetData().SetString().push_back(

""

);

1781  if

(src_col->IsSetData() && src_col->GetData().IsString())

1784

dst_col->SetData().SetString()[dst_row] = src_col->GetData().GetString()[src_row];

1786

dst_col->SetData().SetString()[dst_row] += delim + src_col->GetData().GetString()[src_row];

1791  if

(k >= src->GetColumns().size()) {

1810  for

(

size_t i

= 0;

i

< values->

GetData

().GetString().

size

();

i

++) {

1812  bool

found =

false

;

1813  for

(

size_t

j = 0; j < choices->

GetData

().GetString().

size

() && !found; j++) {

1829  if

(!

m_Grid

->IsSelection()) {

1833  const

wxGridCellCoordsArray& selected_blocks =

m_Grid

->GetSelectionBlockTopLeft();

1834  size_t

num_blocks = selected_blocks.size();

1836  const

wxArrayInt& rows =

m_Grid

->GetSelectedRows();

1837  size_t

num_rows = rows.size();

1839  const

wxArrayInt& cols =

m_Grid

->GetSelectedCols();

1840  size_t

num_cols = cols.size();

1842  if

(num_blocks == 0 && num_rows == 0 && num_cols == 0) {

1843

wxMessageBox(

wxT

(

"Nothing selected!"

),

wxT

(

"Error"

), wxOK | wxICON_ERROR,

this

);

1845

}

else if

(num_blocks > 1

1846

|| (num_blocks > 0 && num_rows > 0)

1847

|| (num_blocks > 0 && num_cols > 0)

1848

|| (num_rows > 0 && num_cols > 0)) {

1849

wxMessageBox(

wxT

(

"Selection is too complex"

),

wxT

(

"Error"

), wxOK | wxICON_ERROR,

this

);

1852  const

wxGridCellCoordsArray& selected_block_right =

m_Grid

->GetSelectionBlockBottomRight();

1853  if

(num_blocks != selected_block_right.size()) {

1854

wxMessageBox(

wxT

(

"Selection is too complex"

),

wxT

(

"Error"

), wxOK | wxICON_ERROR,

this

);

1859  if

( !gridAdapter ) {

1866  int

bot_row = values_table->GetNum_rows() - 1;

1867  int

right_col =

static_cast<int>

(values_table->GetColumns().size() - 1);

1868  if

(num_blocks == 1) {

1869

top_row = selected_blocks[0].GetRow();

1870

left_col = selected_blocks[0].GetCol();

1871

bot_row = selected_block_right[0].GetRow();

1872

right_col = selected_block_right[0].GetCol();

1873

num_rows = bot_row - top_row + 1;

1874

num_cols = right_col - left_col + 1;

1876  if

(num_rows % copied->GetNum_rows() != 0 || num_cols % copied->GetColumns().size() != 0) {

1877

wxMessageBox(

wxT

(

"Source size does not match destination size!"

),

wxT

(

"Error"

), wxOK | wxICON_ERROR,

this

);

1882  for

(

int i

= left_col;

i

<= right_col;

i

++) {

1886

wxMessageBox(

wxT

(

"Source values are inappropriate for destination values!"

),

wxT

(

"Error"

), wxOK | wxICON_ERROR,

this

);

1890  if

(j >= copied->GetColumns().size()) {

1896  for

(

int i

= left_col;

i

<= right_col;

i

++) {

1901  if

(j >= copied->GetColumns().size()) {

1905

}

else if

(num_cols > 0) {

1906  if

(num_cols % copied->GetColumns().size() != 0) {

1907

wxMessageBox(

wxT

(

"Source size does not match destination size!"

),

wxT

(

"Error"

), wxOK | wxICON_ERROR,

this

);

1912  for

(

int i

= 0;

i

< num_cols;

i

++) {

1916

wxMessageBox(

wxT

(

"Source values are inappropriate for destination values!"

),

wxT

(

"Error"

), wxOK | wxICON_ERROR,

this

);

1920  if

(j >= copied->GetColumns().size()) {

1927  for

(

int i

= 0;

i

< num_cols;

i

++) {

1930  s_CopyColumn

(cpy_column, new_column, 0, values_table->GetNum_rows() - 1,

append

, delim);

1932  if

(j >= copied->GetColumns().size()) {

1936

}

else if

(num_rows > 0) {

1940  for

(

int i

= 1;

i

< values_table->GetColumns().

size

();

i

++) {

1942

wxMessageBox(

wxT

(

"Source values are inappropriate for destination values!"

),

wxT

(

"Error"

), wxOK | wxICON_ERROR,

this

);

1946  if

(j >= copied->GetColumns().size()) {

1953  for

(

int i

= 0;

i

< num_rows;

i

++) {

1954  s_CopyRow

(copied, values_table, 1,

static_cast<int>

(values_table->GetColumns().size()) - 1, j, rows[

i

],

append

, delim);

1956  if

(j >= copied->GetNum_rows()) {

1980

wxTheClipboard->Open();

1981

wxTextDataObject

data

;

1982

wxTheClipboard->GetData(

data

);

1989  m_Copied

->SetColumns().push_back(col);

1991  m_Copied

->SetColumns().front()->SetData().SetString().push_back(

val

);

1993

wxTheClipboard->Close();

2016  if

(!

m_Grid

->IsSelection()) {

2017

wxMessageBox(

wxT

(

"Nothing selected!"

),

wxT

(

"Error"

), wxOK | wxICON_ERROR,

this

);

2020  const

wxArrayInt& rows =

m_Grid

->GetSelectedRows();

2021  size_t

num_rows = rows.size();

2023

wxMessageBox(

wxT

(

"Selection is too complex"

),

wxT

(

"Error"

), wxOK | wxICON_ERROR,

this

);

2027  const

wxGridCellCoordsArray& selected_blocks =

m_Grid

->GetSelectionBlockTopLeft();

2028  size_t

num_blocks = selected_blocks.size();

2030  const

wxArrayInt& cols =

m_Grid

->GetSelectedCols();

2031  size_t

num_cols = cols.size();

2033  if

(num_blocks == 0 && num_cols == 0) {

2034

wxMessageBox(

wxT

(

"Nothing selected!"

),

wxT

(

"Error"

), wxOK | wxICON_ERROR,

this

);

2036

}

else if

(num_blocks > 1

2037

|| (num_blocks > 0 && num_cols > 0)) {

2038

wxMessageBox(

wxT

(

"Selection is too complex"

),

wxT

(

"Error"

), wxOK | wxICON_ERROR,

this

);

2041  const

wxGridCellCoordsArray& selected_block_right =

m_Grid

->GetSelectionBlockBottomRight();

2042  if

(num_blocks != selected_block_right.size()) {

2043

wxMessageBox(

wxT

(

"Selection is too complex"

),

wxT

(

"Error"

), wxOK | wxICON_ERROR,

this

);

2048  if

( !gridAdapter ) {

2057  int

bot_row = values_table->GetNum_rows() - 1;

2058

num_rows = values_table->GetNum_rows();

2059  if

(num_blocks == 1) {

2060

top_row = selected_blocks[0].GetRow();

2061

bot_row = selected_block_right[0].GetRow();

2062

num_rows = bot_row - top_row + 1;

2067

new_column->SetHeader().SetTitle(

"Copied ID"

);

2069  for

(

int

j = top_row; j <= bot_row; j++) {

2072

new_column->SetData().SetString().push_back(

label

);

2074

copy_data->SetColumns().push_back(new_column);

2093  int i

=

event

.GetRow();

2094  int

j =

event

.GetCol();

2095  if

(

i

>=0 && j >=0 )

2100

it->second = -it->second;

2106  m_Grid

->SetGridCursor(

i

,j );

2107  if

(

m_Grid

->CanEnableCellControl())

2111  m_Grid

->EnableCellEditControl();

2112

wxGridCellEditor* editor =

m_Grid

->GetCellEditor(

i

,j);

2126  int i

=

event

.GetRow();

2127  int

j =

event

.GetCol();

2128  if

(

i

>=0 && j >=0 )

2137  m_Grid

->SetGridCursor(

i

,j );

2138  if

(

m_Grid

->CanEnableCellControl())

2140

wxString old_value =

m_Grid

->GetCellValue(

i

,j);

2142  if

(dlg.ShowModal() == wxID_OK)

2144

wxString new_value = dlg.

GetValue

();

2145  if

(new_value != old_value)

2147  string val

= new_value.ToStdString();

2151  m_Grid

->SetCellValue(

i

,j, wxString(

val

));

2164

wxObject *obj =

event

.GetEventObject();

2165

wxTextCtrl *ctrl =

dynamic_cast<

wxTextCtrl*

>

(obj);

2168

wxString old_value = ctrl->GetValue();

2170  if

(dlg.ShowModal() == wxID_OK)

2172

wxString new_value = dlg.

GetValue

();

2173  if

(new_value != old_value)

2175  string val

= new_value.ToStdString();

2198  if

( !gridAdapter ) {

2203

old_table->Assign(*values_table);

2207  int

num_cols =

static_cast<int>

(values_table->GetColumns().size());

2208

vector<vector<bool> > selection(num_rows, vector<bool>(num_cols,

false

));

2209  for

(

int i

=0;

i

<num_rows;

i

++)

2210  for

(

int

j=0; j<num_cols; j++)

2211  if

(

m_Grid

->IsInSelection(

i

,j))

2212

selection[

i

][j] =

true

;

2215

vector < pair< pair<string,int>,

int

> > sorted;

2216  for

(

int i

=0;

i

<num_rows;

i

++)

2220

sorted.push_back(pair< pair<string,int>,

int

>(p,

i

));

2225

std::reverse(sorted.begin(),sorted.end());

2226  m_Grid

->ClearSelection();

2228  for

(

int

j=0; j<num_cols; j++)

2230  switch

(values_table->GetColumns()[j]->GetData().Which())

2233

values_table->SetColumns()[j]->SetData().SetId().resize(num_rows);

2236

values_table->SetColumns()[j]->SetData().SetString().resize(num_rows);

2243  for

(

int i

=0;

i

<num_rows;

i

++)

2245  int

old_i = sorted[

i

].second;

2246  for

(

int

j=0; j<num_cols; j++)

2248  switch

(values_table->GetColumns()[j]->GetData().Which())

2251  if

(old_i < old_table->SetColumns()[j]->GetData().

GetId

().

size

())

2252

values_table->SetColumns()[j]->SetData().SetId()[

i

] = old_table->SetColumns()[j]->GetData().GetId()[old_i];

2255  if

(old_i < old_table->SetColumns()[j]->GetData().GetString().

size

())

2256

values_table->SetColumns()[j]->SetData().SetString()[

i

] = old_table->SetColumns()[j]->GetData().GetString()[old_i];

2258

values_table->SetColumns()[j]->SetData().SetString()[

i

].clear();

2263  if

(selection[old_i][j])

2264  m_Grid

->SelectBlock(

i

,j,

i

,j,

true

);

2273  int row

=

event

.GetRow();

2274  int

col =

event

.GetCol();

2283  else if

(col == -1 &&

row

== -1)

2285  if

(col == -1 ||

row

== -1)

2286  m_Grid

->DisableCellEditControl();

2288  m_Grid

->EnableCellEditControl();

2290  if

( col == -1 &&

row

>= 0)

2316  if

(event.GetCol() == -1 && event.GetRow() == -1)

2322  if

(event.GetCol() == -1 && event.GetRow() != -1)

2324  int row

=

event

.GetRow();

2335  if

(event.GetCol() == -1 || event.GetRow() == -1)

2336  m_Grid

->DisableCellEditControl();

2338  m_Grid

->EnableCellEditControl();

2345

wxWindow* w = this->GetParent();

2346  while

(w !=

NULL

) {

2361  if

( !gridAdapter )

return

;

2365

wxTextEntryDialog dlg(

this

,

wxT

(

"Enter the sequences you would like to select separated by space"

),

wxT

(

"Enter Sequence IDs"

),

m_FindStr

, wxOK|wxCANCEL);

2366  if

(dlg.ShowModal() == wxID_OK)

2371  m_Grid

->ClearSelection();

2372  while

( tkz.HasMoreTokens() )

2374

wxString token = tkz.GetNextToken();

2376  for

(

int i

=0;

i

<num_rows;

i

++)

2378  m_Grid

->SelectRow(

i

,

true

);

2388  if

((event.GetKeyCode() ==

'C'

) && (event.ControlDown() ==

true

))

2392  else if

((event.GetKeyCode() ==

'V'

) && (event.ControlDown() ==

true

))

2401  const

wxArrayInt& rows =

m_Grid

->GetSelectedRows();

2402  size_t

num_rows = rows.size();

2405  const

wxGridCellCoordsArray& selected_blocks_left =

m_Grid

->GetSelectionBlockTopLeft();

2406  const

wxGridCellCoordsArray& selected_blocks_right =

m_Grid

->GetSelectionBlockBottomRight();

2407  if

(selected_blocks_left.size() == selected_blocks_right.size())

2408  for

(

size_t i

= 0;

i

< selected_blocks_left.size();

i

++)

2410  int

top_row = selected_blocks_left[

i

].GetRow();

2411  int

left_col = selected_blocks_left[

i

].GetCol();

2412  int

bot_row = selected_blocks_right[

i

].GetRow();

2413  int

right_col = selected_blocks_right[

i

].GetCol();

2414  int

num_cols = right_col - left_col + 1;

2415  if

(num_cols ==

m_Grid

->GetNumberCols())

2416

num_rows += bot_row - top_row + 1;

2420

wxWindow *w = this->GetParent();

2423

wxWindowList& wlist = w->GetChildren();

2424  for

( wxWindowList::Node *node = wlist.GetFirst(); node; node = node->GetNext() )

2426

wxWindow *current = (wxWindow *)node->GetData();

2443  auto

num_rows =

m_Grid

->GetNumberRows();

2444

vector<bool> selected(num_rows,

false

);

2445  for

(

auto i

= 0;

i

< num_rows;

i

++)

2447

selected[

i

] =

true

;

2449  m_Grid

->ClearSelection();

2451  bool

selected_before = selected[

row

];

2452

selected[

row

] = !selected_before;

2455  while

(i < num_rows && !m_Grid->IsRowShown(

i

))

2457

selected[

i

] = !selected_before;

2461  for

(

auto i

= 0;

i

< num_rows;

i

++)

2463  m_Grid

->SelectRow(

i

,

true

);

int UpdateRowOrColSize(int &sizeCurrent, int sizeNew)

void FastSetRowSize(int row, int height)

wxString BreakLines(const wxString &text)

virtual wxSize GetBestSize(wxGrid &grid, wxGridCellAttr &attr, wxDC &dc, int row, int col) wxOVERRIDE

virtual void Draw(wxGrid &grid, wxGridCellAttr &attr, wxDC &dc, const wxRect &rect, int row, int col, bool isSelected) wxOVERRIDE

void SetTextColoursAndFont(const wxGrid &grid, const wxGridCellAttr &attr, wxDC &dc, bool isSelected)

virtual ~CSeqGridCellAttrProvider()

virtual void SetAttr(wxGridCellAttr *attr, int row, int col) wxOVERRIDE

CSeqGridCellAttrProvider()

virtual wxGridCellAttr * GetAttr(int row, int col, wxGridCellAttr::wxAttrKind kind=wxGridCellAttr::Any) const wxOVERRIDE

unordered_map< pair< int, int >, wxGridCellAttr *, pair_hash > m_cache

void JumpToTextView(int row)

void MakeColumnReadOnly(int pos, bool val=true)

void InitMapRowLabelToIndex()

CSeqTableGridPanel()

Constructors.

void OnCellRightClick(wxGridEvent &event)

wxEVT_GRID_CELL_RIGHT_CLICK event handler for ID_GRID

void x_CollapseTableByColumn(bool initialize=false)

void CollapseByCol(int col)

int GetCollapseColAndExpand(void)

void UpdateColumnChoices(int pos, vector< string > choices)

void x_SelectHiddenRows(int row)

void CreateControls()

Creates the controls and sizers.

static bool ShowToolTips()

Should we show tooltips?

void x_UpdateCountSelectedDisplay(void)

CRef< objects::CSeq_table > m_Table

map< pair< int, int >, wxString > m_CollapseCache

void OnCellDoubleLeftClick2(wxMouseEvent &event)

~CSeqTableGridPanel()

Destructor.

void OnCopyCellsFromId(wxCommandEvent &event)

void OnCellDoubleLeftClick(wxGridEvent &event)

void x_SortTableByColumn(int col, bool ascend)

unordered_map< string, int > m_MapRowLabelToIndex

void UpdateColumnLabelHeight()

set< int > m_SetOfReadOnlyCols

unordered_map< int, int > m_CollapseCell

void OnCopyCells(wxCommandEvent &event)

void OnLabelRightClick(wxGridEvent &event)

wxEVT_GRID_LABEL_RIGHT_CLICK event handler for ID_GRID

void x_CreateMenu(wxGridEvent &evt)

void OnRenameColumn(wxCommandEvent &event)

void SetColumnSizesAndChoices()

bool m_SortByRowLabelAscend

void InitColumnCollapse(int col)

void OnExpandColumn(wxCommandEvent &event)

void x_MakeProblemsColumnReadOnly()

void OnPasteAppendCells(wxCommandEvent &event)

void OnLabelLeftClick(wxGridEvent &event)

void OnDeleteColumn(wxCommandEvent &event)

CSeqGridTableNav * x_GetSeqGridTableNav()

void x_UpdateCollapsedRow(unsigned int num_cols, int expand_row, vector< bool > &all_present, vector< bool > &all_same, vector< wxString > &values)

bool x_ValuesOkForNewColumn(CConstRef< objects::CSeqTable_column > values, int col_pos)

void OnSearchTable(wxCommandEvent &event)

SrcEditDialog * x_GetParent()

CRef< objects::CSeq_table > m_Choices

wxBitmap GetBitmapResource(const wxString &name)

Retrieves bitmap resources.

void SetValuesTable(CRef< objects::CSeq_table > table)

void x_PasteCells(CRef< objects::CSeq_table > copied, bool append=false, string delim=";")

void MakeAllColumnsReadOnly()

void OnCollapseColumn(wxCommandEvent &event)

CCollapsibleGrid * m_Grid

void CopyPasteDataByKeyboard(wxKeyEvent &event)

bool Create(wxWindow *parent, wxWindowID id=10078, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)

Creation.

void x_ExpandTableByColumn(void)

void OnSortTableByColumn(wxGridEvent &event)

CRef< objects::CSeq_table > m_Copied

CRef< objects::CSeq_table > GetValuesTable()

wxIcon GetIconResource(const wxString &name)

Retrieves icon resources.

void OnLabelLeftDClick(wxGridEvent &event)

void OnCellLeftClick(wxGridEvent &event)

void Init()

Initialises member variables.

void OnPasteCells(wxCommandEvent &event)

virtual bool IsEmptyCell(int row, int col)

virtual void SetColLabelValue(int col, const wxString &label)

virtual wxString GetValue(int row, int col)

virtual int GetNumberRows()

virtual bool DeleteCols(size_t pos=0, size_t numCols=1)

CSeqTableGrid(CRef< objects::CSeq_table > values_table)

virtual void SetValue(int vis_row, int vis_col, const wxString &value)

virtual wxString GetColLabelValue(int col)

virtual wxString GetRowLabelValue(int row)

CRef< objects::CSeq_table > GetValuesTable(void)

CRef< objects::CSeq_table > m_ValuesTable

virtual int GetNumberCols()

virtual bool InsertCols(size_t pos=0, size_t numCols=1)

virtual bool AppendCols(size_t numCols=1)

void UpdateCountSelectedDisplay(int num)

CUICommandRegistry is a centralized registry where all application commands should be registered.

static CUICommandRegistry & GetInstance()

the main instance associated with the application

wxMenu * CreateMenu(const SwxMenuItemRec *items)

create a menu from a static definition (see WX_*_MENU macros)

int RegisterCommand(CUICommand *cmd)

assumes ownership of the given object returns a command id (useful when registry is used for auto id ...

void GetQualChoices(wxArrayString &srcModNameStrings)

void ChangeColumnName(int col, string qual_name)

void x_RepopulateAddQualList()

iterator_bool insert(const value_type &val)

const_iterator find(const key_type &key) const

const_iterator end() const

std::ofstream out("events_result.xml")

main entry point for tests

const char * kSequenceIdColLabel

static void DLIST_NAME() append(DLIST_LIST_TYPE *list, DLIST_TYPE *item)

static const char * str(char *buf, int n)

static const char * column

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

const CSeq_id & GetId(const CSeq_loc &loc, CScope *scope)

If all CSeq_ids embedded in CSeq_loc refer to the same CBioseq, returns the first CSeq_id found,...

void Reset(void)

Reset reference object.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)

Convert string to int.

static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)

Check if a string is blank (has no text).

static TNumeric StringToNumeric(const CTempString str, TStringToNumFlags flags=0, int base=10)

Convert string to a numeric value.

static void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)

Truncate whitespace in a string (in-place)

static SIZE_TYPE Find(const CTempString str, const CTempString pattern, ECase use_case=eCase, EDirection direction=eForwardSearch, SIZE_TYPE occurrence=0)

Find the pattern in the string.

static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)

Case-insensitive equality of a substring with another string.

static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)

Convert numeric value to string.

static bool Equal(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2, ECase use_case=eCase)

Test for equality of a substring with another string.

static string & ReplaceInPlace(string &src, const string &search, const string &replace, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)

Replace occurrences of a substring within a string.

@ fAllowTrailingSpaces

Ignore trailing whitespace characters.

@ fConvErr_NoThrow

Do not throw an exception on error.

@ fAllowLeadingSpaces

Ignore leading whitespace characters in converted string.

static const char label[]

bool IsString(void) const

Check if variant String is selected.

bool IsSetData(void) const

row data Check if a value has been assigned to Data data member.

const TString & GetString(void) const

Get the variant data.

const TData & GetData(void) const

Get the Data member data.

@ e_String

a set of strings, one per row

<!DOCTYPE HTML >< html > n< header > n< title > PubSeq Gateway Help Page</title > n< style > n table

static void text(MDB_val *v)

constexpr auto sort(_Init &&init)

constexpr bool empty(list< Ts... >) noexcept

const struct ncbi::grid::netcache::search::fields::SIZE size

const GenericPointer< typename T::ValueType > T2 value

double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)

bool cmpTableValues(const pair< pair< string, int >, int > &a, const pair< pair< string, int >, int > &b)

static void s_CopyRow(CConstRef< objects::CSeq_table > src, CRef< objects::CSeq_table > dst, int left, int right, int src_row, int dst_row, bool append, string delim)

static void s_CopyToIntColumn(CConstRef< objects::CSeqTable_column > src, CRef< objects::CSeqTable_column > dst, int top, int bot)

static void s_CopyColumn(CConstRef< objects::CSeqTable_column > src, CRef< objects::CSeqTable_column > dst, int top, int bot, bool append, string delim)

static void s_CopyToStringColumn(CConstRef< objects::CSeqTable_column > src, CRef< objects::CSeqTable_column > dst, int top, int bot, bool append, string delim)

@ eCmdCopyTableValuesFromId

CRef< CSeqTable_column > FindSeqTableColumnByName(CRef< objects::CSeq_table > values_table, string column_name)

ViewerWindowBase::OnEditMenu ViewerWindowBase::OnJustification EVT_MENU(MID_SHOW_GEOM_VLTNS, ViewerWindowBase::OnShowGeomVltns) EVT_MENU(MID_FIND_PATTERN

static SLJIT_INLINE sljit_ins l(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

#define row(bind, expected)

bool IsSynonymForFalse(const string &val)

bool IsSynonymForTrue(const string &val)

#define WX_DEFINE_MENU(name)

New macros for defining menus for use with CUICommandRegistry.

#define WX_MENU_ITEM(cmd)

wxString ToWxString(const string &s)

string ToStdString(const wxString &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