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

📄 rm_tb97.hpp

📁 这是一个功能强大
💻 HPP
📖 第 1 页 / 共 2 页
字号:

typedef void __fastcall (*TPositionWriteIntProc)(const AnsiString ToolbarName, const AnsiString Value, const int Data, const void * ExtraData);

typedef void __fastcall (*TPositionWriteStringProc)(const AnsiString ToolbarName, const AnsiString Value, const AnsiString Data, const void * ExtraData);

class PASCALIMPLEMENTATION TCustomToolWindow97 : public Controls::TCustomControl 
{
	typedef Controls::TCustomControl inherited;
	
private:
	int FDockPos;
	int FDockRow;
	bool FDocked;
	TDock97* FDockedTo;
	TDock97* FDefaultDock;
	TDock97* FLastDock;
	Classes::TNotifyEvent FOnClose;
	Classes::TNotifyEvent FOnDockChanged;
	Classes::TNotifyEvent FOnDockChanging;
	Classes::TNotifyEvent FOnMove;
	Classes::TNotifyEvent FOnRecreated;
	Classes::TNotifyEvent FOnRecreating;
	Classes::TNotifyEvent FOnResize;
	Classes::TNotifyEvent FOnVisibleChanged;
	Forms::TCloseQueryEvent FOnCloseQuery;
	TDockChangingExEvent FOnDockChangingEx;
	TDockChangingExEvent FOnDockChangingHidden;
	bool FActivateParent;
	bool FHideWhenInactive;
	bool FCloseButton;
	bool FCloseButtonWhenDocked;
	bool FFullSize;
	bool FResizable;
	bool FShowCaption;
	bool FUseLastDock;
	Forms::TFormBorderStyle FBorderStyle;
	TToolWindowDockMode FDockMode;
	TDragHandleStyle FDragHandleStyle;
	TDockableTo FDockableTo;
	TToolWindowFloatingMode FFloatingMode;
	TDockType FLastDockType;
	bool FLastDockTypeSet;
	TToolWindowParams FParams;
	int FUpdatingBounds;
	int FDisableArrangeControls;
	int FDisableOnMove;
	int FHidden;
	bool FArrangeNeeded;
	bool FMoved;
	bool FInactiveCaption;
	#pragma pack(push,1)
	Types::TPoint FFloatingTopLeft;
	#pragma pack(pop)
	Classes::TList* FDockForms;
	bool FSavedAtRunTime;
	int FNonClientWidth;
	int FNonClientHeight;
	TFloatingWindowParent* FFloatParent;
	bool FCloseButtonDown;
	AnsiString __fastcall GetVersion();
	bool __fastcall IsLastDockStored(void);
	void __fastcall SetBorderStyle(Forms::TBorderStyle Value);
	void __fastcall SetCloseButton(bool Value);
	void __fastcall SetCloseButtonWhenDocked(bool Value);
	void __fastcall SetDefaultDock(TDock97* Value);
	void __fastcall SetDockedTo(TDock97* Value);
	void __fastcall SetDockPos(int Value);
	void __fastcall SetDockRow(int Value);
	void __fastcall SetDragHandleStyle(TDragHandleStyle Value);
	void __fastcall SetFloatingMode(TToolWindowFloatingMode Value);
	void __fastcall SetFullSize(bool Value);
	void __fastcall SetLastDock(TDock97* Value);
	void __fastcall SetResizable(bool Value);
	void __fastcall SetShowCaption(bool Value);
	void __fastcall SetUseLastDock(bool Value);
	void __fastcall SetVersion(const AnsiString Value);
	void __fastcall CalculateNonClientSizes(Types::PRect R);
	void __fastcall MoveOnScreen(const bool OnlyIfFullyOffscreen);
	void __fastcall DrawDraggingOutline(const HDC DC, const Types::PRect NewRect, const Types::PRect OldRect, const bool NewDocking, const bool OldDocking);
	void __fastcall DrawFloatingNCArea(const bool DrawToDC, const HDC ADC, const HRGN Clip, TToolWindowNCRedrawWhat RedrawWhat);
	void __fastcall DrawDockedNCArea(const bool DrawToDC, const HDC ADC, const HRGN Clip);
	void __fastcall InvalidateDockedNCArea(void);
	void __fastcall InvalidateFloatingNCArea(const TToolWindowNCRedrawWhat RedrawWhat);
	void __fastcall ValidateDockedNCArea(void);
	TToolWindowNCRedrawWhat __fastcall ValidateFloatingNCArea(void);
	void __fastcall SetInactiveCaption(bool Value);
	void __fastcall Moved(void);
	bool __fastcall GetShowingState(void);
	void __fastcall UpdateTopmostFlag(void);
	void __fastcall UpdateVisibility(void);
	void __fastcall ReadSavedAtRunTime(Classes::TReader* Reader);
	void __fastcall WriteSavedAtRunTime(Classes::TWriter* Writer);
	HIDESBASE MESSAGE void __fastcall CMColorChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMTextChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMShowingChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMVisibleChanged(Messages::TMessage &Message);
	MESSAGE void __fastcall WMActivate(Messages::TWMActivate &Message);
	MESSAGE void __fastcall WMClose(Messages::TWMNoParams &Message);
	MESSAGE void __fastcall WMEnable(Messages::TWMEnable &Message);
	MESSAGE void __fastcall WMGetMinMaxInfo(Messages::TWMGetMinMaxInfo &Message);
	HIDESBASE MESSAGE void __fastcall WMMove(Messages::TWMMove &Message);
	HIDESBASE MESSAGE void __fastcall WMMouseActivate(Messages::TWMMouseActivate &Message);
	HIDESBASE MESSAGE void __fastcall WMNCCalcSize(Messages::TWMNCCalcSize &Message);
	HIDESBASE MESSAGE void __fastcall WMNCHitTest(Messages::TWMNCHitTest &Message);
	HIDESBASE MESSAGE void __fastcall WMNCLButtonDown(Messages::TWMNCHitMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMNCPaint(Messages::TMessage &Message);
	MESSAGE void __fastcall WMPrint(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMPrintClient(Messages::TMessage &Message);
	MESSAGE void __fastcall WMTB97PaintDockedNCArea(Messages::TMessage &Message);
	MESSAGE void __fastcall WMTB97PaintFloatingNCArea(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
	
protected:
	__property bool ActivateParent = {read=FActivateParent, write=FActivateParent, default=1};
	__property Forms::TBorderStyle BorderStyle = {read=FBorderStyle, write=SetBorderStyle, default=1};
	__property Color  = {default=-16777201};
	__property bool CloseButton = {read=FCloseButton, write=SetCloseButton, default=1};
	__property bool CloseButtonWhenDocked = {read=FCloseButtonWhenDocked, write=SetCloseButtonWhenDocked, default=0};
	__property TDock97* DefaultDock = {read=FDefaultDock, write=SetDefaultDock};
	__property TDockableTo DockableTo = {read=FDockableTo, write=FDockableTo, default=15};
	__property TToolWindowDockMode DockMode = {read=FDockMode, write=FDockMode, default=0};
	__property TDragHandleStyle DragHandleStyle = {read=FDragHandleStyle, write=SetDragHandleStyle, default=0};
	__property TToolWindowFloatingMode FloatingMode = {read=FFloatingMode, write=SetFloatingMode, default=0};
	__property bool FullSize = {read=FFullSize, write=SetFullSize, default=0};
	__property bool HideWhenInactive = {read=FHideWhenInactive, write=FHideWhenInactive, default=1};
	__property TDock97* LastDock = {read=FLastDock, write=SetLastDock, stored=IsLastDockStored};
	__property TToolWindowParams Params = {read=FParams};
	__property bool Resizable = {read=FResizable, write=SetResizable, default=1};
	__property bool ShowCaption = {read=FShowCaption, write=SetShowCaption, default=1};
	__property bool UseLastDock = {read=FUseLastDock, write=SetUseLastDock, default=1};
	__property AnsiString Version = {read=GetVersion, write=SetVersion, stored=false};
	__property Classes::TNotifyEvent OnClose = {read=FOnClose, write=FOnClose};
	__property Forms::TCloseQueryEvent OnCloseQuery = {read=FOnCloseQuery, write=FOnCloseQuery};
	__property Classes::TNotifyEvent OnDockChanged = {read=FOnDockChanged, write=FOnDockChanged};
	__property Classes::TNotifyEvent OnDockChanging = {read=FOnDockChanging, write=FOnDockChanging};
	__property TDockChangingExEvent OnDockChangingEx = {read=FOnDockChangingEx, write=FOnDockChangingEx};
	__property TDockChangingExEvent OnDockChangingHidden = {read=FOnDockChangingHidden, write=FOnDockChangingHidden};
	__property Classes::TNotifyEvent OnMove = {read=FOnMove, write=FOnMove};
	__property Classes::TNotifyEvent OnRecreated = {read=FOnRecreated, write=FOnRecreated};
	__property Classes::TNotifyEvent OnRecreating = {read=FOnRecreating, write=FOnRecreating};
	__property Classes::TNotifyEvent OnResize = {read=FOnResize, write=FOnResize};
	__property Classes::TNotifyEvent OnVisibleChanged = {read=FOnVisibleChanged, write=FOnVisibleChanged};
	virtual void __fastcall AlignControls(Controls::TControl* AControl, Types::TRect &Rect);
	virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
	virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
	DYNAMIC HPALETTE __fastcall GetPalette(void);
	virtual void __fastcall Loaded(void);
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
	virtual void __fastcall Paint(void);
	DYNAMIC bool __fastcall PaletteChanged(bool Foreground);
	virtual void __fastcall SetParent(Controls::TWinControl* AParent);
	void __fastcall ArrangeControls(void);
	DYNAMIC bool __fastcall ChildControlTransparent(Controls::TControl* Ctl);
	void __fastcall CustomArrangeControls(const TDockType PreviousDockType, const TDock97* DockingTo, const bool Resize);
	DYNAMIC void __fastcall DoDockChangingHidden(TDock97* DockingTo);
	DYNAMIC void __fastcall DoMove(void);
	virtual void __fastcall GetBarSize(int &ASize, const TDockType DockType) = 0 ;
	void __fastcall GetDockRowSize(int &AHeightOrWidth);
	virtual void __fastcall GetMinimumSize(int &AClientWidth, int &AClientHeight) = 0 ;
	DYNAMIC void __fastcall GetParams(TToolWindowParams &Params);
	DYNAMIC void __fastcall InitializeOrdering(void);
	virtual Types::TPoint __fastcall OrderControls(bool CanMoveControls, TDockType PreviousDockType, TDock97* DockingTo) = 0 ;
	DYNAMIC void __fastcall ResizeBegin(TToolWindowSizeHandle SizeHandle);
	DYNAMIC void __fastcall ResizeEnd(bool Accept);
	DYNAMIC void __fastcall ResizeTrack(Types::TRect &Rect, const Types::TRect &OrigRect);
	virtual void __fastcall SizeChanging(const int AWidth, const int AHeight);
	
public:
	__property bool Docked = {read=FDocked, nodefault};
	__property TDock97* DockedTo = {read=FDockedTo, write=SetDockedTo, stored=false};
	__property int DockPos = {read=FDockPos, write=SetDockPos, default=-1};
	__property int DockRow = {read=FDockRow, write=SetDockRow, default=0};
	__property Types::TPoint FloatingPosition = {read=FFloatingTopLeft, write=FFloatingTopLeft};
	__property int NonClientWidth = {read=FNonClientWidth, nodefault};
	__property int NonClientHeight = {read=FNonClientHeight, nodefault};
	__fastcall virtual TCustomToolWindow97(Classes::TComponent* AOwner);
	__fastcall virtual ~TCustomToolWindow97(void);
	DYNAMIC Classes::TComponent* __fastcall GetParentComponent(void);
	DYNAMIC bool __fastcall HasParent(void);
	virtual void __fastcall SetBounds(int ALeft, int ATop, int AWidth, int AHeight);
	void __fastcall AddDockForm(const Forms::TCustomForm* Form);
	void __fastcall AddDockedNCAreaToSize(Types::TPoint &S, const bool LeftRight);
	void __fastcall AddFloatingNCAreaToSize(Types::TPoint &S);
	void __fastcall BeginMoving(const int InitX, const int InitY);
	void __fastcall BeginSizing(const TToolWindowSizeHandle ASizeHandle);
	void __fastcall BeginUpdate(void);
	DYNAMIC void __fastcall DoneReadingPositionData(const TPositionReadIntProc ReadIntProc, const TPositionReadStringProc ReadStringProc, const void * ExtraData);
	void __fastcall EndUpdate(void);
	void __fastcall GetDockedNCArea(Types::TPoint &TopLeft, Types::TPoint &BottomRight, const bool LeftRight);
	Types::TPoint __fastcall GetFloatingBorderSize();
	void __fastcall GetFloatingNCArea(Types::TPoint &TopLeft, Types::TPoint &BottomRight);
	DYNAMIC void __fastcall ReadPositionData(const TPositionReadIntProc ReadIntProc, const TPositionReadStringProc ReadStringProc, const void * ExtraData);
	void __fastcall RemoveDockForm(const Forms::TCustomForm* Form);
	DYNAMIC void __fastcall WritePositionData(const TPositionWriteIntProc WriteIntProc, const TPositionWriteStringProc WriteStringProc, const void * ExtraData);
	
__published:
	__property Height  = {stored=false};
	__property Width  = {stored=false};
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TCustomToolWindow97(HWND ParentWindow) : Controls::TCustomControl(ParentWindow) { }
	#pragma option pop
	
};


//-- var, const, procedure ---------------------------------------------------
static const Word WM_TB97PaintDockedNCArea = 0x17af;
static const Word WM_TB97PaintFloatingNCArea = 0x17b0;
extern PACKAGE TDockType __fastcall GetDockTypeOf(const TDock97* Control);
extern PACKAGE Forms::TCustomForm* __fastcall GetToolWindowParentForm(const TCustomToolWindow97* ToolWindow);
extern PACKAGE Forms::TCustomForm* __fastcall ValidToolWindowParentForm(const TCustomToolWindow97* ToolWindow);
extern PACKAGE void __fastcall CustomLoadToolbarPositions(const Forms::TCustomForm* Form, const TPositionReadIntProc ReadIntProc, const TPositionReadStringProc ReadStringProc, const void * ExtraData);
extern PACKAGE void __fastcall CustomSaveToolbarPositions(const Forms::TCustomForm* Form, const TPositionWriteIntProc WriteIntProc, const TPositionWriteStringProc WriteStringProc, const void * ExtraData);
extern PACKAGE void __fastcall IniLoadToolbarPositions(const Forms::TCustomForm* Form, const AnsiString Filename, const AnsiString SectionNamePrefix);
extern PACKAGE void __fastcall IniSaveToolbarPositions(const Forms::TCustomForm* Form, const AnsiString Filename, const AnsiString SectionNamePrefix);
extern PACKAGE void __fastcall RegLoadToolbarPositions(const Forms::TCustomForm* Form, const AnsiString BaseRegistryKey);
extern PACKAGE void __fastcall RegLoadToolbarPositionsEx(const Forms::TCustomForm* Form, const unsigned RootKey, const AnsiString BaseRegistryKey);
extern PACKAGE void __fastcall RegSaveToolbarPositions(const Forms::TCustomForm* Form, const AnsiString BaseRegistryKey);
extern PACKAGE void __fastcall RegSaveToolbarPositionsEx(const Forms::TCustomForm* Form, const unsigned RootKey, const AnsiString BaseRegistryKey);

}	/* namespace Rm_tb97 */
using namespace Rm_tb97;
#pragma pack(pop)
#pragma option pop

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

⌨️ 快捷键说明

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