⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sskinprovider.hpp

📁 I mComputermaster programmisDelphi+pascal
💻 HPP
📖 第 1 页 / 共 2 页
字号:
	bool __fastcall MDIButtonsNeeded(void);
	Types::TPoint __fastcall RBGripPoint(int ImgIndex);
	Types::TRect __fastcall IconRect();
	Types::TPoint __fastcall FormLeftTop();
	int __fastcall SysButtonsCount(void);
	int __fastcall SmallButtonWidth(void);
	int __fastcall ButtonHeight(void);
	int __fastcall SmallButtonHeight(void);
	int __fastcall SysButtonWidth(const TsCaptionButton &Btn);
	int __fastcall TitleBtnsWidth(void);
	int __fastcall UserButtonWidth(TsTitleButton* Btn);
	int __fastcall BarWidth(int i);
	void __fastcall UpdateIconsIndexes(void);
	void __fastcall StartMove(int X, int Y);
	void __fastcall StopMove(int X, int Y);
	void __fastcall DrawFormBorder(int X, int Y);
	void __fastcall SetHotHT(int i, bool Repaint = true);
	void __fastcall SetPressedHT(int i);
	void __fastcall DropSysMenu(int x, int y);
	bool __fastcall FormChanged(void);
	bool __fastcall IconVisible(void);
	AnsiString __fastcall TitleSkinSection();
	void __fastcall CheckSysMenu(const bool Skinned);
	
public:
	bool InMenu;
	Forms::TShowAction ShowAction;
	bool fAnimating;
	Acsbutils::TacScrollWnd* ListSW;
	TacCtrlAdapter* Adapter;
	bool RgnChanging;
	bool MenuChanged;
	Classes::TWndMethod OldWndProc;
	System::TObject* MDIForm;
	bool FormActive;
	Graphics::TBitmap* MenuLineBmp;
	Forms::TForm* Form;
	int FLinesCount;
	TsSystemMenu* SystemMenu;
	Graphics::TBitmap* TitleBG;
	Forms::TForm* CaptForm;
	Classes::TWndMethod OldCaptFormProc;
	__fastcall virtual TsSkinProvider(Classes::TComponent* AOwner);
	__fastcall virtual ~TsSkinProvider(void);
	virtual void __fastcall AfterConstruction(void);
	virtual void __fastcall Loaded(void);
	void __fastcall PrepareForm(void);
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
	int __fastcall OffsetX(void);
	int __fastcall OffsetY(void);
	void __fastcall NewWndProc(Messages::TMessage &Message);
	void __fastcall DsgnWndProc(Messages::TMessage &Message);
	void __fastcall HookMDI(bool Active = true);
	int __fastcall HeaderHeight(void);
	int __fastcall SysBorderWidth(void);
	int __fastcall SysBorderHeight(void);
	int __fastcall BorderHeight(void);
	int __fastcall BorderWidth(void);
	int __fastcall CaptionHeight(void);
	int __fastcall CaptionWidth(void);
	int __fastcall MenuHeight(void);
	bool __fastcall MenuPresent(void);
	Graphics::TColor __fastcall FormColor(void);
	void __fastcall MdiIcoFormPaint(System::TObject* Sender);
	void __fastcall CaptFormPaint(System::TObject* Sender);
	void __fastcall NewCaptFormProc(Messages::TMessage &Message);
	bool __fastcall UpdateMenu(void);
	void __fastcall InitMenuItems(bool A);
	void __fastcall RepaintMenu(void);
	__property int LinesCount = {read=GetLinesCount, nodefault};
	
