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

📄 advofficeselectors.hpp

📁 TMSPack基本上涵盖了Delphi所有的基础控件
💻 HPP
📖 第 1 页 / 共 5 页
字号:
	void __fastcall SetItemType(const TSelectorItemType Value);
	void __fastcall SetBackGroundColor(const Graphics::TColor Value);
	void __fastcall SetTag(const int Value);
	
protected:
	virtual void __fastcall SetCaption(const AnsiString Value);
	__property Types::TRect ItemRect = {read=FItemRect, write=FItemRect};
	HIDESBASE virtual void __fastcall Changed(void);
	
public:
	__fastcall virtual TAdvSelectorItem(Classes::TCollection* Collection);
	__fastcall virtual ~TAdvSelectorItem(void);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	
__published:
	__property Graphics::TColor BackGroundColor = {read=FBackGroundColor, write=SetBackGroundColor, default=536870911};
	__property AnsiString Caption = {read=FCaption, write=SetCaption};
	__property Classes::TAlignment CaptionAlignment = {read=FCaptionAlignment, write=SetvCaptionAlignment, nodefault};
	__property int ImageIndex = {read=FImageIndex, write=SetImageIndex, nodefault};
	__property AnsiString Hint = {read=FHint, write=SetHint};
	__property AnsiString Value = {read=FValue, write=SetValue};
	__property bool Enable = {read=FEnable, write=SetEnable, nodefault};
	__property TSelectorItemType ItemType = {read=FItemType, write=SetItemType, default=0};
	__property int Tag = {read=FTag, write=SetTag, default=0};
};


class DELPHICLASS TAdvSelectorItems;
class PASCALIMPLEMENTATION TAdvSelectorItems : public Classes::TCollection 
{
	typedef Classes::TCollection inherited;
	
public:
	TAdvSelectorItem* operator[](int Index) { return Items[Index]; }
	
private:
	Classes::TPersistent* FOwner;
	HIDESBASE TAdvSelectorItem* __fastcall GetItem(int Index);
	HIDESBASE void __fastcall SetItem(int Index, const TAdvSelectorItem* Value);
	
protected:
	DYNAMIC Classes::TPersistent* __fastcall GetOwner(void);
	
public:
	__fastcall TAdvSelectorItems(Classes::TPersistent* AOwner);
	HIDESBASE TAdvSelectorItem* __fastcall Add(void);
	HIDESBASE TAdvSelectorItem* __fastcall Insert(int Index);
	__property TAdvSelectorItem* Items[int Index] = {read=GetItem, write=SetItem/*, default*/};
public:
	#pragma option push -w-inl
	/* TCollection.Destroy */ inline __fastcall virtual ~TAdvSelectorItems(void) { }
	#pragma option pop
	
};


typedef void __fastcall (__closure *TChangeSelectionEvent)(int OldItemIndex, int NewItemIndex);

typedef void __fastcall (__closure *THotToolEvent)(System::TObject* Sender, int HotItemIndex);

class DELPHICLASS TAdvCustomSelectorPanel;
class DELPHICLASS TSelectorDropDownWindow;
class PASCALIMPLEMENTATION TSelectorDropDownWindow : public Forms::TCustomForm 
{
	typedef Forms::TCustomForm inherited;
	
private:
	TAdvCustomSelectorPanel* FSelectorPanel;
	bool FHideOnDeActivate;
	bool FShowAbove;
	Classes::TComponent* FOwner;
	bool FShowFullBorder;
	Extctrls::TTimer* FHideTimer;
	bool FShowLeft;
	HIDESBASE MESSAGE void __fastcall WMActivate(Messages::TWMActivate &Message);
	HIDESBASE MESSAGE void __fastcall WMNCHitTest(Messages::TWMNCHitTest &Message);
	HIDESBASE MESSAGE void __fastcall WMWindowPosChanging(Messages::TWMWindowPosMsg &Message);
	void __fastcall HideTimerOnTime(System::TObject* Sender);
	void __fastcall SetSelectorPanel(const TAdvCustomSelectorPanel* Value);
	
protected:
	DYNAMIC void __fastcall Paint(void);
	HWND __fastcall GetParentWnd(void);
	virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	__property bool HideOnDeActivate = {read=FHideOnDeActivate, write=FHideOnDeActivate, nodefault};
	__property bool ShowAbove = {read=FShowAbove, write=FShowAbove, nodefault};
	__property bool ShowLeft = {read=FShowLeft, write=FShowLeft, default=0};
	__property bool ShowFullBorder = {read=FShowFullBorder, write=FShowFullBorder, nodefault};
	
public:
	__fastcall virtual TSelectorDropDownWindow(Classes::TComponent* AOwner);
	__fastcall virtual TSelectorDropDownWindow(Classes::TComponent* AOwner, int Dummy);
	__fastcall virtual ~TSelectorDropDownWindow(void);
	void __fastcall SetWindowSize(void);
	
__published:
	__property TAdvCustomSelectorPanel* SelectorPanel = {read=FSelectorPanel, write=SetSelectorPanel};
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TSelectorDropDownWindow(HWND ParentWindow) : Forms::TCustomForm(ParentWindow) { }
	#pragma option pop
	
};


