diff options
Diffstat (limited to 'public/panorama/iuistylefactory.h')
| -rw-r--r-- | public/panorama/iuistylefactory.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/public/panorama/iuistylefactory.h b/public/panorama/iuistylefactory.h new file mode 100644 index 0000000..235052e --- /dev/null +++ b/public/panorama/iuistylefactory.h @@ -0,0 +1,52 @@ +//=========== Copyright Valve Corporation, All rights reserved. ===============// +// +// Purpose: +//=============================================================================// + +#ifndef IUISTYLEFACTORY_H +#define IUISTYLEFACTORY_H + +#ifdef _WIN32 +#pragma once +#endif + +#include "panoramatypes.h" +#include "layout/stylesymbol.h" + +namespace panorama +{ + +//----------------------------------------------------------------------------- +// Purpose: Public interface for style factory (usuable in client code) +//----------------------------------------------------------------------------- +class IUIStyleFactory +{ +public: + + virtual bool BRegisteredProperty( panorama::CStyleSymbol symName ) = 0; + virtual CStyleSymbol GetPropertyNameForAlias( panorama::CStyleSymbol symName ) = 0; + virtual CStyleProperty *CreateStyleProperty( panorama::CStyleSymbol symName ) = 0; + virtual void FreeStyleProperty( panorama::CStyleProperty *pProperty ) = 0; + virtual const CUtlVector< CUtlString > &GetSortedPropertyAndAliasNames() = 0; +}; + +//----------------------------------------------------------------------------- +// Purpose: Sort comparator +//----------------------------------------------------------------------------- +inline int CompareStylePropertyName( const CUtlString *plhs, const CUtlString *prhs ) +{ + return V_strcmp( plhs->Get(), prhs->Get() ); +} + + +//----------------------------------------------------------------------------- +// Purpose: Less than function +//----------------------------------------------------------------------------- +inline bool StylePropertyNameLessThan( const CUtlString &lhs, const CUtlString &rhs, void *pContext ) +{ + return CompareStylePropertyName( &lhs, &rhs ) < 0; +} + + +} +#endif // IUISTYLEFACTORY_H
\ No newline at end of file |