NCBI C++ ToolKit
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
CDesktopViewContext Class Reference

Search Toolkit Book for CDesktopViewContext

#include <gui/widgets/seq_desktop/desktop_view_context.hpp>

+ Inheritance diagram for CDesktopViewContext:
+ Collaboration diagram for CDesktopViewContext:

Public Types

enum  ESavedObjectType {
  eSavedObjectType_not_set , eSavedObjectType_Bioseq , eSavedObjectType_Bioseqset , eSavedObjectType_ContactInfo ,
  eSavedObjectType_CitSub , eSavedObjectType_Seqdesc , eSavedObjectType_SeqAnnot , eSavedObjectType_SeqFeat ,
  eSavedObjectType_SeqAlign , eSavedObjectType_SeqGraph
}
 

Public Member Functions

 CDesktopViewContext (IBioseqEditor *bioseqEditor, ICommandProccessor &cmdProccessor, const CSerialObject *saved_object=nullptr, ESavedObjectType saved_type=eSavedObjectType_not_set)
 
 ~CDesktopViewContext ()
 
wxMenu * CreateMenu () const
 
void SetCanvas (CDesktopCanvas *canvas)
 
void OnCutSelection (wxCommandEvent &event)
 
void OnCopySelection (wxCommandEvent &event)
 
void OnPasteSelection (wxCommandEvent &event)
 
void OnUpdateCutSelection (wxUpdateUIEvent &event)
 
void OnUpdateCopySelection (wxUpdateUIEvent &event)
 
void OnUpdatePasteSelection (wxUpdateUIEvent &event)
 
const CSerialObjectGetSavedObject () const
 
ESavedObjectType GetSavedObjectType () const
 
void EditSelection ()
 
IBioseqEditorCB interface implementation
virtual void GetItemSelection (TFlatItemList &)
 
virtual void GetCurrentSelection (TEditObjectList &)
 
virtual objects::CBioseq_Handle GetCurrentBioseq ()
 
virtual wxString GetWorkDir () const
 
- Public Member Functions inherited from IBioseqEditorCB
virtual ~IBioseqEditorCB ()
 
virtual bool MayCreateFeatures () const
 

Private Member Functions

 DECLARE_EVENT_TABLE ()
 
CConstRef< IDesktopDataItemx_GetSelectedDataItem () const
 
void x_UpdateCutCopySelection (wxUpdateUIEvent &event)
 

Private Attributes

objects::CBioseq_Handle m_CurBioseq
 
CIRef< IBioseqEditorm_BioseqEditor
 
ICommandProccessorm_CmdProccessor
 
CDesktopCanvasm_Canvas
 
CConstRef< CSerialObjectm_SavedObject
 Saved object resulting from a Cut/Copy operation. More...
 
ESavedObjectType m_SavedType
 Type of the saved object resulting from a Cut/Copy operation. More...
 

Detailed Description

Definition at line 46 of file desktop_view_context.hpp.

Member Enumeration Documentation

◆ ESavedObjectType

Enumerator
eSavedObjectType_not_set 
eSavedObjectType_Bioseq 
eSavedObjectType_Bioseqset 
eSavedObjectType_ContactInfo 
eSavedObjectType_CitSub 
eSavedObjectType_Seqdesc 
eSavedObjectType_SeqAnnot 
eSavedObjectType_SeqFeat 
eSavedObjectType_SeqAlign 
eSavedObjectType_SeqGraph 

Definition at line 51 of file desktop_view_context.hpp.

Constructor & Destructor Documentation

◆ CDesktopViewContext()

static CDesktopViewContext::CDesktopViewContext ( IBioseqEditor bioseqEditor,
ICommandProccessor cmdProccessor,
const CSerialObject saved_object = nullptr,
ESavedObjectType  saved_type = eSavedObjectType_not_set 
)

Definition at line 82 of file desktop_view_context.cpp.

◆ ~CDesktopViewContext()

CDesktopViewContext::~CDesktopViewContext ( )

Definition at line 93 of file desktop_view_context.cpp.

References m_BioseqEditor, and m_Canvas.

Member Function Documentation

◆ CreateMenu()

wxMenu * CDesktopViewContext::CreateMenu ( ) const

◆ DECLARE_EVENT_TABLE()

CDesktopViewContext::DECLARE_EVENT_TABLE ( )
private

◆ EditSelection()

void CDesktopViewContext::EditSelection ( )

