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

Go to the SVN repository for this file.

1 /* $Id: editingbtnspanel.hpp 47154 2022-09-26 17:58:36Z 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: Colleen Bollin
27  */
28 #ifndef _EDITINGBTNSPANEL_H_
29 #define _EDITINGBTNSPANEL_H_
30 
31 #include <corelib/ncbistd.hpp>
33 
35 
36 #include <corelib/ncbiobj.hpp>
37 #include <gui/gui_export.h>
38 
43 
44 
46 
48 
50 
51 
52 /*!
53  * Includes
54  */
55 
56 ////@begin includes
57 ////@end includes
58 
59 #include <wx/panel.h>
60 #include <wx/button.h>
61 #include <wx/textctrl.h>
62 #include <wx/checkbox.h>
63 #include <wx/sizer.h>
64 #include <wx/collpane.h>
65 #include <wx/gbsizer.h>
66 #include <wx/notebook.h>
67 #include <wx/frame.h>
68 #include <wx/srchctrl.h>
69 
70 /*!
71  * Forward declarations
72  */
73 
74 ////@begin forward declarations
75 ////@end forward declarations
76 
78 using namespace objects;
79 
80 class ICommandProccessor;
81 class IMovableButton;
82 class CButtonPanel;
83 
84 /*!
85  * Control identifiers
86  */
87 
88 ////@begin control identifiers
89 #define ID_CEDITINGBTNSPANEL 10020
90 #define ID_CHECKBOX_COLLAPSE 10021
91 #define ID_TAB1 10022
92 #define ID_TAB2 10023
93 #define ID_TAB3 10024
94 #define ID_CHECKBOX_AUTOSTART 10025
95 #define ID_SET_BG_COLOR 10026
96 #define ID_RESET_BG_COLOR 10027
97 
98 #define ID_NOTEBOOK_PANEL 10030
99 #define ID_TAB_REMOVED 10031
100 #define ID_RESET_TABS 10032
101 #define ID_FIND_BUTTON 10033
102 #define ID_IMPORT_TABS 10034
103 #define ID_EXPORT_TABS 10035
104 #define ID_ADD_MACRO 10036
105 
106 #define ID_POPUP_A 10037
107 #define ID_POPUP_B 10038
108 #define ID_POPUP_C 10039
109 #define ID_POPUP_REMOVE 10040
110 #define ID_POPUP_EDIT 10041
111 
112 #define ID_BUTTON1 10043
113 #define ID_BUTTON2 10044
114 #define ID_BUTTON3 10045
115 #define ID_BUTTON4 10046
116 #define ID_BUTTON5 10047
117 #define ID_BUTTON6 10048
118 #define ID_BUTTON7 10049
119 #define ID_BUTTON8 10050
120 #define ID_BUTTON9 10051
121 #define ID_BUTTON10 10052
122 #define ID_BUTTON11 10053
123 #define ID_BUTTON12 10054
124 #define ID_BUTTON13 10055
125 #define ID_BUTTON14 10056
126 #define ID_BUTTON15 10057
127 #define ID_BUTTON16 10058
128 #define ID_BUTTON17 10059
129 #define ID_BUTTON18 10060
130 #define ID_BUTTON19 10061
131 #define ID_BUTTON20 10062
132 #define ID_BUTTON21 10063
133 #define ID_BUTTON22 10064
134 #define ID_BUTTON23 10065
135 #define ID_BUTTON24 10066
136 #define ID_BUTTON25 10067
137 #define ID_BUTTON26 10068
138 #define ID_BUTTON27 10069
139 #define ID_BUTTON28 10070
140 #define ID_BUTTON29 10071
141 #define ID_BUTTON30 10072
142 #define ID_BUTTON31 10073
143 #define ID_BUTTON32 10074
144 #define ID_BUTTON33 10075
145 #define ID_BUTTON34 10076
146 #define ID_BUTTON35 10077
147 #define ID_BUTTON36 10078
148 #define ID_BUTTON37 10079
149 #define ID_BUTTON38 10080
150 #define ID_BUTTON39 10081
151 #define ID_BUTTON40 10082
152 #define ID_BUTTON41 10083
153 #define ID_BUTTON42 10084
154 #define ID_BUTTON43 10085
155 #define ID_BUTTON44 10086
156 #define ID_BUTTON45 10087
157 #define ID_BUTTON46 10088
158 #define ID_BUTTON47 10089
159 #define ID_BUTTON48 10090
160 #define ID_BUTTON49 10091
161 #define ID_BUTTON50 10092
162 #define ID_BUTTON51 10093
163 #define ID_BUTTON52 10094
164 #define ID_BUTTON53 10095
165 #define ID_BUTTON54 10096
166 #define ID_BUTTON55 10097
167 #define ID_BUTTON56 10098
168 #define ID_BUTTON57 10099
169 #define ID_BUTTON58 10100
170 #define ID_BUTTON59 10101
171 #define ID_BUTTON60 10102
172 #define ID_BUTTON61 10103
173 #define ID_BUTTON62 10104
174 #define ID_BUTTON63 10105
175 #define ID_BUTTON64 10106
176 #define ID_BUTTON65 10107
177 #define ID_BUTTON66 10108
178 #define ID_BUTTON67 10109
179 #define ID_BUTTON68 10110
180 #define ID_BUTTON69 10111
181 #define ID_BUTTON70 10112
182 #define ID_BUTTON71 10113
183 #define ID_BUTTON72 10114
184 #define ID_BUTTON73 10115
185 #define ID_BUTTON74 10116
186 #define ID_BUTTON75 10117
187 #define ID_BUTTON76 10118
188 #define ID_BUTTON77 10119
189 #define ID_BUTTON78 10120
190 #define ID_BUTTON79 10121
191 #define ID_BUTTON80 10122
192 #define ID_BUTTON81 10123
193 #define ID_BUTTON82 10124
194 #define ID_BUTTON83 10125
195 #define ID_BUTTON84 10126
196 #define ID_BUTTON85 10127
197 #define ID_BUTTON86 10128
198 #define ID_BUTTON87 10129
199 #define ID_BUTTON88 10130
200 #define ID_BUTTON89 10131
201 #define ID_BUTTON90 10132
202 #define ID_BUTTON91 10133
203 #define ID_BUTTON92 10134
204 #define ID_BUTTON93 10135
205 #define ID_BUTTON94 10136
206 #define ID_BUTTON95 10137
207 #define ID_BUTTON96 10138
208 #define ID_BUTTON97 10139
209 #define ID_BUTTON98 10140
210 #define ID_BUTTON99 10141
211 #define ID_BUTTON100 10142
212 #define ID_BUTTON101 10143
213 #define ID_BUTTON102 10144
214 #define ID_BUTTON103 10145
215 #define ID_BUTTON104 10146
216 #define ID_BUTTON105 10147
217 #define ID_BUTTON106 10148
218 #define ID_BUTTON107 10149
219 #define ID_BUTTON108 10150
220 #define ID_BUTTON109 10151
221 #define ID_BUTTON110 10152
222 #define ID_BUTTON111 10153
223 #define ID_BUTTON112 10154
224 #define ID_BUTTON113 10155
225 #define ID_BUTTON114 10156
226 #define ID_BUTTON116 10158
227 #define ID_BUTTON117 10159
228 #define ID_BUTTON118 10160
229 #define ID_BUTTON119 10161
230 #define ID_BUTTON120 10162
231 #define ID_BUTTON121 10163
232 #define ID_BUTTON122 10164
233 #define ID_BUTTON123 10165
234 #define ID_BUTTON124 10166
235 #define ID_BUTTON125 10167
236 #define ID_BUTTON126 10168
237 #define ID_BUTTON127 10169
238 #define ID_BUTTON128 10170
239 #define ID_BUTTON129 10171
240 #define ID_BUTTON130 10172
241 #define ID_BUTTON131 10173
242 #define ID_BUTTON132 10174
243 #define ID_BUTTON133 10175
244 #define ID_BUTTON134 10176
245 #define ID_BUTTON135 10177
246 #define ID_BUTTON136 10178
247 #define ID_BUTTON137 10179
248 #define ID_BUTTON138 10180
249 #define ID_BUTTON139 10181
250 #define ID_BUTTON140 10182
251 #define ID_BUTTON141 10183
252 #define ID_BUTTON142 10184
253 #define ID_BUTTON143 10185
254 #define ID_BUTTON144 10186
255 #define ID_BUTTON145 10187
256 #define ID_BUTTON146 10188
257 #define ID_BUTTON147 10189
258 #define ID_BUTTON148 10190
259 #define ID_BUTTON149 10191
260 #define ID_BUTTON150 10192
261 #define ID_BUTTON151 10193
262 #define ID_BUTTON152 10194
263 #define ID_BUTTON153 10195
264 #define ID_BUTTON154 10196
265 #define ID_BUTTON155 10197
266 #define ID_BUTTON156 10198
267 #define ID_BUTTON157 10199
268 #define ID_BUTTON158 10200
269 #define ID_BUTTON159 10201
270 #define ID_BUTTON160 10202
271 #define ID_BUTTON161 10203
272 #define ID_BUTTON162 10204
273 #define ID_BUTTON163 10205
274 #define ID_BUTTON164 10206
275 #define ID_BUTTON165 10207
276 #define ID_BUTTON166 10208
277 #define ID_BUTTON167 10209
278 #define ID_BUTTON168 10210
279 #define ID_BUTTON169 10211
280 #define ID_BUTTON170 10212
281 #define ID_BUTTON171 10213
282 #define ID_BUTTON172 10214
283 #define ID_BUTTON173 10215
284 #define ID_BUTTON174 10216
285 #define ID_BUTTON175 10217
286 
287 #define ID_BUTTON_DYNAMIC 10300
288 
289 #define SYMBOL_CEDITINGBTNSPANEL_STYLE wxDEFAULT_FRAME_STYLE
290 #define SYMBOL_CEDITINGBTNSPANEL_TITLE _("EditingBtns")
291 #define SYMBOL_CEDITINGBTNSPANEL_IDNAME ID_CEDITINGBTNSPANEL
292 #define SYMBOL_CEDITINGBTNSPANEL_SIZE wxSize(600,400)
293 #define SYMBOL_CEDITINGBTNSPANEL_POSITION wxDefaultPosition
294 ////@end control identifiers
295 
296 
297 /*!
298  * CEditingBtnsPanel class declaration
299  */
300 
301 class NCBI_GUIPKG_SEQUENCE_EDIT_EXPORT CEditingBtnsPanel: public wxFrame, public CEventHandler, public IRegSettings //, public IPackageWorkbenchConnector
302 {
303  DECLARE_DYNAMIC_CLASS( CEditingBtnsPanel )
304  DECLARE_EVENT_TABLE()
305 
306  /// Constructors
308  CEditingBtnsPanel( wxWindow* parent, IWorkbench* workbench, wxWindowID id = SYMBOL_CEDITINGBTNSPANEL_IDNAME, const wxPoint& pos = SYMBOL_CEDITINGBTNSPANEL_POSITION, const wxSize& size = SYMBOL_CEDITINGBTNSPANEL_SIZE, long style = SYMBOL_CEDITINGBTNSPANEL_STYLE );
309  /// Destructor
311 
312  CEditingBtnsPanel(CEditingBtnsPanel const&); // Don't Implement
313  CEditingBtnsPanel& operator=(CEditingBtnsPanel const&); // Don't implement
315  bool ShouldAutoStart(void) {return m_AutoStart->GetValue();}
316 public:
317 
318  static void GetInstance( wxWindow* parent, IWorkbench* workbench, bool autostart = false, wxWindowID id = SYMBOL_CEDITINGBTNSPANEL_IDNAME, const wxPoint& pos = SYMBOL_CEDITINGBTNSPANEL_POSITION, const wxSize& size = SYMBOL_CEDITINGBTNSPANEL_SIZE, long style = SYMBOL_CEDITINGBTNSPANEL_STYLE );
319 
320  /// Creation
321  bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CEDITINGBTNSPANEL_IDNAME, const wxPoint& pos = SYMBOL_CEDITINGBTNSPANEL_POSITION, const wxSize& size = SYMBOL_CEDITINGBTNSPANEL_SIZE, long style = SYMBOL_CEDITINGBTNSPANEL_STYLE );
322 
323  /// Initialises member variables
324  void Init();
325 
326  /// Creates the controls and sizers
327  void CreateControls();
328 
329  /// Transfer data to the window
330  virtual bool TransferDataToWindow();
331 
332 
333  void OnClickLock( wxCommandEvent& event );
334  void OnNotebookTabChanged(wxBookCtrlEvent &event);
335  void ShowAfter(wxWindow* dlg);
336 
337 ////@begin CEditingBtnsPanel event handler declarations
338 
339  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON1
340  void OnReverseAuthorNamesClick( wxCommandEvent& event );
341 
342  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON2
343  void EditPubs( wxCommandEvent& event );
344 
345  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON3
346  void ParseLocalIdToSrc( wxCommandEvent& event );
347 
348  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON4
349  void OnFixCapitalizationAll( wxCommandEvent& event );
350 
351  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON5
352  void OnFixCapitalizationAuthors( wxCommandEvent& event );
353 
354  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON6
355  void OnFixCapitalizationTitles( wxCommandEvent& event );
356 
357  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON7
358  void OnFixCapitalizationAffiliation( wxCommandEvent& event );
359 
360  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON8
361  void SortUniqueCount( wxCommandEvent& event );
362  void ClickableSortUniqueCount( wxCommandEvent& event );
363 
364  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON9
365  void OnRemoveUnpublishedPublications( wxCommandEvent& event );
366 
367  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON10
368  void TableReaderFromClipboard( wxCommandEvent& event );
369 
370  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON11
371  void TaxFixCleanup( wxCommandEvent& event );
372 
373  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON12
374  void RemoveAllFeatures( wxCommandEvent& event );
375 
376  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON13
377  void OnStripAuthorSuffixes( wxCommandEvent& event );
378 
379  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON14
380  void OnRemoveAuthorConsortiums( wxCommandEvent& event );
381 
382  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON16
383  void TrimNsRich( wxCommandEvent& event );
384 
385  void TrimNsTerminal( wxCommandEvent& event );
386 
387  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON17
388  void AnnotateDescriptorComment( wxCommandEvent& event );
389 
390  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON18
391  void MrnaCds( wxCommandEvent& event );
392 
393  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON19
394  void OnAddCitSubForUpdate( wxCommandEvent& event );
395 
396  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON20
397  void OnRemoveSequences( wxCommandEvent& event );
398 
399  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON21
400  void OnRemoveGenomeProjectsDB( wxCommandEvent& event );
401 
402  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON22
403  void RemProtTitles( wxCommandEvent& event );
404 
405  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON23
406  void RmCultureNotes( wxCommandEvent& event );
407 
408  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON24
409  void RevComp16S(wxCommandEvent& event);
410 
411  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON25
412  void OnRemoveDescriptors( wxCommandEvent& event );
413 
414  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON26
415  void StrainToSp( wxCommandEvent& event );
416 
417  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON27
418  void OnRemoveAllStructuredComments( wxCommandEvent& event );
419 
420  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON28
421  void BulkEditCDS( wxCommandEvent& event );
422 
423  void AddTranslExcept( wxCommandEvent& event );
424 
425  void OnRemoveFeatures( wxCommandEvent& event );
426 
427  void BulkGeneEdit( wxCommandEvent& event );
428 
429  void OnRemoveBankitComment( wxCommandEvent& event );
430 
431  void OnRemoveStructuredCommentKeyword( wxCommandEvent& event );
432 
433  void OnAddStructuredCommentKeyword( wxCommandEvent& event );
434 
435  void OnReorderStructuredComment( wxCommandEvent& event );
436 
437  void OnReorderSequences( wxCommandEvent& event );
438 
439  void OnConvertComment( wxCommandEvent& event );
440 
441  void OnParseComment( wxCommandEvent& event );
442 
443  void OnAssignFeatureIds( wxCommandEvent& event );
444 
445  void LabelrRNAs( wxCommandEvent& event );
446 
447  void RetranslateCDS( wxCommandEvent& event );
448 
449  void RetranslateCDS_NoStp( wxCommandEvent& event );
450 
451  void BulkEditRNA( wxCommandEvent& event );
452 
453  void BulkEditMiscFeat(wxCommandEvent& event);
454 
455  void OnFixiInPrimerSeqs( wxCommandEvent& event );
456 
457  void OnFixOrgModInstitution( wxCommandEvent& event );
458 
459  void OnSwapPrimerSeqName( wxCommandEvent& event );
460 
461  void OnMergePrimerSets( wxCommandEvent& event );
462 
463  void OnSplitPrimerSets( wxCommandEvent& event );
464 
465  void OnAppendModToOrg( wxCommandEvent& event );
466 
467  void OnParseCollectionDateMonthFirst( wxCommandEvent& event );
468 
469  void OnParseCollectionDateDayFirst( wxCommandEvent& event );
470 
471  void OnCountryFixupCap ( wxCommandEvent& event );
472 
473  void OnCountryFixupNoCap ( wxCommandEvent& event );
474 
475  void OnAddrRNA16S ( wxCommandEvent& event );
476 
477  void OnAddrRNA18S ( wxCommandEvent& event );
478 
479  void OnAddrRNA23S ( wxCommandEvent& event );
480 
481  void OnRemoveDefLines (wxCommandEvent& event);
482 
483  void VectorTrim( wxCommandEvent& event );
484 
485  void AddCDS( wxCommandEvent& event );
486 
487  void AddRNA( wxCommandEvent& event );
488 
489  void AddOtherFeature( wxCommandEvent& event );
490 
491  void ValidateSeq( wxCommandEvent& event );
492 
493  void DiscrepancyReport ( wxCommandEvent& event );
494 
495  void AddSequences( wxCommandEvent& event );
496 
497  void ApplySourceQual( wxCommandEvent& event );
498  void EditSourceQual( wxCommandEvent& evt );
499  void ConvertSourceQual( wxCommandEvent& evt );
500  void SwapSourceQual( wxCommandEvent& evt );
501  void RemoveSourceQual( wxCommandEvent& evt );
502  void ApplyRNAQual( wxCommandEvent& evt );
503  void EditRNAQual( wxCommandEvent& evt );
504  void ConvertRNAQual( wxCommandEvent& evt );
505  void SwapRNAQual( wxCommandEvent& evt );
506  void RemoveRNAQual( wxCommandEvent& evt );
507  void ApplyCGPQual( wxCommandEvent& evt );
508  void EditCGPQual( wxCommandEvent& evt );
509  void ConvertCGPQual( wxCommandEvent& evt );
510  void SwapCGPQual( wxCommandEvent& evt );
511  void RemoveCGPQual( wxCommandEvent& evt );
512  void ApplyFeatQual( wxCommandEvent& evt );
513  void EditFeatQual( wxCommandEvent& evt );
514  void ConvertFeatQual( wxCommandEvent& evt );
515  void SwapFeatQual( wxCommandEvent& evt );
516  void RemoveFeatQual( wxCommandEvent& evt );
517  void EditStructField( wxCommandEvent& evt );
518  void EditFeatureEvidence( wxCommandEvent& evt );
519  void EditFeatureLocation( wxCommandEvent& evt );
520  void ParseText( wxCommandEvent& evt );
521  void ParseTextFromDefline( wxCommandEvent& evt );
522  void ConvertFeatures( wxCommandEvent& evt );
523  void TableReader( wxCommandEvent& event );
524  void BulkEdit( wxCommandEvent& event );
525  void MolInfoEdit(wxCommandEvent& evt);
526  void AutodefDefaultOptions(wxCommandEvent& evt);
527  void AutodefOptions(wxCommandEvent& evt);
528  void AutodefMisc(wxCommandEvent& evt);
529  void AutodefId(wxCommandEvent& evt);
530  void AutodefNoMods(wxCommandEvent& evt);
531  void AutodefPopset(wxCommandEvent& evt);
532  void AutodefRefresh(wxCommandEvent& evt);
533  void ParseStrainSerotypeFromNames (wxCommandEvent& event);
534  void AddStrainSerotypeToNames (wxCommandEvent& event);
535  void FixupOrganismNames (wxCommandEvent& event);
536  void SplitQualifiersAtCommas (wxCommandEvent& event);
537  void SplitStructuredCollections (wxCommandEvent& event);
538  void TrimOrganismNames (wxCommandEvent& event);
539  void AddNamedrRNA12S(wxCommandEvent& event);
540  void AddNamedrRNA28S(wxCommandEvent& event);
541  void AddNamedrRNA26S(wxCommandEvent& event);
542  void AddNamedrRNASmall(wxCommandEvent& event);
543  void AddNamedrRNALarge(wxCommandEvent& event);
544  void AddControlRegion ( wxCommandEvent& event);
545  void AddMicrosatellite ( wxCommandEvent& event);
546  void CreateFeature ( wxCommandEvent& evt);
547  void RemoveUnverified( wxCommandEvent& event );
548  void RemoveUnreviewed( wxCommandEvent& event);
549  void AddDefLine ( wxCommandEvent& event);
550 
551  void PrefixOrgToDefLine ( wxCommandEvent& event);
552  void PrefixStrainToDefLine ( wxCommandEvent& event);
553  void PrefixCloneToDefLine ( wxCommandEvent& event);
554  void PrefixIsolateToDefLine ( wxCommandEvent& event);
555  void PrefixHaplotToDefLine ( wxCommandEvent& event);
556  void PrefixCultivarToDefLine ( wxCommandEvent& event);
557  void PrefixListToDefLine ( wxCommandEvent& event);
558 
559  void SegregateSets( wxCommandEvent& event );
560  void PT_Cleanup (wxCommandEvent& event);
561  void OnCallerTool(wxCommandEvent& event);
562  void SelectTarget(wxCommandEvent& event);
563  // macros
564  void RunMacro( wxCommandEvent& event );
565  void RunMacroWithReport( wxCommandEvent& event );
566 
567  void AddSet( wxCommandEvent& event );
568  void AddGSet( wxCommandEvent& event );
569  void UnculTaxTool( wxCommandEvent& event );
570  void RemoveSrcNotes( wxCommandEvent& evt );
571  void AddIsolSource( wxCommandEvent& evt );
572  void ExtendPartialsConstr( wxCommandEvent& evt );
573  void ExtendPartialsAll( wxCommandEvent& evt );
574  void ConvertCdsToMiscFeat( wxCommandEvent& evt );
575  void LowercaseQuals( wxCommandEvent& evt );
576  void RemoveTextOutsideString( wxCommandEvent& evt );
577  void CorrectGenes( wxCommandEvent& event );
578  void CreateDescGenomeAssemblyComment ( wxCommandEvent& evt);
579  void ECNumberCleanup( wxCommandEvent& evt );
580  void Add_rRNA( wxCommandEvent& evt );
581  void Add_misc_feat( wxCommandEvent& evt );
582  void Add_gene( wxCommandEvent& evt );
583  void Save( wxCommandEvent& evt );
584  void ExportTable(wxCommandEvent& evt);
585  void SequesterSets( wxCommandEvent& event );
586  void EditSubmitBlock( wxCommandEvent& event);
587  void rRNAtoDNA( wxCommandEvent& event);
588  void WrongQualsToNote( wxCommandEvent& event);
589  void IllegalQualsToNote( wxCommandEvent& event);
590  void RmIllegalQuals( wxCommandEvent& event);
591  void RmWrongQuals( wxCommandEvent& event);
592  void GroupExplode( wxCommandEvent& event);
593  void RemoveTextInsideStr( wxCommandEvent& evt );
594  void FindASN1( wxCommandEvent& evt );
595  void RemoveDupFeats( wxCommandEvent& evt );
596  void RmWrongOrIllegalQuals( wxCommandEvent& event);
597  void UpdateSingleSeqClipboard( wxCommandEvent& event );
598  void UpdateMultSeqClipboard(wxCommandEvent& event);
599  void ShowFeatureTable( wxCommandEvent& event );
600  void OnMegaReport(wxCommandEvent& event);
601  void ImportFeatureTable(wxCommandEvent& event);
602  void ImportFeatureTableClipboard(wxCommandEvent& event);
603  void LaunchDesktop(wxCommandEvent& event);
604  void BarcodeTool( wxCommandEvent& event );
605  void ApplyDbxrefs(wxCommandEvent& event);
606  void EditSequence( wxCommandEvent& event );
607  void MacroEditor( wxCommandEvent& event );
608  void SaveASN1File(wxCommandEvent& event);
609 
610 ////@end CEditingBtnsPanel event handler declarations
611 
612 ////@begin CEditingBtnsPanel member function declarations
613 
614  /// Retrieves bitmap resources
615  wxBitmap GetBitmapResource( const wxString& name );
616 
617  /// Retrieves icon resources
618  wxIcon GetIconResource( const wxString& name );
619 ////@end CEditingBtnsPanel member function declarations
620 
621  /// Should we show tooltips?
622  static bool ShowToolTips();
623 
624 ////@begin CEditingBtnsPanel member variables
625 ////@end CEditingBtnsPanel member variables
626 
627  void SetFrameAndPosition();
628  bool OnDataChange ();
629  bool IsLocationSelected();
630  bool IsLocationSelectedAa();
631  bool IsLocationSelectedNa();
632  void PlaceButtons();
633  void x_LockButtons(wxSizer *sizer, bool locked);
634  void OnResetTabs ( wxCommandEvent& event);
635  void OnFindButton ( wxCommandEvent& event);
636  void OnCancelFindButton ( wxCommandEvent& event);
637  void OnExportBtnClick( wxCommandEvent& event );
638  void OnImportBtnClick( wxCommandEvent& event );
639  void OnAddMacroClick( wxCommandEvent& event );
640  void OnSetBackground(wxHyperlinkEvent& event);
641  void OnResetBackground(wxHyperlinkEvent& event);
642  void ResetTabs();
643  void RemoveButton(IMovableButton *button);
644  void EditButton(IMovableButton *button);
645  void OnChar(wxKeyEvent& evt);
646  /// @name IRegSettings interface implementation
647  /// @{
648  virtual void SetRegistryPath(const string& reg_path);
649  virtual void LoadSettings();
650  virtual void SaveSettings() const;
651  void LoadSettings(wxString path);
652  void SaveSettings(wxString path) const;
653  /// @}
654 
655 private:
656  vector<CRef<CSeq_loc> > x_GetSelectedLocations();
657  void x_ResetRemovedTab();
658  void x_InterpretMacro(const string& macro_name, CNcbiOstrstream& log);
659  CSeq_entry_Handle x_GetSelectedSeq();
660  void SetPanelsBackgroundColour();
661  void SetTextViewBackgroundColour(const wxColour &color);
662  void SaveSettings(const string &regpath, wxWindow *dlg) const;
663  void LoadSettings(const string &regpath, wxWindow *dlg);
664  void AddDefaultMacroButtons();
665  void RemoveStaticButtons( vector<int> &ids, vector<string> &filenames, vector<string> &button_names, vector<string> &titles);
666 
668  string m_RegPath;
670  objects::CSeq_entry_Handle m_TopSeqEntry;
671  wxString m_WorkDir;
674  vector<CRef<CSeq_loc> > m_Locations;
675  wxCheckBox* m_CheckBox;
676  wxCheckBox* m_AutoStart;
677  wxBoxSizer *m_Sizer1,*m_Sizer2, *m_Sizer3, *m_SizerRemoved;
678  wxButton *m_resetTabsButton, *m_importTabsButton, *m_exportTabsButton, *m_AddMacroButton;
679  wxSearchCtrl *m_findButton;
680  wxSize m_FrameSize;
682  wxNotebook *m_Notebook;
684  vector<IMovableButton*> m_all_buttons;
685  mutable map<int, string> m_dynamic_buttons_filename, m_dynamic_buttons_title, m_dynamic_buttons_name;
686  wxColour m_bg_color;
692 };
693 
694 
695 class IMovableButton : public wxButton // Taken from: http://wiki.wxwidgets.org/Dragging_a_wxWindow_around
696 {
697 private:
698  void RemoveButton();
699  int m_OrigId;
700  wxPoint m_Position;
702  bool m_locked;
703  bool m_removed;
704  wxSizer *m_Sizer, *m_TopSizer1, *m_TopSizer2, *m_TopSizer3, *m_TopSizerRemoved;
705  wxWindow *m_win_top;
706  wxPoint m_ScrollPos;
707  wxMenu m_menu;
708 public:
709  IMovableButton() : wxButton() {}
710  IMovableButton(wxPanel* parent, wxWindowID id, const wxString &label=wxEmptyString, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0);
711  virtual ~IMovableButton() {}
712  virtual bool VerifySelection(CEditingBtnsPanel* e) = 0;
713  virtual void SetLocked(bool locked);
714  virtual void SetRemoved(bool removed);
715  virtual void SetDragging(bool dragging);
716  virtual void SetSizers(wxWindow *win_top=NULL, wxSizer *sizer1=NULL, wxSizer *sizer2=NULL, wxSizer *sizer3=NULL, wxSizer *sizer_removed_actual=NULL);
717  virtual wxPoint FindUnoccupiedPosition(wxSizer *sizer = NULL);
718  virtual bool IsOccupiedPosition();
719  virtual void OnRightClick(wxContextMenuEvent &evt);
720  virtual void onMouseClick(wxCommandEvent& evt);
721  virtual void MoveButton(wxPoint mousePos);
722  virtual void OnKeyDown(wxKeyEvent& evt);
723  virtual bool OnChar(wxKeyEvent& event);
724  void SetScrollPos(wxPoint scrollpos);
725  void OnPopupClick(wxCommandEvent &evt);
726  void OnPopupClickUpdate(wxUpdateUIEvent& event);
727  int GetOrigId() {return m_OrigId;}
728  wxPoint GetOrigPosition() {return m_Position;}
729  void SetOriginalPosition(wxPoint p) {m_Position = p;}
730  void CopyButton(wxSizer *sizer, wxPoint p);
731  void DeleteButton();
732  void AddDynamicMenu();
733 
734 
735  DECLARE_ABSTRACT_CLASS( IMovableButton )
736 };
737 
738 class CButtonPanel : public wxScrolledWindow
739 {
740 private:
742 public:
743  CButtonPanel() : wxScrolledWindow() {}
744  CButtonPanel(wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize);
745  virtual ~CButtonPanel();
746  virtual bool Layout();
747  virtual void onMouseClick(wxMouseEvent& evt);
748  virtual void OnKeyDown(wxKeyEvent& event);
749  virtual bool OnChar(wxKeyEvent& event);
750  void SetMovingButton(IMovableButton *btn, bool dragging);
751  wxPoint GetScrollPos();
752  IMovableButton *CreateButton(wxWindow *w, int x, int y);
753  DECLARE_DYNAMIC_CLASS( CButtonPanel )
754 };
755 
757 
758 #endif
759  // _EDITINGBTNSPANEL_H_
User-defined methods of the data storage class.
IMovableButton * m_MovingButton
void x_InterpretMacro(const string &macro_name, CNcbiOstrstream &log)
vector< CRef< CSeq_loc > > m_Locations
ICommandProccessor * m_CmdProccessor
IWorkbench * m_Workbench
CEditingBtnsPanel & operator=(CEditingBtnsPanel const &)
TConstScopedObjects m_InputObjects
CEditingBtnsPanel(CEditingBtnsPanel const &)
CButtonPanel * m_panel1
CButtonPanel * m_panel3
wxButton * m_resetTabsButton
CConstRef< CSeq_submit > m_SeqSubmit
objects::CSeq_entry_Handle m_TopSeqEntry
map< int, vector< pair< int, wxPoint > > > m_MovableButtonPosition
wxSearchCtrl * m_findButton
vector< IMovableButton * > m_all_buttons
wxBoxSizer * m_SizerRemoved
CButtonPanel * m_panel2
static CEditingBtnsPanel * m_Instance
CButtonPanel * m_panel_removed
wxCheckBox * m_AutoStart
map< int, string > m_dynamic_buttons_title
CEventHandler.
CSeq_entry_Handle –.
Undo/Redo interface for editing operations.
wxPoint GetOrigPosition()
virtual ~IMovableButton()
void SetOriginalPosition(wxPoint p)
virtual bool VerifySelection(CEditingBtnsPanel *e)=0
wxSizer * m_TopSizerRemoved
IRegSettings An interface for objects that save / restore settings using CGuiRegistry.
IWorkbench is the central interface in the application framework.
Definition: workbench.hpp:113
Definition: map.hpp:338
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define SYMBOL_CEDITINGBTNSPANEL_IDNAME
#define SYMBOL_CEDITINGBTNSPANEL_SIZE
#define SYMBOL_CEDITINGBTNSPANEL_STYLE
#define SYMBOL_CEDITINGBTNSPANEL_POSITION
static void Init(void)
Definition: cursor6.c:76
#define NULL
Definition: ncbistd.hpp:225
vector< SConstScopedObject > TConstScopedObjects
Definition: objects.hpp:65
bool RetranslateCDS(const CSeq_feat &cds, CScope &scope)
RetranslateCDS A function to replace the protein Bioseq pointed to by cds.product with the current tr...
Definition: feature.cpp:4121
#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_GUIPKG_SEQUENCE_EDIT_EXPORT
Definition: gui_export.h:515
static const char label[]
Defines to provide correct exporting from DLLs in Windows.
n background color
const struct ncbi::grid::netcache::search::fields::SIZE size
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.
static int filenames
Definition: pcre2grep.c:247
#define RemoveButton
Modified on Fri Sep 20 14:57:50 2024 by modify_doxy.py rev. 669887