NCBI C++ ToolKit
table_cols_more_dlg.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef GUI_WIDGETS_WX__TABLE_COLS_MORE_DLG__HPP
2 #define GUI_WIDGETS_WX__TABLE_COLS_MORE_DLG__HPP
3 
4 /* $Id: table_cols_more_dlg.hpp 23822 2011-06-08 22:14:04Z voronov $
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Authors: Roman Katargin
30  */
31 #include <corelib/ncbistd.hpp>
32 
33 /*!
34  * Includes
35  */
37 #include <wx/button.h>
38 #include <wx/bitmap.h>
39 #include <wx/icon.h>
41 
42 /*!
43  * Forward declarations
44  */
45 
46 /*!
47  * Control identifiers
48  */
49 
51 
52 ////@begin control identifiers
53 #define SYMBOL_CMORETABLECOLSDLG_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL
54 #define SYMBOL_CMORETABLECOLSDLG_TITLE _("More on Table Columns")
55 #define SYMBOL_CMORETABLECOLSDLG_IDNAME ID_MORECOLDLG
56 #define SYMBOL_CMORETABLECOLSDLG_SIZE wxSize(399, 299)
57 #define SYMBOL_CMORETABLECOLSDLG_POSITION wxDefaultPosition
58 ////@end control identifiers
59 
60 
61 /*!
62  * CMoreTableColsDlg class declaration
63  */
64 
66 {
67  DECLARE_DYNAMIC_CLASS( CMoreTableColsDlg )
68  DECLARE_EVENT_TABLE()
69 
70 public:
71  /// Constructors
73  CMoreTableColsDlg( wxWindow* parent, wxWindowID id = SYMBOL_CMORETABLECOLSDLG_IDNAME, const wxString& caption = SYMBOL_CMORETABLECOLSDLG_TITLE, const wxPoint& pos = SYMBOL_CMORETABLECOLSDLG_POSITION, const wxSize& size = SYMBOL_CMORETABLECOLSDLG_SIZE, long style = SYMBOL_CMORETABLECOLSDLG_STYLE );
74 
75  /// Creation
76  bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CMORETABLECOLSDLG_IDNAME, const wxString& caption = SYMBOL_CMORETABLECOLSDLG_TITLE, const wxPoint& pos = SYMBOL_CMORETABLECOLSDLG_POSITION, const wxSize& size = SYMBOL_CMORETABLECOLSDLG_SIZE, long style = SYMBOL_CMORETABLECOLSDLG_STYLE );
77 
78  /// Destructor
80 
81  /// Initialises member variables
82  void Init();
83 
84  /// Creates the controls and sizers
85  void CreateControls();
86 
87 private:
89  void x_UpdateModel();
90  void x_UpdateButtons();
91 
92 public:
93 ////@begin CMoreTableColsDlg event handler declarations
94 
95  /// wxEVT_COMMAND_LIST_ITEM_SELECTED event handler for ID_COLTABLE
96  void OnColTableSelected( wxListEvent& event );
97 
98  /// wxEVT_COMMAND_LIST_ITEM_DESELECTED event handler for ID_COLTABLE
99  void OnColTableDeselected( wxListEvent& event );
100 
101  /// wxEVT_COMMAND_LIST_ITEM_FOCUSED event handler for ID_COLTABLE
102  void OnColTableRowFocused( wxListEvent& event );
103 
104  /// wxEVT_COMMAND_LIST_KEY_DOWN event handler for ID_COLTABLE
105  void OnColTableKeyDown( wxListEvent& event );
106 
107  /// wxEVT_COMMAND_LIST_COL_RIGHT_CLICK event handler for ID_COLTABLE
108  void OnColTableHeaderMenu( wxListEvent& event );
109 
110  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_SHOW
111  void OnShowClick( wxCommandEvent& event );
112 
113  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_HIDE
114  void OnSortingClick( wxCommandEvent& event );
115 
116  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CLEAR_SORT
117  void OnClearSortClick( wxCommandEvent& event );
118 
119 ////@end CMoreTableColsDlg event handler declarations
120 
121  /// wxEVT_LEFT_DOWN event handler for ID_COLTABLE
122  //! It is out of DialogBlocks because of Table ID Linux issue [YV]
123  void OnColTableLeftDown( wxMouseEvent& event );
124 
125  void EndModal( int retCode );
126 
127 ////@begin CMoreTableColsDlg member function declarations
128 
129  /// Retrieves bitmap resources
130  wxBitmap GetBitmapResource( const wxString& name );
131 
132  /// Retrieves icon resources
133  wxIcon GetIconResource( const wxString& name );
134 ////@end CMoreTableColsDlg member function declarations
135 
136  /// Should we show tooltips?
137  static bool ShowToolTips();
138 
139 private:
140 ////@begin CMoreTableColsDlg member variables
142  wxButton* m_ShowBtn;
143  wxButton* m_SortBtn;
144  wxButton* m_ClearBtn;
147  vector<bool> m_Shown;
148  vector<CwxTableListCtrl::TSortedCol> m_Sorted;
149  /// Control identifiers
150  enum {
151  ID_MORECOLDLG = 10014,
152  ID_COLTABLE = 10003,
153  ID_SHOW = 10004,
154  ID_HIDE = 10006,
155  ID_CLEAR_SORT = 10003
156  };
157 ////@end CMoreTableColsDlg member variables
158 };
159 
161 
162 #endif // GUI_WIDGETS_WX__TABLE_COLS_MORE_DLG__HPP
CDialog.
Definition: dialog.hpp:47
void CreateControls()
Creates the controls and sizers.
vector< CwxTableListCtrl::TSortedCol > m_Sorted
void OnSortingClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_HIDE
void EndModal(int retCode)
void SetTable(CwxTableListCtrl *table)
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void OnColTableRowFocused(wxListEvent &event)
wxEVT_COMMAND_LIST_ITEM_FOCUSED event handler for ID_COLTABLE
CMoreTableColsDlg()
Constructors.
void OnShowClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_SHOW
CwxTableListCtrl * m_ColTable
void OnColTableSelected(wxListEvent &event)
wxEVT_COMMAND_LIST_ITEM_SELECTED event handler for ID_COLTABLE
static bool ShowToolTips()
Should we show tooltips?
bool Create(wxWindow *parent, wxWindowID id=ID_MORECOLDLG, const wxString &caption=_("More on Table Columns"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(399, 299), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
void OnColTableLeftDown(wxMouseEvent &event)
wxEVT_LEFT_DOWN event handler for ID_COLTABLE It is out of DialogBlocks because of Table ID Linux iss...
void OnColTableHeaderMenu(wxListEvent &event)
wxEVT_COMMAND_LIST_COL_RIGHT_CLICK event handler for ID_COLTABLE
CwxTableListCtrl * m_BaseTable
~CMoreTableColsDlg()
Destructor.
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void Init()
Initialises member variables.
void OnColTableDeselected(wxListEvent &event)
wxEVT_COMMAND_LIST_ITEM_DESELECTED event handler for ID_COLTABLE
void OnClearSortClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CLEAR_SORT
void OnColTableKeyDown(wxListEvent &event)
wxEVT_COMMAND_LIST_KEY_DOWN event handler for ID_COLTABLE
CwxTextTableModel - very simple model for storing SMALL numbers fo strings.
CwxTableListCtrl - generic wxListCtrl-based Table Control.
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
<!DOCTYPE HTML >< html > n< header > n< title > PubSeq Gateway Help Page</title > n< style > n table
const struct ncbi::grid::netcache::search::fields::SIZE size
#define SYMBOL_CMORETABLECOLSDLG_IDNAME
#define SYMBOL_CMORETABLECOLSDLG_POSITION
#define SYMBOL_CMORETABLECOLSDLG_TITLE
#define SYMBOL_CMORETABLECOLSDLG_SIZE
#define SYMBOL_CMORETABLECOLSDLG_STYLE
Modified on Sun May 19 04:41:33 2024 by modify_doxy.py rev. 669887