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

Go to the SVN repository for this file.

1 /* $Id: macro_edit_action_panel.cpp 47070 2022-07-01 17:45:28Z 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 
31 #include <ncbi_pch.hpp>
36 
42 
43 #include <wx/statbox.h>
44 #include <wx/stattext.h>
45 #include <wx/wupdlock.h>
46 #include <wx/tipwin.h>
47 #include <wx/dcclient.h>
48 #include <wx/tglbtn.h>
49 
52 
53 /*!
54  * CMacroEditingActionPanel type definition
55  */
56 
57 IMPLEMENT_DYNAMIC_CLASS( CMacroEditingActionPanel, wxPanel )
58 
59 
60 /*!
61  * CMacroEditingActionPanel event table definition
62  */
63 
64 BEGIN_EVENT_TABLE( CMacroEditingActionPanel, wxPanel )
65 
66  EVT_TREE_SEL_CHANGED(ID_MACROEDIT_TREECTRL, CMacroEditingActionPanel::OnActionTreeItemChanged)
67  EVT_SEARCHCTRL_SEARCH_BTN(ID_MACROEDIT_SEARCHCTRL, CMacroEditingActionPanel::OnSearchCtrlClick)
68 
80 
82 
83 
84 /*!
85  * CMacroEditingActionPanel constructors
86  */
87 
89 {
90  Init();
91 }
92 
94  CRef<macro::CMacroRep> macro_rep, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
95  : m_EditedMacro(macro_rep)
96 {
97  Init();
98  Create(parent, id, pos, size, style);
99 }
100 
101 
102 /*!
103  * CMacroEditingActionPanel creator
104  */
105 
106 bool CMacroEditingActionPanel::Create( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
107 {
108 ////@begin CMacroEditingActionPanel creation
109  SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
110  wxPanel::Create( parent, id, pos, size, style );
111 
112  CreateControls();
113  if (GetSizer())
114  {
115  GetSizer()->SetSizeHints(this);
116  }
117  Centre();
118 ////@end CMacroEditingActionPanel creation
119  return true;
120 }
121 
122 
123 /*!
124  * CMacroEditingActionPanel destructor
125  */
126 
128 {
129 ////@begin CMacroEditingActionPanel destruction
130 ////@end CMacroEditingActionPanel destruction
131 }
132 
133 
134 /*!
135  * Member initialisation
136  */
137 
139 {
140 ////@begin CMacroEditingActionPanel member initialisation
141  m_SearchCtrl = NULL;
142  m_ActionTree = NULL;
146  m_SelectedItem = nullptr;
147  m_ParentFrame = nullptr;
148 ////@end CMacroEditingActionPanel member initialisation
149 }
150 
151 
152 /*!
153  * Control creation for CMacroEditingActionPanel
154  */
155 
157 {
158 ////@begin CMacroEditingActionPanel content construction
159  CMacroEditingActionPanel* itemPanel1 = this;
160 
161  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
162  itemPanel1->SetSizer(itemBoxSizer2);
163 
164  wxFlexGridSizer* itemFlexGridSizer3 = new wxFlexGridSizer(0, 2, 0, 0);
165  itemBoxSizer2->Add(itemFlexGridSizer3, 1, wxEXPAND|wxALL, 5);
166 
167  wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxVERTICAL);
168  itemFlexGridSizer3->Add(itemBoxSizer4, 0, wxALIGN_CENTER_HORIZONTAL|wxGROW|wxALL, 0);
169 
170  wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxHORIZONTAL);
171  itemBoxSizer4->Add(itemBoxSizer5, 0, wxGROW|wxALL, 0);
172 
173  wxStaticText* itemStaticText6 = new wxStaticText( itemPanel1, wxID_STATIC, _("Action search:"), wxDefaultPosition, wxDefaultSize, 0 );
174  itemBoxSizer5->Add(itemStaticText6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
175 
176  m_SearchCtrl = new wxSearchCtrl( itemPanel1, ID_MACROEDIT_SEARCHCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
178  m_SearchCtrl->SetToolTip(_("Type action to search for"));
179  itemBoxSizer5->Add(m_SearchCtrl, 1, wxGROW|wxALL, 5);
180  m_SearchCtrl->Bind(wxEVT_TEXT_ENTER, &CMacroEditingActionPanel::OnSearchCtrlEnter, this);
181 
182  m_ActionTree = new CwxTreeCtrl(itemPanel1, ID_MACROEDIT_TREECTRL, wxDefaultPosition, wxSize(270, -1), wxTR_DEFAULT_STYLE | wxTR_HIDE_ROOT | wxTR_SINGLE);
183  itemBoxSizer4->Add(m_ActionTree, 1, wxEXPAND|wxALL, 5);
184 
185  wxBoxSizer* itemBoxSizer9 = new wxBoxSizer(wxVERTICAL);
186  itemFlexGridSizer3->Add(itemBoxSizer9, 0, wxGROW|wxALL, 0);
187 
188  wxStaticBox* itemStaticBoxSizer10Static = new wxStaticBox(itemPanel1, wxID_ANY, _("Action"));
189  m_ActionSizer = new wxStaticBoxSizer(itemStaticBoxSizer10Static, wxVERTICAL);
190  itemBoxSizer9->Add(m_ActionSizer, 1, wxEXPAND | wxALL, 0);
191  m_ActionSizer->SetMinSize(665, 450);
192 
193  wxStaticBox* itemStaticBoxSizer13Static = new wxStaticBox(itemPanel1, wxID_ANY, _("Constraints"));
194  m_ConstraintSizer = new wxStaticBoxSizer(itemStaticBoxSizer13Static, wxHORIZONTAL);
195  itemBoxSizer9->Add(m_ConstraintSizer, 0, wxEXPAND| wxALL, 0);
196 
197  m_ConstraintPanel = new CMacroCompoundConstraintPanel(itemPanel1, ID_MACROEDIT_CONSTRAINTPNL, wxDefaultPosition, wxSize(-1, 120), wxBORDER_NONE);
198  m_ConstraintSizer->Add(m_ConstraintPanel, 1, wxGROW|wxALL, 0);
199 
201 ////@end CMacroEditingActionPanel content construction
202 }
203 
204 
206 {
208  const CMActionNode& root = *action_tree->GetTopNode();
209 
210  wxTreeItemId root_id = m_ActionTree->AddRoot(root.GetLabel());
211  CMTreeItemDataBuilder builder;
212  x_Build(root, root_id, builder);
213 
214  wxTreeItemIdValue cookie;
215  m_TopId = m_ActionTree->GetFirstChild(root_id, cookie);
216 
217  _ASSERT(action_tree->ReferencedOnlyOnce());
218 
219  if (m_EditedMacro) {
220  vector<EMActionType> types;
221  action_tree->GetMActionTypesForTarget(m_EditedMacro->GetForEachString(), types);
222 
223  CMacroInterpreter macro_interpret;
224  bool valid = macro_interpret.InterpretDoFunctions(*m_EditedMacro);
225  if (!valid) {
226  NCBI_THROW(CException, eUnknown, "Failed to view the macro in the editor.");
227  }
228 
229  EMActionType action_type = builder.GetMActionType(*m_EditedMacro, types, macro_interpret);
230  m_FuncInfo = macro_interpret.GetInterpretedFunctions();
231  m_WhereFuncInfo = macro_interpret.GetWhereFunctions();
232 
233  auto it = m_ActionToNodeMap.find(action_type);
234  if (it != m_ActionToNodeMap.end()) {
235  wxTreeItemId item_id = it->second;
236  m_ActionTree->UnselectAll();
237  m_ActionTree->SelectItem(item_id, true);
238  m_ActionTree->EnsureVisible(item_id);
239  }
240  }
241  else {
242  m_ActionTree->CollapseAll();
243  }
244 }
245 
246 void CMacroEditingActionPanel::x_Build(const CMActionNode& root, wxTreeItemId root_id, const CMTreeItemDataBuilder& builder)
247 {
248  for (auto& child : root.GetChildren()) {
249  wxTreeItemId child_id = m_ActionTree->AppendItem(root_id, child->GetLabel(), -1, -1, builder.GetTreeItemData(*child));
250  if (child->GetActionType() != EMActionType::eNotSet) {
251  m_ActionToNodeMap.emplace(child->GetActionType(), child_id);
252  }
253  x_Build(*child, child_id, builder);
254  }
255 }
256 
257 
259 {
260  wxTreeItemId item_id = event.GetItem();
261  if (!item_id.IsOk()) {
262  return;
263  }
264 
265  wxTreeItemId parent_id = m_ActionTree->GetItemParent(item_id);
266  if (!parent_id.IsOk()) {
267  return;
268  }
269 
270  wxTreeItemData* data = m_ActionTree->GetItemData(item_id);
271  if (IMacroActionItemData* edit_item = dynamic_cast<IMacroActionItemData*>(data)) {
272 #if defined __WINDOWS__
273  wxWindowUpdateLocker locker(this);
274 #endif
275  if (m_SelectedItem) {
276  if (!m_ActionSizer->GetChildren().empty()) {
278  }
279  }
280  auto current_target = edit_item->GetTarget().first;
281  bool enable_add_btn = (current_target == macro::CMacroBioData::sm_TSEntry ||
282  current_target == macro::CMacroBioData::sm_AutodefOpts) ? false : true;
283 
284  m_ConstraintPanel->ClearValues(enable_add_btn);
285 
286  m_SelectedItem = edit_item;
287 
289  if (m_EditedMacro) {
290  try {
295  m_FuncInfo.resize(0);
296  }
297  catch (const CException& e) {
298  LOG_POST(Error << "Failed to view the macro constraints in the editor: " + e.GetMsg());
299  }
300  }
301  else if (m_ParentFrame) {
303  }
304  }
305  else if (dynamic_cast<CMIteratorItemData*>(data)) {
307  if (m_ParentFrame) {
308  m_ParentFrame->Clear();
309  }
310  }
311 }
312 
314 {
315  if (event.GetId() == ID_MACROEDIT_SEARCHCTRL) {
316  return;
317  }
319 }
320 
321 void CMacroEditingActionPanel::OnControlClick(wxCommandEvent& event)
322 {
325  }
327 }
328 
329 void CMacroEditingActionPanel::OnHyperlinkClicked(wxHyperlinkEvent& event)
330 {
332 }
333 
335 {
336  // when updating the target, the constraints should also be updated!!!
337  if (m_SelectedItem) {
339  if (m_ParentFrame) {
341  }
342  }
343 }
344 
346 {
347  if (!m_SelectedItem)
348  return { kEmptyStr, kEmptyStr };
349 
350  return m_SelectedItem->GetTarget();
351 }
352 
354 {
355  if (!m_SelectedItem) return kEmptyStr;
356 
358  const string& iter_label = m_SelectedItem->GetTarget().first;
359 
360  if (iter_label.empty())
361  return kEmptyStr;
362 
364  string description = m_SelectedItem->GetMacroDescription();
365 
366  string macro_script = "MACRO Macro_name \"" + description;
367  vector<string> constraints_description = m_ConstraintPanel->GetDescription();
368  if (!constraints_description.empty())
369  macro_script += " where " + NStr::Join(constraints_description, " and ");
370  macro_script += "\"\n";
371 
373  macro_script += "VAR\n";
374  }
375  if (m_SelectedItem->HasVariables()) {
376  macro_script += m_SelectedItem->GetVariables() + "\n";
377  }
379  macro_script += m_ConstraintPanel->GetVariables();
380  }
381 
382  macro_script += "FOR EACH " + iter_label + "\n";
384  string do_function = m_SelectedItem->GetFunction(constraints); // create do_function based on constraint, remove used constraint from the vector;
385 
386  if (!constraints.empty()) {
387  vector<string> pure_constraints;
388  pure_constraints.reserve(constraints.size());
389  for (auto p : constraints) {
390  pure_constraints.push_back(p.second);
391  }
392 
393  macro_script += "WHERE " + NStr::Join(pure_constraints, "\n AND ") + "\n";
394  }
395 
396  macro_script += "DO\n";
397  macro_script += do_function + "\n";
398  macro_script += "DONE\n";
399  macro_script += "---------------------------------------------------\n";
400 
401  return macro_script;
402 }
403 
405 {
406  return m_SelectedItem->GetWarning();
407 }
408 
410 {
411  x_FindText(ToStdString(event.GetString()));
412 }
413 
415 {
416  x_FindText(ToStdString(m_SearchCtrl->GetValue()));
417  event.Skip();
418 }
419 
420 void CMacroEditingActionPanel::x_FindText(const string& search)
421 {
422  if (search.empty()) {
423  NcbiMessageBox("Search string is empty");
424  return;
425  }
426 
427  if (NStr::EqualNocase(search, m_RecentSearch)) {
428  // this has been searched for previously
429  ++m_RecentIt;
430  if (m_RecentIt == m_RecentItemIds.end()) {
431  m_RecentIt = m_RecentItemIds.begin();
432  }
434  }
435  else {
436  m_RecentSearch = search;
437  m_RecentItemIds.resize(0);
438 
439  wxTreeItemId root_item = m_ActionTree->GetRootItem();
440  x_FindItem(search, root_item);
441 
442  if (m_RecentItemIds.empty()) {
443  NcbiInfoBox("String was not found");
444  m_RecentSearch.resize(0);
445  m_ActionTree->UnselectAll();
446  }
447  else {
448  m_RecentIt = m_RecentItemIds.begin();
450  }
451  }
452 }
453 
454 void CMacroEditingActionPanel::x_FindItem(const string& search, const wxTreeItemId& root)
455 {
456  wxTreeItemIdValue cookie;
457  wxTreeItemId child, item_id = m_ActionTree->GetFirstChild(root, cookie);
458 
459  while (item_id.IsOk()) {
460  const string item_text = ToStdString(m_ActionTree->GetItemText(item_id));
461  if (NStr::FindNoCase(item_text, search) != NPOS) {
462  m_RecentItemIds.push_back(item_id);
463  }
464  else if (wxTreeItemData* data = m_ActionTree->GetItemData(item_id)) {
465  IMacroActionItemData* edit_data = dynamic_cast<IMacroActionItemData*>(data);
466  if (edit_data) {
467  const string& description = edit_data->GetGeneralDescription();
468  if (NStr::FindNoCase(description, search) != NPOS) {
469  m_RecentItemIds.push_back(item_id);
470  }
471  else {
472  const vector<string>& keywords = edit_data->GetKeywords();
473  if (!keywords.empty() &&
474  find_if(keywords.begin(), keywords.end(), [&search](const string& it) { return NStr::FindNoCase(it, search) != NPOS; }) != keywords.end()) {
475  m_RecentItemIds.push_back(item_id);
476  }
477  }
478  }
479  }
480 
481  if (m_ActionTree->ItemHasChildren(item_id)) {
482  x_FindItem(search, item_id);
483  }
484  item_id = m_ActionTree->GetNextChild(root, cookie);
485  }
486 }
487 
489 {
490  if (m_RecentIt != m_RecentItemIds.end() && m_RecentIt->IsOk()) {
491  m_ActionTree->UnselectAll();
492  m_ActionTree->SelectItem(*m_RecentIt, true);
493  m_ActionTree->EnsureVisible(*m_RecentIt);
494  }
495 }
496 
497 /*!
498  * Should we show tooltips?
499  */
500 
502 {
503  return true;
504 }
505 
506 /*!
507  * Get bitmap resources
508  */
509 
510 wxBitmap CMacroEditingActionPanel::GetBitmapResource( const wxString& name )
511 {
512  // Bitmap retrieval
513 ////@begin CMacroEditingActionPanel bitmap retrieval
514  wxUnusedVar(name);
515  return wxNullBitmap;
516 ////@end CMacroEditingActionPanel bitmap retrieval
517 }
518 
519 /*!
520  * Get icon resources
521  */
522 
523 wxIcon CMacroEditingActionPanel::GetIconResource( const wxString& name )
524 {
525  // Icon retrieval
526 ////@begin CMacroEditingActionPanel icon retrieval
527  wxUnusedVar(name);
528  return wxNullIcon;
529 ////@end CMacroEditingActionPanel icon retrieval
530 }
531 
532 IMPLEMENT_DYNAMIC_CLASS(CwxTreeCtrl, wxTreeCtrl)
533 
534 BEGIN_EVENT_TABLE(CwxTreeCtrl, wxTreeCtrl)
535  EVT_MOTION(CwxTreeCtrl::OnMouseMove)
536  EVT_TIMER(-1, CwxTreeCtrl::OnTimer)
537  EVT_LEFT_DOWN(CwxTreeCtrl::OnLeftDown)
538 
539  EVT_CONTEXT_MENU(CwxTreeCtrl::OnContextMenu)
540  EVT_MENU(ID_MACROEDIT_POPUPEXPAND, CwxTreeCtrl::OnExpandAllMenuItem)
541  EVT_MENU(ID_MACROEDIT_POPUPCOLLAPSE, CwxTreeCtrl::OnCollapseAllMenuItem)
543 
545 {
546  m_Timer.Stop();
547  x_ShowTooltip(false);
548 }
549 
550 void CwxTreeCtrl::OnLeftDown(wxMouseEvent& event)
551 {
552  event.Skip();
553  if (m_SelItem.IsOk()) {
554  SelectItem(m_SelItem);
555  }
556 }
557 
558 void CwxTreeCtrl::OnMouseMove(wxMouseEvent& event)
559 {
560  m_Timer.Stop();
561  int flags = 0;
562  m_SelItem = HitTest(event.GetPosition(), flags);
563  if (flags & (wxTREE_HITTEST_ONITEMLABEL | wxTREE_HITTEST_ONITEMSTATEICON | wxTREE_HITTEST_ONITEMINDENT)) {
564  m_Timer.StartOnce(500);
565  }
566 
567  event.Skip();
568 }
569 
570 void CwxTreeCtrl::OnTimer(wxTimerEvent& event)
571 {
572  if (m_Timer.IsRunning())
573  return;
574 
575  x_ShowTooltip(true);
576 }
577 
579 {
580  static wxTipWindow* s_tipWindow = nullptr;
581 
582  if (s_tipWindow)
583  {
584  s_tipWindow->SetTipWindowPtr(nullptr);
585  s_tipWindow->Close();
586  s_tipWindow = nullptr;
587  }
588 
589  if (!show)
590  return;
591 
592  if (m_SelItem.IsOk()) {
593  wxTreeItemData* data = GetItemData(m_SelItem);
594  IMacroActionItemData* edit_item = dynamic_cast<IMacroActionItemData*>(data);
595  if (edit_item) {
597  }
598  else {
599  return;
600  }
601  }
602 
603  if (m_ToolTipText.IsEmpty())
604  return;
605 
606  wxClientDC dc(this);
607  int w = dc.GetTextExtent(m_ToolTipText).GetWidth();
608 
609  wxRect r;
610  GetBoundingRect(m_SelItem, r);
611  // Convert from window to screen coordinates
612  r.SetPosition(ClientToScreen(r.GetPosition()));
613 
614  s_tipWindow = new wxTipWindow(this, m_ToolTipText, w, &s_tipWindow, &r);
615 }
616 
617 void CwxTreeCtrl::OnContextMenu(wxContextMenuEvent& event)
618 {
619  m_Timer.Stop();
620  wxMenu item;
621  item.Append(ID_MACROEDIT_POPUPEXPAND, wxT("Expand all"));
622  item.Append(ID_MACROEDIT_POPUPCOLLAPSE, wxT("Collapse all"));
623  PopupMenu(&item);
624 }
625 
626 void CwxTreeCtrl::OnExpandAllMenuItem(wxCommandEvent& event)
627 {
628  ExpandAll();
629  UnselectAll();
630 }
631 
632 void CwxTreeCtrl::OnCollapseAllMenuItem(wxCommandEvent& event)
633 {
634  CollapseAll();
635  UnselectAll();
636 }
637 
EVT_CHECKBOX(ID_CADJUSTFEATURES_CHECKBOX, CAdjustFeaturesForGaps::OnKnownUnknownSelected) EVT_CHECKBOX(ID_CADJUSTFEATURES_CHECKBOX1
CConstRef –.
Definition: ncbiobj.hpp:1266
const string & GetLabel() const
const vector< CRef< CMActionNode > > & GetChildren() const
static CConstRef< CMActionTree > BuildActionTree()
EMActionType GetMActionType(const macro::CMacroRep &macro_rep, const vector< EMActionType > &types, CMacroInterpreter &macro_interpret) const
wxTreeItemData * GetTreeItemData(const CMActionNode &node) const
void SetConstraints(const vector< CFuncWithArgs > &)
When setting constraints from a macro that's edited 1.
bool Create(wxWindow *parent, wxWindowID id=ID_CMACROEDITINGACTIONPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
Creation.
map< EMActionType, wxTreeItemId > m_ActionToNodeMap
void x_FindItem(const string &search, const wxTreeItemId &root)
void OnSearchCtrlClick(wxCommandEvent &event)
vector< wxTreeItemId >::const_iterator m_RecentIt
const string & GetWarning() const
void OnControlClick(wxCommandEvent &event)
void x_FindText(const string &search)
pair< string, string > GetForTarget()
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void OnHyperlinkClicked(wxHyperlinkEvent &event)
void OnSearchCtrlEnter(wxCommandEvent &event)
vector< CFuncWithArgs > m_FuncInfo
Stores parsed information about functions of m_EditedMacro.
vector< wxTreeItemId > m_RecentItemIds
void OnControlInSubPanelChanged(wxCommandEvent &event)
CRef< macro::CMacroRep > m_EditedMacro
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
static bool ShowToolTips()
Should we show tooltips?
IMacroActionItemData * m_SelectedItem
void OnActionTreeItemChanged(wxTreeEvent &event)
wxEVT_TREE_SEL_CHANGED event handler for ID_MACROEDIT_TREECTRL
void CreateControls()
Creates the controls and sizers.
void x_Build(const CMActionNode &root, wxTreeItemId root_id, const CMTreeItemDataBuilder &builder)
void Init()
Initialises member variables.
CMacroCompoundConstraintPanel * m_ConstraintPanel
vector< CFuncWithArgs > m_WhereFuncInfo
bool InterpretDoFunctions(const macro::CMacroRep &macro_rep)
const vector< CFuncWithArgs > & GetWhereFunctions() const
const vector< CFuncWithArgs > & GetInterpretedFunctions() const
void OnCollapseAllMenuItem(wxCommandEvent &event)
void OnTimer(wxTimerEvent &event)
void OnLeftDown(wxMouseEvent &event)
void OnExpandAllMenuItem(wxCommandEvent &event)
void OnMouseMove(wxMouseEvent &event)
void x_ShowTooltip(bool show)
void OnContextMenu(wxContextMenuEvent &event)
const pair< string, string > GetTarget() const
virtual string GetVariables()
virtual string GetFunction(TConstraints &constraints) const =0
virtual bool HasVariables() const
bool TransferDataToPanel(const vector< CFuncWithArgs > &func_info)
virtual string GetMacroDescription() const
void CreateParamPanel(wxStaticBoxSizer &action_sizer, wxPanel *parent)
const string & GetWarning() const
const string & GetGeneralDescription() const
virtual const vector< string > & GetKeywords() const
const_iterator end() const
Definition: map.hpp:152
const_iterator find(const key_type &key) const
Definition: map.hpp:153
#define _(proto)
Definition: ct_nlmzip_i.h:78
static uch flags
static void Init(void)
Definition: cursor6.c:76
static const struct type types[]
Definition: type.c:22
char data[12]
Definition: iconv.c:80
#define NULL
Definition: ncbistd.hpp:225
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
Definition: ncbidiag.hpp:226
void Error(CExceptionArgs_Base &args)
Definition: ncbiexpt.hpp:1197
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
Definition: ncbiexpt.hpp:704
const string & GetMsg(void) const
Get message string.
Definition: ncbiexpt.cpp:461
EDialogReturnValue NcbiInfoBox(const string &message, const string &title="Info")
specialized Message Box function for reporting general information messages
EDialogReturnValue NcbiMessageBox(const string &message, TDialogType type=eDialog_Ok, EDialogIcon icon=eIcon_Exclamation, const string &title="Error", EDialogTextMode text_mode=eRaw)
Definition: message_box.cpp:48
TObjectType * Release(void)
Release a reference to the object and return a pointer to the object.
Definition: ncbiobj.hpp:846
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
vector< pair< string, string > > TStringPairsVector
Definition: ncbistr.hpp:4810
#define kEmptyStr
Definition: ncbistr.hpp:123
static SIZE_TYPE FindNoCase(const CTempString str, const CTempString pattern, SIZE_TYPE start, SIZE_TYPE end, EOccurrence which=eFirst)
Find the pattern in the specified range of a string using a case insensitive search.
Definition: ncbistr.cpp:2993
#define NPOS
Definition: ncbistr.hpp:133
static string Join(const TContainer &arr, const CTempString &delim)
Join strings using the specified delimiter.
Definition: ncbistr.hpp:2697
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
Definition: ncbistr.hpp:5353
END_EVENT_TABLE()
EMActionType
USING_SCOPE(objects)
#define wxT(x)
Definition: muParser.cpp:41
const struct ncbi::grid::netcache::search::fields::SIZE size
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
static static static wxID_ANY
ViewerWindowBase::OnEditMenu ViewerWindowBase::OnJustification EVT_MENU(MID_SHOW_GEOM_VLTNS, ViewerWindowBase::OnShowGeomVltns) EVT_MENU(MID_FIND_PATTERN
static void ExpandAll(wxTreeCtrl &tree, const wxTreeItemId &id, bool shouldExpand, int toLevel)
#define _ASSERT
wxString ToWxString(const string &s)
Definition: wx_utils.hpp:173
string ToStdString(const wxString &s)
Definition: wx_utils.hpp:161
Modified on Sun Apr 21 03:45:18 2024 by modify_doxy.py rev. 669887