/***************************** 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 IconLine.h
// Baudouin Raoult - ECMWF Jul 99

#ifndef IconLine_H
#define IconLine_H

#ifndef UIIconLine_H
#include "UIIconLine.h"
#endif

#ifndef RequestPanelLine_H
#include "RequestPanelLine.h"
#endif


#ifndef IconHolder_H
#include "IconHolder.h"
#endif


class IconLine : public XRequestPanelLine<UIIconLine_c>, public IconHolder {
public:

// -- Exceptions
	// None

// -- Contructors

	IconLine(RequestPanel&,const Parameter&);

// -- Destructor

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

// -- Convertors
	// None

// -- Operators
	// None

// -- Methods

	virtual void update();
	virtual void reset();
	virtual void apply();
	
	virtual void init(Widget);
	virtual void set(Request&);

// -- Overridden methods
	// None

// -- Class members
	// None

protected:

// -- Members


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

// -- Overridden methods
	// None

// -- Class members
	// None

// -- Class methods
	// None

private:

// No copy allowed

	IconLine(const IconLine&);
	IconLine& operator=(const IconLine&);

// -- Members
	bool unique_;
	vector<string> accept_;
	vector<string> classes_;

	

// -- Methods
	// None


// -- Overridden methods

	virtual void editCB(Widget,XtPointer);
	virtual void removeCB(Widget,XtPointer);
	virtual void newIconCB(Widget,XtPointer);
	virtual void openHiddenCB(Widget,XtPointer);

	// From IconHolder
	virtual bool accept(IconObject*);

	//from DragWindow
	virtual Widget menu();
	virtual bool dropCopy() { return true; }

	// From DropSite
	virtual void drop(Dropping&);



// -- Class members
	// None

// -- Class methods
	// None

// -- Friends

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

};

inline void destroy(IconLine**) {}

// If persistent, uncomment, otherwise remove
//#ifdef _ODI_OSSG_
//OS_MARK_SCHEMA_TYPE(IconLine);
//#endif

#endif
