Source: addon.h

# Source: addon.h |
Annotated List
Files
Globals
Hierarchy
Index

    #ifndef _ADDON_H_
    #define _ADDON_H_

    #include "operation.h"

    class Table;
    class Part;
    class Track;
    class Song;

    /** This is the base class for all addons.
     * Beware: If your addon is of the type TO_BE_UNDONE, don't use other operations within your addon!
     */
    class Addon : public Operation
    {

     protected:
      Element * _target;
      int _context;

     public:

      static const bool TO_BE_UNDONE = true;
      static const int TREAT_SELECTION =  1;
      static const int TREAT_PART      =  2;
      static const int TREAT_TRACK     =  4;
      static const int TREAT_SONG      =  8;
      static const int TREAT_GLOBAL    = 16;
      static const int TREAT_ALL       = TREAT_SELECTION + TREAT_PART + TREAT_TRACK + TREAT_SONG + TREAT_GLOBAL;

      Addon(char*,Element*,bool,int);

      virtual ~Addon();

      virtual void undo();

      virtual void redo();

      virtual void selection(Table * selection);
      virtual void part(Part * part);
      virtual void track(Track * track);
      virtual void song(Song * song);
      virtual void global();

      void run();
      int context();
      bool context(int);

      virtual ostream & print(int,ostream&) const;
      virtual void flush(const char*) const;
      virtual Element * copy() const;

    };

    #endif

Generated by: wuerthne on clouseau on Fri Sep 21 19:20:46 2001, using kdoc 2.0a53.