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

NCBI C++ ToolKit: src/gui/widgets/object_list/object_list_widget_sel.cpp Source File

33 #include "wx/imaglist.h" 37 #include <wx/choice.h> 38 #include <wx/statbox.h> 39 #include <wx/button.h> 40 #include <wx/radiobut.h> 41 #include <wx/msgdlg.h> 42 #include <wx/bitmap.h> 60 static const string skColumnNames

[] = {

"Label"

,

"Type"

,

"Description"

};

114  if

( !gui_info.

IsNull

() ){

116  label

= gui_info->GetType();

119  label

= gui_info->GetSubtype();

123  if

(

label

.empty() ){

139  virtual void SetIcon

(

int row

,

const

wxString& icon_alias );

216  return static_cast<int>

(

m_Rows

.size());

243  return wxT

(

"string"

);

245  return wxT

(

"int"

);

248  return wxT

(

"bool"

);

311

: m_SingleSel(

false

)

312

, m_FilterDuplicates(

true

)

313

, m_AccValidator(

nullptr

)

319

: m_ObjectsPacked(

false

)

320

, m_GroupsPacked(

false

)

321

, m_SingleSel(

false

)

322

, m_FilterDuplicates(

true

)

337

style &= ~wxLC_SINGLE_SEL;

340 

wxPanel::Create( parent,

id

, pos,

size

, style );

399

wxBoxSizer* itemBoxSizer2 =

new

wxBoxSizer(wxVERTICAL);

400

itemPanel1->SetSizer(itemBoxSizer2);

402

wxStaticBox* itemStaticBoxSizer3Static =

new

wxStaticBox(itemPanel1,

ID_STATICBOX1

,

_

(

"Static"

));

403

wxStaticBoxSizer* itemStaticBoxSizer3 =

new

wxStaticBoxSizer(itemStaticBoxSizer3Static, wxVERTICAL);

404

itemBoxSizer2->Add(itemStaticBoxSizer3, 1, wxGROW|wxALL, wxDLG_UNIT(itemPanel1, wxSize(5, -1)).x);

406

wxBoxSizer* itemBoxSizer4 =

new

wxBoxSizer(wxHORIZONTAL);

407

itemStaticBoxSizer3->Add(itemBoxSizer4, 0, wxGROW|wxALL, 0);

410

itemBoxSizer4->Add(

m_Accession

, 0, wxALIGN_CENTER_VERTICAL|wxALL, wxDLG_UNIT(itemPanel1, wxSize(5, -1)).x);

412  m_AddBtn

=

new

wxButton( itemPanel1,

ID_ADDACC_BTN

,

_

(

"Add Accession"

), wxDefaultPosition, wxDefaultSize, 0 );

413

itemBoxSizer4->Add(

m_AddBtn

, 0, wxALIGN_CENTER_VERTICAL|wxALL, wxDLG_UNIT(itemPanel1, wxSize(5, -1)).x);

415

wxStaticText* itemStaticText7 =

new

wxStaticText( itemPanel1, wxID_STATIC,

_

(

"Filter:"

), wxDefaultPosition, wxDefaultSize, 0 );

416

itemBoxSizer4->Add(itemStaticText7, 0, wxALIGN_CENTER_VERTICAL|wxALL, wxDLG_UNIT(itemPanel1, wxSize(5, -1)).x);

418  m_FilterText

=

new

wxTextCtrl( itemPanel1,

ID_FILTER

, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );

419

itemBoxSizer4->Add(

m_FilterText

, 0, wxALIGN_CENTER_VERTICAL|wxALL, wxDLG_UNIT(itemPanel1, wxSize(5, -1)).x);

421  m_NucRadio

=

new

wxRadioButton( itemPanel1,

ID_NUC_RDBTN

,

_

(

"Nucleotides"

), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );

424

itemBoxSizer4->Add(

m_NucRadio

, 0, wxALIGN_CENTER_VERTICAL|wxALL, wxDLG_UNIT(itemPanel1, wxSize(5, -1)).x);

429

itemBoxSizer4->Add(

m_ProtRadio

, 0, wxALIGN_CENTER_VERTICAL|wxALL, wxDLG_UNIT(itemPanel1, wxSize(5, -1)).x);

431

itemBoxSizer4->Add(wxDLG_UNIT(itemPanel1, wxSize(5, -1)).x, wxDLG_UNIT(itemPanel1, wxSize(-1, 1)).y, 1, wxALIGN_CENTER_VERTICAL|wxALL, wxDLG_UNIT(itemPanel1, wxSize(5, -1)).x);

433

wxButton* itemButton12 =

new

wxButton( itemPanel1,

ID_BUTTON_SELECT_ALL

,

_

(

"Select All"

), wxDefaultPosition, wxDefaultSize, 0 );

434

itemBoxSizer4->Add(itemButton12, 0, wxALIGN_CENTER_VERTICAL|wxALL, wxDLG_UNIT(itemPanel1, wxSize(5, -1)).x);

440

itemBoxSizer4->Add(

m_ToggleGroups

, 0, wxALIGN_CENTER_VERTICAL|wxALL, wxDLG_UNIT(itemPanel1, wxSize(5, -1)).x);

442

wxArrayString m_CatChoiceStrings;

443  m_CatChoice

=

new

wxChoice( itemPanel1,

ID_CATCHOICE

, wxDefaultPosition, wxDefaultSize, m_CatChoiceStrings, 0 );

444

itemBoxSizer4->Add(

m_CatChoice

, 0, wxALIGN_CENTER_VERTICAL|wxALL, wxDLG_UNIT(itemPanel1, wxSize(2, -1)).x);

447

itemStaticBoxSizer3->Add(

m_ObjTable

, 1, wxGROW|wxALL, wxDLG_UNIT(itemPanel1, wxSize(2, -1)).x);

450

itemStaticBoxSizer3->Add(

m_GrpTable

, 1, wxGROW|wxALL, wxDLG_UNIT(itemPanel1, wxSize(2, -1)).x);

452

wxBoxSizer* itemBoxSizer1 =

new

wxBoxSizer(wxHORIZONTAL);

453

itemStaticBoxSizer3->Add(itemBoxSizer1, 0, wxALIGN_LEFT, wxDLG_UNIT(itemPanel1, wxSize(3, -1)).x);

455

wxStaticText* itemStaticText2 =

new

wxStaticText( itemPanel1, wxID_STATIC,

_

(

"Total Rows Selected: "

), wxDefaultPosition, wxDefaultSize, 0 );

456

itemBoxSizer1->Add(itemStaticText2, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxBOTTOM, wxDLG_UNIT(itemPanel1, wxSize(3, -1)).x);

458  m_TotalRows

=

new

wxStaticText( itemPanel1, wxID_STATIC,

_

(

"0"

), wxDefaultPosition, wxDefaultSize, 0 );

459

itemBoxSizer1->Add(

m_TotalRows

, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxBOTTOM, wxDLG_UNIT(itemPanel1, wxSize(3, -1)).x);

463

style |= wxLC_SINGLE_SEL;

465

style &= ~wxLC_SINGLE_SEL;

470  if

(wnd) wnd->Show(

false

);

548

acc.Trim(

true

).Trim(

false

);

550  m_AddBtn

->Enable( !acc.IsEmpty() );

555

wxStaticBox* staticBox = (wxStaticBox*)FindWindow(

ID_STATICBOX1

);

557

staticBox->SetLabel(

value

);

588  CObject

*

object

=

const_cast<CObject

*

>

(o_iter->object.GetPointer());

594

objects::CBioseq_Handle bsh = scope->GetBioseqHandle(*loc);

597  if

(bsh.IsNucleotide()) {

646  if

(selection != wxNOT_FOUND) {

657  return

wxPanel::TransferDataToWindow();

666  if

( !wxPanel::TransferDataFromWindow() ){

674  for

(

size_t

ix = 0; ix < selected_rows.size(); ix++ ){

688  wxT

(

"Please, select object(s)."

),

wxT

(

"Error"

),

689

wxOK | wxICON_ERROR,

this 717  if

( pattern.empty() ){

726

objects::CScope* scope =

const_cast<

objects::CScope*

>

( obj_list->

GetScope

(

row

) );

732

filtered_list->

AddRow

( obj, scope );

734  for

(

int

col = 0; col < obj_list->

GetNumColumns

(); ++col) {

754  return

filtered_list;

762

objects::CScope* scope =

const_cast<

objects::CScope*

>

(src_list.

GetScope

(

row

));

768  if

(object_labels.

end

() != it) {

772  if

(current == existing)

775  if

(!current || !existing)

778  if

(current->

Equals

(*existing))

784  int

frow = dst_list.

AddRow

(obj, scope);

786  for

(

int

col = 0; col < src_list.

GetNumColumns

(); ++col) {

808  for

(

auto

&listmap : obj_listmap) {

810  if

(filtered_list.

Empty

()) {

816  return

filtered_list;

834

obj_list->

Append

(*it->second);

903  for

(

int i

= 0;

i

< num_objects; ++

i

){

911  wxT

(

"Grouping..."

));

972  LOG_POST

(

Info

<<

"load table setting for "

<< reg_path);

1000  return

wxNullBitmap;

1020

pattern.Trim(

true

).Trim(

false

);

1024

wxString cat =

m_CatChoice

->GetStringSelection();

1035  static

wxString caption(

wxT

(

"Cannot add accession"

));

1041

acc.Trim(

true

).Trim(

false

);

1048

}

catch

( objects::CSeqIdException& ){

1049

wxString

msg

(

wxT

(

"Accession \""

));

1050  msg

+= acc +

wxT

(

"\" not recognized as a valid accession."

);

1051

wxMessageBox(

msg

, caption, wxOK | wxICON_ERROR );

1058  if

( errMsg.empty() ){

1059

errMsg =

wxT

(

"Accession \""

);

1060

errMsg += acc +

wxT

(

"\" doesn't not fit this list."

);

1062

wxMessageBox( errMsg, caption, wxOK | wxICON_ERROR );

1096  m_ObjTable

->SetItemState(0, 0, wxLIST_STATE_SELECTED);

1097  m_ObjTable

->SetItemState(

count

- 1, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);

std::invoke_result< _Fty, ICanceled & >::type GUI_AsyncExec(_Fty &&_Fnarg, const wxString &msg=wxT("Accessing network..."))

virtual void SetStringValueAt(int row, int col, const wxString &value)

vector< wxString > m_Icons

virtual int GetNumColumns() const

Returns the number of columns in the model.

virtual wxString GetColumnType(int col) const

Tries to extract actual type from row 0 value if it exists.

vector< wxString > m_ColumnNames

virtual void SetIntValueAt(int row, int col, const int &value)

virtual void SetIcon(int row, const wxString &icon_alias)

virtual wxString GetImageAliasAt(int row, int col) const

virtual void FireDataChanged()

virtual int GetNumRows() const

Returns the number of rows in the model.

virtual wxVariant GetValueAt(int row, int col) const

virtual wxString GetColumnName(int col) const

Returns a default name for the column using spreadsheet conventions: A, B, C, ...

void SetNumRows(size_t n_rows)

static string MakeKey(const string &section, const string &key, const string &delim=CGuiRegistry::kDecimalDot)

create a key from a section and a subkey

CRegistryWriteView GetWriteView(const string &section)

get a read-write view at a particular level.

static CGuiRegistry & GetInstance()

access the application-wide singleton

CRegistryReadView GetReadView(const string &section) const

get a read-only view at a particular level.

virtual wxString GetExtraColumnName(int col) const

virtual int GetNumExtraColumns() const

virtual wxVariant GetExtraValueAt(int row, int col) const

CRef< CObjectList > m_ObjectList

void x_SetCachedLabel(int row, int col, const string &value) const

bool x_GetCachedLabel(int row, int col, string &value) const

CObjectList Data structure representing a list of CObjects with associated Scopes and other optional ...

double GetDouble(int col, int row) const

void SetDouble(int col, int row, double val)

int AddRow(CObject *obj, objects::CScope *scope)

EColumnType GetColumnType(int col) const

void AddObjectLabel(const string &name, CLabel::ELabelType type)

void SetString(int col, int row, const string &val)

CObject * GetObject(int row)

access to values (row, column)

const string & GetString(int col, int row) const

objects::CScope * GetScope(int row)

void SetInteger(int col, int row, int val)

void Append(const CObjectList &list)

adds rows from the given list, the lists must have identical sets of columns

int GetInteger(int col, int row) const

void SetColStartIx(int ix)

int GetNumColumns() const

access to columns (attribute, indexes)

class CRegistryReadView provides a nested hierarchical view at a particular key.

Base class for all serializable objects.

CwxAbstractTableModel - simple TableModel implementation.

virtual void x_FireDataChanged()

CwxTableListCtrl - generic wxListCtrl-based Table Control.

void AssignModel(IwxTableModel *data_model)

void LoadTableSettings(const CRegistryReadView &view, bool byName=false)

wxArrayInt GetDataRowsSelected() const

void SaveTableSettings(CRegistryWriteView &view, bool saveSorting=true) const

Interface for testing cancellation request in a long lasting operation.

virtual CConstRef< CObject > Validate(const objects::CSeq_id &id, objects::CScope &scope, wxString &errMessage)=0

const_iterator begin() const

const_iterator end() const

const_iterator find(const key_type &key) const

static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

#define NON_CONST_ITERATE(Type, Var, Cont)

Non constant version of ITERATE macro.

#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.

void Info(CExceptionArgs_Base &args)

static void GetLabel(const CObject &obj, string *label, ELabelType type=eDefault)

vector< SConstScopedObject > TConstScopedObjects

virtual bool Equals(const CSerialObject &object, ESerialRecursionMode how=eRecursive) const

Check if both objects contain the same values.

TObjectType * GetPointer(void) const THROWS_NONE

Get pointer,.

CConstRef< C > ConstRef(const C *object)

Template function for conversion of const object pointer to CConstRef.

TObjectType * GetPointer(void) THROWS_NONE

Get pointer,.

void Reset(void)

Reset reference object.

bool IsNull(void) const THROWS_NONE

Check if pointer is null – same effect as Empty().

bool Empty(void) const THROWS_NONE

Check if CRef is empty – not pointing to any object, which means having a null value.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

static SIZE_TYPE FindNoCase(const CTempString str, const CTempString pattern, SIZE_TYPE start, SIZE_TYPE end, EOccurrence which=eFirst)

Find the pattern in the specified range of a string using a case insensitive search.

static const char label[]

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

const GenericPointer< typename T::ValueType > T2 value

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

#define row(bind, expected)

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