📄 appinsp.pas
字号:
unit AppInsp;
{$IFDEF VER120}
{$DEFINE VERSION4}
{$ENDIF}
{$IFDEF VER125}
{$DEFINE VERSION4}
{$ENDIF}
{$IFDEF VER130}
{$DEFINE VERSION4}
{$DEFINE VERSION5}
{$ENDIF}
{$IFDEF VER140}
{$DEFINE VERSION4}
{$DEFINE VERSION5}
{$DEFINE VERSION6}
{$ENDIF}
{$IFDEF VER150}
{$DEFINE VERSION4}
{$DEFINE VERSION5}
{$DEFINE VERSION6}
{$DEFINE VERSION7}
{$ENDIF}
{$IFDEF VER170}
{$DEFINE VERSION4}
{$DEFINE VERSION5}
{$DEFINE VERSION6}
{$DEFINE VERSION7}
{$DEFINE VERSION9}
{$ENDIF}
interface
uses Windows, SysUtils, Classes, Graphics, Forms, Dialogs,
{$IFDEF VERSION4}
ActnList,
{$ENDIF}
PropList, InspCtrl, CompInsp;
type
TApplicationInterface = class(TComponent)
private
function GetHelpFile: string;
procedure SetHelpFile(const Value: string);
function GetHintColor: TColor;
procedure SetHintColor(const Value: TColor);
function GetHintHidePause: Integer;
procedure SetHintHidePause(const Value: Integer);
function GetHintPause: Integer;
procedure SetHintPause(const Value: Integer);
function GetHintShortPause: Integer;
procedure SetHintShortPause(const Value: Integer);
function GetIcon: TIcon;
procedure SetIcon(const Value: TIcon);
function GetShowHint: Boolean;
procedure SetShowHint(const Value: Boolean);
function GetTitle: string;
procedure SetTitle(const Value: string);
function GetUpdateFormatSettings: Boolean;
procedure SetUpdateFormatSettings(const Value: Boolean);
function GetUpdateMetricSettings: Boolean;
procedure SetUpdateMetricSettings(const Value: Boolean);
function GetOnActivate: TNotifyEvent;
procedure SetOnActivate(const Value: TNotifyEvent);
function GetOnDeactivate: TNotifyEvent;
procedure SetOnDeactivate(const Value: TNotifyEvent);
function GetOnException: TExceptionEvent;
procedure SetOnException(const Value: TExceptionEvent);
function GetOnHelp: THelpEvent;
procedure SetOnHelp(const Value: THelpEvent);
function GetOnHint: TNotifyEvent;
procedure SetOnHint(const Value: TNotifyEvent);
function GetOnIdle: TIdleEvent;
procedure SetOnIdle(const Value: TIdleEvent);
function GetOnMessage: TMessageEvent;
procedure SetOnMessage(const Value: TMessageEvent);
function GetOnMinimize: TNotifyEvent;
procedure SetOnMinimize(const Value: TNotifyEvent);
function GetOnRestore: TNotifyEvent;
procedure SetOnRestore(const Value: TNotifyEvent);
function GetOnShowHint: TShowHintEvent;
procedure SetOnShowHint(const Value: TShowHintEvent);
{$IFDEF VERSION4}
function GetBiDiMode: TBiDiMode;
procedure SetBiDiMode(const Value: TBiDiMode);
function GetHintShortCuts: Boolean;
procedure SetHintShortCuts(const Value: Boolean);
function GetOnActionExecute: TActionEvent;
procedure SetOnActionExecute(const Value: TActionEvent);
function GetOnActionUpdate: TActionEvent;
procedure SetOnActionUpdate(const Value: TActionEvent);
function GetOnShortCut: TShortCutEvent;
procedure SetOnShortCut(const Value: TShortCutEvent);
{$ENDIF}
{$IFDEF VERSION5}
function GetBiDiKeyboard: string;
procedure SetBiDiKeyboard(const Value: string);
function GetNonBiDiKeyboard: string;
procedure SetNonBiDiKeyboard(const Value: string);
{$ENDIF}
{$IFDEF VERSION6}
function GetAutoDragDocking: Boolean;
procedure SetAutoDragDocking(const Value: Boolean);
function GetOnSettingChange: TSettingChangeEvent;
procedure SetOnSettingChange(const Value: TSettingChangeEvent);
{$ENDIF}
{$IFDEF VERSION7}
function GetOnModalBegin: TNotifyEvent;
procedure SetOnModalBegin(const Value: TNotifyEvent);
function GetOnModalEnd: TNotifyEvent;
procedure SetOnModalEnd(const Value: TNotifyEvent);
{$ENDIF}
published
property HelpFile: string read GetHelpFile write SetHelpFile;
property HintColor: TColor read GetHintColor write SetHintColor;
property HintHidePause: Integer read GetHintHidePause write SetHintHidePause;
property HintPause: Integer read GetHintPause write SetHintPause;
property HintShortPause: Integer read GetHintShortPause write SetHintShortPause;
property Icon: TIcon read GetIcon write SetIcon;
property ShowHint: Boolean read GetShowHint write SetShowHint;
property Title: string read GetTitle write SetTitle;
property UpdateFormatSettings: Boolean read GetUpdateFormatSettings write SetUpdateFormatSettings;
property UpdateMetricSettings: Boolean read GetUpdateMetricSettings write SetUpdateMetricSettings;
property OnActivate: TNotifyEvent read GetOnActivate write SetOnActivate;
property OnDeactivate: TNotifyEvent read GetOnDeactivate write SetOnDeactivate;
property OnException: TExceptionEvent read GetOnException write SetOnException;
property OnHelp: THelpEvent read GetOnHelp write SetOnHelp;
property OnHint: TNotifyEvent read GetOnHint write SetOnHint;
property OnIdle: TIdleEvent read GetOnIdle write SetOnIdle;
property OnMessage: TMessageEvent read GetOnMessage write SetOnMessage;
property OnMinimize: TNotifyEvent read GetOnMinimize write SetOnMinimize;
property OnRestore: TNotifyEvent read GetOnRestore write SetOnRestore;
property OnShowHint: TShowHintEvent read GetOnShowHint write SetOnShowHint;
{$IFDEF VERSION4}
property BiDiMode: TBiDiMode read GetBiDiMode write SetBiDiMode;
property HintShortCuts: Boolean read GetHintShortCuts write SetHintShortCuts;
property OnActionExecute: TActionEvent read GetOnActionExecute write SetOnActionExecute;
property OnActionUpdate: TActionEvent read GetOnActionUpdate write SetOnActionUpdate;
property OnShortCut: TShortCutEvent read GetOnShortCut write SetOnShortCut;
{$ENDIF}
{$IFDEF VERSION5}
property BiDiKeyboard: string read GetBiDiKeyboard write SetBiDiKeyboard;
property NonBiDiKeyboard: string read GetNonBiDiKeyboard write SetNonBiDiKeyboard;
{$ENDIF}
{$IFDEF VERSION6}
property AutoDragDocking: Boolean read GetAutoDragDocking write SetAutoDragDocking;
property OnSettingChange: TSettingChangeEvent read GetOnSettingChange write SetOnSettingChange;
{$ENDIF}
{$IFDEF VERSION7}
property OnModalBegin: TNotifyEvent read GetOnModalBegin write SetOnModalBegin;
property OnModalEnd: TNotifyEvent read GetOnModalEnd write SetOnModalEnd;
{$ENDIF}
end;
TCustomApplicationInspector = class(TCustomComponentInspector)
private
FApplicationInterface: TApplicationInterface;
protected
function GetButtonType(TheIndex: Integer): TButtonType; override;
function GetEnableExternalEditor(TheIndex: Integer): Boolean; override;
function CallEditor(TheIndex: Integer): Boolean; override;
public
procedure CreateWnd; override;
end;
TApplicationInspector = class(TCustomApplicationInspector)
published
{$IFDEF VERSION4}
property Anchors;
property Constraints;
{$ENDIF}
property Align;
property BorderStyle;
property Color;
property Ctl3D;
property DragCursor;
property DragMode;
property Enabled;
property Font;
property IntegralHeight;
property ParentColor;
property ParentCtl3D;
property ParentFont;
property ParentShowHint;
property PopupMenu;
property ShowHint;
property Sorted;
property TabOrder;
property TabStop;
property Visible;
property OnDragDrop;
property OnDragOver;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnStartDrag;
property CheckBoxes;
property PaintStyle;
property Splitter;
property OnUpdate;
property OnValidateChar;
property OnChangeValue;
property OnDrawName;
property OnDrawValue;
property Root;
property Mode;
property OnGetName;
property OnGetValue;
property OnGetNextValue;
property OnSetValue;
property OnGetButtonType;
property OnGetInplaceEditorType;
property OnGetMaxLength;
property OnGetEditMask;
property OnGetEnableExternalEditor;
property OnGetReadOnly;
property OnGetExpandState;
property OnGetLevel;
property OnGetValuesList;
property OnGetSortValuesList;
property OnGetSelectedValue;
property OnGetAutoApply;
property OnGetNameFont;
property OnGetNameColor;
property OnGetValueFont;
property OnGetValueColor;
property OnCallEditor;
property OnGetEditorClass;
property OnFilter;
property OnCompare;
property OnSelectItem;
property OnDeselectItem;
property OnValueDoubleClick;
end;
implementation
function TApplicationInterface.GetHelpFile: string;
begin
Result:=Application.HelpFile;
end;
procedure TApplicationInterface.SetHelpFile(const Value: string);
begin
Application.HelpFile:=Value;
end;
function TApplicationInterface.GetHintColor: TColor;
begin
Result:=Application.HintColor;
end;
procedure TApplicationInterface.SetHintColor(const Value: TColor);
begin
Application.HintColor:=Value;
end;
function TApplicationInterface.GetHintPause: Integer;
begin
Result:=Application.HintPause;
end;
procedure TApplicationInterface.SetHintPause(const Value: Integer);
begin
Application.HintPause:=Value;
end;
function TApplicationInterface.GetHintHidePause: Integer;
begin
Result:=Application.HintHidePause;
end;
procedure TApplicationInterface.SetHintHidePause(const Value: Integer);
begin
Application.HintHidePause:=Value;
end;
function TApplicationInterface.GetHintShortPause: Integer;
begin
Result:=Application.HintShortPause;
end;
procedure TApplicationInterface.SetHintShortPause(const Value: Integer);
begin
Application.HintShortPause:=Value;
end;
function TApplicationInterface.GetIcon: TIcon;
begin
Result:=Application.Icon;
end;
procedure TApplicationInterface.SetIcon(const Value: TIcon);
begin
Application.Icon:=Value;
end;
function TApplicationInterface.GetShowHint: Boolean;
begin
Result:=Application.ShowHint;
end;
procedure TApplicationInterface.SetShowHint(const Value: Boolean);
begin
Application.ShowHint:=Value;
end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -