Cadabra
Computer algebra system for field theory problems
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Public Member Functions | Private Attributes | List of all members
cadabra::ActionPositionCursor Class Reference

Description

Position the cursor relative to the indicated cell.

If position is 'next' and there is no input cell following the indicated one, create a new one.

#include <Actions.hh>

Inheritance diagram for cadabra::ActionPositionCursor:
cadabra::ActionBase

Public Types

enum  Position { Position::in, Position::next, Position::previous }
 

Public Member Functions

 ActionPositionCursor (DTree::iterator ref_, Position pos_)
 
virtual void execute (DocumentThread &, GUIBase &) override
 Perform the action. More...
 
virtual void revert (DocumentThread &, GUIBase &) override
 Revert the change to the DTree document and the GUI. More...
 
- Public Member Functions inherited from cadabra::ActionBase
virtual bool undoable () const
 Can this action be undone? More...
 

Private Attributes

bool needed_new_cell
 
DTree::iterator ref
 
DTree::iterator newref
 
Position pos
 

Member Enumeration Documentation

Enumerator
in 
next 
previous 

Constructor & Destructor Documentation

ActionPositionCursor::ActionPositionCursor ( DTree::iterator  ref_,
Position  pos_ 
)

Member Function Documentation

void ActionPositionCursor::execute ( DocumentThread &  ,
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.

Implements cadabra::ActionBase.

void ActionPositionCursor::revert ( DocumentThread &  ,
GUIBase &   
)
overridevirtual

Revert the change to the DTree document and the GUI.

Implements cadabra::ActionBase.

Member Data Documentation

bool cadabra::ActionPositionCursor::needed_new_cell
private
DTree::iterator cadabra::ActionPositionCursor::newref
private
Position cadabra::ActionPositionCursor::pos
private
DTree::iterator cadabra::ActionPositionCursor::ref
private

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