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

#pragma once

namespace VWFC
{
	namespace Tools
	{
		class VWAutoClassing
		{
		public:
			static bool			GetUserClassName(const TXString& defaultClassName, TXString& outUserClassName);
			static void			CreateUserClass(const TXString& userClassName);
			static void			SetAttrsByClass(MCObjectHandle hObject);
			static void			AutoClass(MCObjectHandle hPlugin, const TXString& defaultClassName);
			static bool			AutoClassByObject(MCObjectHandle hObject, const TXString& defaultClassName);
			static bool			GetRefClassName(const TXString& userClassName, TXString& defaultClassName);
			static TXString		GetUserClass(const TXString& refClass);
			static TXString		GetRefClass(const TXString& userClass);

			// this is the 'LoadAutoClassPopup' VS equivalent
			static void			GetAutoClassList(const TXString& standardClass, const TXString& selectedClass, TXStringSTLArray& outArrStrings, size_t& outSelectedIndex);
			// default value for divider index is 2.
			// But one could change the position by adding new popup elements at the beginning of a list popup.
			static TXString		GetAutoClassListSelection(size_t& inOutSelIndex, const TXString& selText, size_t dividerIndex = 2);

		protected:
			static TXString		GetLocStr(short tableID, short stringID);
			static TXString		GetRRield(MCObjectHandle hRec, const TXString& fieldName);
		};
	}
}