__published:
	__property Classes::TAlignment CaptionAlignment = {read=FCaptionAlignment, write=SetCaptionAlignment, default=0};
	__property Scommondata::TsCommonData* SkinData = {read=FCommonData, write=FCommonData};
	__property TsGripMode GripMode = {read=FGripMode, write=FGripMode, default=0};
	__property bool MakeSkinMenu = {read=FMakeSkinMenu, write=FMakeSkinMenu, default=0};
	__property AnsiString MenuLineSkin = {read=FMenuLineSkin, write=SetMenuLineSkin};
	__property TsResizeMode ResizeMode = {read=FResizeMode, write=FResizeMode, default=0};
	__property bool ScreenSnap = {read=FScreenSnap, write=FScreenSnap, default=0};
	__property int SnapBuffer = {read=FSnapBuffer, write=FSnapBuffer, default=10};
	__property bool ShowAppIcon = {read=FShowAppIcon, write=SetShowAppIcon, default=1};
	__property TsTitleButtons* TitleButtons = {read=FTitleButtons, write=SetTitleButtons};
	__property TsTitleIcon* TitleIcon = {read=FTitleIcon, write=FTitleIcon};
	__property AnsiString TitleSkin = {read=FTitleSkin, write=SetTitleSkin};
	__property bool UseGlobalColor = {read=FUseGlobalColor, write=SetUseGlobalColor, default=1};
	__property TAddItemEvent OnSkinItem = {read=FOnSkinItem, write=FOnSkinItem};
};


class PASCALIMPLEMENTATION TacCtrlAdapter : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
public:
	TMetaClass*CtrlClass;
	AnsiString DefaultSection;
	DynamicArray<TacAdapterItem* >  Items;
	TsSkinProvider* Provider;
	virtual bool __fastcall IsControlSupported(Classes::TComponent* Control);
	int __fastcall Count(void);
	__fastcall TacCtrlAdapter(TsSkinProvider* AProvider);
	__fastcall virtual ~TacCtrlAdapter(void);
	virtual TacAdapterItem* __fastcall GetItem(int Index);
	virtual Scommondata::TsCommonData* __fastcall GetCommonData(int Index);
	int __fastcall IndexOf(Controls::TWinControl* Ctrl);
	virtual void __fastcall AfterConstruction(void);
	void __fastcall AddAllItems(Controls::TWinControl* OwnerCtrl = (Controls::TWinControl*)(0x0));
	virtual void __fastcall AddNewItem(Controls::TWinControl* Ctrl)/* overload */;
	virtual void __fastcall AddNewItem(Controls::TWinControl* Ctrl, const AnsiString SkinSection)/* overload */;
	virtual void __fastcall RemoveItem(int Index);
	void __fastcall RemoveAllItems(void);
	void __fastcall CleanItems(void);
	virtual void __fastcall WndProc(Messages::TMessage &Message);
};


class PASCALIMPLEMENTATION TacAdapterItem : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
public:
	Controls::TWinControl* Ctrl;
	Scommondata::TsCommonData* SkinData;
	int OldFontColor;
	TacCtrlAdapter* Adapter;
	Acsbutils::TacMainWnd* ScrollWnd;
	__fastcall virtual TacAdapterItem(void);
	__fastcall virtual ~TacAdapterItem(void);
	virtual void __fastcall DoHook(Controls::TWinControl* Control);
};


