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

📄 inspectorbar.hpp

📁 TMS component pack v4.2 for delphi
💻 HPP
📖 第 1 页 / 共 5 页
字号:
	void __fastcall SetHeight(const int Value);
	void __fastcall SetShape(const TCaptionShape Value);
	void __fastcall SetAlignment(const Classes::TAlignment Value);
	void __fastcall SetFont(const Graphics::TFont* Value);
	void __fastcall SetVAlignment(const TVAlignment Value);
	void __fastcall SetColor(const Graphics::TColor Value);
	void __fastcall SetShadeGrain(const Byte Value);
	void __fastcall SetShadeLight(const Byte Value);
	void __fastcall SetShadeType(const TShadeType Value);
	void __fastcall SetGlyphClose(const Graphics::TBitmap* Value);
	void __fastcall SetGlyphOpen(const Graphics::TBitmap* Value);
	void __fastcall SetCursor(const Controls::TCursor Value);
	void __fastcall SetOpenCloseGraphic(const TOpenCloseGraphic Value);
	void __fastcall SetOpenClosePosition(const TOpenClosePosition Value);
	void __fastcall SetFlat(const bool Value);
	void __fastcall SetActiveBackground(const Graphics::TBitmap* Value);
	void __fastcall SetBackground(const Graphics::TBitmap* Value);
	void __fastcall SetActiveFont(const Graphics::TFont* Value);
	void __fastcall SetIndent(const int Value);
	void __fastcall SetSideDisplay(const bool Value);
	void __fastcall SetSideWidth(const int Value);
	void __fastcall SetUnderLine(const bool Value);
	void __fastcall SetUnderlineColor(const Graphics::TColor Value);
	void __fastcall SetUnderlineWidth(const int Value);
	void __fastcall SetInspectorBar(const TInspectorBar* Value);
	void __fastcall SetColorTo(const Graphics::TColor Value);
	
protected:
	void __fastcall Changed(void);
	void __fastcall ShadeChanged(void);
	void __fastcall FontChanged(System::TObject* Sender);
	
public:
	__fastcall TInspectorCaption(void);
	__fastcall virtual ~TInspectorCaption(void);
	__property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
	__property Classes::TNotifyEvent OnShadeChange = {read=FOnShadeChange, write=FOnShadeChange};
	__property TInspectorBar* InspectorBar = {read=FInspectorBar, write=SetInspectorBar};
	
__published:
	__property Graphics::TBitmap* ActiveBackground = {read=FActiveBackground, write=SetActiveBackground};
	__property Graphics::TFont* ActiveFont = {read=FActiveFont, write=SetActiveFont};
	__property Classes::TAlignment Alignment = {read=FAlignment, write=SetAlignment, default=0};
	__property Graphics::TBitmap* Background = {read=FBackground, write=SetBackground};
	__property bool Button = {read=FButton, write=FButton, nodefault};
	__property Graphics::TColor Color = {read=FColor, write=SetColor, nodefault};
	__property Graphics::TColor ColorTo = {read=FColorTo, write=SetColorTo, default=536870911};
	__property Controls::TCursor Cursor = {read=FCursor, write=SetCursor, default=0};
	__property bool Flat = {read=FFlat, write=SetFlat, default=0};
	__property Graphics::TFont* Font = {read=FFont, write=SetFont};
	__property bool SideDisplay = {read=FSideDisplay, write=SetSideDisplay, nodefault};
	__property int SideWidth = {read=FSideWidth, write=SetSideWidth, nodefault};
	__property Graphics::TBitmap* GlyphOpen = {read=FGlyphOpen, write=SetGlyphOpen};
	__property Graphics::TBitmap* GlyphClose = {read=FGlyphClose, write=SetGlyphClose};
	__property int Height = {read=FHeight, write=SetHeight, default=20};
	__property int Indent = {read=FIndent, write=SetIndent, default=0};
	__property TOpenClosePosition OpenClosePosition = {read=FOpenClosePosition, write=SetOpenClosePosition, nodefault};
	__property TOpenCloseGraphic OpenCloseGraphic = {read=FOpenCloseGraphic, write=SetOpenCloseGraphic, nodefault};
	__property Byte ShadeGrain = {read=FShadeGrain, write=SetShadeGrain, nodefault};
	__property TShadeType ShadeType = {read=FShadeType, write=SetShadeType, nodefault};
	__property Byte ShadeLight = {read=FShadeLight, write=SetShadeLight, default=255};
	__property TCaptionShape Shape = {read=FShape, write=SetShape, default=0};
	__property bool Underline = {read=FUnderLine, write=SetUnderLine, default=0};
	__property Graphics::TColor UnderlineColor = {read=FUnderlineColor, write=SetUnderlineColor, default=16711680};
	__property int UnderlineWidth = {read=FUnderlineWidth, write=SetUnderlineWidth, default=1};
	__property TVAlignment VAlignment = {read=FVAlignment, write=SetVAlignment, nodefault};
};


