| wxFRAME_FLOAT_ON_PARENT
69viewerWidget(
NULL), viewer(parentViewer)
71 if(!parentViewer)
ERRORMSG(
"ViewerWindowBase::ViewerWindowBase() - got NULL pointer");
73SetSizeHints(200, 150);
74SetIcon(wxICON(cn3d));
78 intwidths[2] = { 175, -1 };
79SetStatusWidths(2, widths);
82SetupFontFromRegistry();
84menuBar =
newwxMenuBar;
85viewMenu =
newwxMenu;
86viewMenu->Append(MID_SHOW_TITLES,
"Show &Titles");
88viewMenu->Append(MID_SHOW_GEOM_VLTNS,
"Show &Geometry Violations",
"",
true);
89viewMenu->Append(MID_FIND_PATTERN,
"Find &Pattern");
90viewMenu->AppendSeparator();
91viewMenu->Append(MID_CACHE_HIGHLIGHTS,
"&Cache Highlights");
92viewMenu->Append(MID_RESTORE_CACHED_HIGHLIGHTS,
"Rest&ore Cached Highlights");
93menuBar->Append(viewMenu,
"&View");
95editMenu =
newwxMenu;
96editMenu->Append(MID_ENABLE_EDIT,
"&Enable Editor",
"",
true);
97editMenu->Append(MID_UNDO,
"Undo\tCtrl-Z");
99editMenu->Append(MID_REDO,
"Redo\tShift-Ctrl-Z");
102editMenu->Append(MID_REDO,
"Redo");
104editMenu->AppendSeparator();
105editMenu->Append(MID_SPLIT_BLOCK,
"&Split Block",
"",
true);
106editMenu->Append(MID_MERGE_BLOCKS,
"&Merge Blocks",
"",
true);
107editMenu->Append(MID_CREATE_BLOCK,
"&Create Block",
"",
true);
108editMenu->Append(MID_DELETE_BLOCK,
"&Delete Block",
"",
true);
109editMenu->AppendSeparator();
110editMenu->Append(MID_SYNC_STRUCS,
"Sy&nc Structure Colors");
112menuBar->Append(editMenu,
"&Edit");
114mouseModeMenu =
newwxMenu;
115mouseModeMenu->Append(MID_SELECT_RECT,
"&Select Rectangle",
"",
true);
116mouseModeMenu->Append(MID_SELECT_COLS,
"Select &Columns",
"",
true);
117mouseModeMenu->Append(MID_SELECT_ROWS,
"Select &Rows",
"",
true);
118mouseModeMenu->Append(MID_SELECT_BLOCKS,
"Select &Blocks",
"",
true);
119mouseModeMenu->Append(MID_DRAG_HORIZ,
"&Horizontal Drag",
"",
true);
120menuBar->Append(mouseModeMenu,
"&Mouse Mode");
123wxAcceleratorEntry
entries[5];
124 entries[0].Set(wxACCEL_NORMAL,
's', MID_SELECT_RECT);
125 entries[1].Set(wxACCEL_NORMAL,
'c', MID_SELECT_COLS);
126 entries[2].Set(wxACCEL_NORMAL,
'r', MID_SELECT_ROWS);
127 entries[3].Set(wxACCEL_NORMAL,
'b', MID_SELECT_BLOCKS);
128 entries[4].Set(wxACCEL_NORMAL,
'h', MID_DRAG_HORIZ);
129wxAcceleratorTable accel(5,
entries);
130SetAcceleratorTable(accel);
132justificationMenu =
newwxMenu;
133justificationMenu->Append(MID_LEFT,
"&Left",
"",
true);
134justificationMenu->Append(MID_RIGHT,
"&Right",
"",
true);
135justificationMenu->Append(MID_CENTER,
"&Center",
"",
true);
136justificationMenu->Append(
MID_SPLIT,
"&Split",
"",
true);
137menuBar->Append(justificationMenu,
"Unaligned &Justification");
141menuBar->Check(MID_SELECT_RECT,
true);
144viewerWidget->TitleAreaOn();
146EnableBaseEditorMenuItems(
false);
147menuBar->Check(MID_SHOW_GEOM_VLTNS,
false);
160unique_ptr<wxFont> font(wxFont::New(wxString(nativeFont.c_str())));
161 if(!font.get() || !font->Ok())
163 ERRORMSG(
"ViewerWindowBase::SetupFontFromRegistry() - error setting up font");
208 switch(event.GetId()) {
220 switch(event.GetId()) {
264SetCursor(*wxCROSS_CURSOR);
272SetCursor(*wxCROSS_CURSOR);
282SetCursor(*wxCROSS_CURSOR);
292SetCursor(*wxCROSS_CURSOR);
305 constwxMenuItemList& items =
mouseModeMenu->GetMenuItems();
306 for(
unsigned int i=0;
i<items.GetCount(); ++
i)
307items.Item(
i)->GetData()->Check(
308(items.Item(
i)->GetData()->GetId() == event.GetId()) ?
true:
false);
310 switch(event.GetId()) {
327 menuBar->Check(
i, (
i== event.GetId()) ?
true:
false);
329 switch(event.GetId()) {
351ViewerBase::AlignmentList::const_iterator
a, ae = alignments.end();
353 for(
a=alignments.begin();
a!=ae; ++
a)
356 INFOMSG(
"Found "<< nViolations <<
" geometry violation" 357<< ((nViolations == 1) ?
"":
"s") <<
" in this window");
363 staticwxString previousPattern;
364 staticwxString previousMode(
"Replace");
368dialog.
m_Pattern->SetValue(previousPattern);
369dialog.
m_Pattern->SetSelection(-1, -1);
370dialog.
m_Mode->SetStringSelection(previousMode);
371 intstatus = dialog.ShowModal();
372wxString pattern = dialog.
m_Pattern->GetValue();
373 if(status != wxID_OK || pattern.size() == 0)
377 if(pattern[pattern.size() - 1] !=
'.') pattern +=
'.';
378previousPattern = pattern;
379previousMode = dialog.
m_Mode->GetStringSelection();
383 if(dialog.
m_Mode->GetStringSelection() ==
"Within")
385 if(dialog.
m_Mode->GetStringSelection() ==
"Replace"|| dialog.
m_Mode->GetStringSelection() ==
"Within")
392 for(
unsigned int i=0;
i<display->
NRows(); ++
i) {
395 if(!sequence || usedSequences.
find(sequence) != usedSequences.
end())
continue;
396usedSequences[sequence] =
true;
405 for(
unsigned int i=0;
i<display->
NRows(); ++
i) {
407 if(sequence && sequence->
identifier== identifier) {
void RestoreCachedHighlights(void)
void GetHighlights(MoleculeHighlightMap *copyHighlights)
void PostRedrawSequenceViewer(ViewerBase *viewer)
bool RemoveAllHighlights(bool postRedraws)
void PostRedrawAllSequenceViewers(void)
void CacheHighlights(void)
std::map< const MoleculeIdentifier *, std::vector< bool > > MoleculeHighlightMap
void AddBlockBoundaryRows(void)
const Sequence * GetSequenceForRow(unsigned int row) const
unsigned int NRows(void) const
void RedrawAlignedMolecules(void) const
void RemoveBlockBoundaryRows(void)
bool IsEditable(void) const
const MoleculeIdentifier * identifier
bool HighlightPattern(const std::string &pattern, const MoleculeHighlightMap &restrictTo) const
std::list< BlockMultipleAlignment * > AlignmentList
void SetUndoRedoMenuStates(void)
SequenceDisplay * GetCurrentDisplay(void)
const AlignmentList & GetCurrentAlignments(void) const
bool DoCreateBlock(void) const
void NewDisplay(SequenceDisplay *display, bool enableSelectByColumn)
void DeleteBlockOff(void)
bool DoSplitBlock(void) const
void SetupFontFromRegistry(void)
virtual bool RequestEditorEnable(bool enable)
@ MID_RESTORE_CACHED_HIGHLIGHTS
void MakeSequenceVisible(const MoleculeIdentifier *identifier)
void OnFindPattern(wxCommandEvent &event)
SequenceViewerWidget * viewerWidget
virtual SequenceViewerWidget::eMouseMode GetMouseModeForCreateAndMerge(void)=0
void SyncStructures(void)
BlockMultipleAlignment::eUnalignedJustification currentJustification
bool DoMergeBlocks(void) const
void MergeBlocksOff(void)
SequenceViewerWidget::eMouseMode prevMouseMode
void CancelBaseSpecialModesExcept(int id)
void UpdateGeometryViolations(void) const
void CreateBlockOff(void)
void OnJustification(wxCommandEvent &event)
void CancelAllSpecialModesExcept(int id)
void OnEditMenu(wxCommandEvent &event)
virtual ~ViewerWindowBase(void)
virtual void EnableDerivedEditorMenuItems(bool enable)
void OnMouseMode(wxCommandEvent &event)
bool AlwaysSyncStructures(void) const
void OnShowGeomVltns(wxCommandEvent &event)
bool DoDeleteBlock(void) const
void EnableBaseEditorMenuItems(bool enabled)
void UpdateDisplay(SequenceDisplay *display)
void OnTitleView(wxCommandEvent &event)
void OnCacheHighlights(wxCommandEvent &event)
bool GeometryViolationsShown(void) const
const_iterator end() const
const_iterator find(const key_type &key) const
wxFrame * GlobalTopWindow(void)
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_SCOPE(ns)
Define a new scope.
Messenger * GlobalMessenger(void)
const struct ncbi::grid::netcache::search::fields::SIZE size
ViewerWindowBase::OnEditMenu MID_SPLIT
static wxAcceleratorEntry entries[3]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4