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

#ifndef DJ_IMAGE_IO_PPM_WIDGET_H
#define DJ_IMAGE_IO_PPM_WIDGET_H
#include <djImageIoPpm.h>
#include <djEnumWidget.h>
#include <djImageIoWidget.h>

namespace dj {
namespace ImageIoPpm {

// Image save widget.
//
class SaveWidget : public ImageSaveWidget {
public:

  SaveWidget();
  
  const Str name() const { return ImageIoPpm::name(); }
  Plugin * copy() const { return new SaveWidget; }
  
  void set(ImageSave *);
  void widgetUpdate();
  
private:

  DJ_CALLBACK(SaveWidget, modeCallback, Save::MODE)

  EnumWidget<Save::MODE> * _modeWidget;
  bool _callbacks;
};

}
}

#endif
