NCBI C++ ToolKit
ec_numbers_panel.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: ec_numbers_panel.cpp 25347 2012-03-01 18:22:54Z 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: Colleen Bollin
27  */
28 
29 
30 #include <ncbi_pch.hpp>
31 ////@begin includes
32 #include "string_list_ctrl.hpp"
33 ////@end includes
34 
36 
37 #include "ec_numbers_panel.hpp"
38 
39 ////@begin XPM images
40 ////@end XPM images
41 
44 
45 /*!
46  * CECNumbersPanel type definition
47  */
48 
49 IMPLEMENT_DYNAMIC_CLASS( CECNumbersPanel, wxPanel )
50 
51 
52 /*!
53  * CECNumbersPanel event table definition
54  */
55 
56 BEGIN_EVENT_TABLE( CECNumbersPanel, wxPanel )
57 
58 ////@begin CECNumbersPanel event table entries
59 ////@end CECNumbersPanel event table entries
60 
62 
63 
64 /*!
65  * CECNumbersPanel constructors
66  */
67 
69 {
70  Init();
71 }
72 
73 CECNumbersPanel::CECNumbersPanel( wxWindow* parent, CSerialObject& object, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
74  : m_Object(&object)
75 {
76  Init();
77  Create(parent, id, pos, size, style);
78 }
79 
80 
81 /*!
82  * CECNumbersPanel creator
83  */
84 
85 bool CECNumbersPanel::Create( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
86 {
87 ////@begin CECNumbersPanel creation
88  wxPanel::Create( parent, id, pos, size, style );
89 
91  if (GetSizer())
92  {
93  GetSizer()->SetSizeHints(this);
94  }
95  Centre();
96 ////@end CECNumbersPanel creation
97  return true;
98 }
99 
100 
101 /*!
102  * CECNumbersPanel destructor
103  */
104 
106 {
107 ////@begin CECNumbersPanel destruction
108 ////@end CECNumbersPanel destruction
109 }
110 
111 
112 /*!
113  * Member initialisation
114  */
115 
117 {
118 ////@begin CECNumbersPanel member initialisation
119 ////@end CECNumbersPanel member initialisation
120 }
121 
122 
123 /*!
124  * Control creation for CECNumbersPanel
125  */
126 
128 {
129 ////@begin CECNumbersPanel content construction
130  CECNumbersPanel* itemPanel1 = this;
131 
132  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
133  itemPanel1->SetSizer(itemBoxSizer2);
134 
135  wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxHORIZONTAL);
136  itemBoxSizer2->Add(itemBoxSizer3, 1, wxGROW|wxALL, 0);
137 
138  CStringListCtrl* itemScrolledWindow4 = new CStringListCtrl( itemPanel1, ID_WINDOW, wxDefaultPosition, itemPanel1->ConvertDialogToPixels(wxSize(44, 37)), wxSUNKEN_BORDER|wxScrolledWindowStyle|wxTAB_TRAVERSAL );
139  itemBoxSizer3->Add(itemScrolledWindow4, 1, wxGROW|wxALL, 0);
140 
141  // Set validators
142  itemScrolledWindow4->SetValidator( CSerialStringListValidator(*m_Object, "ec") );
143 ////@end CECNumbersPanel content construction
144 }
145 
146 
147 /*!
148  * Should we show tooltips?
149  */
150 
152 {
153  return true;
154 }
155 
156 /*!
157  * Get bitmap resources
158  */
159 
160 wxBitmap CECNumbersPanel::GetBitmapResource( const wxString& name )
161 {
162  // Bitmap retrieval
163 ////@begin CECNumbersPanel bitmap retrieval
164  wxUnusedVar(name);
165  return wxNullBitmap;
166 ////@end CECNumbersPanel bitmap retrieval
167 }
168 
169 /*!
170  * Get icon resources
171  */
172 
173 wxIcon CECNumbersPanel::GetIconResource( const wxString& name )
174 {
175  // Icon retrieval
176 ////@begin CECNumbersPanel icon retrieval
177  wxUnusedVar(name);
178  return wxNullIcon;
179 ////@end CECNumbersPanel icon retrieval
180 }
181 
183 
CSerialObject * m_Object
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
~CECNumbersPanel()
Destructor.
static bool ShowToolTips()
Should we show tooltips?
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void CreateControls()
Creates the controls and sizers.
void Init()
Initialises member variables.
CECNumbersPanel()
Constructors.
bool Create(wxWindow *parent, wxWindowID id=ID_CSYNONYMSPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
Creation.
Base class for all serializable objects.
Definition: serialbase.hpp:150
USING_SCOPE(objects)
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
END_EVENT_TABLE()
const struct ncbi::grid::netcache::search::fields::SIZE size
Modified on Fri Sep 20 14:57:35 2024 by modify_doxy.py rev. 669887