#pragma option push -b-
enum TInspectorEditStyle { esInplace, esPopup };
#pragma option pop

typedef void __fastcall (__closure *TInspSetPropertiesEvent)(System::TObject* Sender, const Types::TRect &R, TInspectorItem* Item);

typedef void __fastcall (__closure *TSetEditTextEvent)(System::TObject* Sender, TInspectorItem* Item, AnsiString &AText);

typedef void __fastcall (__closure *TGetEditTextEvent)(System::TObject* Sender, TInspectorItem* Item, AnsiString &AText);

class DELPHICLASS TInspectorEditLink;
class PASCALIMPLEMENTATION TInspectorEditLink : public Classes::TComponent 
{
	typedef Classes::TComponent inherited;
	
private:
	bool FWantKeyUpDown;
	bool FWantKeyPriorNext;
	bool FWantKeyHomeEnd;
	bool FWantKeyLeftRight;
	bool FWantKeyEscape;
	bool FWantKeyReturn;
	int FPopupWidth;
	int FPopupHeight;
	int FTag;
	TInspectorEditStyle FEditStyle;
	TInspectorBar* FInspector;
	Forms::TForm* FPopupForm;
	TInspSetPropertiesEvent FOnSetProperties;
	TSetEditTextEvent FOnSetEditText;
	TGetEditTextEvent FOnGetEditText;
	
public:
	void __fastcall EditKeyDown(System::TObject* Sender, Word &Key, Classes::TShiftState Shift);
	void __fastcall EditExit(System::TObject* Sender);
	void __fastcall FormExit(System::TObject* Sender);
	virtual Controls::TWinControl* __fastcall GetEditor(void);
	virtual void __fastcall CreateEditor(Controls::TWinControl* AParent);
	virtual void __fastcall DestroyEditor(void);
	virtual void __fastcall SetProperties(const Types::TRect &R, TInspectorItem* Item);
	virtual void __fastcall StartEdit(TInspectorItem* Item);
	virtual void __fastcall StopEdit(TInspectorItem* Item);
	virtual AnsiString __fastcall GetEditorValue(AnsiString s);
	virtual void __fastcall SetEditorValue(AnsiString &s);
	virtual void __fastcall SetOriginalValue(void);
	__property TInspectorBar* Inspector = {read=FInspector, write=FInspector};
	
__published:
	__property TInspectorEditStyle EditStyle = {read=FEditStyle, write=FEditStyle, nodefault};
	__property int PopupWidth = {read=FPopupWidth, write=FPopupWidth, nodefault};
	__property int PopupHeight = {read=FPopupHeight, write=FPopupHeight, nodefault};
	__property bool WantKeyLeftRight = {read=FWantKeyLeftRight, write=FWantKeyLeftRight, nodefault};
	__property bool WantKeyUpDown = {read=FWantKeyUpDown, write=FWantKeyUpDown, nodefault};
	__property bool WantKeyHomeEnd = {read=FWantKeyHomeEnd, write=FWantKeyHomeEnd, nodefault};
	__property bool WantKeyPriorNext = {read=FWantKeyPriorNext, write=FWantKeyPriorNext, nodefault};
	__property bool WantKeyReturn = {read=FWantKeyReturn, write=FWantKeyReturn, nodefault};
	__property bool WantKeyEscape = {read=FWantKeyEscape, write=FWantKeyEscape, nodefault};
	__property int Tag = {read=FTag, write=FTag, nodefault};
	__property TInspSetPropertiesEvent OnSetProperties = {read=FOnSetProperties, write=FOnSetProperties};
	__property TGetEditTextEvent OnGetEditText = {read=FOnGetEditText, write=FOnGetEditText};
	__property TSetEditTextEvent OnSetEditText = {read=FOnSetEditText, write=FOnSetEditText};
public:
	#pragma option push -w-inl
	/* TComponent.Create */ inline __fastcall virtual TInspectorEditLink(Classes::TComponent* AOwner) : Classes::TComponent(AOwner) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TComponent.Destroy */ inline __fastcall virtual ~TInspectorEditLink(void) { }
	#pragma option pop
	
};


