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

Search Toolkit Book for CSeqTableGridPanel

#include <gui/packages/pkg_sequence_edit/seq_table_grid.hpp>

+ Inheritance diagram for CSeqTableGridPanel:
+ Collaboration diagram for CSeqTableGridPanel:

Public Member Functions

 CSeqTableGridPanel ()
 Constructors. More...
 
 CSeqTableGridPanel (wxWindow *parent, CRef< objects::CSeq_table > values, CRef< objects::CSeq_table > choices, int glyph_col=-1, wxWindowID id=10078, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
 
bool Create (wxWindow *parent, wxWindowID id=10078, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
 Creation. More...
 
 ~CSeqTableGridPanel ()
 Destructor. More...
 
void Init ()
 Initialises member variables. More...
 
void CreateControls ()
 Creates the controls and sizers. More...
 
void OnCellRightClick (wxGridEvent &event)
 wxEVT_GRID_CELL_RIGHT_CLICK event handler for ID_GRID More...
 
void OnLabelRightClick (wxGridEvent &event)
 wxEVT_GRID_LABEL_RIGHT_CLICK event handler for ID_GRID More...
 
void OnCopyCells (wxCommandEvent &event)
 
void OnPasteCells (wxCommandEvent &event)
 
void OnPasteAppendCells (wxCommandEvent &event)
 
void OnCopyCellsFromId (wxCommandEvent &event)
 
void OnSearchTable (wxCommandEvent &event)
 
void OnSortTableByColumn (wxGridEvent &event)
 
void OnLabelLeftClick (wxGridEvent &event)
 
void OnLabelLeftDClick (wxGridEvent &event)
 
void OnCellLeftClick (wxGridEvent &event)
 
void OnCellDoubleLeftClick (wxGridEvent &event)
 
void OnCellDoubleLeftClick2 (wxMouseEvent &event)
 
void OnDeleteColumn (wxCommandEvent &event)
 
void OnRenameColumn (wxCommandEvent &event)
 
void OnCollapseColumn (wxCommandEvent &event)
 
void OnExpandColumn (wxCommandEvent &event)
 
wxBitmap GetBitmapResource (const wxString &name)
 Retrieves bitmap resources. More...
 
wxIcon GetIconResource (const wxString &name)
 Retrieves icon resources. More...
 
wxGrid * GetGrid (void)
 
CRef< objects::CSeq_table > GetValuesTable ()
 
void SetValuesTable (CRef< objects::CSeq_table > table)
 
void CopyPasteDataByKeyboard (wxKeyEvent &event)
 
void UpdateColumnLabelHeight ()
 
int GetBestTableWidth ()
 
void SetBestTableWidth ()
 
void MakeColumnReadOnly (int pos, bool val=true)
 
void MakeColumnReadOnly (string name, bool val=true)
 
void MakeAllColumnsReadOnly ()
 
void SetColumnSizesAndChoices ()
 
void UpdateColumnChoices (int pos, vector< string > choices)
 
void InitColumnCollapse (int col)
 
bool GetModified ()
 
int GetCollapseColAndExpand (void)
 
void CollapseByCol (int col)
 
int GetRowIndex (int row)
 

Static Public Member Functions

static bool ShowToolTips ()
 Should we show tooltips? More...
 

Private Member Functions

void InitMapRowLabelToIndex ()
 
void x_SortByRowLabel ()
 
void x_SetUpMenu ()
 
void x_CreateMenu (wxGridEvent &evt)
 
void x_PasteCells (CRef< objects::CSeq_table > copied, bool append=false, string delim=";")
 
bool x_ValuesOkForNewColumn (CConstRef< objects::CSeqTable_column > values, int col_pos)
 
void x_OnCopyCells ()
 
void x_OnPasteCells ()
 
void x_MakeProblemsColumnReadOnly ()
 
SrcEditDialogx_GetParent ()
 
CSeqGridTableNavx_GetSeqGridTableNav ()
 
void x_CollapseTableByColumn (bool initialize=false)
 
void x_ExpandTableByColumn (void)
 
void x_UpdateCollapsedRow (unsigned int num_cols, int expand_row, vector< bool > &all_present, vector< bool > &all_same, vector< wxString > &values)
 
void x_ExpandTable ()
 
void x_SortTableByColumn (int col, bool ascend)
 
void x_UpdateCountSelectedDisplay (void)
 
void x_SelectHiddenRows (int row)
 

Private Attributes

CRef< objects::CSeq_table > m_Table
 
CRef< objects::CSeq_table > m_Choices
 
CRef< objects::CSeq_table > m_Copied
 
bool m_SortByRowLabel
 
bool m_SortByRowLabelAscend
 
unordered_map< string, intm_MapRowLabelToIndex
 
wxString m_FindStr
 
unordered_map< int, intm_CollapseCell
 
map< pair< int, int >, wxString > m_CollapseCache
 
int m_CollapseGlyphCol
 
int m_CollapseCol
 
set< intm_SetOfReadOnlyCols
 
bool m_Modified
 
int m_SortCol
 
int m_MenuCol
 
CCollapsibleGridm_Grid
 
int m_edit_cell_row
 
int m_edit_cell_col
 

Detailed Description

CSeqTableGridPanel class declaration

Definition at line 220 of file seq_table_grid.hpp.

Constructor & Destructor Documentation

◆ CSeqTableGridPanel() [1/2]

CSeqTableGridPanel::CSeqTableGridPanel ( )

Constructors.

CSeqTableGridPanel type definition

CSeqTableGridPanel event table definition

CSeqTableGridPanel constructors

Definition at line 515 of file seq_table_grid.cpp.

References Init().

◆ CSeqTableGridPanel() [2/2]

CSeqTableGridPanel::CSeqTableGridPanel ( wxWindow *  parent,
CRef< objects::CSeq_table >  values,
CRef< objects::CSeq_table >  choices,
int  glyph_col = -1,
wxWindowID  id = 10078,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxSize(400, 300),
long  style = wxTAB_TRAVERSAL 
)

◆ ~CSeqTableGridPanel()

CSeqTableGridPanel::~CSeqTableGridPanel ( )

Destructor.

CSeqTableGridPanel destructor

Definition at line 553 of file seq_table_grid.cpp.

Member Function Documentation

◆ CollapseByCol()

void CSeqTableGridPanel::CollapseByCol ( int  col)

◆ CopyPasteDataByKeyboard()

void CSeqTableGridPanel::CopyPasteDataByKeyboard ( wxKeyEvent &  event)

Definition at line 2386 of file seq_table_grid.cpp.

References x_OnCopyCells(), and x_OnPasteCells().

Referenced by CreateControls().

◆ Create()

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

Creation.

CSeqTableGrid creator

Definition at line 533 of file seq_table_grid.cpp.

References CreateControls(), and ncbi::grid::netcache::search::fields::size.

◆ CreateControls()

void CSeqTableGridPanel::CreateControls ( )

Creates the controls and sizers.

Control creation for CSeqTableGrid

Definition at line 584 of file seq_table_grid.cpp.

References CopyPasteDataByKeyboard(), ID_GRID, m_Grid, m_Table, NULL, SetColumnSizesAndChoices(), wxID_ANY, and x_MakeProblemsColumnReadOnly().

Referenced by Create().

◆ GetBestTableWidth()

int CSeqTableGridPanel::GetBestTableWidth ( )

Definition at line 814 of file seq_table_grid.cpp.

References i, and m_Grid.

Referenced by SetBestTableWidth().

◆ GetBitmapResource()

wxBitmap CSeqTableGridPanel::GetBitmapResource ( const wxString &  name)

Retrieves bitmap resources.

Get bitmap resources

Definition at line 851 of file seq_table_grid.cpp.

◆ GetCollapseColAndExpand()

int CSeqTableGridPanel::GetCollapseColAndExpand ( void  )

◆ GetGrid()

wxGrid* CSeqTableGridPanel::GetGrid ( void  )
inline

◆ GetIconResource()

wxIcon CSeqTableGridPanel::GetIconResource ( const wxString &  name)

Retrieves icon resources.

Get icon resources

Definition at line 864 of file seq_table_grid.cpp.

◆ GetModified()

bool CSeqTableGridPanel::GetModified ( )
inline

◆ GetRowIndex()

int CSeqTableGridPanel::GetRowIndex ( int  row)

◆ GetValuesTable()

CRef< CSeq_table > CSeqTableGridPanel::GetValuesTable ( void  )

◆ Init()

void CSeqTableGridPanel::Init ( void  )

Initialises member variables.

Member initialisation

Definition at line 564 of file seq_table_grid.cpp.

References m_CollapseCol, m_edit_cell_col, m_edit_cell_row, m_MenuCol, m_Modified, m_SortByRowLabel, m_SortByRowLabelAscend, m_SortCol, and x_SetUpMenu().

◆ InitColumnCollapse()

void CSeqTableGridPanel::InitColumnCollapse ( int  col)

◆ InitMapRowLabelToIndex()

void CSeqTableGridPanel::InitMapRowLabelToIndex ( )
private

◆ MakeAllColumnsReadOnly()

void CSeqTableGridPanel::MakeAllColumnsReadOnly ( )

◆ MakeColumnReadOnly() [1/2]

void CSeqTableGridPanel::MakeColumnReadOnly ( int  pos,
bool  val = true 
)

◆ MakeColumnReadOnly() [2/2]

void CSeqTableGridPanel::MakeColumnReadOnly ( string  name,
bool  val = true 
)

Definition at line 636 of file seq_table_grid.cpp.

References NStr::EqualNocase(), i, m_Grid, MakeColumnReadOnly(), ToStdString(), and val.

◆ OnCellDoubleLeftClick()

void CSeqTableGridPanel::OnCellDoubleLeftClick ( wxGridEvent &  event)

◆ OnCellDoubleLeftClick2()

void CSeqTableGridPanel::OnCellDoubleLeftClick2 ( wxMouseEvent &  event)

◆ OnCellLeftClick()

void CSeqTableGridPanel::OnCellLeftClick ( wxGridEvent &  event)

◆ OnCellRightClick()

void CSeqTableGridPanel::OnCellRightClick ( wxGridEvent &  event)

wxEVT_GRID_CELL_RIGHT_CLICK event handler for ID_GRID

wxEVT_GRID_CELL_RIGHT_CLICK event handler for ID_GRID

Definition at line 2086 of file seq_table_grid.cpp.

References x_CreateMenu().

◆ OnCollapseColumn()

void CSeqTableGridPanel::OnCollapseColumn ( wxCommandEvent &  event)

◆ OnCopyCells()

void CSeqTableGridPanel::OnCopyCells ( wxCommandEvent &  event)

wxEVT_COMMAND_BUTTON_CLICKED event handler for eCmdCopyTableValues

Definition at line 1588 of file seq_table_grid.cpp.

References m_MenuCol, and x_OnCopyCells().

◆ OnCopyCellsFromId()

void CSeqTableGridPanel::OnCopyCellsFromId ( wxCommandEvent &  event)

wxEVT_COMMAND_BUTTON_CLICKED event handler for eCmdCopyTableValuesFromId

Definition at line 2014 of file seq_table_grid.cpp.

References eContent, CSeqTableGrid::GetValuesTable(), label, m_Grid, m_MenuCol, wxT, and x_PasteCells().

◆ OnDeleteColumn()

void CSeqTableGridPanel::OnDeleteColumn ( wxCommandEvent &  event)

◆ OnExpandColumn()

void CSeqTableGridPanel::OnExpandColumn ( wxCommandEvent &  event)

Definition at line 1465 of file seq_table_grid.cpp.

References m_CollapseCol, m_MenuCol, wxT, and x_ExpandTable().

◆ OnLabelLeftClick()

void CSeqTableGridPanel::OnLabelLeftClick ( wxGridEvent &  event)

◆ OnLabelLeftDClick()

void CSeqTableGridPanel::OnLabelLeftDClick ( wxGridEvent &  event)

◆ OnLabelRightClick()

void CSeqTableGridPanel::OnLabelRightClick ( wxGridEvent &  event)

wxEVT_GRID_LABEL_RIGHT_CLICK event handler for ID_GRID

wxEVT_GRID_LABEL_RIGHT_CLICK event handler for ID_GRID

Definition at line 2190 of file seq_table_grid.cpp.

References x_CreateMenu().

◆ OnPasteAppendCells()

void CSeqTableGridPanel::OnPasteAppendCells ( wxCommandEvent &  event)

wxEVT_COMMAND_BUTTON_CLICKED event handler for eCmdAppendTableValues

Definition at line 2003 of file seq_table_grid.cpp.

References m_Copied, m_MenuCol, and x_PasteCells().

◆ OnPasteCells()

void CSeqTableGridPanel::OnPasteCells ( wxCommandEvent &  event)

wxEVT_COMMAND_BUTTON_CLICKED event handler for eCmdPasteTableValues

Definition at line 1970 of file seq_table_grid.cpp.

References m_MenuCol, and x_OnPasteCells().

◆ OnRenameColumn()

void CSeqTableGridPanel::OnRenameColumn ( wxCommandEvent &  event)

◆ OnSearchTable()

void CSeqTableGridPanel::OnSearchTable ( wxCommandEvent &  event)

◆ OnSortTableByColumn()

void CSeqTableGridPanel::OnSortTableByColumn ( wxGridEvent &  event)

◆ SetBestTableWidth()

void CSeqTableGridPanel::SetBestTableWidth ( )

Definition at line 825 of file seq_table_grid.cpp.

References GetBestTableWidth(), and m_Grid.

Referenced by CTblEditDlg::CreateControls(), and SetColumnSizesAndChoices().

◆ SetColumnSizesAndChoices()

void CSeqTableGridPanel::SetColumnSizesAndChoices ( )

◆ SetValuesTable()

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

◆ ShowToolTips()

bool CSeqTableGridPanel::ShowToolTips ( )
static

Should we show tooltips?

Should we show tooltips?

Definition at line 842 of file seq_table_grid.cpp.

◆ UpdateColumnChoices()

void CSeqTableGridPanel::UpdateColumnChoices ( int  pos,
vector< string choices 
)

◆ UpdateColumnLabelHeight()

void CSeqTableGridPanel::UpdateColumnLabelHeight ( )

Definition at line 680 of file seq_table_grid.cpp.

References NStr::Find(), i, label, m_Grid, and ToStdString().

Referenced by CTblEditDlg::CreateControls().

◆ x_CollapseTableByColumn()

void CSeqTableGridPanel::x_CollapseTableByColumn ( bool  initialize = false)
private

◆ x_CreateMenu()

static void CSeqTableGridPanel::x_CreateMenu ( wxGridEvent &  evt)
private

◆ x_ExpandTable()

void CSeqTableGridPanel::x_ExpandTable ( )
private

◆ x_ExpandTableByColumn()

void CSeqTableGridPanel::x_ExpandTableByColumn ( void  )
private

◆ x_GetParent()

SrcEditDialog * CSeqTableGridPanel::x_GetParent ( )
private

Definition at line 1365 of file seq_table_grid.cpp.

References NULL.

Referenced by OnDeleteColumn(), and OnRenameColumn().

◆ x_GetSeqGridTableNav()

CSeqGridTableNav * CSeqTableGridPanel::x_GetSeqGridTableNav ( )
private

Definition at line 2343 of file seq_table_grid.cpp.

References NULL.

Referenced by OnLabelLeftDClick().

◆ x_MakeProblemsColumnReadOnly()

void CSeqTableGridPanel::x_MakeProblemsColumnReadOnly ( )
private

◆ x_OnCopyCells()

void CSeqTableGridPanel::x_OnCopyCells ( )
private

◆ x_OnPasteCells()

void CSeqTableGridPanel::x_OnPasteCells ( )
private

◆ x_PasteCells()

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

◆ x_SelectHiddenRows()

void CSeqTableGridPanel::x_SelectHiddenRows ( int  row)
private

Definition at line 2439 of file seq_table_grid.cpp.

References i, m_CollapseGlyphCol, m_Grid, row, and x_UpdateCountSelectedDisplay().

Referenced by OnLabelLeftClick().

◆ x_SetUpMenu()

void CSeqTableGridPanel::x_SetUpMenu ( )
private

◆ x_SortByRowLabel()

void CSeqTableGridPanel::x_SortByRowLabel ( )
private

◆ x_SortTableByColumn()

void CSeqTableGridPanel::x_SortTableByColumn ( int  col,
bool  ascend 
)
private

◆ x_UpdateCollapsedRow()

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

◆ x_UpdateCountSelectedDisplay()

void CSeqTableGridPanel::x_UpdateCountSelectedDisplay ( void  )
private

◆ x_ValuesOkForNewColumn()

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

Member Data Documentation

◆ m_Choices

CRef<objects::CSeq_table> CSeqTableGridPanel::m_Choices
private

◆ m_CollapseCache

map<pair<int,int>, wxString> CSeqTableGridPanel::m_CollapseCache
private

◆ m_CollapseCell

unordered_map<int, int> CSeqTableGridPanel::m_CollapseCell
private

◆ m_CollapseCol

int CSeqTableGridPanel::m_CollapseCol
private

◆ m_CollapseGlyphCol

int CSeqTableGridPanel::m_CollapseGlyphCol
private

◆ m_Copied

CRef<objects::CSeq_table> CSeqTableGridPanel::m_Copied
private

Definition at line 304 of file seq_table_grid.hpp.

Referenced by OnPasteAppendCells(), x_OnCopyCells(), and x_OnPasteCells().

◆ m_edit_cell_col

int CSeqTableGridPanel::m_edit_cell_col
private

Definition at line 337 of file seq_table_grid.hpp.

Referenced by Init(), OnCellDoubleLeftClick2(), and OnCellLeftClick().

◆ m_edit_cell_row

int CSeqTableGridPanel::m_edit_cell_row
private

Definition at line 337 of file seq_table_grid.hpp.

Referenced by Init(), OnCellDoubleLeftClick2(), and OnCellLeftClick().

◆ m_FindStr

wxString CSeqTableGridPanel::m_FindStr
private

Definition at line 308 of file seq_table_grid.hpp.

Referenced by OnSearchTable().

◆ m_Grid

CCollapsibleGrid* CSeqTableGridPanel::m_Grid
private

◆ m_MapRowLabelToIndex

unordered_map<string,int> CSeqTableGridPanel::m_MapRowLabelToIndex
private

◆ m_MenuCol

int CSeqTableGridPanel::m_MenuCol
private

◆ m_Modified

bool CSeqTableGridPanel::m_Modified
private

◆ m_SetOfReadOnlyCols

set<int> CSeqTableGridPanel::m_SetOfReadOnlyCols
private

Definition at line 332 of file seq_table_grid.hpp.

Referenced by MakeColumnReadOnly(), and x_UpdateCollapsedRow().

◆ m_SortByRowLabel

bool CSeqTableGridPanel::m_SortByRowLabel
private

Definition at line 305 of file seq_table_grid.hpp.

Referenced by Init(), OnLabelLeftClick(), OnLabelLeftDClick(), and OnSortTableByColumn().

◆ m_SortByRowLabelAscend

bool CSeqTableGridPanel::m_SortByRowLabelAscend
private

Definition at line 306 of file seq_table_grid.hpp.

Referenced by GetValuesTable(), Init(), OnSortTableByColumn(), and x_SortByRowLabel().

◆ m_SortCol

int CSeqTableGridPanel::m_SortCol
private

Definition at line 334 of file seq_table_grid.hpp.

Referenced by Init(), and OnSortTableByColumn().

◆ m_Table

CRef<objects::CSeq_table> CSeqTableGridPanel::m_Table
private

Definition at line 302 of file seq_table_grid.hpp.

Referenced by CreateControls().


The documentation for this class was generated from the following files:
Modified on Tue May 21 10:53:29 2024 by modify_doxy.py rev. 669887