/***************************** LICENSE START ***********************************

 Copyright 2012 ECMWF and INPE. This software is distributed under the terms
 of the Apache License version 2.0. In applying this license, ECMWF does not
 waive the privileges and immunities granted to it by virtue of its status as
 an Intergovernmental Organization or submit itself to any jurisdiction.

 ***************************** LICENSE END *************************************/

// File EditorTool.h
// Baudouin Raoult - ECMWF Jul 99

#ifndef EditorTool_H
#define EditorTool_H

#ifndef Drawer_H
#include "Drawer.h"
#endif

class Editor;
class IconClass;


#ifndef Editor_H
#include "Editor.h"
#endif

class EditorTool {
public:

// -- Exceptions
	// None

	EditorTool(Editor&,const string&);

// -- Destructor

	virtual ~EditorTool(); // Change to virtual if base class

// -- Convertors
	// None

// -- Operators
	// None

// -- Methods
	virtual void edit(IconObject*);
	// ---


// -- Overridden methods
	// None	
	  

// -- Class members
	// None

// -- Class method

protected:

// -- Contructors


// -- Members
       
	Editor& editor_;
	string name_;
	

// -- Methods
	
	// void print(ostream&) const; // Change to virtual if base class	

// -- Overridden methods
	// None

// -- Class members
	// None

// -- Class methods
	// None

private:

// No copy allowed

	EditorTool(const EditorTool&);
	EditorTool& operator=(const EditorTool&);

// -- Members
	

// -- Methods


// -- Overridden methods


// -- Class members


// -- Class methods
	// None

// -- Friends

	//friend ostream& operator<<(ostream& s,const EditorTool& p)
	//	{ p.print(s); return s; }

};


#if 0

template<class T>
class XEditorTool : public EditorTool, public T {
	virtual Widget widget() { return T::xd_rootwidget(); }
public:
	XEditorTool(Editor& e,const char* name = 0) : EditorTool(e)
	{
		T::create(e.tool(), const_cast<char*>(name));
		XtManageChild(T::xd_rootwidget());
	}
};

#endif

#endif
