//
//	Copyright © 2005 Nemetschek North America 
//	All Rights Reserved.
//
// Created by Vladislav Stanev

#pragma once

namespace VWFC
{
	using namespace Tools;

	namespace VWObjects
	{
		enum EClassVisibility {
			kClassVisibilityInvisible			= -1,
			kClassVisibilityNormal				= 0,
			kClassVisibilityGrayed				= 2
		};

		class VWClass
		{
		public:
									VWClass(InternalIndex index);
									VWClass(const TXString& name);
			virtual					~VWClass();

			operator InternalIndex() const;

		public:
			void					SetThisClassAsDefault() const;
			bool					IsValidClass() const;
			TXString				GetClassName() const;
			// Objects that belong to that class are assigned to the None class.
			void					DeleteThisClass();

			EClassVisibility		IsClassVisible() const;
			// Does not reset the drawing visiblity automatically
			// VWObject::ResetAllObjectsVis should be called whenever class visibility is changed.
			void					SetClassVisible(EClassVisibility visibility);

			bool					GetUseGraphics() const;
			void					SetUseGraphics(bool use);
		
			VWClassAttr				GetClassAttribs() const;

			// Tools
		public:
			static InternalIndex	GetDefaultClass();
			static bool				IsValidClassName(const TXString& name);
			static bool				IsValidClassIndex(InternalIndex index);
			static InternalIndex	GetClassIDByName(const TXString& name);
			// Returns the largest valid class ID number.
			// The smallest class ID is always the value obtained by calling GetNoneClassID,
			// the ID of the class 'None'.
			static InternalIndex	GetMaxClassIndex();
			// Returns the ID of the Guides class, first creating it and setting its attributes if it doesn't already exist.
			// Note that the name of the Guides class is localized and won't always be 'Guides'.
			static InternalIndex	AddGuidesClass();
			static InternalIndex	GetDimensionClassIndex();
			static InternalIndex	GetNoneClassIndex();

			// program variables for classes
			static EClassOptions	GetProgramVar_ClassOptions();

		protected:
			InternalIndex		fClassIndex;
		};
	}
}