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

Go to the SVN repository for this file.

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