class PASCALIMPLEMENTATION TsTitleButton : public Classes::TCollectionItem 
{
	typedef Classes::TCollectionItem inherited;
	
private:
	bool FUseSkinData;
	AnsiString FName;
	Graphics::TBitmap* FGlyph;
	Controls::TMouseEvent FOnMouseUp;
	Controls::TMouseEvent FOnMouseDown;
	bool FEnabled;
	void __fastcall SetGlyph(const Graphics::TBitmap* Value);
	void __fastcall SetName(const AnsiString Value);
	void __fastcall MouseDown(int BtnIndex, Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	void __fastcall MouseUp(int BtnIndex, Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	
public:
	TsCaptionButton BtnData;
	__fastcall virtual TsTitleButton(Classes::TCollection* Collection);
	__fastcall virtual ~TsTitleButton(void);
	virtual AnsiString __fastcall GetDisplayName();
	
__published:
	__property bool Enabled = {read=FEnabled, write=FEnabled, default=1};
	__property Graphics::TBitmap* Glyph = {read=FGlyph, write=SetGlyph};
	__property AnsiString Name = {read=FName, write=SetName};
	__property bool UseSkinData = {read=FUseSkinData, write=FUseSkinData, default=1};
	__property Controls::TMouseEvent OnMouseDown = {read=FOnMouseDown, write=FOnMouseDown};
	__property Controls::TMouseEvent OnMouseUp = {read=FOnMouseUp, write=FOnMouseUp};
};


//-- var, const, procedure ---------------------------------------------------
static const Shortint UserButtonsOffset = 0x8;
static const Shortint ScrollWidth = 0x12;
static const Shortint IconicHeight = 0x1a;
static const Word HTUDBTN = 0x3e8;
extern PACKAGE Messages::TMessage acM;
extern PACKAGE int Style;
extern PACKAGE Sskinmenus::TMenuItemData HotItem;
extern PACKAGE Menus::TMenuItem* SelectedMenuItem;
extern PACKAGE bool bInProcess;
extern PACKAGE bool DoStartMove;
extern PACKAGE bool bCapture;
extern PACKAGE bool bFlag;
extern PACKAGE bool bRemoving;
extern PACKAGE bool bMode;
extern PACKAGE HWND deskwnd;
extern PACKAGE HDC formDC;
extern PACKAGE int ntop;
extern PACKAGE int nleft;
extern PACKAGE int nbottom;
extern PACKAGE int nright;
extern PACKAGE int nX;
extern PACKAGE int nY;
extern PACKAGE int nDirection;
extern PACKAGE int nMinHeight;
extern PACKAGE int nMinWidth;
extern PACKAGE int nDC;
extern PACKAGE unsigned hDWMAPI;
extern PACKAGE void __fastcall InitDwmApi(void);
extern PACKAGE bool __fastcall AeroIsEnabled(void);
extern PACKAGE bool __fastcall UseAero(void);
extern PACKAGE void __fastcall UseDwm(unsigned Handle, bool Active, bool Refresh = true);
extern PACKAGE bool __fastcall BigButtons(TsSkinProvider* sp);
extern PACKAGE bool __fastcall IsBorderUnchanged(const int BorderIndex, const Sskinmanager::TsSkinManager* sm);
extern PACKAGE bool __fastcall IsGripVisible(const TsSkinProvider* sp);
extern PACKAGE void __fastcall PaintGrip(const HDC aDC, const TsSkinProvider* sp);
extern PACKAGE bool __fastcall CtrlIsReadyForHook(const Controls::TWinControl* Ctrl);
extern PACKAGE void __fastcall FillArOR(TsSkinProvider* sp);
extern PACKAGE void __fastcall UpdateRgn(TsSkinProvider* sp, bool Repaint = true);
extern PACKAGE HRGN __fastcall GetRgnFromArOR(TsSkinProvider* sp, int X = 0x0, int Y = 0x0);
extern PACKAGE void __fastcall ForbidDrawing(TsSkinProvider* sp, bool MDIAlso = false);
extern PACKAGE void __fastcall PermitDrawing(TsSkinProvider* sp, bool MDIAlso = false);
extern PACKAGE bool __fastcall HaveBorder(TsSkinProvider* sp);
extern PACKAGE void __fastcall UpdateSkinCaption(TsSkinProvider* SkinProvider);
extern PACKAGE TsSkinProvider* __fastcall GetSkinProvider(Classes::TComponent* Cmp);
extern PACKAGE void __fastcall DrawAppIcon(TsSkinProvider* SkinProvider);
extern PACKAGE int __fastcall GetWindowWidth(HWND Handle);
extern PACKAGE int __fastcall GetClientWidth(HWND Handle);
extern PACKAGE int __fastcall GetWindowHeight(HWND Handle);
extern PACKAGE int __fastcall GetClientHeight(HWND Handle);

}	/* namespace Sskinprovider */
using namespace Sskinprovider;
#pragma option pop	// -w-
#pragma option pop	// -Vx

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// sSkinProvider

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -