summaryrefslogtreecommitdiff
path: root/public/panorama/iuistylefactory.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /public/panorama/iuistylefactory.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'public/panorama/iuistylefactory.h')
-rw-r--r--public/panorama/iuistylefactory.h52
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