class PASCALIMPLEMENTATION TAdvCustomSelectorPanel : public Extctrls::TCustomPanel 
{
	typedef Extctrls::TCustomPanel inherited;
	
private:
	Classes::TComponent* FOwner;
	Graphics::TColor FColorTo;
	TGradientDirection FGradientDirection;
	Graphics::TColor FWindowBorderColor;
	Classes::TNotifyEvent FOnShouldHide;
	bool FAllowFloating;
	TVistaBackgroundHot* FDragGripAppearance;
	TGripPosition FGripPosition;
	bool FDragGripHot;
	bool FFloating;
	TGradientCaption* FCaptionAppearance;
	Classes::TNotifyEvent FOnFloating;
	bool FCloseBtnHot;
	bool FCloseBtnDown;
	Graphics::TColor FColorFloatingTo;
	Graphics::TColor FColorFloating;
	Classes::TNotifyEvent FOnCloseBtnClick;
	TSelectorDropDownWindow* FDropDownWindow;
	HIDESBASE MESSAGE void __fastcall CMMouseLeave(Messages::TMessage &Message);
	void __fastcall SetColorTo(const Graphics::TColor Value);
	void __fastcall SetTGradientDirection(const TGradientDirection Value);
	void __fastcall SetWindowBorderColor(const Graphics::TColor Value);
	void __fastcall SetDragGripAppearance(const TVistaBackgroundHot* Value);
	void __fastcall SetCaptionAppearance(const TGradientCaption* Value);
	
protected:
	void __fastcall DrawCloseBtn(void);
	virtual void __fastcall Paint(void);
	virtual void __fastcall ResetDown(void);
	DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
	void __fastcall Initialize(void);
	virtual int __fastcall GetVisibleHeight(void);
	virtual void __fastcall SetFloating(const bool Value);
	__property bool Floating = {read=FFloating, write=SetFloating, nodefault};
	Types::TRect __fastcall GetDragGripRect();
	Types::TRect __fastcall GetCaptionRect();
	Types::TRect __fastcall GetCloseBtnRect();
	void __fastcall InvalidateCloseBtn(void);
	void __fastcall InvalidateDragGrip(void);
	void __fastcall CloseBtnClick(void);
	__property TSelectorDropDownWindow* DropDownWindow = {read=FDropDownWindow, write=FDropDownWindow};
	__property Classes::TNotifyEvent OnShouldHide = {read=FOnShouldHide, write=FOnShouldHide};
	
public:
	__fastcall virtual TAdvCustomSelectorPanel(Classes::TComponent* AOwner);
	__fastcall virtual ~TAdvCustomSelectorPanel(void);
	
__published:
	__property Graphics::TColor ColorTo = {read=FColorTo, write=SetColorTo, default=536870911};
	__property Graphics::TColor ColorFloating = {read=FColorFloating, write=FColorFloating, nodefault};
	__property Graphics::TColor ColorFloatingTo = {read=FColorFloatingTo, write=FColorFloatingTo, nodefault};
	__property Graphics::TColor WindowBorderColor = {read=FWindowBorderColor, write=SetWindowBorderColor, default=8421504};
	__property TGradientDirection GradientDirection = {read=FGradientDirection, write=SetTGradientDirection, nodefault};
	__property bool AllowFloating = {read=FAllowFloating, write=FAllowFloating, nodefault};
	__property TGripPosition GripPosition = {read=FGripPosition, write=FGripPosition, nodefault};
	__property TVistaBackgroundHot* DragGripAppearance = {read=FDragGripAppearance, write=SetDragGripAppearance};
	__property TGradientCaption* CaptionAppearance = {read=FCaptionAppearance, write=SetCaptionAppearance};
	__property Classes::TNotifyEvent OnFloating = {read=FOnFloating, write=FOnFloating};
	__property Classes::TNotifyEvent OnCloseBtnClick = {read=FOnCloseBtnClick, write=FOnCloseBtnClick};
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TAdvCustomSelectorPanel(HWND ParentWindow) : Extctrls::TCustomPanel(ParentWindow) { }
	#pragma option pop
	
};


