// Classic Shell (c) 2009-2017, Ivo Beltchev // Open-Shell (c) 2017-2018, The Open-Shell Team // Confidential information of Ivo Beltchev. Not for disclosure or distribution without prior written consent from the author #pragma once #include #include const int MAX_SKIN_VERSION=3; class CSkinParser; enum TSkinOptionType; struct MenuBitmap { bool bIsBitmap; bool bIsOwned; // only valid if bIsBitmap and bitmap bool bIs32; // only valid if bIsBitmap and bitmap MenuBitmap( void ) { bIsBitmap=bIsOwned=bIs32=false; bitmap=NULL; } void Init( bool bIsColor=false ); void Reset( bool bIsColor=false ); HBITMAP GetBitmap( void ) const { return bIsBitmap?bitmap:NULL; } COLORREF GetColor( void ) const { return bIsBitmap?0:color; } void operator=( HBITMAP bmp ) { bIsBitmap=true; bitmap=bmp; } void operator=( COLORREF col ) { bIsBitmap=false; color=col; } private: union { COLORREF color; HBITMAP bitmap; }; }; struct MenuSkin { enum TSkinType { // the first 3 values match the MenuStyle setting SKIN_TYPE_CLASSIC1, SKIN_TYPE_CLASSIC2, SKIN_TYPE_WIN7, SKIN_TYPE_ALL_PROGRAMS, SKIN_TYPE_COUNT }; unsigned int Hash; unsigned int MetroColorHash; int Dpi; CString About; // the text to show in the About box HICON AboutIcon; // the icon to show in the About box int Version; // 1 - skin 1.0 (default), 2 - skin 2.0 (future skins) TSkinType SkinType; bool ForceRTL; bool TwoColumns; bool Main_FakeGlass; bool Submenu_FakeGlass; bool ForceTouch; struct Variation { CString label; CString labelEn; CString tip; }; std::vector> Variations; struct Option { // from skin CString name; TSkinOptionType type; CString label; CString tip; CString condition; int groupId; bool bDefValue; // default value when not set by user CString disValue; // the value when the setting is disabled // current state mutable bool bEnabled; mutable bool bValue; mutable CString sValue; }; std::vector