34 #include <wx/choice.h>
36 #include <wx/menuitem.h>
62 : m_Timer(this), m_AssemblyLoaded(
false)
65 Create(parent,
id, pos,
size, style);
102 if (event.IsCommandEvent()) {
103 wxEventType
type =
event.GetEventType();
105 wxEvtHandler* evtHandler = 0;
107 if (evtHandler && evtHandler->ProcessEventLocally(event))
111 return wxPanel::ProcessEvent(event);
116 int selection =
event.GetSelection();
117 if (selection < 0 || selection >= (
int)
m_Assemblies.size())
136 if (!
fp)
return false;
148 static bool sImagesRegistered =
false;
149 if (!sImagesRegistered) {
152 sImagesRegistered =
true;
156 wxAuiToolBar* toolbar =
nullptr;
159 toolbar = (wxAuiToolBar*)pane.window;
162 if (ctrl) ctrl->Destroy();
165 if (ctrl) ctrl->Destroy();
168 if (ctrl) ctrl->Destroy();
178 toolbar->ClearTools();
181 toolbar =
new wxAuiToolBar(
this,
wxID_ANY, wxDefaultPosition,
182 wxDefaultSize, wxAUI_TB_HORIZONTAL | wxBORDER_NONE);
189 toolbar->AddSeparator();
195 toolbar->AddSeparator();
197 toolbar->AddSeparator();
204 strings.Add(
_(
"Do not match case"));
212 wxMenu* menu =
new wxMenu();
213 menu->Append(wxID_COPY,
_(
"&Copy"));
214 menu->Append(wxID_PASTE,
_(
"&Paste"));
220 toolbar->AddSeparator();
231 string accession =
i->GetAccession();
232 string name =
i->GetName();
233 int index = assListCtrl->Append(
ToWxString(name +
" (") + accession +
")");
242 assListCtrl->SetSelection(selection);
243 toolbar->AddControl(assListCtrl);
252 toolbar->AddStretchSpacer();
254 wxArtProvider::GetBitmap(wxART_HELP, wxART_OTHER, wxSize(16, 16)),
255 wxT(
"Graphical View Help"));
271 .RightDockable(
false)
272 .BottomDockable(
false)
277 .DestroyOnClose(
true)
280 pane.BestSize(toolbar->GetClientSize());
295 if (!pane.IsOk())
return;
297 wxAuiToolBar* tb =
static_cast<wxAuiToolBar*
>(pane.window);
307 wxRect rect = tb->GetToolRect(evt.GetId());
308 wxPoint pt = tb->ClientToScreen(rect.GetBottomLeft());
309 pt = ScreenToClient(pt);
311 PopupMenu(&menuPopup, pt);
319 const wxString caption =
wxT(
"Find Text");
324 wxMessageBox(
wxT(
"Search string is empty."), caption, wxOK | wxICON_EXCLAMATION);
331 string tmp =
text.ToStdString();
337 wxMessageBox(
wxT(
"Search string not found."), caption, wxOK | wxICON_EXCLAMATION);
wxChoice * m_FindModeCtrl
void OnAssemblySelected(wxCommandEvent &event)
void OnSearchTermCtrlEnter(wxCommandEvent &event)
virtual bool ProcessEvent(wxEvent &event)
void OnFindNextClick(wxCommandEvent &event)
CSeqGraphicWidget * m_SeqWidget
vector< CRef< objects::CGC_Assembly > > m_Assemblies
void OnTimer(wxTimerEvent &event)
wxAuiManager m_AuiManager
CRichTextCtrl * m_FindTextCtrl
void OnHelpClick(wxCommandEvent &event)
void OnConfigureTracks(wxCommandEvent &event)
CRichTextCtrl - a wrapper for wxRichTextCtrl that handles additional keyboard events (such as Clipboa...
void SetContextMenu(wxMenu *contextMenu)
CUICommandRegistry is a centralized registry where all application commands should be registered.
static CUICommandRegistry & GetInstance()
the main instance associated with the application
void AppendTool(wxToolBar &tool_bar, TCmdID cmd_id)
wxMenuItem * AppendMenuItem(wxMenu &menu, TCmdID cmd_id) const
virtual void RegisterFileAlias(const wxArtID &anId, const wxArtClient &aClient, const wxSize &aSize, const wxString &aName, long aType=wxBITMAP_TYPE_ANY, int anIndex=-1)
int Main(int argc, const char *argv[])
static const char *const strings[]
static const wxChar * pszMainToolbar
@ eCmdZoomIn
empty command
@ eCmdZoomSeq
Zoom to Selection.
@ eCmdWebHelpGSVInteractionGuide
@ eCmdBack
Navigation commands.
@ eCmdWebHelpGSVNavigation
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)
Truncate whitespace in a string (in-place)
static void text(MDB_val *v)
const struct ncbi::grid::netcache::search::fields::SIZE size
const CConstRef< CSeq_id > GetAccession(const CSeq_id_Handle &id_handle)
wxEVT_COMMAND_MENU_SELECTED
ViewerWindowBase::OnEditMenu ViewerWindowBase::OnJustification EVT_MENU(MID_SHOW_GEOM_VLTNS, ViewerWindowBase::OnShowGeomVltns) EVT_MENU(MID_FIND_PATTERN
wxFileArtProvider * GetDefaultFileArtProvider()
wxString ToWxString(const string &s)