NCBI C++ ToolKit
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
CLocationListCtrl Class Reference

Search Toolkit Book for CLocationListCtrl

#include <gui/widgets/edit/locationl_list_ctrl.hpp>

+ Inheritance diagram for CLocationListCtrl:
+ Collaboration diagram for CLocationListCtrl:

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< SIntDatam_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
 
CNoTabChoicem_LastStrand
 
int m_LastStrandSelection
 
CNoTabComboBoxm_LastId
 
int m_LastIdSelection
 
wxString m_LastIdValue
 
int m_CtrlColNum
 

Detailed Description

CLocationListCtrl class declaration

Definition at line 73 of file locationl_list_ctrl.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
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.

Constructor & Destructor Documentation

◆ CLocationListCtrl() [1/2]

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() [2/2]

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 
)

◆ ~CLocationListCtrl()

CLocationListCtrl::~CLocationListCtrl ( )

Destructor.

CLocationListCtrl destructor

Definition at line 122 of file locationl_list_ctrl.cpp.

Member Function Documentation

◆ AddEmptyRow()

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().

◆ AddRow()

void CLocationListCtrl::AddRow ( int  from,
int  to,
int  strand,
const wxString &  seqID,
const bool  fuzz 
)

◆ ClearRows()

void CLocationListCtrl::ClearRows ( void  )

Definition at line 288 of file locationl_list_ctrl.cpp.

References m_Data, and m_Sizer.

Referenced by CLocationPanel::TransferDataToWindow().

◆ Create()

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().

◆ CreateControls()

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().

◆ DeleteRow()

void CLocationListCtrl::DeleteRow ( wxSizerItemList::iterator  row,
wxSizerItemList &  itemList 
)
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().

◆ GetBitmapResource()

wxBitmap CLocationListCtrl::GetBitmapResource ( const wxString &  name)

Retrieves bitmap resources.

Get bitmap resources

Definition at line 1230 of file locationl_list_ctrl.cpp.

◆ GetIconResource()

wxIcon CLocationListCtrl::GetIconResource ( const wxString &  name)

Retrieves icon resources.

Get icon resources

Definition at line 1243 of file locationl_list_ctrl.cpp.

◆ GetIdFromForm()

CRef< CSeq_id > CLocationListCtrl::GetIdFromForm ( size_t  index)
private

◆ GetListIdStrForSeqId()

wxString CLocationListCtrl::GetListIdStrForSeqId ( const objects::CSeq_id &  seq_id)

◆ GetLocType()

int CLocationListCtrl::GetLocType ( ) const
inline

Definition at line 113 of file locationl_list_ctrl.hpp.

References m_LocType.

◆ GetSeq_loc()

CRef< CSeq_loc > CLocationListCtrl::GetSeq_loc ( )

◆ GetStrandFromForm()

ENa_strand CLocationListCtrl::GetStrandFromForm ( size_t  index)
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().

◆ Init()

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().

◆ IsInIdList()

bool CLocationListCtrl::IsInIdList ( wxString  str)

Definition at line 1173 of file locationl_list_ctrl.cpp.

References m_SeqIds, and str().

Referenced by GetListIdStrForSeqId().

◆ OnDelete()

void CLocationListCtrl::OnDelete ( wxHyperlinkEvent &  event)

◆ OnNewText()

void CLocationListCtrl::OnNewText ( wxCommandEvent &  event)

◆ OnSortClick()

void CLocationListCtrl::OnSortClick ( wxCommandEvent &  event)

◆ OnSpinCtrl()

void CLocationListCtrl::OnSpinCtrl ( wxCommandEvent &  evt)

◆ OnStrandChange()

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().

◆ PopulateIdListFromScope()

void CLocationListCtrl::PopulateIdListFromScope ( )

◆ SetLocType()

void CLocationListCtrl::SetLocType ( int  value)
inline

Definition at line 114 of file locationl_list_ctrl.hpp.

References m_LocType, and rapidjson::value.

Referenced by CLocationPanel::x_SetJoinOrder().

◆ SetPartials()

void CLocationListCtrl::SetPartials ( bool  partial5,
bool  partial3 
)

Definition at line 275 of file locationl_list_ctrl.cpp.

References m_Partial3, and m_Partial5.

Referenced by CLocationPanel::x_FillList().

◆ ShowToolTips()

bool CLocationListCtrl::ShowToolTips ( )
static

Should we show tooltips?

Should we show tooltips?

Definition at line 1221 of file locationl_list_ctrl.cpp.

Referenced by CreateControls().

◆ TransferDataFromWindow()

bool CLocationListCtrl::TransferDataFromWindow ( )
virtual

◆ TransferDataToWindow()

bool CLocationListCtrl::TransferDataToWindow ( )
virtual

◆ x_AddEmptyRow()

void CLocationListCtrl::x_AddEmptyRow ( size_t  rowPos = -1)
private

◆ x_AddRow()

