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

Go to the SVN repository for this file.

1 /* $Id: convert_text_options_panel.cpp 30522 2014-06-06 18:47:41Z asztalos $
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: Andrea Asztalos
27  */
28 
29 
30 #include <ncbi_pch.hpp>
33 #include <wx/sizer.h>
34 #include <wx/checkbox.h>
35 #include <wx/icon.h>
36 
39 
40 /*!
41  * CConvertTextOptionsPanel type definition
42  */
43 
44 IMPLEMENT_DYNAMIC_CLASS( CConvertTextOptionsPanel, wxPanel )
45 
46 
47 /*!
48  * CConvertTextOptionsPanel event table definition
49  */
50 
51 BEGIN_EVENT_TABLE( CConvertTextOptionsPanel, wxPanel )
52 
53 ////@begin CConvertTextOptionsPanel event table entries
54 ////@end CConvertTextOptionsPanel event table entries
55 
57 
58 
59 /*!
60  * CConvertTextOptionsPanel constructors
61  */
62 
64 {
65  Init();
66 }
67 
68 CConvertTextOptionsPanel::CConvertTextOptionsPanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
69 {
70  Init();
71  Create(parent, id, pos, size, style);
72 }
73 
74 
75 /*!
76  * CConvertTextOptionsPanel creator
77  */
78 
79 bool CConvertTextOptionsPanel::Create( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
80 {
81 ////@begin CConvertTextOptionsPanel creation
82  wxPanel::Create( parent, id, pos, size, style );
83 
85  if (GetSizer())
86  {
87  GetSizer()->SetSizeHints(this);
88  }
89  Centre();
90 ////@end CConvertTextOptionsPanel creation
91  return true;
92 }
93 
94 
95 /*!
96  * CConvertTextOptionsPanel destructor
97  */
98 
100 {
101 ////@begin CConvertTextOptionsPanel destruction
102 ////@end CConvertTextOptionsPanel destruction
103 }
104 
105 
106 /*!
107  * Member initialisation
108  */
109 
111 {
112 ////@begin CConvertTextOptionsPanel member initialisation
116 ////@end CConvertTextOptionsPanel member initialisation
117 }
118 
119 
120 /*!
121  * Control creation for CConvertTextOptionsPanel
122  */
123 
125 {
126 ////@begin CConvertTextOptionsPanel content construction
127  CConvertTextOptionsPanel* itemPanel1 = this;
128 
129  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
130  itemPanel1->SetSizer(itemBoxSizer2);
131 
132  wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxHORIZONTAL);
133  itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
134 
135  m_LeaveOriginal = new wxCheckBox( itemPanel1, ID_LVORIG_CHKBX, _("Leave on original"), wxDefaultPosition, wxDefaultSize, 0 );
136  m_LeaveOriginal->SetValue(false);
137  itemBoxSizer3->Add(m_LeaveOriginal, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
138 
139  m_StripNameFromText = new wxCheckBox( itemPanel1, ID_RMVNAME_CHKBX, _("Strip name from text"), wxDefaultPosition, wxDefaultSize, 0 );
140  m_StripNameFromText->SetValue(false);
141  itemBoxSizer3->Add(m_StripNameFromText, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
142 
143  m_CapChangeOptions = new CCapChangePanel( itemPanel1, ID_CAPCHNGPANEL, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
144  itemBoxSizer2->Add(m_CapChangeOptions, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
145 
146 ////@end CConvertTextOptionsPanel content construction
147 }
148 
149 
150 /*!
151  * Should we show tooltips?
152  */
153 
155 {
156  return true;
157 }
158 
159 /*!
160  * Get bitmap resources
161  */
162 
163 wxBitmap CConvertTextOptionsPanel::GetBitmapResource( const wxString& name )
164 {
165  // Bitmap retrieval
166 ////@begin CConvertTextOptionsPanel bitmap retrieval
167  wxUnusedVar(name);
168  return wxNullBitmap;
169 ////@end CConvertTextOptionsPanel bitmap retrieval
170 }
171 
172 /*!
173  * Get icon resources
174  */
175 
176 wxIcon CConvertTextOptionsPanel::GetIconResource( const wxString& name )
177 {
178  // Icon retrieval
179 ////@begin CConvertTextOptionsPanel icon retrieval
180  wxUnusedVar(name);
181  return wxNullIcon;
182 ////@end CConvertTextOptionsPanel icon retrieval
183 }
184 
void CreateControls()
Creates the controls and sizers.
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
static bool ShowToolTips()
Should we show tooltips?
bool Create(wxWindow *parent, wxWindowID id=10364, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
Creation.
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void Init()
Initialises member variables.
USING_SCOPE(ncbi::objects)
#define ID_CAPCHNGPANEL
#define ID_LVORIG_CHKBX
#define ID_RMVNAME_CHKBX
#define _(proto)
Definition: ct_nlmzip_i.h:78
static void Init(void)
Definition: cursor6.c:76
#define NULL
Definition: ncbistd.hpp:225
#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:22 2024 by modify_doxy.py rev. 669887