72 #include "wx/wxprec.h"
83 #include "wx/imaglist.h"
84 #include <wx/display.h>
85 #include <wx/filename.h>
86 #include <wx/hyperlink.h>
132 : m_Workbench(wb), m_params(params)
136 Create( parent,
id, caption, pos,
size, style );
150 wxFrame::Create( parent,
id, caption, pos,
size, style );
153 Centre(wxBOTH|wxCENTRE_ON_SCREEN);
206 if (width >= 0 && height >= 0)
207 SetSize(wxSize(width,height));
214 if (pos_x >= 0 && pos_y >= 0) {
216 for (
unsigned i = 0;
i < wxDisplay::GetCount();
i++) {
217 wxDisplay display(
i);
218 max_x += display.GetGeometry().GetWidth();
221 if (pos_x + width > max_x)
222 pos_x = wxGetDisplaySize().GetWidth()-width-5;
224 if (pos_y + height > wxGetDisplaySize().GetHeight())
225 pos_y = wxGetDisplaySize().GetHeight()-height-5;
227 SetPosition(wxPoint(pos_x,pos_y));
261 wxPanel* itemPanel2 =
new wxPanel(itemFrame1);
262 wxBoxSizer* itemBoxSizer1 =
new wxBoxSizer(wxVERTICAL);
263 itemPanel2->SetSizer(itemBoxSizer1);
267 itemBoxSizer1->Add(
m_Panel, 1, wxGROW|wxALL, 0);
270 wxBoxSizer* itemBoxSizer6 =
new wxBoxSizer(wxHORIZONTAL);
271 itemBoxSizer1->Add(itemBoxSizer6, 0, wxGROW|wxALL,0);
276 itemBoxSizer6->Add(validate_genomes, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL| wxALL, 5);
278 itemBoxSizer6->AddStretchSpacer();
281 itemBoxSizer6->Add(itemButton8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
287 itemBoxSizer6->Add(
m_DoneButton, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
291 itemBoxSizer6->Add(itemButton11, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
294 itemBoxSizer6->Add(itemButton12, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
298 wxButton* itemButton7 =
new wxButton( itemPanel2,
ID_VALIDATE_FRAME_REFRESH,
_(
"Refresh"), wxDefaultPosition, wxDefaultSize, 0 );
299 itemBoxSizer6->Add(itemButton7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
301 wxButton* itemButton10 =
new wxButton( itemPanel2,
ID_VALIDATE_FRAME_DISMISS,
_(
"Dismiss"), wxDefaultPosition, wxDefaultSize, 0 );
302 itemBoxSizer6->Add(itemButton10, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
304 wxHyperlinkCtrl* itemHyperlinkCtrl =
new wxHyperlinkCtrl( itemPanel2, wxID_HELP,
_(
"Help"),
wxT(
"https://www.ncbi.nlm.nih.gov/tools/gbench/manual8/#validator"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
305 itemHyperlinkCtrl->SetForegroundColour(wxColour(192, 192, 192));
306 itemBoxSizer6->Add(itemHyperlinkCtrl, 0, wxALIGN_CENTER_VERTICAL, 5);
308 itemBoxSizer6->AddStretchSpacer();
429 enable = view.
GetBool(
"EnableDone",
true);
431 event.Enable(enable);
439 if (!projectService)
return;
452 int pitemId = (*bit)->GetId();
470 }
catch (
const exception& ex) {
473 if (!errMsg.empty()) {
474 wxMessageBox(errMsg,
wxT(
"Smart client communication error"), wxOK|wxICON_ERROR);
User-defined methods of the data storage class.
EVT_CHECKBOX(ID_CADJUSTFEATURES_CHECKBOX, CAdjustFeaturesForGaps::OnKnownUnknownSelected) EVT_CHECKBOX(ID_CADJUSTFEATURES_CHECKBOX1
void Save(const wxString &abs_path)
CUndoManager & GetUndoManager()
wxString GetFileName() const
CRegistryWriteView GetWriteView(const string §ion)
get a read-write view at a particular level.
static CGuiRegistry & GetInstance()
access the application-wide singleton
CRegistryReadView GetReadView(const string §ion) const
get a read-only view at a particular level.
CProjectItem * FindProjectItemById(CProjectItem::TId id)
CProjectService - a service providing API for operations with Workspaces and Projects.
void RemoveProject(CGBDocument &doc)
CRef< objects::CGBWorkspace > GetGBWorkspace()
class CRegistryReadView provides a nested hierarchical view at a particular key.
int GetInt(const string &key, int default_val=0) const
access a named key at this level, with no recursion
bool GetBool(const string &key, bool default_val=false) const
bool HasField(const string &key) const
Does a field with this section and key exist in this view?
void Set(const string &key, int val)
access a named key at this level, with no recursion
void SetSubsets(const set< objects::CBioseq_Handle > &selected)
void SetSubsets(const set< objects::CBioseq_Handle > &selected)
static void SendResult(objects::CScope *scope, const objects::CProjectItem &projitem, EResultType result_type)
static void SetIncludeGenomes(objects::CUser_object ¶ms, bool val)
void Init()
Initialises member variables.
void OnValidateGenomesChkBox(wxCommandEvent &event)
void OnSegregate(wxCommandEvent &event)
static bool ShowToolTips()
Should we show tooltips?
virtual void SaveSettings() const
CValidateFrame()
Constructors.
CRef< objects::CUser_object > m_params
void OnDone(wxCommandEvent &event)
void OnDismiss(wxCommandEvent &event)
static CValidateFrame * m_Instance
void OnRefresh(wxCommandEvent &event)
virtual ~CValidateFrame()
Destructor.
void CreateControls()
Creates the controls and sizers.
void OnSequester(wxCommandEvent &event)
void OnReport(wxCommandEvent &event)
static void GetInstance(wxWindow *parent, IWorkbench *workbench, CRef< objects::CUser_object > params, wxWindowID id=17000, const wxString &caption=_("Validation Errors"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(900, 600), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxTAB_TRAVERSAL)
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
virtual void LoadSettings()
void OnUpdateDoneBtn(wxUpdateUIEvent &event)
bool Create(wxWindow *parent, wxWindowID id=17000, const wxString &caption=_("Validation Errors"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(900, 600), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxTAB_TRAVERSAL)
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
virtual void SetRegistryPath(const string ®_path)
void GetSelected(set< objects::CBioseq_Handle > &selected)
void UpdateParams(CRef< objects::CUser_object > params)
TConstScopedObjects GetObjects()
void GetTopSeqAndSeqSubmit(objects::CSeq_entry_Handle &top_seq_entry, CConstRef< objects::CSeq_submit > &seq_submit)
CRef< CObjectFor< objects::CValidError::TErrs > > GetErrors()
CRef< objects::CScope > GetScope()
void SetWorkDir(const wxString &workDir)
Undo/Redo interface for editing operations.
IWorkbench is the central interface in the application framework.
IMPLEMENT_CLASS(CFloatingFrame, CFloatingFrameBaseClass) const static long kFloatFrameStyle
CFloatingFrame.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
const string & GetMsg(void) const
Get message string.
virtual const char * what(void) const noexcept
Standard report (includes full backlog).
CIRef< T > GetServiceByType()
retrieves a typed reference to a service, the name of C++ type is used as the name of the service.
vector< SConstScopedObject > TConstScopedObjects
CScope & GetScope(void) const
Get scope this handle belongs to.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
list< CRef< CProjectItem > > TItems
bool CanGetItems(void) const
Check if it is safe to call GetItems method.
const TItems & GetItems(void) const
Get the Items member data.
void ReportUsage(const wxString &dialog_name)
Report opening & accepting events in the editing package.
const struct ncbi::grid::netcache::search::fields::SIZE size
static const char * kInternalIndexerRegistry
static const char * kInternalIndexerRegistryType
static const char * kFramePosX
static const char * kFrameHeight
static const char * kValidateGenomes
static const char * kFramePosY
static const char * kFrameWidth
#define ID_VALIDATE_FRAME_DONE_BTN
#define ID_VALIDATE_FRAME_REPORT_BTN
#define ID_VALIDATE_FRAME_REFRESH
#define ID_VALIDATE_FRAME_SEGREGATE_BTN
#define ID_VALIDATE_FRAME_SEQUESTER_BTN
#define SYMBOL_VALIDATE_FRAME_SIZE
#define ID_VALIDATE_FRAME_GENOMES_CHKBOX
#define ID_VALIDATE_FRAME_DISMISS
wxRect GetScreenRect(const wxWindow &win)