#pragma option push -b-
enum TItemNodeState { nsOpen, nsClose };
#pragma option pop

#pragma option push -b-
enum TInspBackgroundPos { bpTopLeft, bpBottomLeft, bpTopRight, bpBottomRight };
#pragma option pop

class PASCALIMPLEMENTATION TInspectorItem : public Classes::TCollectionItem 
{
	typedef Classes::TCollectionItem inherited;
	
private:
	AnsiString FCaption;
	Graphics::TIcon* FIcon;
	bool FVisible;
	int FIntValue;
	AnsiString FTextValue;
	int FHeight;
	AnsiString FEditMask;
	Classes::TStringList* FValues;
	TPropertyType FPropertyType;
	bool FBoolValue;
	AnsiString FHint;
	int FImageIndex;
	Classes::TShortCut FShortCut;
	int FTag;
	bool FReadOnly;
	System::TDateTime FDateTimeValue;
	System::TDateTime FDateTime;
	bool FOwnsObject;
	System::TObject* FObject;
	bool FAutoIcon;
	AnsiString FURL;
	Graphics::TColor FColorValue;
	Graphics::TFont* FFontValue;
	int FSpinMax;
	int FSpinMin;
	int FAutoIconIndex;
	Inspimg::TInspImage* FBackground;
	TInspBackgroundPos FBkgPos;
	TInspectorEditLink* FEditLink;
	bool FDown;
	bool FEditing;
	bool FModified;
	int FIndent;
	AnsiString FHelp;
	int FLevel;
	TItemNodeState FNodeState;
	AnsiString FHotAnchor;
	bool FItemFocused;
	#pragma pack(push,1)
	Types::TRect Flocalrect;
	#pragma pack(pop)
	bool FSelected;
	Graphics::TBitmap* FBitmap;
	Graphics::TPicture* FPictureValue;
	int FMaxLength;
	void __fastcall SetCaption(const AnsiString Value);
	void __fastcall SetIcon(const Graphics::TIcon* Value);
	Graphics::TIcon* __fastcall GetIcon(void);
	void __fastcall SetIntValue(const int Value);
	void __fastcall SetTextValue(const AnsiString Value);
	void __fastcall SetValues(const Classes::TStringList* Value);
	void __fastcall SetPropertyType(const TPropertyType Value);
	void __fastcall SetBoolValue(const bool Value);
	void __fastcall SetImageIndex(const int Value);
	TInspectorBar* __fastcall GetInspectorBar(void);
	TInspectorPanel* __fastcall GetInspectorPanel(void);
	void __fastcall SetDateTimeValue(const System::TDateTime Value);
	void __fastcall SetDateValue(const System::TDateTime Value);
	void __fastcall SetTimeValue(const System::TDateTime Value);
	void __fastcall SetAutoIcon(const bool Value);
	void __fastcall SetURL(const AnsiString Value);
	void __fastcall SetColorValue(const Graphics::TColor Value);
	void __fastcall SetFontValue(const Graphics::TFont* Value);
	void __fastcall SetAutoIconIndex(const int Value);
	void __fastcall SetBackground(const Inspimg::TInspImage* Value);
	void __fastcall SetBackgroundPos(const TInspBackgroundPos Value);
	void __fastcall SetDown(const bool Value);
	void __fastcall SetHeight(const int Value);
	void __fastcall SetVisible(const bool Value);
	void __fastcall SetModified(const bool Value);
	void __fastcall SetIndent(const int Value);
	void __fastcall SetLevel(const int Value);
	void __fastcall SetNodeState(const TItemNodeState Value);
	void __fastcall SetItemFocused(const bool Value);
	void __fastcall SetShortCut(const Classes::TShortCut Value);
	void __fastcall SetSelected(const bool Value);
	void __fastcall SetBitmap(const Graphics::TBitmap* Value);
	void __fastcall SetPictureValue(const Graphics::TPicture* Value);
	void __fastcall SetMaxLength(const int Value);
	
protected:
	HIDESBASE void __fastcall Changed(void);
	virtual AnsiString __fastcall GetDisplayName();
	virtual void __fastcall EditStart(void);
	virtual void __fastcall EditStop(void);
	virtual void __fastcall EditChange(void);
	void __fastcall BkgChanged(System::TObject* Sender);
	
public:
	__fastcall virtual TInspectorItem(Classes::TCollection* Collection);
	__fastcall virtual ~TInspectorItem(void);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	int __fastcall NumChilds(void);
	void __fastcall ExpandChilds(void);
	void __fastcall CollapsChilds(void);
	__property TInspectorPanel* InspectorPanel = {read=GetInspectorPanel};
	__property TInspectorBar* InspectorBar = {read=GetInspectorBar};
	__property System::TDateTime DateTimeValue = {read=FDateTimeValue, write=SetDateTimeValue};
	__property System::TDateTime DateValue = {read=FDateTime, write=SetDateValue};
	__property System::TDateTime TimeValue = {read=FDateTime, write=SetTimeValue};
	__property bool OwnsObject = {read=FOwnsObject, write=FOwnsObject, nodefault};
	__property System::TObject* ItemObject = {read=FObject, write=FObject};
	__property bool Down = {read=FDown, write=SetDown, nodefault};
	__property bool Editing = {read=FEditing, nodefault};
	__property TItemNodeState NodeState = {read=FNodeState, write=SetNodeState, nodefault};
	__property AnsiString HotAnchor = {read=FHotAnchor, write=FHotAnchor};
	__property bool ItemFocused = {read=FItemFocused, write=SetItemFocused, nodefault};
	__property bool Selected = {read=FSelected, write=SetSelected, nodefault};
	virtual void __fastcall Update(void);
	virtual void __fastcall DoEdit(void);
	
__published:
	__property bool AutoIcon = {read=FAutoIcon, write=SetAutoIcon, default=0};
	__property int AutoIconIndex = {read=FAutoIconIndex, write=SetAutoIconIndex, default=0};
	__property Inspimg::TInspImage* Background = {read=FBackground, write=SetBackground};
	__property TInspBackgroundPos BackgroundPosition = {read=FBkgPos, write=SetBackgroundPos, default=3};
	__property Graphics::TBitmap* Bitmap = {read=FBitmap, write=SetBitmap};
	__property bool BoolValue = {read=FBoolValue, write=SetBoolValue, nodefault};
	__property AnsiString Caption = {read=FCaption, write=SetCaption};
	__property Graphics::TColor ColorValue = {read=FColorValue, write=SetColorValue, nodefault};
	__property TInspectorEditLink* EditLink = {read=FEditLink, write=FEditLink};
	__property AnsiString EditMask = {read=FEditMask, write=FEditMask};
	__property Graphics::TFont* FontValue = {read=FFontValue, write=SetFontValue};
	__property AnsiString Help = {read=FHelp, write=FHelp};
	__property AnsiString Hint = {read=FHint, write=FHint};

⌨️ 快捷键说明

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