NCBI C++ ToolKit
Public Member Functions | List of all members
IEditObject Class Referenceabstract

Search Toolkit Book for IEditObject

GUI editing interface. More...

#include <gui/widgets/edit/edit_object.hpp>

+ Inheritance diagram for IEditObject:

Public Member Functions

virtual ~IEditObject ()
 
virtual wxWindow * CreateWindow (wxWindow *parent)=0
 creates a child (not top level) windows that can contain whatever controls/subwindows etc. More...
 
virtual IEditCommandGetEditCommand ()=0
 After placing the window in the Edit Object Dialog ShowModal() method of the dialog is called. More...
 
virtual bool CanClose ()
 

Detailed Description

GUI editing interface.

Implementations of this interface needs to register with CInterfaceRegistry (Example: edit_object_seq_feat.cpp implements CEditObjectSeq_feat for CSeq_feat) Declarations if objects used in Interface Registry are in file interface_registry.hpp

When we want to use the interface and we have C++Toolkit object and CScope we request interface via CreateObjectInterface<IEditObject>( TConstScopedObject obj, NULL). (Example: CProjectView::OnEditSelection(), file project_view_impl.cpp). If the interface is registered for this C++Toolkit class we get it and use it.

See also
IEditCommand, IUndoManager, CInterfaceRegistry

Definition at line 62 of file edit_object.hpp.

Constructor & Destructor Documentation

◆ ~IEditObject()

virtual IEditObject::~IEditObject ( )
inlinevirtual

Definition at line 65 of file edit_object.hpp.

Member Function Documentation

◆ CanClose()

virtual bool IEditObject::CanClose ( )
inlinevirtual

Reimplemented in CEditObjectSeq_feat.

Definition at line 80 of file edit_object.hpp.

◆ CreateWindow()

virtual wxWindow* IEditObject::CreateWindow ( wxWindow *  parent)
pure virtual

creates a child (not top level) windows that can contain whatever controls/subwindows etc.

needed to edit an object. This window is placed in a placeholder of Edit Object Dialog (top level window). In the future we can present this window somewhere else (GBench view for example).

Implemented in CEditObjectSubmit_block, CEditObjectSet, CEditObjectSeq_feat, CEditObjectSeq_desc, and CEditObjectFeaturePropagate.

◆ GetEditCommand()

virtual IEditCommand* IEditObject::GetEditCommand ( )
pure virtual

After placing the window in the Edit Object Dialog ShowModal() method of the dialog is called.

If OK button is called the second method of IEditObject dialog is called which returns object derived from IEditCommand. This object implements actual modifications of original object in the Project/Document via Execute() method.

Implemented in CEditObjectSubmit_block, CEditObjectSet, CEditObjectSeq_feat, CEditObjectSeq_desc, and CEditObjectFeaturePropagate.


The documentation for this class was generated from the following file:
Modified on Fri Sep 20 14:58:15 2024 by modify_doxy.py rev. 669887