Cadabra
Computer algebra system for field theory problems
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
cadabra::ActionOpen Class Reference

Description

Open a notebook from a file, in the current window.

#include <Actions.hh>

Inheritance diagram for cadabra::ActionOpen:
cadabra::ActionBase

Public Member Functions

 ActionOpen (const std::string &)
 
virtual ~ActionOpen ()
 
virtual void execute (DocumentThread &, GUIBase &) override
 Perform the action.
 
virtual void revert (DocumentThread &, GUIBase &) override
 Revert the change to the DTree document and the GUI.
 
virtual bool undoable () const override
 Can this action be undone?
 
- Public Member Functions inherited from cadabra::ActionBase
 ActionBase (DataCell::id_t ref_id)
 

Private Attributes

std::string notebook_name
 

Additional Inherited Members

- Public Attributes inherited from cadabra::ActionBase
DataCell::id_t ref_id
 
std::function< void()> callback
 If you want a callback once this action has finished, set it here before queuing.
 
- Protected Attributes inherited from cadabra::ActionBase
DTree::iterator ref
 

Constructor & Destructor Documentation

◆ ActionOpen()

ActionOpen::ActionOpen ( const std::string &  n)

◆ ~ActionOpen()

ActionOpen::~ActionOpen ( )
virtual

Member Function Documentation

◆ execute()

void ActionOpen::execute ( DocumentThread cl,
GUIBase  
)
overridevirtual

Perform the action.

This should update both the document tree data structure and the GUI. The latter is updated by calling relevant methods on the GUIBase object passed in.

The base class just looks up the cell given its id_t. If your action does not refer to a cell at all, you do not need to call the base class execute.

Reimplemented from cadabra::ActionBase.

◆ revert()

void ActionOpen::revert ( DocumentThread ,
GUIBase  
)
overridevirtual

Revert the change to the DTree document and the GUI.

Implements cadabra::ActionBase.

◆ undoable()

bool ActionOpen::undoable ( ) const
overridevirtual

Can this action be undone?

Reimplemented from cadabra::ActionBase.

Member Data Documentation

◆ notebook_name

std::string cadabra::ActionOpen::notebook_name
private

The documentation for this class was generated from the following files: