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

📄 sskinprovider.hpp

📁 I mComputermaster programmisDelphi+pascal
💻 HPP
📖 第 1 页 / 共 2 页
字号:
	void __fastcall AC_WMEraseBkGnd(const HDC aDC);
	void __fastcall AC_WMNCPaint(void);
	int __fastcall HTProcess(const Messages::TWMNCHitTest &Message);
	bool __fastcall AboveBorder(const Messages::TWMNCHitTest &Message);
	Types::TPoint __fastcall CursorToPoint(int x, int y);
	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);
	System::UnicodeString __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 System::UnicodeString 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 System::UnicodeString TitleSkin = {read=FTitleSkin, write=SetTitleSkin};
	__property bool UseGlobalColor = {read=FUseGlobalColor, write=SetUseGlobalColor, default=1};
	__property TAddItemEvent OnSkinItem = {read=FOnSkinItem, write=FOnSkinItem};
};


class PASCALIMPLEMENTATION TsSystemMenu : public Menus::TPopupMenu
{
	typedef Menus::TPopupMenu inherited;
	
public:
	TsSkinProvider* FOwner;
	Forms::TCustomForm* FForm;
	Menus::TMenuItem* ItemRestore;
	Menus::TMenuItem* ItemMove;
	Menus::TMenuItem* ItemSize;
	Menus::TMenuItem* ItemMinimize;
	Menus::TMenuItem* ItemMaximize;
	Menus::TMenuItem* ItemClose;
	__fastcall virtual TsSystemMenu(Classes::TComponent* AOwner);
	HIDESBASE void __fastcall UpdateItems(void);
	void __fastcall UpdateGlyphs(void);
	void __fastcall MakeSkinItems(void);
	bool __fastcall VisibleRestore(void);
	bool __fastcall VisibleSize(void);
	bool __fastcall VisibleMin(void);
	bool __fastcall VisibleMax(void);
	bool __fastcall VisibleClose(void);
	bool __fastcall EnabledRestore(void);
	bool __fastcall EnabledMove(void);
	bool __fastcall EnabledSize(void);
	bool __fastcall EnabledMin(void);
	bool __fastcall EnabledMax(void);
	void __fastcall RestoreClick(System::TObject* Sender);
	void __fastcall MoveClick(System::TObject* Sender);
	void __fastcall SizeClick(System::TObject* Sender);
	void __fastcall MinClick(System::TObject* Sender);
	void __fastcall MaxClick(System::TObject* Sender);
	void __fastcall CloseClick(System::TObject* Sender);
	void __fastcall SkinSelect(System::TObject* Sender);
public:
	/* TPopupMenu.Destroy */ inline __fastcall virtual ~TsSystemMenu(void) { }
	
};


typedef DynamicArray<TacAdapterItem*> TacAdapterItems;

class PASCALIMPLEMENTATION TacCtrlAdapter : public Classes::TPersistent
{
	typedef Classes::TPersistent inherited;
	
public:
	Sconst::TsCtrlClass CtrlClass;
	System::UnicodeString DefaultSection;
	TacAdapterItems 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 System::UnicodeString SkinSection)/* overload */;
	virtual void __fastcall RemoveItem(int Index);
	void __fastcall RemoveAllItems(void);
	void __fastcall CleanItems(void);
	virtual void __fastcall WndProc(Messages::TMessage &Message);
};


//-- 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 pack(pop)
#pragma option pop

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

⌨️ 快捷键说明

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