/*------------------------------------------------------------------------------
 src/bin/djview/djImageOpStack.h

 Copyright (c) 2004-2006 Darby Johnston.
 All rights reserved.
 Use is subject to license terms.
------------------------------------------------------------------------------*/

#ifndef DJ_IMAGE_OP_STACK_H
#define DJ_IMAGE_OP_STACK_H
#include <djBase.h>

namespace dj {

class ImageOp;

// Image operation stack.
//
class ImageOpStack {
public:
  
  ImageOpStack();
  ~ImageOpStack();
  
  // Stacks.
  //
  void stackNew(const Str & = Str());
  bool stackCopy(int stack);
  bool stackDel(int stack);
  bool stackName(const Str & name, int stack);
  bool stackLeft(int stack);
  bool stackRight(int stack);
  int stackSize() const { return _stackList.size(); }
  const Str & stackName(int in) const { return _nameList[in]; }
  const List<ImageOp *> & stack(int in) const { return _stackList[in]; }
  
  // Operations.
  //
  bool opNew(const Str &, int stack);
  bool opCopy(int, int stack);
  bool opDel(int, int stack);
  bool opLeft(int, int stack);
  bool opRight(int, int stack);

private:

  StrList _nameList;
  List<List<ImageOp *> > _stackList;
};

}

#endif
