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

Go to the SVN repository for this file.

1 #ifndef GUI_WIDGETS_EDIT___NON_ASCII_REPLACEMENT_DLG__HPP
2 #define GUI_WIDGETS_EDIT___NON_ASCII_REPLACEMENT_DLG__HPP
3 
4 /* $Id: non_ascii_replacement_dlg.hpp 40562 2018-03-09 14:59:21Z filippov $
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: Igor Filippov
30  */
31 
32 #include <corelib/ncbistd.hpp>
33 #include <gui/gui_export.h>
34 
35 // For compilers that support precompilation, includes "wx/wx.h".
36 #include "wx/wxprec.h"
37 
38 #ifdef __BORLANDC__
39 #pragma hdrstop
40 #endif
41 
42 #ifndef WX_PRECOMP
43 #include "wx/wx.h"
44 #endif
45 
47 
49 
50 
51 ////@begin control identifiers
52 #define ID_CNONASCIICHARACTERREPLACEMENT wxID_ANY
53 #define ID_SCROLLEDWINDOW wxID_ANY
54 #define SYMBOL_CNONASCIICHARACTERREPLACEMENT_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL
55 #define SYMBOL_CNONASCIICHARACTERREPLACEMENT_TITLE _("non-ascii character replacement")
56 #define SYMBOL_CNONASCIICHARACTERREPLACEMENT_IDNAME ID_CNONASCIICHARACTERREPLACEMENT
57 #define SYMBOL_CNONASCIICHARACTERREPLACEMENT_SIZE wxSize(400, 300)
58 #define SYMBOL_CNONASCIICHARACTERREPLACEMENT_POSITION wxDefaultPosition
59 ////@end control identifiers
60 
61 
62 /*!
63  * CNonAsciiCharacterReplacement class declaration
64  */
65 
67 {
68  DECLARE_DYNAMIC_CLASS( CNonAsciiCharacterReplacement )
69  DECLARE_EVENT_TABLE()
70 
71 public:
72  /// Constructors
75 
76  /// Creation
78 
79  /// Destructor
81 
82  /// Initialises member variables
83  void Init();
84 
85  /// Creates the controls and sizers
86  void CreateControls();
87 
88 ////@begin CNonAsciiCharacterReplacement event handler declarations
89 
90 ////@end CNonAsciiCharacterReplacement event handler declarations
91 
92 ////@begin CNonAsciiCharacterReplacement member function declarations
93 
94  /// Retrieves bitmap resources
95  wxBitmap GetBitmapResource( const wxString& name );
96 
97  /// Retrieves icon resources
98  wxIcon GetIconResource( const wxString& name );
99 ////@end CNonAsciiCharacterReplacement member function declarations
100 
101  /// Should we show tooltips?
102  static bool ShowToolTips();
103 
104  map<TUnicodeSymbol, string> GetReplacementMap();
105  bool TransferDataFromWindow();
106 private:
107 ////@begin CNonAsciiCharacterReplacement member variables
108  wxScrolledWindow* m_ScrolledWindow;
109 ////@end CNonAsciiCharacterReplacement member variables
110 
113 };
114 
115 ////@begin control identifiers
116 #define ID_CREPLACEMENTPANEL wxID_ANY
117 #define SYMBOL_CREPLACEMENTPANEL_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
118 #define SYMBOL_CREPLACEMENTPANEL_IDNAME ID_CREPLACEMENTPANEL
119 #define SYMBOL_CREPLACEMENTPANEL_SIZE wxDefaultSize
120 #define SYMBOL_CREPLACEMENTPANEL_POSITION wxDefaultPosition
121 ////@end control identifiers
122 
123 
124 /*!
125  * CNonAsciiReplacementPanel class declaration
126  */
127 
128 class CNonAsciiReplacementPanel: public wxPanel
129 {
130  DECLARE_CLASS( CNonAsciiReplacementPanel )
131  DECLARE_EVENT_TABLE()
132 
133 public:
134  /// Constructors
136  CNonAsciiReplacementPanel( wxWindow* parent, wxUniChar orig, const string &replacement, const set<wxString> &contexts, wxWindowID id = SYMBOL_CREPLACEMENTPANEL_IDNAME, const wxPoint& pos = SYMBOL_CREPLACEMENTPANEL_POSITION, const wxSize& size = SYMBOL_CREPLACEMENTPANEL_SIZE, long style = SYMBOL_CREPLACEMENTPANEL_STYLE );
137 
138  bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CREPLACEMENTPANEL_IDNAME, const wxPoint& pos = SYMBOL_CREPLACEMENTPANEL_POSITION, const wxSize& size = SYMBOL_CREPLACEMENTPANEL_SIZE, long style = SYMBOL_CREPLACEMENTPANEL_STYLE );
139 
140  /// Destructor
142 
143  /// Initialises member variables
144  void Init();
145 
146  /// Creates the controls and sizers
147  void CreateControls();
148 
149 ////@begin CNonAsciiReplacementPanel event handler declarations
150 
151 ////@end CNonAsciiReplacementPanel event handler declarations
152 
153 ////@begin CNonAsciiReplacementPanel member function declarations
154 
155  /// Retrieves bitmap resources
156  wxBitmap GetBitmapResource( const wxString& name );
157 
158  /// Retrieves icon resources
159  wxIcon GetIconResource( const wxString& name );
160 ////@end CNonAsciiReplacementPanel member function declarations
161 
162  /// Should we show tooltips?
163  static bool ShowToolTips();
164 
165  pair<TUnicodeSymbol, string> GetReplacement();
166 
167 private:
168 ////@begin CNonAsciiReplacementPanel member variables
169  wxStaticText* m_Char;
170  wxTextCtrl* m_Replacement;
171 ////@end CNonAsciiReplacementPanel member variables
172  wxUniChar m_Orig;
175 };
176 
177 
179 
180 #endif // GUI_WIDGETS_EDIT___NON_ASCII_REPLACEMENT_DLG__HPP
map< TUnicodeSymbol, string > m_NonAsciiChars
map< TUnicodeSymbol, set< wxString > > m_NonAsciiContext
void Init()
Initialises member variables.
void CreateControls()
Creates the controls and sizers.
static bool ShowToolTips()
Should we show tooltips?
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX)
pair< TUnicodeSymbol, string > GetReplacement()
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
Definition: set.hpp:45
Include a standard set of the NCBI C++ Toolkit most basic headers.
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
Uint4 TUnicodeSymbol
Unicode character.
Definition: ncbistr.hpp:141
#define NCBI_GUIWIDGETS_EDIT_EXPORT
Definition: gui_export.h:526
Defines to provide correct exporting from DLLs in Windows.
where boath are integers</td > n< td ></td > n</tr > n< tr > n< td > tse</td > n< td > optional</td > n< td > String</td > n< td class=\"description\"> TSE option controls what blob is orig
const struct ncbi::grid::netcache::search::fields::SIZE size
#define SYMBOL_CNONASCIICHARACTERREPLACEMENT_STYLE
#define SYMBOL_CNONASCIICHARACTERREPLACEMENT_POSITION
#define SYMBOL_CNONASCIICHARACTERREPLACEMENT_IDNAME
void TestForNonAsciiText(wxWindow *win)
#define SYMBOL_CREPLACEMENTPANEL_SIZE
#define SYMBOL_CNONASCIICHARACTERREPLACEMENT_SIZE
#define SYMBOL_CNONASCIICHARACTERREPLACEMENT_TITLE
#define SYMBOL_CREPLACEMENTPANEL_STYLE
#define SYMBOL_CREPLACEMENTPANEL_POSITION
#define SYMBOL_CREPLACEMENTPANEL_IDNAME
Modified on Sun May 19 04:42:47 2024 by modify_doxy.py rev. 669887