// 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 _Aspect_Grid_HeaderFile
#define _Aspect_Grid_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Handle_Aspect_Grid_HeaderFile
#include <Handle_Aspect_Grid.hxx>
#endif

#ifndef _Quantity_PlaneAngle_HeaderFile
#include <Quantity_PlaneAngle.hxx>
#endif
#ifndef _Quantity_Length_HeaderFile
#include <Quantity_Length.hxx>
#endif
#ifndef _Quantity_Color_HeaderFile
#include <Quantity_Color.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Aspect_GridDrawMode_HeaderFile
#include <Aspect_GridDrawMode.hxx>
#endif
#ifndef _MMgt_TShared_HeaderFile
#include <MMgt_TShared.hxx>
#endif
class Quantity_Color;



class Aspect_Grid : public MMgt_TShared {

public:
 // Methods PUBLIC
 // 

//! defines the x Origin of the grid. <br>
Standard_EXPORT   void SetXOrigin(const Quantity_Length anOrigin) ;

//! defines the y Origin of the grid. <br>
Standard_EXPORT   void SetYOrigin(const Quantity_Length anOrigin) ;

//! defines the orientation of the the grid. <br>
Standard_EXPORT   void SetRotationAngle(const Quantity_PlaneAngle anAngle) ;

//! Rotate the grid from a relative angle. <br>
Standard_EXPORT   void Rotate(const Quantity_PlaneAngle anAngle) ;

//! Translate the grid from a relative distance. <br>
Standard_EXPORT   void Translate(const Quantity_Length aDx,const Quantity_Length aDy) ;

//! Change the colors of the grid <br>
Standard_EXPORT virtual  void SetColors(const Quantity_Color& aColor,const Quantity_Color& aTenthColor) ;

//! returns the point of the grid the closest to the point X,Y <br>
//!          if the grid is active. If the grid is not active returns <br>
//!          X,Y. <br>
Standard_EXPORT   void Hit(const Quantity_Length X,const Quantity_Length Y,Quantity_Length& gridX,Quantity_Length& gridY) const;

//! returns the point of the grid the closest to the point X,Y <br>
Standard_EXPORT virtual  void Compute(const Quantity_Length X,const Quantity_Length Y,Quantity_Length& gridX,Quantity_Length& gridY) const = 0;

//! activates the grid. The Hit method will return <br>
//!          gridx and gridx computed according to the steps <br>
//!          of the grid. <br>
Standard_EXPORT   void Activate() ;

//! deactivates the grid. The hit method will return <br>
//!          gridx and gridx as the enter value X & Y. <br>
Standard_EXPORT   void Deactivate() ;

//! returns the x Origin of the grid. <br>
Standard_EXPORT   Quantity_Length XOrigin() const;

//! returns the x Origin of the grid. <br>
Standard_EXPORT   Quantity_Length YOrigin() const;

//! returns the x Angle of the grid. <br>
Standard_EXPORT   Quantity_PlaneAngle RotationAngle() const;

//! Returns TRUE when the grid is active. <br>
Standard_EXPORT   Standard_Boolean IsActive() const;

//! Returns the colors of the grid. <br>
Standard_EXPORT   void Colors(Quantity_Color& aColor,Quantity_Color& aTenthColor) const;

//! Change the grid aspect. <br>
Standard_EXPORT   void SetDrawMode(const Aspect_GridDrawMode aDrawMode) ;

//! Returns the grid aspect. <br>
Standard_EXPORT   Aspect_GridDrawMode DrawMode() const;

//! Display the grid at screen. <br>
Standard_EXPORT virtual  void Display() ;

//! Erase the grid from screen. <br>
Standard_EXPORT virtual  void Erase() const;

//! Returns TRUE when the grid is displayed at screen. <br>
Standard_EXPORT virtual  Standard_Boolean IsDisplayed() const;


Standard_EXPORT virtual  void Init()  = 0;
//Standard_EXPORT ~Aspect_Grid();




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

protected:

 // Methods PROTECTED
 // 

//! creates a new grid. By default this grid is not <br>
//!          active. <br>
Standard_EXPORT Aspect_Grid(const Quantity_Length anXOrigin = 0.0,const Quantity_Length anYOrigin = 0.0,const Quantity_PlaneAngle aRotationAngle = 0,const Quantity_Color& aColor = Quantity_NOC_GRAY50,const Quantity_Color& aTenthColor = Quantity_NOC_GRAY70);

//! Updates the grid parameters. <br>
Standard_EXPORT virtual  void UpdateDisplay() ;


 // Fields PROTECTED
 //
Quantity_PlaneAngle myRotationAngle;
Quantity_Length myXOrigin;
Quantity_Length myYOrigin;
Quantity_Color myColor;
Quantity_Color myTenthColor;


private: 

 // Methods PRIVATE
 // 


 // Fields PRIVATE
 //
Standard_Boolean myIsActive;
Standard_Boolean myIsDisplayed;
Aspect_GridDrawMode myDrawMode;


};





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


#endif