Definition at line 531 of file desktop_view_context.cpp.

References m_BioseqEditor, and x_GetSelectedDataItem().

◆ GetCurrentBioseq()

CBioseq_Handle CDesktopViewContext::GetCurrentBioseq ( )
virtual

Implements IBioseqEditorCB.

Definition at line 157 of file desktop_view_context.cpp.

◆ GetCurrentSelection()

void CDesktopViewContext::GetCurrentSelection ( TEditObjectList objects)
virtual

◆ GetItemSelection()

virtual void CDesktopViewContext::GetItemSelection ( TFlatItemList )
inlinevirtual

Implements IBioseqEditorCB.

Definition at line 73 of file desktop_view_context.hpp.

◆ GetSavedObject()

const CSerialObject* CDesktopViewContext::GetSavedObject ( ) const
inline

◆ GetSavedObjectType()

ESavedObjectType CDesktopViewContext::GetSavedObjectType ( ) const
inline

Definition at line 89 of file desktop_view_context.hpp.

References m_SavedType.

Referenced by CSeqDesktopPanel::x_SaveSelection().

◆ GetWorkDir()

virtual wxString CDesktopViewContext::GetWorkDir ( ) const
inlinevirtual

Implements IBioseqEditorCB.

Definition at line 76 of file desktop_view_context.hpp.

◆ OnCopySelection()

void CDesktopViewContext::OnCopySelection ( wxCommandEvent &  event)

◆ OnCutSelection()

void CDesktopViewContext::OnCutSelection ( wxCommandEvent &  event)

◆ OnPasteSelection()

void CDesktopViewContext::OnPasteSelection ( wxCommandEvent &  event)

◆ OnUpdateCopySelection()

void CDesktopViewContext::OnUpdateCopySelection ( wxUpdateUIEvent &  event)

Definition at line 511 of file desktop_view_context.cpp.

References x_UpdateCutCopySelection().

◆ OnUpdateCutSelection()

void CDesktopViewContext::OnUpdateCutSelection ( wxUpdateUIEvent &  event)

Definition at line 507 of file desktop_view_context.cpp.

References x_UpdateCutCopySelection().

◆ OnUpdatePasteSelection()

void CDesktopViewContext::OnUpdatePasteSelection ( wxUpdateUIEvent &  event)

Definition at line 515 of file desktop_view_context.cpp.

References m_SavedObject.

◆ SetCanvas()

void CDesktopViewContext::SetCanvas ( CDesktopCanvas canvas)

Definition at line 117 of file desktop_view_context.cpp.

References m_BioseqEditor, and m_Canvas.

◆ x_GetSelectedDataItem()

CConstRef< IDesktopDataItem > CDesktopViewContext::x_GetSelectedDataItem ( ) const
private

◆ x_UpdateCutCopySelection()

void CDesktopViewContext::x_UpdateCutCopySelection ( wxUpdateUIEvent &  event)
private

Member Data Documentation

◆ m_BioseqEditor

CIRef<IBioseqEditor> CDesktopViewContext::m_BioseqEditor
private

◆ m_Canvas

CDesktopCanvas* CDesktopViewContext::m_Canvas
private

◆ m_CmdProccessor

ICommandProccessor& CDesktopViewContext::m_CmdProccessor
private

Definition at line 99 of file desktop_view_context.hpp.

Referenced by OnCutSelection(), and OnPasteSelection().

◆ m_CurBioseq

objects::CBioseq_Handle CDesktopViewContext::m_CurBioseq
private

Definition at line 97 of file desktop_view_context.hpp.

◆ m_SavedObject

CConstRef<CSerialObject> CDesktopViewContext::m_SavedObject
private

Saved object resulting from a Cut/Copy operation.

Definition at line 103 of file desktop_view_context.hpp.

Referenced by GetSavedObject(), OnCopySelection(), OnCutSelection(), OnPasteSelection(), and OnUpdatePasteSelection().

◆ m_SavedType

ESavedObjectType CDesktopViewContext::m_SavedType
private

Type of the saved object resulting from a Cut/Copy operation.

Definition at line 105 of file desktop_view_context.hpp.

Referenced by GetSavedObjectType(), OnCopySelection(), OnCutSelection(), and OnPasteSelection().


The documentation for this class was generated from the following files:
Modified on Sat Jul 13 13:37:02 2024 by modify_doxy.py rev. 669887