[] = {
"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,
constwxString& 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)
337style &= ~wxLC_SINGLE_SEL;
340wxPanel::Create( parent,
id, pos,
size, style );
399wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
400itemPanel1->SetSizer(itemBoxSizer2);
402wxStaticBox* itemStaticBoxSizer3Static =
newwxStaticBox(itemPanel1,
ID_STATICBOX1,
_(
"Static"));
403wxStaticBoxSizer* itemStaticBoxSizer3 =
newwxStaticBoxSizer(itemStaticBoxSizer3Static, wxVERTICAL);
404itemBoxSizer2->Add(itemStaticBoxSizer3, 1, wxGROW|wxALL, wxDLG_UNIT(itemPanel1, wxSize(5, -1)).x);
406wxBoxSizer* itemBoxSizer4 =
newwxBoxSizer(wxHORIZONTAL);
407itemStaticBoxSizer3->Add(itemBoxSizer4, 0, wxGROW|wxALL, 0);
410itemBoxSizer4->Add(
m_Accession, 0, wxALIGN_CENTER_VERTICAL|wxALL, wxDLG_UNIT(itemPanel1, wxSize(5, -1)).x);
412 m_AddBtn=
newwxButton( itemPanel1,
ID_ADDACC_BTN,
_(
"Add Accession"), wxDefaultPosition, wxDefaultSize, 0 );
413itemBoxSizer4->Add(
m_AddBtn, 0, wxALIGN_CENTER_VERTICAL|wxALL, wxDLG_UNIT(itemPanel1, wxSize(5, -1)).x);
415wxStaticText* itemStaticText7 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Filter:"), wxDefaultPosition, wxDefaultSize, 0 );
416itemBoxSizer4->Add(itemStaticText7, 0, wxALIGN_CENTER_VERTICAL|wxALL, wxDLG_UNIT(itemPanel1, wxSize(5, -1)).x);
418 m_FilterText=
newwxTextCtrl( itemPanel1,
ID_FILTER, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
419itemBoxSizer4->Add(
m_FilterText, 0, wxALIGN_CENTER_VERTICAL|wxALL, wxDLG_UNIT(itemPanel1, wxSize(5, -1)).x);
421 m_NucRadio=
newwxRadioButton( itemPanel1,
ID_NUC_RDBTN,
_(
"Nucleotides"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
424itemBoxSizer4->Add(
m_NucRadio, 0, wxALIGN_CENTER_VERTICAL|wxALL, wxDLG_UNIT(itemPanel1, wxSize(5, -1)).x);
429itemBoxSizer4->Add(
m_ProtRadio, 0, wxALIGN_CENTER_VERTICAL|wxALL, wxDLG_UNIT(itemPanel1, wxSize(5, -1)).x);
431itemBoxSizer4->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);
433wxButton* itemButton12 =
newwxButton( itemPanel1,
ID_BUTTON_SELECT_ALL,
_(
"Select All"), wxDefaultPosition, wxDefaultSize, 0 );
434itemBoxSizer4->Add(itemButton12, 0, wxALIGN_CENTER_VERTICAL|wxALL, wxDLG_UNIT(itemPanel1, wxSize(5, -1)).x);
440itemBoxSizer4->Add(
m_ToggleGroups, 0, wxALIGN_CENTER_VERTICAL|wxALL, wxDLG_UNIT(itemPanel1, wxSize(5, -1)).x);
442wxArrayString m_CatChoiceStrings;
443 m_CatChoice=
newwxChoice( itemPanel1,
ID_CATCHOICE, wxDefaultPosition, wxDefaultSize, m_CatChoiceStrings, 0 );
444itemBoxSizer4->Add(
m_CatChoice, 0, wxALIGN_CENTER_VERTICAL|wxALL, wxDLG_UNIT(itemPanel1, wxSize(2, -1)).x);
447itemStaticBoxSizer3->Add(
m_ObjTable, 1, wxGROW|wxALL, wxDLG_UNIT(itemPanel1, wxSize(2, -1)).x);
450itemStaticBoxSizer3->Add(
m_GrpTable, 1, wxGROW|wxALL, wxDLG_UNIT(itemPanel1, wxSize(2, -1)).x);
452wxBoxSizer* itemBoxSizer1 =
newwxBoxSizer(wxHORIZONTAL);
453itemStaticBoxSizer3->Add(itemBoxSizer1, 0, wxALIGN_LEFT, wxDLG_UNIT(itemPanel1, wxSize(3, -1)).x);
455wxStaticText* itemStaticText2 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Total Rows Selected: "), wxDefaultPosition, wxDefaultSize, 0 );
456itemBoxSizer1->Add(itemStaticText2, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxBOTTOM, wxDLG_UNIT(itemPanel1, wxSize(3, -1)).x);
458 m_TotalRows=
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0 );
459itemBoxSizer1->Add(
m_TotalRows, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxBOTTOM, wxDLG_UNIT(itemPanel1, wxSize(3, -1)).x);
463style |= wxLC_SINGLE_SEL;
465style &= ~wxLC_SINGLE_SEL;
470 if(wnd) wnd->Show(
false);
548acc.Trim(
true).Trim(
false);
550 m_AddBtn->Enable( !acc.IsEmpty() );
555wxStaticBox* staticBox = (wxStaticBox*)FindWindow(
ID_STATICBOX1);
557staticBox->SetLabel(
value);
588 CObject*
object=
const_cast<CObject*
>(o_iter->object.GetPointer());
594objects::CBioseq_Handle bsh = scope->GetBioseqHandle(*loc);
597 if(bsh.IsNucleotide()) {
646 if(selection != wxNOT_FOUND) {
657 returnwxPanel::TransferDataToWindow();
666 if( !wxPanel::TransferDataFromWindow() ){
674 for(
size_tix = 0; ix < selected_rows.size(); ix++ ){
688 wxT(
"Please, select object(s)."),
wxT(
"Error"),
689wxOK | wxICON_ERROR,
this 717 if( pattern.empty() ){
726objects::CScope* scope =
const_cast<objects::CScope*
>( obj_list->
GetScope(
row) );
732filtered_list->
AddRow( obj, scope );
734 for(
intcol = 0; col < obj_list->
GetNumColumns(); ++col) {
754 returnfiltered_list;
762objects::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 intfrow = dst_list.
AddRow(obj, scope);
786 for(
intcol = 0; col < src_list.
GetNumColumns(); ++col) {
808 for(
auto&listmap : obj_listmap) {
810 if(filtered_list.
Empty()) {
816 returnfiltered_list;
834obj_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 returnwxNullBitmap;
1020pattern.Trim(
true).Trim(
false);
1024wxString cat =
m_CatChoice->GetStringSelection();
1035 staticwxString caption(
wxT(
"Cannot add accession"));
1041acc.Trim(
true).Trim(
false);
1048}
catch( objects::CSeqIdException& ){
1049wxString
msg(
wxT(
"Accession \""));
1050 msg+= acc +
wxT(
"\" not recognized as a valid accession.");
1051wxMessageBox(
msg, caption, wxOK | wxICON_ERROR );
1058 if( errMsg.empty() ){
1059errMsg =
wxT(
"Accession \"");
1060errMsg += acc +
wxT(
"\" doesn't not fit this list.");
1062wxMessageBox( 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 §ion, const string &key, const string &delim=CGuiRegistry::kDecimalDot)
create a key from a section and a subkey
CRegistryWriteView GetWriteView(const string §ion)
get a read-write view at a particular level.
static CGuiRegistry & GetInstance()
access the application-wide singleton
CRegistryReadView GetReadView(const string §ion) 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