📄 tntstdactns.pas
字号:
end;
{TNT-WARN TSearchAction}
TTntSearchAction = class(TSearchAction{TNT-ALLOW TSearchAction}, ITntAction)
private
function GetCaption: WideString;
procedure SetCaption(const Value: WideString);
function GetHint: WideString;
procedure SetHint(const Value: WideString);
protected
procedure DefineProperties(Filer: TFiler); override;
public
procedure Assign(Source: TPersistent); override;
public
property Caption: WideString read GetCaption write SetCaption;
property Hint: WideString read GetHint write SetHint;
end;
{TNT-WARN TSearchFind}
TTntSearchFind = class(TSearchFind{TNT-ALLOW TSearchFind}, ITntAction)
private
function GetCaption: WideString;
procedure SetCaption(const Value: WideString);
function GetHint: WideString;
procedure SetHint(const Value: WideString);
protected
procedure DefineProperties(Filer: TFiler); override;
public
procedure Assign(Source: TPersistent); override;
published
property Caption: WideString read GetCaption write SetCaption;
property Hint: WideString read GetHint write SetHint;
end;
{TNT-WARN TSearchReplace}
TTntSearchReplace = class(TSearchReplace{TNT-ALLOW TSearchReplace}, ITntAction)
private
function GetCaption: WideString;
procedure SetCaption(const Value: WideString);
function GetHint: WideString;
procedure SetHint(const Value: WideString);
protected
procedure DefineProperties(Filer: TFiler); override;
public
procedure Assign(Source: TPersistent); override;
published
property Caption: WideString read GetCaption write SetCaption;
property Hint: WideString read GetHint write SetHint;
end;
{TNT-WARN TSearchFindFirst}
TTntSearchFindFirst = class(TSearchFindFirst{TNT-ALLOW TSearchFindFirst}, ITntAction)
private
function GetCaption: WideString;
procedure SetCaption(const Value: WideString);
function GetHint: WideString;
procedure SetHint(const Value: WideString);
protected
procedure DefineProperties(Filer: TFiler); override;
public
procedure Assign(Source: TPersistent); override;
published
property Caption: WideString read GetCaption write SetCaption;
property Hint: WideString read GetHint write SetHint;
end;
{TNT-WARN TSearchFindNext}
TTntSearchFindNext = class(TSearchFindNext{TNT-ALLOW TSearchFindNext}, ITntAction)
private
function GetCaption: WideString;
procedure SetCaption(const Value: WideString);
function GetHint: WideString;
procedure SetHint(const Value: WideString);
protected
procedure DefineProperties(Filer: TFiler); override;
public
procedure Assign(Source: TPersistent); override;
published
property Caption: WideString read GetCaption write SetCaption;
property Hint: WideString read GetHint write SetHint;
end;
{TNT-WARN TFontEdit}
TTntFontEdit = class(TFontEdit{TNT-ALLOW TFontEdit}, ITntAction)
private
function GetCaption: WideString;
procedure SetCaption(const Value: WideString);
function GetHint: WideString;
procedure SetHint(const Value: WideString);
protected
procedure DefineProperties(Filer: TFiler); override;
public
procedure Assign(Source: TPersistent); override;
published
property Caption: WideString read GetCaption write SetCaption;
property Hint: WideString read GetHint write SetHint;
end;
{TNT-WARN TColorSelect}
TTntColorSelect = class(TColorSelect{TNT-ALLOW TColorSelect}, ITntAction)
private
function GetCaption: WideString;
procedure SetCaption(const Value: WideString);
function GetHint: WideString;
procedure SetHint(const Value: WideString);
protected
procedure DefineProperties(Filer: TFiler); override;
public
procedure Assign(Source: TPersistent); override;
published
property Caption: WideString read GetCaption write SetCaption;
property Hint: WideString read GetHint write SetHint;
end;
{TNT-WARN TPrintDlg}
TTntPrintDlg = class(TPrintDlg{TNT-ALLOW TPrintDlg}, ITntAction)
private
function GetCaption: WideString;
procedure SetCaption(const Value: WideString);
function GetHint: WideString;
procedure SetHint(const Value: WideString);
protected
procedure DefineProperties(Filer: TFiler); override;
public
procedure Assign(Source: TPersistent); override;
published
property Caption: WideString read GetCaption write SetCaption;
property Hint: WideString read GetHint write SetHint;
end;
procedure TntStdActn_AfterInherited_Assign(Action: TCustomAction{TNT-ALLOW TCustomAction}; Source: TPersistent);
implementation
uses
Dialogs, TntClasses;
{TNT-IGNORE-UNIT}
procedure TntStdActn_AfterInherited_Assign(Action: TCustomAction{TNT-ALLOW TCustomAction}; Source: TPersistent);
begin
TntAction_AfterInherited_Assign(Action, Source);
// TCommonDialogAction
if (Action is TCommonDialogAction) and (Source is TCommonDialogAction) then begin
TCommonDialogAction(Action).BeforeExecute := TCommonDialogAction(Source).BeforeExecute;
TCommonDialogAction(Action).OnAccept := TCommonDialogAction(Source).OnAccept;
TCommonDialogAction(Action).OnCancel := TCommonDialogAction(Source).OnCancel;
end;
// TFileOpen
if (Action is TFileOpen) and (Source is TFileOpen) then begin
{$IFDEF COMPILER_7_UP}
TFileOpen(Action).UseDefaultApp := TFileOpen(Source).UseDefaultApp;
{$ENDIF}
end;
// TFileOpenWith
if (Action is TFileOpenWith) and (Source is TFileOpenWith) then begin
TFileOpenWith(Action).FileName := TFileOpenWith(Source).FileName;
{$IFDEF COMPILER_7_UP}
TFileOpenWith(Action).AfterOpen := TFileOpenWith(Source).AfterOpen;
{$ENDIF}
end;
// TSearchFindNext
if (Action is TSearchFindNext) and (Source is TSearchFindNext) then begin
TSearchFindNext(Action).SearchFind := TSearchFindNext(Source).SearchFind;
end;
end;
//-------------------------
// TNT STD ACTNS
//-------------------------
{ TTntHintAction }
procedure TTntHintAction.Assign(Source: TPersistent);
begin
inherited;
TntStdActn_AfterInherited_Assign(Self, Source);
end;
procedure TTntHintAction.DefineProperties(Filer: TFiler);
begin
inherited;
TntPersistent_AfterInherited_DefineProperties(Filer, Self);
end;
function TTntHintAction.GetCaption: WideString;
begin
Result := TntAction_GetCaption(Self);
end;
procedure TTntHintAction.SetCaption(const Value: WideString);
begin
TntAction_SetCaption(Self, Value);
end;
function TTntHintAction.GetHint: WideString;
begin
Result := TntAction_GetHint(Self);
end;
procedure TTntHintAction.SetHint(const Value: WideString);
begin
TntAction_SetHint(Self, Value);
end;
{ TTntEditAction }
procedure TTntEditAction.Assign(Source: TPersistent);
begin
inherited;
TntStdActn_AfterInherited_Assign(Self, Source);
end;
procedure TTntEditAction.DefineProperties(Filer: TFiler);
begin
inherited;
TntPersistent_AfterInherited_DefineProperties(Filer, Self);
end;
function TTntEditAction.GetCaption: WideString;
begin
Result := TntAction_GetCaption(Self);
end;
procedure TTntEditAction.SetCaption(const Value: WideString);
begin
TntAction_SetCaption(Self, Value);
end;
function TTntEditAction.GetHint: WideString;
begin
Result := TntAction_GetHint(Self);
end;
procedure TTntEditAction.SetHint(const Value: WideString);
begin
TntAction_SetHint(Self, Value);
end;
{ TTntEditCut }
procedure TTntEditCut.Assign(Source: TPersistent);
begin
inherited;
TntStdActn_AfterInherited_Assign(Self, Source);
end;
procedure TTntEditCut.DefineProperties(Filer: TFiler);
begin
inherited;
TntPersistent_AfterInherited_DefineProperties(Filer, Self);
end;
function TTntEditCut.GetCaption: WideString;
begin
Result := TntAction_GetCaption(Self);
end;
procedure TTntEditCut.SetCaption(const Value: WideString);
begin
TntAction_SetCaption(Self, Value);
end;
function TTntEditCut.GetHint: WideString;
begin
Result := TntAction_GetHint(Self);
end;
procedure TTntEditCut.SetHint(const Value: WideString);
begin
TntAction_SetHint(Self, Value);
end;
{ TTntEditCopy }
procedure TTntEditCopy.Assign(Source: TPersistent);
begin
inherited;
TntStdActn_AfterInherited_Assign(Self, Source);
end;
procedure TTntEditCopy.DefineProperties(Filer: TFiler);
begin
inherited;
TntPersistent_AfterInherited_DefineProperties(Filer, Self);
end;
function TTntEditCopy.GetCaption: WideString;
begin
Result := TntAction_GetCaption(Self);
end;
procedure TTntEditCopy.SetCaption(const Value: WideString);
begin
TntAction_SetCaption(Self, Value);
end;
function TTntEditCopy.GetHint: WideString;
begin
Result := TntAction_GetHint(Self);
end;
procedure TTntEditCopy.SetHint(const Value: WideString);
begin
TntAction_SetHint(Self, Value);
end;
{ TTntEditPaste }
procedure TTntEditPaste.Assign(Source: TPersistent);
begin
inherited;
TntStdActn_AfterInherited_Assign(Self, Source);
end;
procedure TTntEditPaste.DefineProperties(Filer: TFiler);
begin
inherited;
TntPersistent_AfterInherited_DefineProperties(Filer, Self);
end;
function TTntEditPaste.GetCaption: WideString;
begin
Result := TntAction_GetCaption(Self);
end;
procedure TTntEditPaste.SetCaption(const Value: WideString);
begin
TntAction_SetCaption(Self, Value);
end;
function TTntEditPaste.GetHint: WideString;
begin
Result := TntAction_GetHint(Self);
end;
procedure TTntEditPaste.SetHint(const Value: WideString);
begin
TntAction_SetHint(Self, Value);
end;
{ TTntEditSelectAll }
procedure TTntEditSelectAll.Assign(Source: TPersistent);
begin
inherited;
TntStdActn_AfterInherited_Assign(Self, Source);
end;
procedure TTntEditSelectAll.DefineProperties(Filer: TFiler);
begin
inherited;
TntPersistent_AfterInherited_DefineProperties(Filer, Self);
end;
function TTntEditSelectAll.GetCaption: WideString;
begin
Result := TntAction_GetCaption(Self);
end;
procedure TTntEditSelectAll.SetCaption(const Value: WideString);
begin
TntAction_SetCaption(Self, Value);
end;
function TTntEditSelectAll.GetHint: WideString;
begin
Result := TntAction_GetHint(Self);
end;
procedure TTntEditSelectAll.SetHint(const Value: WideString);
begin
TntAction_SetHint(Self, Value);
end;
{ TTntEditUndo }
procedure TTntEditUndo.Assign(Source: TPersistent);
begin
inherited;
TntStdActn_AfterInherited_Assign(Self, Source);
end;
procedure TTntEditUndo.DefineProperties(Filer: TFiler);
begin
inherited;
TntPersistent_AfterInherited_DefineProperties(Filer, Self);
end;
function TTntEditUndo.GetCaption: WideString;
begin
Result := TntAction_GetCaption(Self);
end;
procedure TTntEditUndo.SetCaption(const Value: WideString);
begin
TntAction_SetCaption(Self, Value);
end;
function TTntEditUndo.GetHint: WideString;
begin
Result := TntAction_GetHint(Self);
end;
procedure TTntEditUndo.SetHint(const Value: WideString);
begin
TntAction_SetHint(Self, Value);
end;
{ TTntEditDelete }
procedure TTntEditDelete.Assign(Source: TPersistent);
begin
inherited;
TntStdActn_AfterInherited_Assign(Self, Source);
end;
procedure TTntEditDelete.DefineProperties(Filer: TFiler);
begin
inherited;
TntPersistent_AfterInherited_DefineProperties(Filer, Self);
end;
function TTntEditDelete.GetCaption: WideString;
begin
Result := TntAction_GetCaption(Self);
end;
procedure TTntEditDelete.SetCaption(const Value: WideString);
begin
TntAction_SetCaption(Self, Value);
end;
function TTntEditDelete.GetHint: WideString;
begin
Result := TntAction_GetHint(Self);
end;
procedure TTntEditDelete.SetHint(const Value: WideString);
begin
TntAction_SetHint(Self, Value);
end;
procedure TTntEditDelete.UpdateTarget(Target: TObject);
begin
Enabled := True;
end;
procedure TTntEditDelete.ExecuteTarget(Target: TObject);
begin
if GetControl(Target).SelLength = 0 then
GetControl(Target).SelLength := 1;
GetControl(Target).ClearSelection
end;
{ TTntWindowAction }
procedure TTntWindowAction.Assign(Source: TPersistent);
begin
inherited;
TntStdActn_AfterInherited_Assign(Self, Source);
end;
procedure TTntWindowAction.DefineProperties(Filer: TFiler);
begin
inherited;
TntPersistent_AfterInherited_DefineProperties(Filer, Self);
end;
function TTntWindowAction.GetCaption: WideString;
begin
Result := TntAction_GetCaption(Self);
end;
procedure TTntWindowAction.SetCaption(const Value: WideString);
begin
TntAction_SetCaption(Self, Value);
end;
function TTntWindowAction.GetHint: WideString;
begin
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -