( wxWindow* parent, wxWindowID
id,
constwxString& caption,
constwxPoint& pos,
constwxSize&
size,
longstyle )
87 Create(parent,
id, caption, pos,
size, style);
91 bool COpenDlg::Create( wxWindow* parent, wxWindowID
id,
constwxString& caption,
constwxPoint& pos,
constwxSize&
size,
longstyle )
94SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
95CDialog::Create( parent,
id, caption, pos,
size, style );
134 classCUnfocusedListBox :
publicwxListBox
137CUnfocusedListBox(wxWindow *parent, wxWindowID
id,
138 constwxPoint& pos,
constwxSize&
size,
constwxArrayString &choices,
longstyle)
140Create(parent,
id, pos,
size, choices, style);
143 virtual boolAcceptsFocus()
const{
return false; }
154wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
155itemCDialog1->SetSizer(itemBoxSizer2);
158itemBoxSizer2->Add(
m_Splitter, 1, wxGROW|wxALL, wxDLG_UNIT(itemCDialog1, wxSize(5, -1)).x);
160wxArrayString m_OptionListStrings;
163wxStaticLine* itemStaticLine5 =
newwxStaticLine( itemCDialog1, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
164itemBoxSizer2->Add(itemStaticLine5, 0, wxGROW|wxALL, wxDLG_UNIT(itemCDialog1, wxSize(5, -1)).x);
166wxBoxSizer* itemBoxSizer6 =
newwxBoxSizer(wxHORIZONTAL);
167itemBoxSizer2->Add(itemBoxSizer6, 0, wxGROW|wxLEFT|wxRIGHT, wxDLG_UNIT(itemCDialog1, wxSize(5, -1)).x);
169wxHyperlinkCtrl* itemHyperlinkCtrl7 =
newwxHyperlinkCtrl( itemCDialog1, wxID_HELP,
_(
"Help"),
wxT(
"https://www.ncbi.nlm.nih.gov/tools/gbench"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
170itemHyperlinkCtrl7->SetForegroundColour(wxColour(192, 192, 192));
171itemBoxSizer6->Add(itemHyperlinkCtrl7, 0, wxALIGN_CENTER_VERTICAL|wxALL, wxDLG_UNIT(itemCDialog1, wxSize(5, -1)).x);
173itemBoxSizer6->Add(wxDLG_UNIT(itemCDialog1, wxSize(2, -1)).x, wxDLG_UNIT(itemCDialog1, wxSize(-1, 2)).y, 1, wxALIGN_CENTER_VERTICAL|wxALL, wxDLG_UNIT(itemCDialog1, wxSize(5, -1)).x);
175wxBoxSizer* itemBoxSizer9 =
newwxBoxSizer(wxHORIZONTAL);
176itemBoxSizer6->Add(itemBoxSizer9, 0, wxALIGN_CENTER_VERTICAL, wxDLG_UNIT(itemCDialog1, wxSize(5, -1)).x);
178 m_BackBtn=
newwxButton( itemCDialog1, wxID_BACKWARD,
_(
"< &Back"), wxDefaultPosition, wxDefaultSize, 0 );
179itemBoxSizer9->Add(
m_BackBtn, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, wxDLG_UNIT(itemCDialog1, wxSize(5, -1)).x);
184 boolspacer_code_included =
true;
185 #ifdef __WXOSX_COCOA__ 186itemBoxSizer9->AddSpacer(6);
189 m_NextBtn=
newwxButton( itemCDialog1, wxID_FORWARD,
_(
"&Next >"), wxDefaultPosition, wxDefaultSize, 0 );
191itemBoxSizer9->Add(
m_NextBtn, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP|wxBOTTOM, wxDLG_UNIT(itemCDialog1, wxSize(5, -1)).x);
193wxButton* itemButton12 =
newwxButton( itemCDialog1, wxID_CANCEL,
_(
"&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
194itemBoxSizer6->Add(itemButton12, 0, wxALIGN_CENTER_VERTICAL|wxALL, wxDLG_UNIT(itemCDialog1, wxSize(5, -1)).x);
198 if(!spacer_code_included) {
217 intsizes[3] = { 170, 250, -1 };
221wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL );
223wxBoxSizer* itemBoxSizer_op =
newwxBoxSizer(wxVERTICAL);
251manager->SetServiceLocator(
NULL);
252manager->SetParentWindow(
NULL);
261manager->SetParentWindow(
this);
282 strings = manager->GetDescriptor().GetLabel();
300wxDialog::InitDialog();
407 if(panel->GetContainingSizer() !=
m_OptionPanel->GetSizer()) {
408 m_OptionPanel->GetSizer()->Insert(0, panel, 1, wxEXPAND | wxALL, 5);
414 if(panel->GetParent() !=
this) {
415panel->Reparent(
this);
418 if(panel->GetContainingSizer() != GetSizer()) {
419GetSizer()->Insert(0, panel, 1, wxEXPAND | wxALL, 5);
475 boolsuccess =
false;
479success = manager->DoTransition(action);
484 catch(
constexception& e) {
488 if(!errMsg.empty()) {
489wxMessageBox (
ToWxString(errMsg),
wxT(
"Error"), wxOK | wxICON_ERROR);
495 if(manager->IsCompletedState()) {
504 const IUIObject& descriptor = manager->GetDescriptor();
505 const string& log_event = descriptor.
GetLogEvent();
506 if(!log_event.empty()) {
513wxPanel* new_panel = manager->GetCurrentPanel();
562 m_NextBtn->SetLabel(manager->IsFinalState() ?
wxT(
"Finish") :
wxT(
"Next >"));
572wxString s =
ToWxString(manager->GetDescriptor().GetLabel());
574title +=
wxT(
" - ") + s;
584manager->ResetState();
594wxDialog::EndModal(ret_code);
608 stringsub_section = manager->GetDescriptor().GetLabel();
609 stringmgr_path =
m_RegPath+
"."+ sub_section;
624 if(widths.size() == 2) {
640 stringmgr_label = manager->GetDescriptor().GetLabel();
641 if(mgr_label == sel_mgr_label) {
657 stringmgr_label = manager->GetDescriptor().GetLabel();
virtual void SaveSettings() const
virtual void SetRegistryPath(const string &path)
virtual void LoadSettings()
CFileLoadManager CFileLoadManager - a Loader Manager implementing "File" option in "Open" dialog.
void SetDialog(COpenDlg *dlg)
virtual void SetFilenames(vector< wxString > &filenames)
vector< wxString > GetFilenames() const
static CGuiRegistry & GetInstance()
access the application-wide singleton
void Set(const string &key, int val)
set specific values
void x_SelectManager(int index)
static bool ShowToolTips()
bool Create(wxWindow *parent, wxWindowID id=ID_COPENDLG, const wxString &caption=_("Open"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(450, 275), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxTAB_TRAVERSAL)
virtual void SelectOptionByLabel(const string &label)
select loading options By Extension ID
virtual void SetRegistryPath(const string &path)
int m_RequestedManager
if >= 0, than the dialog shall show a particualr option
virtual void x_SaveSettings(CRegistryWriteView view) const
@ ID_OPEN_FOLDER_CHECKBOX
void OnBackwardClick(wxCommandEvent &event)
IServiceLocator * m_SrvLocator
void x_SetCurrentPanel(wxPanel *panel, bool firstPage)
virtual void InitDialog()
wxIcon GetIconResource(const wxString &name)
void OnListItemActivate(wxListEvent &event)
vector< wxString > m_Filenames
virtual void x_LoadSettings(const CRegistryReadView &view)
override these functions in derived classes
void OnForwardClick(wxCommandEvent &event)
void OnCancelClick(wxCommandEvent &event)
virtual void SetManagers(vector< TManagerRef > &managers)
virtual void SetFilenames(const vector< wxString > &filenames)
vector< TManagerRef > m_Managers
Load Managers corresponding to Loading Options.
void x_DoTransition(IUIToolManager::EAction action)
void OnOptionListSelected(wxCommandEvent &event)
virtual void EndModal(int ret_code)
wxCheckBox * m_OpenExportFolder
wxBitmap GetBitmapResource(const wxString &name)
void x_AppendOptionForManager(IUIToolManager &manager)
add a Loading Option (displayed in the list on the left) for the given Manager
virtual CIRef< IAppTask > GetLoadingTask()
CIRef< IAppTask > m_AppTask
void OnSkipClick(wxCommandEvent &event)
virtual void SetServiceLocator(IServiceLocator *srv_locator)
class CRegistryReadView provides a nested hierarchical view at a particular key.
void GetIntVec(const string &key, vector< int > &val) 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
CSplitter - container with resizable separators.
virtual bool Show(bool show=true)
bool InsertToCell(wxWindow *child, int col, int row)
If cell [col, row] exists and vacant - adds widget to the container.
void GetWidths(TPosVector &widths) const
void SetWidths(const TPosVector &widths)
@ eHorizontal
vertical space is splitted
virtual void Split(ESplitType type)
Creates a splitter with a single cell.
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
IServiceLocator - an abstract mechanism for locating services.
IUIObject - object that provides basic properties often required in a UI object.
const string & GetMsg(void) const
Get message string.
virtual const char * what(void) const noexcept
Standard report (includes full backlog).
virtual const string & GetLogEvent() const =0
virtual const string & GetLabel() const =0
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
void Reset(void)
Reset reference object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static const char label[]
unsigned int
A callback function used to compare two keys in a database.
const struct ncbi::grid::netcache::search::fields::SIZE size
static const char * kExportOpenFolderTag
static const char * kSplitterWidthsTag
static const char * kSelOptionTag
#define SYMBOL_COPENDLG_SIZE
static void SetTitle(CRef< CSeq_entry > entry, string title)
#define REPORT_USAGE(event, args)
Convenience macro to log usage statisitics.
wxString ToWxString(const string &s)
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