ThemePageControl.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //---------------------------------------------------------------------------
  2. #ifndef ThemePageControlH
  3. #define ThemePageControlH
  4. //---------------------------------------------------------------------------
  5. #include <ComCtrls.hpp>
  6. //---------------------------------------------------------------------------
  7. class TThemeTabSheet : public TTabSheet
  8. {
  9. public:
  10. __fastcall TThemeTabSheet(TComponent * Owner);
  11. __property bool Shadowed = { read = FShadowed, write = SetShadowed };
  12. private:
  13. void __fastcall SetShadowed(bool Value);
  14. bool FShadowed;
  15. };
  16. //---------------------------------------------------------------------------
  17. class TThemePageControl : public TPageControl
  18. {
  19. friend class TThemeTabSheet;
  20. public:
  21. __fastcall TThemePageControl(TComponent * Owner);
  22. int __fastcall GetTabsHeight();
  23. protected:
  24. virtual void __fastcall PaintWindow(HDC DC);
  25. DYNAMIC bool __fastcall CanChange();
  26. DYNAMIC void __fastcall Change();
  27. #ifdef _DEBUG
  28. virtual void __fastcall RequestAlign();
  29. #endif
  30. private:
  31. void __fastcall DrawThemesXpTabItem(HDC DC, int Item, const TRect & Rect, bool Body, int State);
  32. void __fastcall DrawTabItem(HDC DC, int Item, TRect Rect, bool Selected, bool Shadowed);
  33. void __fastcall DrawThemesPart(HDC DC, int PartId, int StateId, LPCWSTR PartNameID, LPRECT Rect);
  34. void __fastcall InvalidateTab(int Index);
  35. int FOldTabIndex;
  36. };
  37. //---------------------------------------------------------------------------
  38. #endif