48 #include <wx/button.h>
49 #include <wx/bitmap.h>
51 #include <wx/checkbox.h>
52 #include <wx/valgen.h>
72 return m_Factory->GetViewTypeDescriptor();
77 return m_Factory->GetViewTypeDescriptor().GetCategory();
118 Create(parent,
id, caption, pos,
size, style);
122 bool COpenViewDlg::Create( wxWindow* parent, wxWindowID
id,
const wxString& caption,
const wxPoint& pos,
const wxSize&
size,
long style )
125 SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
126 CDialog::Create( parent,
id, caption, pos,
size, style );
130 GetSizer()->SetSizeHints(
this);
172 wxBoxSizer* itemBoxSizer2 =
new wxBoxSizer(wxVERTICAL);
173 itemCDialog1->SetSizer(itemBoxSizer2);
175 m_Panel =
new wxPanel( itemCDialog1,
ID_OPENVIEWPANEL, wxDefaultPosition, wxSize(400, 300), wxNO_BORDER|wxFULL_REPAINT_ON_RESIZE|wxTAB_TRAVERSAL );
176 itemBoxSizer2->Add(
m_Panel, 1, wxGROW, 5);
178 wxBoxSizer* itemBoxSizer4 =
new wxBoxSizer(wxVERTICAL);
179 m_Panel->SetSizer(itemBoxSizer4);
181 wxStaticLine* itemStaticLine5 =
new wxStaticLine( itemCDialog1, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
182 itemBoxSizer2->Add(itemStaticLine5, 0, wxGROW|wxALL, 5);
184 wxBoxSizer* itemBoxSizer6 =
new wxBoxSizer(wxHORIZONTAL);
185 itemBoxSizer2->Add(itemBoxSizer6, 0, wxGROW|wxLEFT|wxRIGHT, 5);
187 wxHyperlinkCtrl* itemHyperlinkCtrl7 =
new wxHyperlinkCtrl( itemCDialog1,
ID_HELPLINK,
_(
"Help"),
wxT(
"https://www.ncbi.nlm.nih.gov/tools/gbench/"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
188 itemHyperlinkCtrl7->SetForegroundColour(wxColour(192, 192, 192));
189 itemBoxSizer6->Add(itemHyperlinkCtrl7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
191 itemBoxSizer6->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);
193 wxBoxSizer* itemBoxSizer9 =
new wxBoxSizer(wxHORIZONTAL);
194 itemBoxSizer6->Add(itemBoxSizer9, 0, wxALIGN_CENTER_VERTICAL, 5);
196 m_BackBtn =
new wxButton( itemCDialog1, wxID_BACKWARD,
_(
"< &Back"), wxDefaultPosition, wxDefaultSize, 0 );
197 itemBoxSizer9->Add(
m_BackBtn, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP|wxBOTTOM, 5);
202 bool spacer_code_included =
true;
203 #ifdef __WXOSX_COCOA__
204 itemBoxSizer9->AddSpacer(6);
207 m_NextBtn =
new wxButton( itemCDialog1, wxID_FORWARD,
_(
"&Next >"), wxDefaultPosition, wxDefaultSize, 0 );
209 itemBoxSizer9->Add(
m_NextBtn, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP|wxBOTTOM, 5);
211 wxButton* itemButton12 =
new wxButton( itemCDialog1, wxID_CANCEL,
_(
"&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
212 itemBoxSizer6->Add(itemButton12, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
216 if (!spacer_code_included) {
233 wxBoxSizer* itemBoxSizer13 =
new wxBoxSizer(wxVERTICAL);
243 wxCheckBox* onlyCheckBox =
new wxCheckBox(
m_ViewListPanel,
ID_ONLY,
wxT(
"Show only compatible views"), wxDefaultPosition, wxDefaultSize, 0 );
245 itemBoxSizer13->Add(onlyCheckBox, 0, wxALIGN_LEFT|wxALL, 5);
265 string sub_section =
m_Factories[
i]->GetViewTypeDescriptor().GetLabel();
298 if( fc_item !=
NULL ){
309 wxDialog::OnInitDialog(event);
344 wxT(
"Please select a view to be opened."),
345 wxT(
"Open View"), wxOK | wxICON_EXCLAMATION,
this
388 string sub_section =
m_Factories[
i]->GetViewTypeDescriptor().GetLabel();
409 wxDialog::EndModal( ret_code );
426 string mgr_label =
m_CurrFactory->GetViewTypeDescriptor().GetLabel();
468 string mgr_label =
m_Factories[
i]->GetViewTypeDescriptor().GetLabel();
469 if( mgr_label == sel_mgr_label ){
502 string inputCategory = gui_info->GetViewCategory();
542 if(
test & good_mask ){
555 vector<TItemRef> items;
556 for(
size_t i = 0;
i < factories->size();
i++ ){
557 bool showDefault =
false;
568 items.push_back( item );
588 if (panel->GetContainingSizer() !=
m_Panel->GetSizer()) {
589 m_Panel->GetSizer()->Add(panel, 1, wxEXPAND | wxALL, 5);
619 wxT(
"Particular kind of this input object is not supported:\n")
621 wxT(
"Open View"), wxOK | wxICON_EXCLAMATION
628 if( new_panel ==
NULL ){
650 bool can_back =
false;
651 bool can_next =
true;
EVT_CHECKBOX(ID_CADJUSTFEATURES_CHECKBOX, CAdjustFeaturesForGaps::OnKnownUnknownSelected) EVT_CHECKBOX(ID_CADJUSTFEATURES_CHECKBOX1
virtual void SaveSettings() const
static CGuiRegistry & GetInstance()
access the application-wide singleton
string GetString(const string &key, const string &default_val=kEmptyStr) const
CMapControl owns all its items.
SProperties & GetProperties()
CIRef< IProjectViewFactory > TFactoryRef
TConstScopedObjects m_InputObjects
The original input objects that serve as input arguments for object converter.
void OnInitDialog(wxInitDialogEvent &event)
static string GetDefaultFactoryLabel(const string ®_path, TConstScopedObjects &objects)
vector< TFactoryRef > TFactories
wxBitmap GetBitmapResource(const wxString &name)
virtual void EndModal(int ret_code)
void x_SetCurrentPanel(wxPanel *panel, const wxString &caption=_("Open View"))
static bool ShowToolTips()
void OnBackwardClick(wxCommandEvent &event)
CItemSelectionPanel * m_ItemPanel
void OnOnlyClick(wxCommandEvent &event)
wxPanel * m_ViewListPanel
virtual void SetRegistryPath(const string &path)
void SetInputObjects(const TConstScopedObjects &input_objects)
wxIcon GetIconResource(const wxString &name)
TConstScopedObjects m_OutputObjects
The output objects after view-specific object conversion and possible object aggregation.
TFactories m_CompatibleFactories
void x_DoTransition(IOpenViewManager::EAction action)
TFactoryRef GetSelectedFactory()
virtual void x_LoadSettings(const CRegistryReadView &view)
override these functions in derived classes
void OnForwardClick(wxCommandEvent &event)
CRef< COpenViewManager > m_DefaultManager
TManagerRef m_CurrManager
void SetFactories(TFactories &factories)
void OnViewSelected(wxCommandEvent &event)
void OnListItemActivate(wxListEvent &event)
void OnSelectAll(wxCommandEvent &anEvt)
virtual void x_SaveSettings(CRegistryWriteView view) const
vector< int > m_OutputIndices
COpenViewDlg()
COpenViewDlg.
TFactoryRef m_CurrFactory
bool Create(wxWindow *parent, wxWindowID id=ID_COPENVIEWDLG, const wxString &caption=_("Open View"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxTAB_TRAVERSAL)
virtual void CleanUI()
clean UI objects associated with the Manager
virtual void SetParentWindow(wxWindow *parent)
void SetProjectViewFactory(IProjectViewFactory *factory)
virtual void SaveSettings() const
virtual void InitUI()
initialize the Manager before using in UI (set it to Initial state)
virtual void LoadSettings()
virtual void SetRegistryPath(const string &path)
class CRegistryReadView provides a nested hierarchical view at a particular key.
bool GetBool(const string &key, bool default_val=false) const
string GetString(const string &key, const string &default_val=kEmptyStr) const
void Set(const string &key, int val)
access a named key at this level, with no recursion
CViewFactoryItem(IProjectViewFactory &factory, bool showDefault=false)
virtual string GetCategory()
CIRef< IProjectViewFactory > m_Factory
virtual const IUIObject & GetDescriptor() const
virtual bool ShowDefault() const
IOpenViewManager - interface dealing with a series of open view operations.
virtual void CleanUI()=0
clean UI objects associated with the Manager
virtual void InitUI()=0
initialize the Manager before using in UI (set it to Initial state)
virtual void SetParentWindow(wxWindow *parent)=0
IRegSettings An interface for objects that save / restore settings using CGuiRegistry.
virtual void SaveSettings() const =0
virtual void LoadSettings()=0
virtual void SetRegistryPath(const string &path)=0
IUIObject - object that provides basic properties often required in a UI object.
#define test(a, b, c, d, e)
const string & GetMsg(void) const
Get message string.
void SetItemTypeLabel(const string &label)
virtual void LoadSettings()
TItemRef GetSelectedItemRef()
virtual void SetRegistryPath(const string &path)
virtual void SaveSettings() const
void SetItems(vector< TItemRef > &items)
CGroupMapWidget * m_MapWidget
vector< SConstScopedObject > TConstScopedObjects
bool NotNull(void) const THROWS_NONE
Check if pointer is not null – same effect as NotEmpty().
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
bool IsNull(void) const THROWS_NONE
Check if pointer is null – same effect as Empty().
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
const struct ncbi::grid::netcache::search::fields::SIZE size
static const char * kOnlyCompatibleTag
static const char * kDefaultItem
static const char * kSelOptionTag
#define SYMBOL_COPENVIEWDLG_TITLE
ViewerWindowBase::OnEditMenu ViewerWindowBase::OnJustification EVT_MENU(MID_SHOW_GEOM_VLTNS, ViewerWindowBase::OnShowGeomVltns) EVT_MENU(MID_FIND_PATTERN
static void SetTitle(CRef< CSeq_entry > entry, string title)
wxString ToWxString(const string &s)