// File generated by CPPExt (Transient)
//
//
//                     Copyright (C) 1991 - 2000 by  
//                      Matra Datavision SA.  All rights reserved.
//  
//                     Copyright (C) 2001 - 2004 by
//                     Open CASCADE SA.  All rights reserved.
// 
// This file is part of the Open CASCADE Technology software.
//
// This software may be distributed and/or modified under the terms and
// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
// and appearing in the file LICENSE included in the packaging of this file.
//  
// This software is distributed on an "AS IS" basis, without warranty of any
// kind, and Open CASCADE SA hereby disclaims all such warranties,
// including without limitation, any warranties of merchantability, fitness
// for a particular purpose or non-infringement. Please see the License for
// the specific terms and conditions governing rights and limitations under the
// License.

#ifndef _Xw_IconBox_HeaderFile
#define _Xw_IconBox_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Handle_Xw_IconBox_HeaderFile
#include <Handle_Xw_IconBox.hxx>
#endif

#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _Xw_Window_HeaderFile
#include <Xw_Window.hxx>
#endif
#ifndef _Handle_Xw_GraphicDevice_HeaderFile
#include <Handle_Xw_GraphicDevice.hxx>
#endif
#ifndef _Standard_CString_HeaderFile
#include <Standard_CString.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _Quantity_NameOfColor_HeaderFile
#include <Quantity_NameOfColor.hxx>
#endif
#ifndef _Xw_WindowQuality_HeaderFile
#include <Xw_WindowQuality.hxx>
#endif
#ifndef _Handle_Xw_Window_HeaderFile
#include <Handle_Xw_Window.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Aspect_Handle_HeaderFile
#include <Aspect_Handle.hxx>
#endif
class Aspect_WindowDefinitionError;
class Aspect_WindowError;
class Xw_GraphicDevice;
class Xw_Window;


//! This class defines a X11 IconBox <br>
//!  Warning: The IconBox is not visible at the creation time . <br>
//!	    To show the Icon Box use the method Show () . <br>
//!	    In this case the Icon Box appears at the DSU position <br>
//!	    specified given in [0,1] space . <br>
//!	    The size of the Icon Box grows depending of the number <br>
//!	    of the Icons loaded inside . <br>
class Xw_IconBox : public Xw_Window {

public:
 // Methods PUBLIC
 // 

//! Creates a IconBox n Preferred PseudoColor Visual <br>
//!	    defined by his Center in DSU and connects it to the <br>
//!	    X server at the first call depending of the GraphicDevice <br>
//!	    connexion . <br>
//!	    ALL Icons are loaded from the Icon File Directory Name : <br>
//!	    "[$SYMBOL]xxxxxxx[.ifd]" <br>
//!  Warning: Raises if the Position is out of the Screen Space <br>
//!	    or the Icon File Directory Name don't exist <br>
Standard_EXPORT Xw_IconBox(const Handle(Xw_GraphicDevice)& Device,const Standard_CString Name,const Standard_Real Xc = 0.5,const Standard_Real Yc = 0.5,const Quantity_NameOfColor BackColor = Quantity_NOC_MATRAGRAY,const Xw_WindowQuality aQuality = Xw_WQ_SAMEQUALITY);

//! Loads Icon Box from an Other Icon File Directory Name <br>
//!  and returns the loaded icons number. <br>
//!  Warning: The Icons previously loaded are NOT cleared . <br>
Standard_EXPORT   Standard_Integer LoadIcons(const Standard_CString Name) ;

//! Shows Icon Box to the screen <br>
//!  Warning: The Icon Box is displayed at the centered position <br>
//!	    specified at the creation time and the size depend <br>
//!	    of the Icon number really loaded inside . <br>
Standard_EXPORT   void Show() const;

//! Unloads All previously loaded Icons in the IconBox <br>
//!  and returns the unloaded icons number. <br>
Standard_EXPORT   Standard_Integer UnloadIcons(const Standard_CString Name) ;

//! Destroies the IconBox <br>
Standard_EXPORT virtual  void Destroy() ;
~Xw_IconBox()
{
  Destroy();
}


//! Adds an Icon of Size aWidth,aHeight given in PIXEL <br>
//!  to the Icon Box from a FULL Existing Window <br>
//!  NOTE that if aWidth or aHeight is 0 the default icon size is taken. <br>
Standard_EXPORT   void AddIcon(const Handle(Xw_Window)& W,const Standard_CString Name,const Standard_Integer aWidth = 0,const Standard_Integer aHeight = 0) ;

//!  Saves all new created Icons as iconname.xwd file in the user <br>
//!  directory and returns the saved icons number. <br>
Standard_EXPORT   Standard_Integer SaveIcons() const;

//! Returns the Number of Icons loaded in the Icon Box . <br>
Standard_EXPORT   Standard_Integer IconNumber() const;

//! Returns the Name of the N ime Icon <br>
//!  Warning: Raises if Index if out of range depending of the <br>
//!	    Number of Loaded Icons . <br>
Standard_EXPORT   Standard_CString IconName(const Standard_Integer Index) const;

//! Returns the Pixmap Size attached to the Icon Name <br>
//!  Warning: May return FALSE if Icon doesn't exist in the IconBox . <br>
Standard_EXPORT   Standard_Boolean IconSize(const Standard_CString Name,Standard_Integer& Width,Standard_Integer& Height) const;

//! Returns the Pixmap attached to the Icon Name <br>
//!  Warning: May return 0 if Icon doesn't exist in the IconBox . <br>
Standard_EXPORT   Aspect_Handle IconPixmap(const Standard_CString Name) const;

//! Returns the Centered part of the Pixmap of required Size <br>
//!	    attached to the Icon Name <br>
//!  Warning: May return 0 if Icon doesn't exist in the IconBox . <br>
Standard_EXPORT   Aspect_Handle IconPixmap(const Standard_CString Name,const Standard_Integer Width,const Standard_Integer Height) const;




 // Type management
 //
 Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
 //Standard_EXPORT Standard_Boolean	       IsKind(const Handle(Standard_Type)&) const;

protected:

 // Methods PROTECTED
 // 


 // Fields PROTECTED
 //


private: 

 // Methods PRIVATE
 // 


 // Fields PRIVATE
 //
Standard_Integer MyNumberOfIcons;


};





// other Inline functions and methods (like "C++: function call" methods)
//


#endif
