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

Go to the SVN repository for this file.

1 /* $Id: feature_check_dialog.hpp 25998 2012-06-22 18:39:27Z katargir $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Authors: Roman Katargin
27  */
28 #ifndef _FEATURE_CHECK_DIALOG_H_
29 #define _FEATURE_CHECK_DIALOG_H_
30 
31 
32 /*!
33  * Includes
34  */
35 
36 #include <corelib/ncbistd.hpp>
37 #include <wx/dialog.h>
39 
40 ////@begin includes
41 #include "wx/srchctrl.h"
42 #include "wx/statline.h"
43 ////@end includes
44 
45 /*!
46  * Forward declarations
47  */
48 
49 ////@begin forward declarations
50 class wxSearchCtrl;
51 class CFeatureCheckPanel;
52 ////@end forward declarations
53 
54 /*!
55  * Control identifiers
56  */
57 
58 ////@begin control identifiers
59 #define SYMBOL_CFEATURECHECKDIALOG_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL
60 #define SYMBOL_CFEATURECHECKDIALOG_TITLE _("Select Feature Types")
61 #define SYMBOL_CFEATURECHECKDIALOG_IDNAME ID_CFEATURECHECKDIALOG
62 #define SYMBOL_CFEATURECHECKDIALOG_SIZE wxDefaultSize
63 #define SYMBOL_CFEATURECHECKDIALOG_POSITION wxDefaultPosition
64 ////@end control identifiers
65 
66 
68 
69 /*!
70  * CFeatureCheckDialog class declaration
71  */
72 
74 {
75  DECLARE_DYNAMIC_CLASS( CFeatureCheckDialog )
76  DECLARE_EVENT_TABLE()
77 
78 public:
79  typedef objects::CFeatListItem TFeatTypeItem;
81 
82  /// Constructors
84  CFeatureCheckDialog( wxWindow* parent, wxWindowID id = SYMBOL_CFEATURECHECKDIALOG_IDNAME, const wxString& caption = SYMBOL_CFEATURECHECKDIALOG_TITLE, const wxPoint& pos = SYMBOL_CFEATURECHECKDIALOG_POSITION, const wxSize& size = SYMBOL_CFEATURECHECKDIALOG_SIZE, long style = SYMBOL_CFEATURECHECKDIALOG_STYLE );
85 
86  /// Creation
87  bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CFEATURECHECKDIALOG_IDNAME, const wxString& caption = SYMBOL_CFEATURECHECKDIALOG_TITLE, const wxPoint& pos = SYMBOL_CFEATURECHECKDIALOG_POSITION, const wxSize& size = SYMBOL_CFEATURECHECKDIALOG_SIZE, long style = SYMBOL_CFEATURECHECKDIALOG_STYLE );
88 
89  /// Destructor
91 
92  /// Initialises member variables
93  void Init();
94 
95  /// Creates the controls and sizers
96  void CreateControls();
97 
98 ////@begin CFeatureCheckDialog event handler declarations
99 
100  /// wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN event handler for ID_SEARCHCTRL
101  void OnSearchctrlSearchButtonClick( wxCommandEvent& event );
102 
103  /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_SEARCHCTRL
104  void OnSearchctrlTextUpdated( wxCommandEvent& event );
105 
106 ////@end CFeatureCheckDialog event handler declarations
107 
108 ////@begin CFeatureCheckDialog member function declarations
109 
110  /// Retrieves bitmap resources
111  wxBitmap GetBitmapResource( const wxString& name );
112 
113  /// Retrieves icon resources
114  wxIcon GetIconResource( const wxString& name );
115 ////@end CFeatureCheckDialog member function declarations
116 
117  /// Should we show tooltips?
118  static bool ShowToolTips();
119 
120 ////@begin CFeatureCheckDialog member variables
121  wxSearchCtrl* m_Filter;
123  /// Control identifiers
124  enum {
125  ID_CFEATURECHECKDIALOG = 10000,
126  ID_SEARCHCTRL = 10002,
127  ID_PANEL1 = 10001
128  };
129 ////@end CFeatureCheckDialog member variables
130 public:
131  // overloaded
132 
133  virtual int ShowModal();
134 
135  // selection get/set
136  void GetSelected(TFeatTypeItemSet& feat_types);
137  void SetSelected(TFeatTypeItemSet& feat_types);
138 
139  // turn on and set registry path for state persistance
140  void SetRegistryPath(const string & rpath);
141 
142 protected:
143  void x_Serialize(bool bRead = true);
144 
145  string m_RegPath;
146 };
147 
149 
150 #endif
151  // _FEATURE_CHECK_DIALOG_H_
objects::CFeatListItem TFeatTypeItem
set< TFeatTypeItem > TFeatTypeItemSet
CFeatureCheckPanel * m_Panel
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define SYMBOL_CFEATURECHECKDIALOG_IDNAME
#define SYMBOL_CFEATURECHECKDIALOG_STYLE
#define SYMBOL_CFEATURECHECKDIALOG_SIZE
#define SYMBOL_CFEATURECHECKDIALOG_TITLE
#define SYMBOL_CFEATURECHECKDIALOG_POSITION
static void Init(void)
Definition: cursor6.c:76
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define NCBI_GUIWIDGETS_SEQ_EXPORT
Definition: gui_export.h:539
const struct ncbi::grid::netcache::search::fields::SIZE size
#define ID_SEARCHCTRL
#define ID_PANEL1
Modified on Fri Sep 20 14:58:32 2024 by modify_doxy.py rev. 669887