typedef void __fastcall (__closure *TItemDrawEvent)(System::TObject* Sender, int Index, const Types::TRect &R);

typedef void __fastcall (__closure *TSelectEvent)(System::TObject* Sender, int Index, TAdvSelectorItem* Item);

typedef void __fastcall (__closure *TColorSelectEvent)(System::TObject* Sender, Graphics::TColor AColor);

typedef void __fastcall (__closure *TPenStyleSelectEvent)(System::TObject* Sender, Graphics::TPenStyle AStyle);

typedef void __fastcall (__closure *TBrushStyleSelectEvent)(System::TObject* Sender, Graphics::TBrushStyle AStyle);

typedef void __fastcall (__closure *TCharSelectEvent)(System::TObject* Sender, char AChar);

typedef void __fastcall (__closure *TTableSizeSelectEvent)(System::TObject* Sender, int Columns, int Rows);

class DELPHICLASS TAdvSelectorPanel;
class PASCALIMPLEMENTATION TAdvSelectorPanel : public TAdvCustomSelectorPanel 
{
	typedef TAdvCustomSelectorPanel inherited;
	
private:
	int FItemIndex;
	TAdvSelectorItems* FItems;
	Graphics::TColor FColorHotTo;
	Graphics::TColor FBorderColor;
	Graphics::TColor FBorderDownColor;
	Graphics::TColor FColorHot;
	Graphics::TColor FBorderHotColor;
	Graphics::TColor FColorDownTo;
	Graphics::TColor FColorDown;
	Imglist::TCustomImageList* FImages;
	int FHotItemIndex;
	int FDownItemIndex;
	int FButtonHeight;
	int FTopOffSet;
	int FLeftOffSet;
	TNoOfButtons FButtonsPerRow;
	TChangeSelectionEvent FOnChangeSelection;
	int FButtonMargin;
	bool FMouseDown;
	Classes::TNotifyEvent FOnSelect;
	Graphics::TColor FBorderSelectedColor;
	Graphics::TColor FColorSelected;
	Graphics::TColor FColorSelectedTo;
	THotToolEvent FOnHotTool;
	int FMaxCaptionLength;
	TItemDrawEvent FOnDrawItem;
	int FMinButtonWidth;
	int FMinButtonHeight;
	bool FNoPrefix;
	bool FTwoColorImages;
	TSelectionAppearance* FSelectionAppearance;
	HIDESBASE MESSAGE void __fastcall WMChar(Messages::TWMKey &Msg);
	MESSAGE void __fastcall CMWantSpecialKey(Messages::TWMKey &Msg);
	HIDESBASE MESSAGE void __fastcall CMMouseLeave(Messages::TMessage &Message);
	void __fastcall SetBorderColor(const Graphics::TColor Value);
	void __fastcall SetItemIndex(const int Value);
	void __fastcall SetItems(const TAdvSelectorItems* Value);
	void __fastcall SetImages(const Imglist::TCustomImageList* Value);
	void __fastcall SetButtonsPerRow(const TNoOfButtons Value);
	void __fastcall SetButtonMargin(const int Value);
	void __fastcall SetMinButtonHeight(const int Value);
	void __fastcall SetMinButtonWidth(const int Value);
	void __fastcall SetTwoColorImages(const bool Value);
	void __fastcall SetSelectionAppearance(const TSelectionAppearance* Value);
	
protected:
	void __fastcall DrawItem(int Index, bool RefreshItem = false);
	virtual void __fastcall Paint(void);
	virtual void __fastcall ResetDown(void);
	void __fastcall SetItemsPosition(void);
	int __fastcall GetMaxWidth(void);
	int __fastcall TotalAutoSizeButtons(void);
	int __fastcall ItemAtPos(int X, int Y);
	void __fastcall SetPanelHeight(void);
	void __fastcall AutoSizeBtnSize(int &W, int &H);
	DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
	virtual void __fastcall SetFloating(const bool Value);
	__property int MinButtonWidth = {read=FMinButtonWidth, write=SetMinButtonWidth, default=16};
	__property int MinButtonHeight = {read=FMinButtonHeight, write=SetMinButtonHeight, default=16};
	__property bool NoPrefix = {read=FNoPrefix, write=FNoPrefix, nodefault};
	__property bool TwoColorImages = {read=FTwoColorImages, write=SetTwoColorImages, nodefault};
	
public:
	__fastcall virtual TAdvSelectorPanel(Classes::TComponent* AOwner);
	__fastcall virtual ~TAdvSelectorPanel(void);
	__property TAdvSelectorItems* Items = {read=FItems, write=SetItems};
	__property int ItemIndex = {read=FItemIndex, write=SetItemIndex, nodefault};
	
__published:
	__property Graphics::TColor BorderColor = {read=FBorderColor, write=SetBorderColor, default=536870911};
	__property Graphics::TColor BorderDownColor = {read=FBorderDownColor, write=FBorderDownColor, default=536870911};
	__property Graphics::TColor BorderHotColor = {read=FBorderHotColor, write=FBorderHotColor, default=536870911};
	__property Graphics::TColor BorderSelectedColor = {read=FBorderSelectedColor, write=FBorderSelectedColor, default=0};
	__property Graphics::TColor ColorDown = {read=FColorDown, write=FColorDown, nodefault};
	__property Graphics::TColor ColorDownTo = {read=FColorDownTo, write=FColorDownTo, default=536870911};
	__property Graphics::TColor ColorHot = {read=FColorHot, write=FColorHot, nodefault};
	__property Graphics::TColor ColorHotTo = {read=FColorHotTo, write=FColorHotTo, default=536870911};
	__property Graphics::TColor ColorSelected = {read=FColorSelected, write=FColorSelected, nodefault};
	__property Graphics::TColor ColorSelectedTo = {read=FColorSelectedTo, write=FColorSelectedTo, nodefault};
	__property TSelectionAppearance* SelectionAppearance = {read=FSelectionAppearance, write=SetSelectionAppearance};
	__property TNoOfButtons ButtonsPerRow = {read=FButtonsPerRow, write=SetButtonsPerRow, default=1};
	__property Imglist::TCustomImageList* Images = {read=FImages, write=SetImages};
	__property int ButtonMargin = {read=FButtonMargin, write=SetButtonMargin, default=3};
	__property TChangeSelectionEvent OnChangeSelection = {read=FOnChangeSelection, write=FOnChangeSelection};
	__property Classes::TNotifyEvent OnSelect = {read=FOnSelect, write=FOnSelect};
	__property THotToolEvent OnHotTool = {read=FOnHotTool, write=FOnHotTool};
	__property TItemDrawEvent OnDrawItem = {read=FOnDrawItem, write=FOnDrawItem};
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TAdvSelectorPanel(HWND ParentWindow) : TAdvCustomSelectorPanel(ParentWindow) { }
	#pragma option pop
	
};


struct TColorCubeCell
{
	
public:
	#pragma pack(push,1)
	Types::TPoint CenterPos;
	#pragma pack(pop)
	Graphics::TColor Color;
} ;

class DELPHICLASS TAdvColorCubePanel;
class PASCALIMPLEMENTATION TAdvColorCubePanel : public TAdvCustomSelectorPanel 
{
	typedef TAdvCustomSelectorPanel inherited;

⌨️ 快捷键说明

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