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

Go to the SVN repository for this file.

1 /* $Id: field_constraint_panel.hpp 35122 2016-03-24 20:57:42Z filippov $
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: Colleen Bollin
27  */
28 #ifndef _PKG_SEQUENCE_EDITFIELD_CONSTRAINT_PANEL_H_
29 #define _PKG_SEQUENCE_EDITFIELD_CONSTRAINT_PANEL_H_
30 
31 #include <corelib/ncbistd.hpp>
32 
36 
37 /*!
38  * Includes
39  */
40 
41 ////@begin includes
42 ////@end includes
43 
44 #include <wx/sizer.h>
45 #include <wx/choice.h>
46 
47 /*!
48  * Forward declarations
49  */
50 
51 ////@begin forward declarations
53 ////@end forward declarations
54 
56 
57 /*!
58  * Control identifiers
59  */
60 
61 ////@begin control identifiers
62 #define SYMBOL_CFIELDCONSTRAINTPANEL_STYLE wxTAB_TRAVERSAL
63 #define SYMBOL_CFIELDCONSTRAINTPANEL_TITLE _("FieldConstraintPanel")
64 #define SYMBOL_CFIELDCONSTRAINTPANEL_IDNAME ID_CFIELDCONSTRAINTPANEL
65 #define SYMBOL_CFIELDCONSTRAINTPANEL_SIZE wxDefaultSize
66 #define SYMBOL_CFIELDCONSTRAINTPANEL_POSITION wxDefaultPosition
67 ////@end control identifiers
68 
69 
70 /*!
71  * CFieldConstraintPanel class declaration
72  */
73 
75 {
76  DECLARE_DYNAMIC_CLASS( CFieldConstraintPanel )
77  DECLARE_EVENT_TABLE()
78 
79 public:
80  /// Constructors
82  CFieldConstraintPanel( wxWindow* parent,
83  wxWindowID id = SYMBOL_CFIELDCONSTRAINTPANEL_IDNAME,
84  const wxPoint& pos = SYMBOL_CFIELDCONSTRAINTPANEL_POSITION,
85  const wxSize& size = SYMBOL_CFIELDCONSTRAINTPANEL_SIZE,
87 
88  /// Creation
89  bool Create( wxWindow* parent,
90  wxWindowID id = SYMBOL_CFIELDCONSTRAINTPANEL_IDNAME,
91  const wxPoint& pos = SYMBOL_CFIELDCONSTRAINTPANEL_POSITION,
92  const wxSize& size = SYMBOL_CFIELDCONSTRAINTPANEL_SIZE,
94 
95  /// Destructor
97 
98  /// Initialises member variables
99  void Init();
100 
101  /// Creates the controls and sizers
102  void CreateControls();
103 
104 ////@begin CFieldConstraintPanel event handler declarations
105 
106 ////@end CFieldConstraintPanel event handler declarations
107 
108 ////@begin CFieldConstraintPanel 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 CFieldConstraintPanel member function declarations
116 
117  /// Should we show tooltips?
118  static bool ShowToolTips();
119 
120 ////@begin CFieldConstraintPanel member variables
122 ////@end CFieldConstraintPanel member variables
124 
125  enum {
129  };
130  bool SetFieldType(CFieldNamePanel::EFieldType field_type);
132  const vector<CFieldNamePanel::EFieldType> GetFieldTypes() { return m_FieldType->GetFieldTypes(); }
133  virtual string GetFieldName(const bool subfield = false);
134  virtual bool SetFieldName(const string& field);
135  virtual vector<string> GetChoices(bool& allow_other);
136 
138  virtual void UpdateEditor();
140 };
141 
143 
144 #endif
145  // _PKG_SEQUENCE_EDITFIELD_CONSTRAINT_PANEL_H_
const vector< CFieldNamePanel::EFieldType > GetFieldTypes()
CFieldNamePanel::EFieldType GetFieldType()
CFieldNamePanel::EFieldType GetFieldType()
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
CFieldChoicePanel * GetFieldChoicePanel(void)
virtual vector< string > GetChoices(bool &allow_other)
bool Create(wxWindow *parent, wxWindowID id=ID_CFIELDCONSTRAINTPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
Creation.
const vector< CFieldNamePanel::EFieldType > GetFieldTypes()
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void Init()
Initialises member variables.
void CreateControls()
Creates the controls and sizers.
CFieldChoicePanel * m_FieldType
CRef< edit::CStringConstraint > GetStringConstraint()
CStringConstraintPanel * m_StringConstraintPanel
virtual string GetFieldName(const bool subfield=false)
Returns the name of the field as selected in the panel.
static bool ShowToolTips()
Should we show tooltips?
bool SetFieldType(CFieldNamePanel::EFieldType field_type)
virtual bool SetFieldName(const string &field)
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define SYMBOL_CFIELDCONSTRAINTPANEL_STYLE
#define SYMBOL_CFIELDCONSTRAINTPANEL_POSITION
#define SYMBOL_CFIELDCONSTRAINTPANEL_IDNAME
#define SYMBOL_CFIELDCONSTRAINTPANEL_SIZE
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
const struct ncbi::grid::netcache::search::fields::SIZE size
Modified on Fri Sep 20 14:57:56 2024 by modify_doxy.py rev. 669887