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

Go to the SVN repository for this file.

1 #ifndef GUI_WIDGETS_EDIT___FEATURE_TYPE_PANEL__HPP
2 #define GUI_WIDGETS_EDIT___FEATURE_TYPE_PANEL__HPP
3 /* $Id: feature_type_panel.hpp 42432 2019-02-22 18:44:43Z filippov $
4  * ===========================================================================
5  *
6  * PUBLIC DOMAIN NOTICE
7  * National Center for Biotechnology Information
8  *
9  * This software/database is a "United States Government Work" under the
10  * terms of the United States Copyright Act. It was written as part of
11  * the author's official duties as a United States Government employee and
12  * thus cannot be copyrighted. This software/database is freely available
13  * to the public for use. The National Library of Medicine and the U.S.
14  * Government have not placed any restriction on its use or reproduction.
15  *
16  * Although all reasonable efforts have been taken to ensure the accuracy
17  * and reliability of the software and data, the NLM and the U.S.
18  * Government do not and cannot warrant the performance or results that
19  * may be obtained by using this software or data. The NLM and the U.S.
20  * Government disclaim all warranties, express or implied, including
21  * warranties of performance, merchantability or fitness for any particular
22  * purpose.
23  *
24  * Please cite the author in any work or product based on this material.
25  *
26  * ===========================================================================
27  *
28  * Authors: Colleen Bollin
29  */
30 // Generated by DialogBlocks (unregistered), 12/06/2013 08:31:07
31 
32 #include <corelib/ncbistd.hpp>
34 #include <wx/listbox.h>
35 
36 
37 /*!
38  * Forward declarations
39  */
40 
41 ////@begin forward declarations
42 ////@end forward declarations
43 
45 
46 /*!
47  * Control identifiers
48  */
49 
50 ////@begin control identifiers
51 #define ID_CFEATURETYPEPANEL 10179
52 #define ID_LISTBOX1 10180
53 #define SYMBOL_CFEATURETYPEPANEL_STYLE wxSIMPLE_BORDER|wxTAB_TRAVERSAL
54 #define SYMBOL_CFEATURETYPEPANEL_TITLE _("FeatureTypePanel")
55 #define SYMBOL_CFEATURETYPEPANEL_IDNAME ID_CFEATURETYPEPANEL
56 #define SYMBOL_CFEATURETYPEPANEL_SIZE wxDefaultSize
57 #define SYMBOL_CFEATURETYPEPANEL_POSITION wxDefaultPosition
58 ////@end control identifiers
59 
60 
61 /*!
62  * CFeatureTypePanel class declaration
63  */
64 
66 {
67  DECLARE_DYNAMIC_CLASS( CFeatureTypePanel )
68  DECLARE_EVENT_TABLE()
69 
70 public:
71  /// Constructors
73  CFeatureTypePanel( wxWindow* parent, wxWindowID id = SYMBOL_CFEATURETYPEPANEL_IDNAME, const wxPoint& pos = SYMBOL_CFEATURETYPEPANEL_POSITION, const wxSize& size = SYMBOL_CFEATURETYPEPANEL_SIZE, long style = SYMBOL_CFEATURETYPEPANEL_STYLE );
74 
75  /// Creation
76  bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CFEATURETYPEPANEL_IDNAME, const wxPoint& pos = SYMBOL_CFEATURETYPEPANEL_POSITION, const wxSize& size = SYMBOL_CFEATURETYPEPANEL_SIZE, long style = SYMBOL_CFEATURETYPEPANEL_STYLE );
77 
78  /// Destructor
80 
81  /// Initialises member variables
82  void Init();
83 
84  /// Creates the controls and sizers
85  void CreateControls();
86 
87 ////@begin CFeatureTypePanel event handler declarations
88 
89  /// wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_LISTBOX1
90  void OnListbox1Selected( wxCommandEvent& event );
91 
92 ////@end CFeatureTypePanel event handler declarations
93 
94 ////@begin CFeatureTypePanel member function declarations
95  // places an 'Any' item at the top of the feature list
96  void ListAnyOption(void);
97  void ListAllOption(void);
98 
99  // lists the features present on the record first
100  void ListPresentFeaturesFirst(const objects::CSeq_entry_Handle& entry, vector<const objects::CFeatListItem *> *featlist = nullptr);
101  /// Retrieves bitmap resources
102  wxBitmap GetBitmapResource( const wxString& name );
103 
104  /// Retrieves icon resources
105  wxIcon GetIconResource( const wxString& name );
106 ////@end CFeatureTypePanel member function declarations
107 
108  /// Should we show tooltips?
109  static bool ShowToolTips();
110 
111  static bool s_IsRarelyUsedOrDiscouragedFeatureType(int subtype);
112 
113 ////@begin CFeatureTypePanel member variables
114  wxListBox* m_List;
115 ////@end CFeatureTypePanel member variables
116  virtual string GetFieldName(const bool subfield = false);
117  virtual bool SetFieldName(const string& field);
118  virtual void ClearValues(void);
119  void SetListAllFeats(bool flag) {m_list_all_feats = flag;}
120  virtual void SetShowLegalOnly(bool show);
121 
122 private:
123  vector<string> m_Featlist;
126 };
127 
128 
130 
131 #endif
132  // GUI_WIDGETS_EDIT___FEATURE_TYPE_PANEL__HPP
void SetListAllFeats(bool flag)
vector< string > m_Featlist
virtual string GetFieldName(const bool subfield=false)=0
Returns the name of the field as selected in the panel.
virtual void SetShowLegalOnly(bool show)
virtual bool SetFieldName(const string &field)=0
virtual void ClearValues(void)
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define SYMBOL_CFEATURETYPEPANEL_POSITION
#define SYMBOL_CFEATURETYPEPANEL_IDNAME
#define SYMBOL_CFEATURETYPEPANEL_SIZE
#define SYMBOL_CFEATURETYPEPANEL_STYLE
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_EDIT_EXPORT
Definition: gui_export.h:526
const struct ncbi::grid::netcache::search::fields::SIZE size
Modified on Wed May 29 18:43:28 2024 by modify_doxy.py rev. 669887