vector<TConstScopedObjects>
objects;
87sel_srv->GetActiveObjects(
objects);
90 NcbiInfoBox(
"Please select objects you would like to run a tool on!");
95vector< CIRef<IUIAlgoToolManager> > managers;
98 if(!toolLabel.empty()) {
99 for(
size_t i=0;
i< managers.size();
i++ ){
100TManagerRef manager = managers[
i];
101 if(manager->GetDescriptor().GetLabel() == toolLabel) {
103managers.push_back(manager);
130::wxBeginBusyCursor();
133vector<TConstScopedObjects>
objects;
135sel_srv->GetActiveObjects(
objects);
138 NcbiInfoBox(
"Please select objects you would like to export!");
142vector<IExporterFactory*> factories;
148objs.insert(objs.end(), it->begin(), it->end());
159 if(projectService) {
160 if(objs.size() == 1 && objs[0].object && objs[0].scope) {
166 ITERATE(vector<IExporterFactory*>, it, factories) {
167 if((*it)->TestInputObjects(objs)) {
169exporter->SetLocations(
map);
170exporter->SetObjects(objs);
171exporter->SetFileName(fileName);
176 if(managers.empty()) {
177 NcbiInfoBox(
"No exporters defined that can export selected objects!");
185dlg.SetSize(710, 480);
194 if(dlg.ShowModal() == wxID_OK) {
211 const CSeq_id*
id=
dynamic_cast<const CSeq_id*
>(itr->object.GetPointer());
213itr->scope->GetBioseqHandle(*
id);
217 const CSeq_loc* loc =
dynamic_cast<const CSeq_loc*
>(itr->object.GetPointer());
219itr->scope->GetBioseqHandle(*loc);
223 const CBioseq* seq =
dynamic_cast<const CBioseq*
>(itr->object.GetPointer());
225itr->scope->GetBioseqHandle(*seq);
240itr->scope->GetSeq_featHandle(*feat);
251 const CSeq_id*
id=
dynamic_cast<const CSeq_id*
>(
object.object.GetPointer() );
252 const CSeq_loc* loc =
dynamic_cast<const CSeq_loc*
>(
object.object.GetPointer() );
253 const CBioseq* seq =
dynamic_cast<const CBioseq*
>(
object.object.GetPointer() );
256handle =
object.scope->GetBioseqHandle(*
id);
259handle =
object.scope->GetBioseqHandle(*loc);
262handle =
object.scope->GetBioseqHandle(*seq);
268warning_msg =
"this record has been removed or withdrawn.";
276warning_msg =
"this record has been replaced by: ";
282(*seq_iter)->Which() ==
CSeq_id::e_Other&& (*seq_iter)->GetOther().IsSetAccession()
284id_label = (*seq_iter)->GetOther().GetAccession();
285 if( (*seq_iter)->GetOther().IsSetVersion() ){
291 if( id_label.empty() ){
294warning_msg += id_label +
" ";
298 if( !warning_msg.empty() ){
299 static boolshowDialog =
true;
303 stringviewed_id_label;
305 stringbase =
"Opening record "+ viewed_id_label +
". Please be aware of that ";
307wxRichMessageDialog dlg(
NULL,
ToWxString(base + warning_msg),
wxT(
"Warning"), wxOK|wxICON_EXCLAMATION);
308dlg.ShowCheckBox(
wxT(
"Don't show this dialog in the current session"));
310 if(dlg.IsCheckBoxChecked())
321sel_srv->GetActiveObjects(
objects);
324 NcbiWarningBox(
"Please select objects you would like to view.");
333 stringdefaultFactoryLabel;
344 for(
size_t i= 0;
i< factories.size();
i++ ){
348prj_factories.push_back(ref);
353defaultFactory.
Reset(prj_fc);
358 if(openDefault && defaultFactory) {
360 stringview_name = pvt_desc.
GetLabel();
365 if( prefetch_needed ){
369 catch(
constexception&) {}
372 for(
size_tj = 0; j <
objects.size(); j++) {
375}
NCBI_CATCH(
"CAppDialogs::OpenViewlDialog");
404 if( dlg.ShowModal() == wxID_OK ){
408 stringview_name = pvt_desc.
GetLabel();
430 if( prefetch_needed ){
433}
catch(
constexception&) {}
436 for(
size_tj = 0; j <
objects.size(); j++)
439 catch(
constexception&) {}
444 for(
size_tix = 0; ix <
objects.size(); ix++ ){
445 intgroup_ix = ix < indices.
size() ? indices[ix] : -1;
456}
else if( opened_groups.
find( group_ix ) == opened_groups.
end() ){
457opened_groups.
insert( group_ix );
464 for(
size_tj = ix; j < indices.size(); j++ ){
465 if( indices[j] == group_ix ){
466obj_group.push_back(
objects[j] );
492srv->GetLoadManagers(managers);
498dlg.SetSize(710, 480);
502 if(!loader_label.empty()) {
510 if(dlg.ShowModal() == wxID_OK) {
User-defined methods of the data storage class.
User-defined methods of the data storage class.
static const char * kRunToolDlgSection
static void s_CheckDataStatus(SConstScopedObject &object)
static const char * kOpenViewDlgSection
std::invoke_result< _Fty, ICanceled & >::type GUI_AsyncExec(_Fty &&_Fnarg, const wxString &msg=wxT("Accessing network..."))
void AsyncConvertObjects(const CTypeInfo *typeInfo, const TConstScopedObjects &inputObjects, map< string, TConstScopedObjects > &results)
static void RunToolDialog(IWorkbench *workbench, const string &toolLabel=NcbiEmptyString)
static void ExportDialog(IWorkbench *workbench)
static void OpenViewlDialog(IWorkbench *workbench, bool openDefault=false)
static void COpenDialog(IWorkbench *workbench, const string &loader_label=NcbiEmptyString, const vector< wxString > &filenames=vector< wxString >())
void GetLabel(string *label, ELabelType type, bool worst=false) const
bool RecordKnown(const objects::CBioseq_Handle &handle)
Check if the record is in the cache.
static CGiCache & GetInstance()
retrieve a singleton.
virtual void SelectOptionByLabel(const string &label)
select loading options By Extension ID
virtual void SetRegistryPath(const string &path)
virtual void SetManagers(vector< TManagerRef > &managers)
virtual void SetFilenames(const vector< wxString > &filenames)
void SetBaseTitle(wxString value)
virtual CIRef< IAppTask > GetLoadingTask()
virtual void SetServiceLocator(IServiceLocator *srv_locator)
const vector< int > GetOutputIndices() const
static string GetDefaultFactoryLabel(const string ®_path, TConstScopedObjects &objects)
vector< TFactoryRef > TFactories
const TConstScopedObjects & GetOutputObjects() const
virtual void SetRegistryPath(const string &path)
void SetInputObjects(const TConstScopedObjects &input_objects)
TFactoryRef GetSelectedFactory()
void SetFactories(TFactories &factories)
CProjectService - a service providing API for operations with Workspaces and Projects.
CIRef< IProjectView > AddProjectView(const string &view_name, SConstScopedObject &object, const objects::CUser_object *params, bool bFloat=false)
const objects::CProjectItem * GetProjectItem(const CObject &object, objects::CScope &scope)
CProjectViewTypeDescriptor - holds description of a project view type.
EPVObjectsAccepted GetObjectsAccepted() const
bool IsPrefetchNeeded() const
namespace ncbi::objects::
vector< TUIToolManagerRef > TUIToolManagerVec
Interface for testing cancellation request in a long lasting operation.
virtual const CViewTypeDescriptor & GetViewTypeDescriptor() const
returns a Descriptor for the View Type supported by the Factory
virtual int TestInputObjects(TConstScopedObjects &objects)=0
tests input objects (not using object conversion) and returns a combination of ETestResult flags bett...
virtual bool ShowInOpenViewDlg() const
IViewManagerService IViewManagerService manages views in Workbench.
IWorkbench is the central interface in the application framework.
iterator_bool insert(const value_type &val)
const_iterator find(const key_type &key) const
const_iterator end() const
#define test(a, b, c, d, e)
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
#define NCBI_CATCH(message)
Catch CExceptions as well This macro is deprecated - use *_X or *_XX variant instead of it.
const string & GetMsg(void) const
Get message string.
void Info(CExceptionArgs_Base &args)
virtual wxFrame * GetMainWindow()=0
returns a pointer to the main application frame window
CIRef< T > GetServiceByType()
retrieves a typed reference to a service, the name of C++ type is used as the name of the service.
void AddTask(IAppTask &task)
Add a task to the queue.
virtual string GetRegistrySectionPath(ERegistrySection section)=0
returns a path to CGuiRegistry section where resources of the specified type shall be located
vector< CIRef< IViewFactory > > TFactories
virtual IViewManagerService * GetViewManagerService()=0
virtual void GetFactories(TFactories &factories)=0
virtual CAppTaskService * GetAppTaskService()=0
EDialogReturnValue NcbiInfoBox(const string &message, const string &title="Info")
specialized Message Box function for reporting general information messages
void GetExtensionAsInterface(const string &ext_point_id, vector< CIRef< I > > &interfaces)
GetExtensionAsInterface() is a helper function that extracts all extensions implementing the specifie...
void NcbiWarningBox(const string &message, const string &title="Warning")
specialized Message Box function for reporting non-critical errors
void NcbiErrorBox(const string &message, const string &title="Error")
specialized Message Box function for reporting critical errors
virtual const string & GetLabel() const
vector< SConstScopedObject > TConstScopedObjects
@ eFasta
Tagged ID in NCBI's traditional FASTA style.
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
const TInst_Hist & GetInst_Hist(void) const
CConstRef< CBioseq > GetCompleteBioseq(void) const
Get the complete bioseq.
bool IsSetInst_Hist(void) const
bool IsSetInst(void) const
CScope & GetScope(void) const
Get scope this handle belongs to.
bool State_Suppressed(void) const
bool State_Withdrawn(void) const
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 string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
void Stop(void)
Suspend the timer.
string AsSmartString(CTimeSpan::ESmartStringPrecision precision, ERound rounding, CTimeSpan::ESmartStringZeroMode zero_mode=CTimeSpan::eSSZ_SkipZero) const
Transform elapsed time to "smart" string.
@ eStart
Start timer immediately after creating.
@ e_Other
for historical reasons, 'other' = 'refseq'
bool IsSetReplaced_by(void) const
these seqs make this one obsolete Check if a value has been assigned to Replaced_by data member.
const TId & GetId(void) const
Get the Id member data.
list< CRef< CSeq_id > > TId
list< CRef< CSeq_id > > TIds
const TIds & GetIds(void) const
Get the Ids member data.
const TReplaced_by & GetReplaced_by(void) const
Get the Replaced_by member data.
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