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

Go to the SVN repository for this file.

1 #ifndef GUI_WIDGETS_EDIT___SRCMOD_PANEL__HPP
2 #define GUI_WIDGETS_EDIT___SRCMOD_PANEL__HPP
3 
4 /* $Id: srcmod_panel.hpp 43092 2019-05-14 15:50:00Z bollin $
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: Vasuki Palanigobu
30  */
31 
32 /*!
33  * Includes
34  */
35 
36 ////@begin includes
37 ////@end includes
38 
39 #include <wx/checkbox.h>
40 #include <wx/combobox.h>
41 #include <wx/sizer.h>
42 #include <wx/arrstr.h>
43 
46 
48 
49 /*!
50  * Forward declarations
51  */
52 
53 ////@begin forward declarations
54 class wxBoxSizer;
55 ////@end forward declarations
56 
58 
59 /*!
60  * Control identifiers
61  */
62 
63 ////@begin control identifiers
64 #define ID_SRCMODPANEL 10013
65 #define ID_MODIFIER_NAME 10010
66 #define SYMBOL_CSRCMODPANEL_STYLE wxTAB_TRAVERSAL
67 #define SYMBOL_CSRCMODPANEL_TITLE _("Modifier")
68 #define SYMBOL_CSRCMODPANEL_IDNAME ID_SRCMODPANEL
69 #define SYMBOL_CSRCMODPANEL_SIZE wxSize(400, 300)
70 #define SYMBOL_CSRCMODPANEL_POSITION wxDefaultPosition
71 ////@end control identifiers
72 
73 
74 /*!
75  * CSrcModPanel class declaration
76  */
77 
79 {
80  DECLARE_DYNAMIC_CLASS( CSrcModPanel )
81  DECLARE_EVENT_TABLE()
82 
83 public:
84  struct SModData {
85  wxString name;
86  wxString value;
87  };
88 
89  /// Constructors
90  CSrcModPanel();
91  CSrcModPanel( wxWindow* parent, SModData mod_data, wxWindowID id = SYMBOL_CSRCMODPANEL_IDNAME, const wxPoint& pos = SYMBOL_CSRCMODPANEL_POSITION, const wxSize& size = SYMBOL_CSRCMODPANEL_SIZE, long style = SYMBOL_CSRCMODPANEL_STYLE );
92 
93  /// Creation
94  bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CSRCMODPANEL_IDNAME, const wxPoint& pos = SYMBOL_CSRCMODPANEL_POSITION, const wxSize& size = SYMBOL_CSRCMODPANEL_SIZE, long style = SYMBOL_CSRCMODPANEL_STYLE );
95 
96  /// Destructor
97  ~CSrcModPanel();
98 
99  /// Initialises member variables
100  void Init();
101 
102  /// Creates the controls and sizers
103  void CreateControls();
104 
105  void SetModifierData();
106  const SModData& GetModifierData(); //CHECK!!!
107 
108  void SetModifierData(const string& mod_name, const string& mod_val);
109 
110 ////@begin CSrcModPanel event handler declarations
111 
112  /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_MODIFIER_NAME
113  void OnModifierNameSelected( wxCommandEvent& event );
114  void OnLeftDown( wxMouseEvent& event);
115  void OnLeftUp( wxMouseEvent& event);
116 
117 ////@end CSrcModPanel event handler declarations
118 
119  void OnEditorChange( );
120 
121 ////@begin CSrcModPanel member function declarations
122 
123  wxArrayString s_GetModifierList();
124  /// Retrieves bitmap resources
125  wxBitmap GetBitmapResource( const wxString& name );
126 
127  /// Retrieves icon resources
128  wxIcon GetIconResource( const wxString& name );
129 ////@end CSrcModPanel member function declarations
130 
131  /// Should we show tooltips?
132  static bool ShowToolTips();
133 
134 ////@begin CSrcModPanel member variables
135  wxBoxSizer* m_Sizer;
136  wxComboBox* m_SrcModName;
137 ////@end CSrcModPanel member variables
138 
139  virtual bool DoNotListOrgMod(int st);
140  virtual bool DoNotListSubSrc(int st);
141 
142 private:
145  string m_Selected;
146 
147  void x_SetEditor(CSrcModEditPanel::EEditorType editor_type);
148 };
149 
150 
152 
153 #endif
154  //GUI_WIDGETS_EDIT___SRCMOD_PANEL__HPP
SModData m_ModData
CSrcModEditPanel * m_Editor
wxComboBox * m_SrcModName
wxBoxSizer * m_Sizer
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
#define SYMBOL_CSRCMODPANEL_IDNAME
#define SYMBOL_CSRCMODPANEL_POSITION
#define SYMBOL_CSRCMODPANEL_SIZE
#define SYMBOL_CSRCMODPANEL_STYLE
Modified on Sat May 25 14:22:35 2024 by modify_doxy.py rev. 669887