void CLocationListCtrl::x_AddRow ( int  from,
int  to,
int  strand,
const wxString &  seqID,
const bool  fuzz,
size_t  rowPos = -1 
)
private

◆ x_FindRow()

wxSizerItemList::iterator CLocationListCtrl::x_FindRow ( wxWindow *  wnd,
wxSizerItemList &  itemList 
)
private

Definition at line 543 of file locationl_list_ctrl.cpp.

References m_CtrlColNum, NULL, and row.

Referenced by OnDelete(), OnSpinCtrl(), and OnStrandChange().

◆ x_GetInterval()

CRef< CSeq_loc > CLocationListCtrl::x_GetInterval ( size_t  index,
bool  int_only 
)
private

◆ x_GetRowData()

void CLocationListCtrl::x_GetRowData ( wxSizerItemList::iterator  row,
wxSizerItemList &  itemList,
int from,
int to,
int strand,
wxString &  seqID,
bool fuzz 
)
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().

◆ x_GetStrandFromForm()

ENa_strand CLocationListCtrl::x_GetStrandFromForm ( size_t  index)
private

◆ x_NextRow()

wxSizerItemList::iterator CLocationListCtrl::x_NextRow ( wxSizerItemList::iterator  row,
wxSizerItemList &  itemList 
)
private

Definition at line 566 of file locationl_list_ctrl.cpp.

References i, m_CtrlColNum, and row.

Referenced by OnSpinCtrl().

◆ x_PrevRow()

wxSizerItemList::iterator CLocationListCtrl::x_PrevRow ( wxSizerItemList::iterator  row,
wxSizerItemList &  itemList 
)
private

Definition at line 576 of file locationl_list_ctrl.cpp.

References i, m_CtrlColNum, and row.

Referenced by OnSpinCtrl().

Member Data Documentation

◆ m_AllowNuc

bool CLocationListCtrl::m_AllowNuc
private

Definition at line 204 of file locationl_list_ctrl.hpp.

Referenced by PopulateIdListFromScope().

◆ m_AllowProt

bool CLocationListCtrl::m_AllowProt
private

Definition at line 205 of file locationl_list_ctrl.hpp.

Referenced by PopulateIdListFromScope().

◆ m_CtrlColNum

int CLocationListCtrl::m_CtrlColNum
private

◆ m_Data

vector<SIntData> CLocationListCtrl::m_Data
private

◆ m_is_aa

bool CLocationListCtrl::m_is_aa
private

◆ m_LastFrom

wxTextCtrl* CLocationListCtrl::m_LastFrom
private

◆ m_LastId

CNoTabComboBox* CLocationListCtrl::m_LastId
private

◆ m_LastIdSelection

int CLocationListCtrl::m_LastIdSelection
private

Definition at line 214 of file locationl_list_ctrl.hpp.

Referenced by Init(), OnNewText(), and x_AddRow().

◆ m_LastIdValue

wxString CLocationListCtrl::m_LastIdValue
private

Definition at line 215 of file locationl_list_ctrl.hpp.

Referenced by OnNewText(), x_AddEmptyRow(), and x_AddRow().

◆ m_LastStrand

CNoTabChoice* CLocationListCtrl::m_LastStrand
private

◆ m_LastStrandSelection

int CLocationListCtrl::m_LastStrandSelection
private

Definition at line 212 of file locationl_list_ctrl.hpp.

Referenced by Init(), OnNewText(), x_AddEmptyRow(), and x_AddRow().

◆ m_LastTo

wxTextCtrl* CLocationListCtrl::m_LastTo
private

◆ m_LocType

int CLocationListCtrl::m_LocType
private

Definition at line 150 of file locationl_list_ctrl.hpp.

Referenced by CreateControls(), GetLocType(), GetSeq_loc(), Init(), and SetLocType().

◆ m_Partial3

wxCheckBox* CLocationListCtrl::m_Partial3

Definition at line 147 of file locationl_list_ctrl.hpp.

Referenced by CreateControls(), GetSeq_loc(), Init(), and SetPartials().

◆ m_Partial5

wxCheckBox* CLocationListCtrl::m_Partial5

Definition at line 146 of file locationl_list_ctrl.hpp.

Referenced by CreateControls(), GetSeq_loc(), Init(), and SetPartials().

◆ m_Scope

CRef<objects::CScope> CLocationListCtrl::m_Scope
private

◆ m_ScrolledWindow

wxScrolledWindow* CLocationListCtrl::m_ScrolledWindow

◆ m_SeqIds

wxArrayString CLocationListCtrl::m_SeqIds
private

◆ m_Sizer

wxFlexGridSizer* CLocationListCtrl::m_Sizer
private

◆ m_str_to_id

map<string, CConstRef<objects::CSeq_id> > CLocationListCtrl::m_str_to_id
private

Definition at line 208 of file locationl_list_ctrl.hpp.

Referenced by GetIdFromForm(), and PopulateIdListFromScope().


The documentation for this class was generated from the following files:
Modified on Wed Jun 05 12:07:10 2024 by modify_doxy.py rev. 669887