72 "The Dot Matrix View shows a dot-plot of a given alignment",
98 wxMenu* view_menu =
new wxMenu();
99 wxMenu* dm_menu =
new wxMenu();
104 view_menu->Append(
wxID_ANY,
wxT(
"Dot Matrix"), dm_menu);
106 wxMenu* bar_menu =
new wxMenu();
107 bar_menu->Append(
wxID_ANY,
wxT(
"&View"), view_menu );
165 const CObject*
object = it->object.GetPointer();
176 if( aligns.size() > 0 ){
180 return objects[0].scope.GetPointer();
213 if(! s_coll.
empty()) {
222 if(! q_coll.
empty()) {
288 vector<const CSeq_align*> sel_aligns;
296 const IHit& hit = **it_hit;
301 sel_aligns.push_back(&align);
314 ERR_POST(
Error <<
"CDotMatrixView: no data source while trying to GetVisibleRanges()" );
379 static string sid(
"dot_matrix_view_factory");
385 static string slabel(
"Dot Matrix View Factory");
421 bool found_good =
false;
422 bool found_bad =
false;
425 const type_info&
type =
typeid(*obj);
429 vector< CConstRef<objects::CSeq_align> > aligns;
431 if (aligns.size() > 0)
449 size_t num_objects =
objects.size();
450 if (num_objects == 0)
451 return vector<int>();
453 return vector<int>(num_objects, 0);
CRangeCollection< TSeqPos > TRangeColl
std::invoke_result< _Fty, ICanceled & >::type GUI_AsyncExec(_Fty &&_Fnarg, const wxString &msg=wxT("Accessing network..."))
CIRef< IHitMatrixDataSource > CreateDataSource()
void Init(objects::CScope &scope, const objects::CSeq_align &align)
initial data set from which an alignment will be build
virtual void OnProjectChanged()
virtual void x_UpdateContentLabel()
virtual CRef< objects::CScope > GetScope() const
unique_ptr< const wxMenu > m_MenuBarMenu
virtual objects::CScope * x_GetScope() const
virtual bool x_HasProject() const
EEventSubtype GetSubtype() const
CProjectViewTypeDescriptor - holds description of a project view type.
CSelectionEvent CSelectionEvent is used for broadcasting selection between views.
bool HasRangeSelection() const
Range Selection - represents a collection of selected segments.
void GetAllObjects(TConstObjects &objs) const
void AddRangeSelection(const objects::CSeq_id &id, const TRangeColl &segs)
static bool Match(const CObject &obj1, objects::CScope &scope1, const CObject &obj2, objects::CScope &scope2)
objects::CScope & GetScope()
const objects::CHandleRangeMap & GetRangeSelection() const
bool HasObjectSelection()
Object Selection - represents select Objects (such as features, alignments, etc)
bool AddObjectSelection(const CObject &obj)
CUICommandRegistry is a centralized registry where all application commands should be registered.
wxMenuItem * AppendMenuItem(wxMenu &menu, TCmdID cmd_id) const
EEventType GetType() const
CViewTypeDescriptor - holds description of a view type.
bool Clamp(const objects::CBioseq_Handle &handle, TSeqRange &range) const
Alter the supplied range according to the rules provided in the policy and the supplied new location.
bool Match(const objects::CSeq_id &id) const
See if we can match the supplied range.
void AddLocation(const objects::CSeq_loc &loc)
Interface for testing cancellation request in a long lasting operation.
vector< IHit * > THitAdapterCont
virtual const objects::CSeq_align * GetSeqAlign() const =0
virtual const CViewTypeDescriptor & GetViewTypeDescriptor() const
returns a Descriptor for the View Type supported by the Factory
IView - represents a standard visual part of Workbench UI.
IVisibleRangeClient - represents an object that wants notifications about visible range changes.
CFingerprint identifies an instance of IWMClient and is used for labeling layout positions.
virtual void RegisterFileAlias(const wxArtID &anId, const wxArtClient &aClient, const wxSize &aSize, const wxString &aName, long aType=wxBITMAP_TYPE_ANY, int anIndex=-1)
unsigned int TSeqPos
Type for sequence locations and lengths.
#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.
void Error(CExceptionArgs_Base &args)
virtual CUICommandRegistry & GetUICommandRegistry()=0
returns an instance of Command Registry associated with the Workbench
static CRef< objects::CSeq_loc > CreateSeq_loc(const objects::CSeq_id &id, const CRangeCollection< TSeqPos > &ranges)
TModelRect & GetVisibleRect(void)
virtual wxWindow * GetWindow()
returns a pointer to the wxWindow representing the client
virtual const CViewTypeDescriptor & GetTypeDescriptor() const
return an object providing meta information about thei view type
virtual IView * CreateInstanceByFingerprint(const TFingerprint &fingerprint) const
if fingerprint is recognized - creates and returns a new instance
CIRef< IHitMatrixDataSource > m_DataSource
virtual const CObject * x_GetOrigObject() const
virtual IView * CreateInstance() const
creates a view instance
CDotMatrixViewFactory()
CDotMatrixViewFactory.
void GetSelection(CSelectionEvent &evt) const
get selection for broadcasting
virtual void OnVisibleRangeChanged(const CVisibleRange &vrange, IVisibleRangeClient *source)
virtual vector< int > CombineInputObjects(const TConstScopedObjects &objects)
CHitMatrixWidget * m_AlnWidget
virtual void x_OnSetSelection(CSelectionEvent &evt)
override in derived classes in order to handle selection broadcast
virtual void DestroyViewWindow()
destroy Window corresponding to the view
virtual string GetExtensionIdentifier() const
returns the unique human-readable identifier for the extension the id should use lowercase letters se...
virtual const CProjectViewTypeDescriptor & GetProjectViewTypeDescriptor() const
returns a Descriptor for the View Type supported by the Factory
virtual int TestInputObjects(TConstScopedObjects &objects)
tests input objects (probably using object conversion, or not) and returns a combination of ETestResu...
virtual objects::CScope * x_PreAttachToProject(TConstScopedObjects &objects)
virtual string GetExtensionLabel() const
returns a displayable label for this extension ( please capitalize the key words - "My Extension" )
vector< CConstRef< objects::CSeq_align > > TAlignVector
virtual void CreateViewWindow(wxWindow *parent)
create Window corresponding to the view
virtual void RegisterIconAliases(wxFileArtProvider &provider)
called by the framework to give Factory a chance to register images used by view
virtual void x_PostAttachToProject()
virtual void RegisterCommands(CUICommandRegistry &cmd_reg, wxFileArtProvider &provider)
called by the framework to give Factory a chance to register commands used by view
virtual void x_CreateMenuBarMenu()
initializes m_MenuBarMenu; override in derived classes
virtual void GetVisibleRanges(CVisibleRange &vrange) const
populate a visible range event for broadcasting
static CProjectViewTypeDescriptor m_TypeDescr
vector< CConstRef< CObject > > TConstObjects
virtual const string & GetIconAlias() const
virtual void AddListener(CEventHandler *listener, int pool_name=ePool_Default)
Add a listener.
vector< SConstScopedObject > TConstScopedObjects
void SetId(CSeq_id &id)
set the 'id' field in all parts of this location
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
void Reset(void)
Reset reference object.
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.
range(_Ty, _Ty) -> range< _Ty >
const CharType(& source)[N]
@ eSimilarObjectsAccepted
void ExtractSeqAligns(const T &obj, vector< CConstRef< objects::CSeq_align > > &aligns)
This is the place where elements of the new Alignment Library will be collected.
wxString ToWxString(const string &s)