NCBI C++ ToolKit
|
Search Toolkit Book for CLocationListCtrl
#include <gui/widgets/edit/locationl_list_ctrl.hpp>
Classes | |
struct | SIntData |
Public Member Functions | |
CLocationListCtrl () | |
Constructors. More... | |
CLocationListCtrl (wxWindow *parent, CRef< objects::CScope > scope, bool allow_nuc, bool allow_prot, bool is_aa, wxWindowID id=ID_CLOCATIONLISTCTRL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxSUNKEN_BORDER|wxTAB_TRAVERSAL) | |
bool | Create (wxWindow *parent, wxWindowID id=ID_CLOCATIONLISTCTRL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxSUNKEN_BORDER|wxTAB_TRAVERSAL) |
Creation. More... | |
~CLocationListCtrl () | |
Destructor. More... | |
void | Init () |
Initialises member variables. More... | |
void | CreateControls () |
Creates the controls and sizers. More... | |
void | OnSortClick (wxCommandEvent &event) |
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON1 More... | |
int | GetLocType () const |
void | SetLocType (int value) |
wxBitmap | GetBitmapResource (const wxString &name) |
Retrieves bitmap resources. More... | |
wxIcon | GetIconResource (const wxString &name) |
Retrieves icon resources. More... | |
void | OnDelete (wxHyperlinkEvent &event) |
void | OnSpinCtrl (wxCommandEvent &evt) |
void | OnStrandChange (wxCommandEvent &event) |
void | OnNewText (wxCommandEvent &event) |
void | AddRow (int from, int to, int strand, const wxString &seqID, const bool fuzz) |
void | AddEmptyRow () |
void | ClearRows () |
void | SetPartials (bool partial5, bool partial3) |
CRef< objects::CSeq_loc > | GetSeq_loc () |
virtual bool | TransferDataToWindow () |
virtual bool | TransferDataFromWindow () |
void | PopulateIdListFromScope () |
bool | IsInIdList (wxString str) |
wxString | GetListIdStrForSeqId (const objects::CSeq_id &seq_id) |
Static Public Member Functions | |
static bool | ShowToolTips () |
Should we show tooltips? More... | |
Public Attributes | |
wxScrolledWindow * | m_ScrolledWindow |
wxCheckBox * | m_Partial5 |
wxCheckBox * | m_Partial3 |
Private Types | |
enum | { ID_CLOCATIONLISTCTRL = 10032 , ID_PANEL1 = 10039 , ID_SCROLLEDWINDOW1 = 10035 , ID_CHECKBOX1 = 10025 , ID_CHECKBOX2 = 10109 , ID_RADIOBOX6 = 10040 , ID_BUTTON1 = 10038 } |
Private Member Functions | |
void | x_AddRow (int from, int to, int strand, const wxString &seqID, const bool fuzz, size_t rowPos=-1) |
void | x_AddEmptyRow (size_t rowPos=-1) |
objects::ENa_strand | GetStrandFromForm (size_t index) |
objects::ENa_strand | x_GetStrandFromForm (size_t index) |
CRef< objects::CSeq_loc > | x_GetInterval (size_t index, bool int_only) |
CRef< objects::CSeq_id > | GetIdFromForm (size_t index) |
void | DeleteRow (wxSizerItemList::iterator row, wxSizerItemList &itemList) |
void | x_GetRowData (wxSizerItemList::iterator row, wxSizerItemList &itemList, int &from, int &to, int &strand, wxString &seqID, bool &fuzz) |
wxSizerItemList::iterator | x_FindRow (wxWindow *wnd, wxSizerItemList &itemList) |
wxSizerItemList::iterator | x_NextRow (wxSizerItemList::iterator row, wxSizerItemList &itemList) |
wxSizerItemList::iterator | x_PrevRow (wxSizerItemList::iterator row, wxSizerItemList &itemList) |
Private Attributes | |
int | m_LocType |
wxFlexGridSizer * | m_Sizer |
vector< SIntData > | m_Data |
wxArrayString | m_SeqIds |
bool | m_AllowNuc |
bool | m_AllowProt |
CRef< objects::CScope > | m_Scope |
bool | m_is_aa |
map< string, CConstRef< objects::CSeq_id > > | m_str_to_id |
wxTextCtrl * | m_LastFrom |
wxTextCtrl * | m_LastTo |
CNoTabChoice * | m_LastStrand |
int | m_LastStrandSelection |
CNoTabComboBox * | m_LastId |
int | m_LastIdSelection |
wxString | m_LastIdValue |
int | m_CtrlColNum |
CLocationListCtrl class declaration
Definition at line 73 of file locationl_list_ctrl.hpp.
|
private |
Enumerator | |
---|---|
ID_CLOCATIONLISTCTRL | |
ID_PANEL1 | |
ID_SCROLLEDWINDOW1 | |
ID_CHECKBOX1 | |
ID_CHECKBOX2 | |
ID_RADIOBOX6 | |
ID_BUTTON1 |
Definition at line 152 of file locationl_list_ctrl.hpp.
CLocationListCtrl::CLocationListCtrl | ( | ) |
Constructors.
CLocationListCtrl type definition
CLocationListCtrl event table definition
CLocationListCtrl constructors
Definition at line 84 of file locationl_list_ctrl.cpp.
References Init().
CLocationListCtrl::CLocationListCtrl | ( | wxWindow * | parent, |
CRef< objects::CScope > | scope, | ||
bool | allow_nuc, | ||
bool | allow_prot, | ||
bool | is_aa, | ||
wxWindowID | id = ID_CLOCATIONLISTCTRL , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxDefaultSize , |
||
long | style = wxSUNKEN_BORDER|wxTAB_TRAVERSAL |
||
) |
Definition at line 89 of file locationl_list_ctrl.cpp.
References Create(), Init(), and ncbi::grid::netcache::search::fields::size.
CLocationListCtrl::~CLocationListCtrl | ( | ) |
void CLocationListCtrl::AddEmptyRow | ( | ) |
Definition at line 281 of file locationl_list_ctrl.cpp.
References m_Data, and CLocationListCtrl::SIntData::m_Empty.
Referenced by CLocationPanel::x_FillList().
void CLocationListCtrl::AddRow | ( | int | from, |
int | to, | ||
int | strand, | ||
const wxString & | seqID, | ||
const bool | fuzz | ||
) |
Definition at line 243 of file locationl_list_ctrl.cpp.
References eNa_strand_both, eNa_strand_minus, eNa_strand_other, eNa_strand_plus, m_Data, CLocationListCtrl::SIntData::m_Empty, CLocationListCtrl::SIntData::m_From, CLocationListCtrl::SIntData::m_Fuzz, CLocationListCtrl::SIntData::m_SeqId, CLocationListCtrl::SIntData::m_Strand, and CLocationListCtrl::SIntData::m_To.
Referenced by CLocationPanel::x_FillList().
void CLocationListCtrl::ClearRows | ( | void | ) |
Definition at line 288 of file locationl_list_ctrl.cpp.
References m_Data, and m_Sizer.
Referenced by CLocationPanel::TransferDataToWindow().
bool CLocationListCtrl::Create | ( | wxWindow * | parent, |
wxWindowID | id = ID_CLOCATIONLISTCTRL , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxDefaultSize , |
||
long | style = wxSUNKEN_BORDER|wxTAB_TRAVERSAL |
||
) |
Creation.
CLocationListCtrl creator
Definition at line 102 of file locationl_list_ctrl.cpp.
References CreateControls(), and ncbi::grid::netcache::search::fields::size.
Referenced by CLocationListCtrl().
void CLocationListCtrl::CreateControls | ( | ) |
Creates the controls and sizers.
Control creation for CLocationListCtrl
Definition at line 156 of file locationl_list_ctrl.cpp.
References _, ID_BUTTON1, ID_CHECKBOX1, ID_CHECKBOX2, ID_PANEL1, ID_RADIOBOX6, ID_SCROLLEDWINDOW1, m_CtrlColNum, m_is_aa, m_LocType, m_Partial3, m_Partial5, m_ScrolledWindow, m_Sizer, ShowToolTips(), and wxID_ANY.
Referenced by Create().
|
private |
Definition at line 523 of file locationl_list_ctrl.cpp.
References i, m_CtrlColNum, m_LastFrom, m_LastId, m_LastStrand, m_LastTo, NULL, and row.
Referenced by OnDelete().
wxBitmap CLocationListCtrl::GetBitmapResource | ( | const wxString & | name | ) |
Retrieves bitmap resources.
Get bitmap resources
Definition at line 1230 of file locationl_list_ctrl.cpp.
wxIcon CLocationListCtrl::GetIconResource | ( | const wxString & | name | ) |
Retrieves icon resources.
Get icon resources
Definition at line 1243 of file locationl_list_ctrl.cpp.
Definition at line 412 of file locationl_list_ctrl.cpp.
References CSeq_id::Assign(), map_checker< Container >::end(), map_checker< Container >::find(), CSeq_id_Base::GetGi(), GetGiForId(), GI_TO, i, CSeq_id_Base::IsGi(), m_Data, m_Scope, m_SeqIds, m_str_to_id, CSeq_id::Set(), CObject_id::SetGi(), CSeq_id_Base::SetGi(), CSeq_id_Base::SetLocal(), CObject_id_Base::SetStr(), ToStdString(), and ZERO_GI.
Referenced by x_GetInterval().
wxString CLocationListCtrl::GetListIdStrForSeqId | ( | const objects::CSeq_id & | seq_id | ) |
Definition at line 1186 of file locationl_list_ctrl.cpp.
References check, CSeq_id::eContent, CLabel::eUserTypeAndContent, CBioseq_Handle::GetCompleteBioseq(), CBioseq_Base::GetId(), CLabel::GetLabel(), CSeq_id::GetLabel(), IsInIdList(), ITERATE, m_Scope, m_SeqIds, PopulateIdListFromScope(), str(), and ToWxString().
Referenced by CLocationPanel::x_FillList().
|
inline |
Definition at line 113 of file locationl_list_ctrl.hpp.
References m_LocType.
Definition at line 303 of file locationl_list_ctrl.cpp.
References CSerialObject::Assign(), CSeq_loc_Base::GetInt(), i, CSeq_loc_Base::IsInt(), CRef< C, Locker >::IsNull(), m_Data, m_LocType, m_Partial3, m_Partial5, CRef< C, Locker >::Reset(), s_FinishLoc(), CSeq_loc::SetInt(), CSeq_loc::SetNull(), and x_GetInterval().
Referenced by CLocationPanel::GetSeq_loc(), and CLocationPanel::OnExport().
|
private |
Definition at line 370 of file locationl_list_ctrl.cpp.
References eNa_strand_unknown, i, m_Data, tmp, and x_GetStrandFromForm().
Referenced by x_GetInterval().
void CLocationListCtrl::Init | ( | void | ) |
Initialises member variables.
Member initialisation
Definition at line 131 of file locationl_list_ctrl.cpp.
References m_CtrlColNum, m_is_aa, m_LastFrom, m_LastId, m_LastIdSelection, m_LastStrand, m_LastStrandSelection, m_LastTo, m_LocType, m_Partial3, m_Partial5, m_ScrolledWindow, m_Sizer, and NULL.
Referenced by CLocationListCtrl().
bool CLocationListCtrl::IsInIdList | ( | wxString | str | ) |
Definition at line 1173 of file locationl_list_ctrl.cpp.
References m_SeqIds, and str().
Referenced by GetListIdStrForSeqId().
void CLocationListCtrl::OnDelete | ( | wxHyperlinkEvent & | event | ) |
Definition at line 663 of file locationl_list_ctrl.cpp.
References DeleteRow(), m_LastFrom, m_LastId, m_LastStrand, m_LastTo, m_ScrolledWindow, m_Sizer, NULL, row, x_AddEmptyRow(), and x_FindRow().
void CLocationListCtrl::OnNewText | ( | wxCommandEvent & | event | ) |
Definition at line 1141 of file locationl_list_ctrl.cpp.
References m_LastFrom, m_LastId, m_LastIdSelection, m_LastIdValue, m_LastStrand, m_LastStrandSelection, m_LastTo, m_ScrolledWindow, and x_AddEmptyRow().
Referenced by x_AddEmptyRow().
void CLocationListCtrl::OnSortClick | ( | wxCommandEvent & | event | ) |
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON1
Definition at line 903 of file locationl_list_ctrl.cpp.
References NStr::EndsWith(), CLocationListCtrl::SIntData::m_Empty, CLocationListCtrl::SIntData::m_From, CLocationListCtrl::SIntData::m_Fuzz, m_is_aa, m_LastFrom, m_LastId, m_LastStrand, m_LastTo, m_ScrolledWindow, CLocationListCtrl::SIntData::m_SeqId, m_Sizer, CLocationListCtrl::SIntData::m_Strand, CLocationListCtrl::SIntData::m_To, NULL, ct::sort(), NStr::StartsWith(), swap(), text(), x_AddEmptyRow(), and x_AddRow().
void CLocationListCtrl::OnSpinCtrl | ( | wxCommandEvent & | evt | ) |
Definition at line 678 of file locationl_list_ctrl.cpp.
References CLargeSpinControl::kBtnDn, CLargeSpinControl::kBtnUp, m_ScrolledWindow, m_Sizer, row, s_SwapRows(), x_AddEmptyRow(), x_AddRow(), x_FindRow(), x_GetRowData(), x_NextRow(), and x_PrevRow().
void CLocationListCtrl::OnStrandChange | ( | wxCommandEvent & | event | ) |
Definition at line 630 of file locationl_list_ctrl.cpp.
References m_is_aa, m_Sizer, row, and x_FindRow().
void CLocationListCtrl::PopulateIdListFromScope | ( | ) |
Definition at line 983 of file locationl_list_ctrl.cpp.
References set< Key, Compare >::begin(), map_checker< Container >::clear(), CScope::eAllTSEs, CSeq_inst_Base::eMol_aa, CSeq_inst_Base::eMol_na, set< Key, Compare >::end(), CLabel::eUserTypeAndContent, CLabel::GetLabel(), set< Key, Compare >::insert(), ITERATE, m_AllowNuc, m_AllowProt, m_Data, m_Scope, m_SeqIds, m_str_to_id, str(), and ToWxString().
Referenced by GetListIdStrForSeqId(), and TransferDataToWindow().
|
inline |
Definition at line 114 of file locationl_list_ctrl.hpp.
References m_LocType, and rapidjson::value.
Referenced by CLocationPanel::x_SetJoinOrder().
Definition at line 275 of file locationl_list_ctrl.cpp.
References m_Partial3, and m_Partial5.
Referenced by CLocationPanel::x_FillList().
|
static |
Should we show tooltips?
Should we show tooltips?
Definition at line 1221 of file locationl_list_ctrl.cpp.
Referenced by CreateControls().
|
virtual |
Definition at line 1075 of file locationl_list_ctrl.cpp.
References NStr::EndsWith(), m_Data, CLocationListCtrl::SIntData::m_Empty, CLocationListCtrl::SIntData::m_From, CLocationListCtrl::SIntData::m_Fuzz, m_is_aa, CLocationListCtrl::SIntData::m_SeqId, m_Sizer, CLocationListCtrl::SIntData::m_Strand, CLocationListCtrl::SIntData::m_To, NULL, NStr::ReplaceInPlace(), NStr::StartsWith(), NStr::StringToInt(), swap(), text(), and NStr::TruncateSpacesInPlace().
|
virtual |
Definition at line 1034 of file locationl_list_ctrl.cpp.
References m_Data, m_LastFrom, m_LastId, m_LastStrand, m_LastTo, m_ScrolledWindow, m_SeqIds, m_Sizer, NULL, PopulateIdListFromScope(), x_AddEmptyRow(), and x_AddRow().
|
private |
Definition at line 826 of file locationl_list_ctrl.cpp.
References m_is_aa, m_LastFrom, m_LastId, m_LastIdValue, m_LastStrand, m_LastStrandSelection, m_LastTo, m_ScrolledWindow, m_SeqIds, m_Sizer, OnNewText(), CLargeSpinControl::UseImageSet(), wxID_ANY, and wxT.
Referenced by OnDelete(), OnNewText(), OnSortClick(), OnSpinCtrl(), and TransferDataToWindow().
|
private |
Definition at line 745 of file locationl_list_ctrl.cpp.
References _, m_is_aa, m_LastIdSelection, m_LastIdValue, m_LastStrandSelection, m_ScrolledWindow, m_SeqIds, m_Sizer, swap(), text(), CLargeSpinControl::UseImageSet(), wxID_ANY, and wxT.
Referenced by OnSortClick(), OnSpinCtrl(), and TransferDataToWindow().
|
private |
Definition at line 543 of file locationl_list_ctrl.cpp.
References m_CtrlColNum, NULL, and row.
Referenced by OnDelete(), OnSpinCtrl(), and OnStrandChange().
Definition at line 473 of file locationl_list_ctrl.cpp.
References abs, CInt_fuzz_Base::eLim_tr, GetIdFromForm(), GetStrandFromForm(), m_Data, m_is_aa, CSeq_interval_Base::SetFrom(), CSeq_point_Base::SetFuzz(), CSeq_interval_Base::SetId(), CSeq_point_Base::SetId(), CSeq_loc::SetInt(), CSeq_loc::SetPnt(), CSeq_point_Base::SetPoint(), CSeq_interval_Base::SetStrand(), CSeq_point_Base::SetStrand(), and CSeq_interval_Base::SetTo().
Referenced by GetSeq_loc().
|
private |
Definition at line 597 of file locationl_list_ctrl.cpp.
References NStr::EndsWith(), m_is_aa, row, NStr::StartsWith(), swap(), and text().
Referenced by OnSpinCtrl().
|
private |
Definition at line 388 of file locationl_list_ctrl.cpp.
References eNa_strand_both, eNa_strand_minus, eNa_strand_other, eNa_strand_plus, eNa_strand_unknown, and m_Data.
Referenced by GetStrandFromForm().
|
private |
Definition at line 566 of file locationl_list_ctrl.cpp.
References i, m_CtrlColNum, and row.
Referenced by OnSpinCtrl().
|
private |
Definition at line 576 of file locationl_list_ctrl.cpp.
References i, m_CtrlColNum, and row.
Referenced by OnSpinCtrl().
|
private |
Definition at line 204 of file locationl_list_ctrl.hpp.
Referenced by PopulateIdListFromScope().
|
private |
Definition at line 205 of file locationl_list_ctrl.hpp.
Referenced by PopulateIdListFromScope().
|
private |
Definition at line 216 of file locationl_list_ctrl.hpp.
Referenced by CreateControls(), DeleteRow(), Init(), x_FindRow(), x_NextRow(), and x_PrevRow().
|
private |
Definition at line 201 of file locationl_list_ctrl.hpp.
Referenced by AddEmptyRow(), AddRow(), ClearRows(), GetIdFromForm(), GetSeq_loc(), GetStrandFromForm(), PopulateIdListFromScope(), TransferDataFromWindow(), TransferDataToWindow(), x_GetInterval(), and x_GetStrandFromForm().
|
private |
Definition at line 207 of file locationl_list_ctrl.hpp.
Referenced by CreateControls(), Init(), OnSortClick(), OnStrandChange(), TransferDataFromWindow(), x_AddEmptyRow(), x_AddRow(), x_GetInterval(), and x_GetRowData().
|
private |
Definition at line 209 of file locationl_list_ctrl.hpp.
Referenced by DeleteRow(), Init(), OnDelete(), OnNewText(), OnSortClick(), TransferDataToWindow(), and x_AddEmptyRow().
|
private |
Definition at line 213 of file locationl_list_ctrl.hpp.
Referenced by DeleteRow(), Init(), OnDelete(), OnNewText(), OnSortClick(), TransferDataToWindow(), and x_AddEmptyRow().
|
private |
Definition at line 214 of file locationl_list_ctrl.hpp.
Referenced by Init(), OnNewText(), and x_AddRow().
|
private |
Definition at line 215 of file locationl_list_ctrl.hpp.
Referenced by OnNewText(), x_AddEmptyRow(), and x_AddRow().
|
private |
Definition at line 211 of file locationl_list_ctrl.hpp.
Referenced by DeleteRow(), Init(), OnDelete(), OnNewText(), OnSortClick(), TransferDataToWindow(), and x_AddEmptyRow().
|
private |
Definition at line 212 of file locationl_list_ctrl.hpp.
Referenced by Init(), OnNewText(), x_AddEmptyRow(), and x_AddRow().
|
private |
Definition at line 210 of file locationl_list_ctrl.hpp.
Referenced by DeleteRow(), Init(), OnDelete(), OnNewText(), OnSortClick(), TransferDataToWindow(), and x_AddEmptyRow().
|
private |
Definition at line 150 of file locationl_list_ctrl.hpp.
Referenced by CreateControls(), GetLocType(), GetSeq_loc(), Init(), and SetLocType().
wxCheckBox* CLocationListCtrl::m_Partial3 |
Definition at line 147 of file locationl_list_ctrl.hpp.
Referenced by CreateControls(), GetSeq_loc(), Init(), and SetPartials().
wxCheckBox* CLocationListCtrl::m_Partial5 |
Definition at line 146 of file locationl_list_ctrl.hpp.
Referenced by CreateControls(), GetSeq_loc(), Init(), and SetPartials().
|
private |
Definition at line 206 of file locationl_list_ctrl.hpp.
Referenced by GetIdFromForm(), GetListIdStrForSeqId(), and PopulateIdListFromScope().
wxScrolledWindow* CLocationListCtrl::m_ScrolledWindow |
Definition at line 145 of file locationl_list_ctrl.hpp.
Referenced by CreateControls(), Init(), OnDelete(), OnNewText(), OnSortClick(), OnSpinCtrl(), TransferDataToWindow(), x_AddEmptyRow(), and x_AddRow().
|
private |
Definition at line 202 of file locationl_list_ctrl.hpp.
Referenced by GetIdFromForm(), GetListIdStrForSeqId(), IsInIdList(), PopulateIdListFromScope(), TransferDataToWindow(), x_AddEmptyRow(), and x_AddRow().
|
private |
Definition at line 162 of file locationl_list_ctrl.hpp.
Referenced by ClearRows(), CreateControls(), Init(), OnDelete(), OnSortClick(), OnSpinCtrl(), OnStrandChange(), TransferDataFromWindow(), TransferDataToWindow(), x_AddEmptyRow(), and x_AddRow().
Definition at line 208 of file locationl_list_ctrl.hpp.
Referenced by GetIdFromForm(), and PopulateIdListFromScope().