亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tntactnlist.pas

?? TNT Components Source
?? PAS
?? 第 1 頁 / 共 2 頁
字號:

{*****************************************************************************}
{                                                                             }
{    Tnt Delphi Unicode Controls                                              }
{      http://www.tntware.com/delphicontrols/unicode/                         }
{        Version: 2.3.0                                                       }
{                                                                             }
{    Copyright (c) 2002-2007, Troy Wolbrink (troy.wolbrink@tntware.com)       }
{                                                                             }
{*****************************************************************************}

unit TntActnList;

{$INCLUDE TntCompilers.inc}

interface

uses
  Classes, Controls, ActnList, Buttons, ExtCtrls, ComCtrls, StdCtrls, Menus;

type
{TNT-WARN TActionList}
  TTntActionList = class(TActionList{TNT-ALLOW TActionList})
  private
    FCheckActionsTimer: TTimer;
    procedure CheckActions(Sender: TObject);
  public
    constructor Create(AOwner: TComponent); override;
  end;

  ITntAction = interface
    ['{59D0AE37-8161-4AD6-9102-14B28E5761EB}']
  end;

//---------------------------------------------------------------------------------------------
//                              ACTIONS
//---------------------------------------------------------------------------------------------

{TNT-WARN TCustomAction}
  TTntCustomAction = class(TCustomAction{TNT-ALLOW TCustomAction}, 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 TAction}
  TTntAction = class(TAction{TNT-ALLOW TAction}, 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;

//---------------------------------------------------------------------------------------------

//                             MENU ACTION LINK
//---------------------------------------------------------------------------------------------

{TNT-WARN TMenuActionLink}
  TTntMenuActionLink = class(TMenuActionLink{TNT-ALLOW TMenuActionLink})
  protected
    function IsCaptionLinked: Boolean; override;
    function IsHintLinked: Boolean; override;
    procedure SetCaption(const Value: string{TNT-ALLOW string}); override;
    procedure SetHint(const Value: string{TNT-ALLOW string}); override;
  end;

//---------------------------------------------------------------------------------------------
//                             CONTROL ACTION LINKS
//---------------------------------------------------------------------------------------------

{TNT-WARN TListViewActionLink}
  TTntListViewActionLink = class(TListViewActionLink{TNT-ALLOW TListViewActionLink})
  protected
    function IsCaptionLinked: Boolean; override;
    function IsHintLinked: Boolean; override;
    procedure SetCaption(const Value: string{TNT-ALLOW string}); override;
    procedure SetHint(const Value: string{TNT-ALLOW string}); override;
  end;

{TNT-WARN TComboBoxExActionLink}
  TTntComboBoxExActionLink = class(TComboBoxExActionLink{TNT-ALLOW TComboBoxExActionLink})
  protected
    function IsCaptionLinked: Boolean; override;
    function IsHintLinked: Boolean; override;
    procedure SetCaption(const Value: string{TNT-ALLOW string}); override;
    procedure SetHint(const Value: string{TNT-ALLOW string}); override;
  end;

{TNT-WARN TSpeedButtonActionLink}
  TTntSpeedButtonActionLink = class(TSpeedButtonActionLink{TNT-ALLOW TSpeedButtonActionLink})
  protected
    function IsCaptionLinked: Boolean; override;
    function IsHintLinked: Boolean; override;
    procedure SetCaption(const Value: string{TNT-ALLOW string}); override;
    procedure SetHint(const Value: string{TNT-ALLOW string}); override;
    {$IFDEF COMPILER_10_UP}
    function IsImageIndexLinked: Boolean; override;
    procedure SetImageIndex(Value: Integer); override;
    {$ENDIF}
  end;

{$IFDEF COMPILER_10_UP}
{TNT-WARN TBitBtnActionLink}
  TTntBitBtnActionLink = class(TBitBtnActionLink{TNT-ALLOW TBitBtnActionLink})
  protected
    function IsCaptionLinked: Boolean; override;
    function IsHintLinked: Boolean; override;
    procedure SetCaption(const Value: string{TNT-ALLOW string}); override;
    procedure SetHint(const Value: string{TNT-ALLOW string}); override;
    {$IFDEF COMPILER_10_UP}
    function IsImageIndexLinked: Boolean; override;
    procedure SetImageIndex(Value: Integer); override;
    {$ENDIF}
  end;
{$ENDIF}

{TNT-WARN TToolButtonActionLink}
  TTntToolButtonActionLink = class(TToolButtonActionLink{TNT-ALLOW TToolButtonActionLink})
  protected
    function IsCaptionLinked: Boolean; override;
    function IsHintLinked: Boolean; override;
    procedure SetCaption(const Value: string{TNT-ALLOW string}); override;
    procedure SetHint(const Value: string{TNT-ALLOW string}); override;
  end;

{TNT-WARN TButtonActionLink}
  TTntButtonActionLink = class(TButtonActionLink{TNT-ALLOW TButtonActionLink})
  protected
    function IsCaptionLinked: Boolean; override;
    function IsHintLinked: Boolean; override;
    procedure SetCaption(const Value: string{TNT-ALLOW string}); override;
    procedure SetHint(const Value: string{TNT-ALLOW string}); override;
  end;

{TNT-WARN TWinControlActionLink}
  TTntWinControlActionLink = class(TWinControlActionLink{TNT-ALLOW TWinControlActionLink})
  protected
    function IsCaptionLinked: Boolean; override;
    function IsHintLinked: Boolean; override;
    procedure SetCaption(const Value: string{TNT-ALLOW string}); override;
    procedure SetHint(const Value: string{TNT-ALLOW string}); override;
  end;

{TNT-WARN TControlActionLink}
  TTntControlActionLink = class(TControlActionLink{TNT-ALLOW TControlActionLink})
  protected
    function IsCaptionLinked: Boolean; override;
    function IsHintLinked: Boolean; override;
    procedure SetCaption(const Value: string{TNT-ALLOW string}); override;
    procedure SetHint(const Value: string{TNT-ALLOW string}); override;
  end;

//---------------------------------------------------------------------------------------------
//                             helper procs
//---------------------------------------------------------------------------------------------

//-- TCustomAction helper routines
procedure TntAction_SetCaption(Action: TCustomAction{TNT-ALLOW TCustomAction}; const Value: WideString);
function TntAction_GetCaption(Action: TCustomAction{TNT-ALLOW TCustomAction}): WideString;
function TntAction_GetNewCaption(Action: TCustomAction{TNT-ALLOW TCustomAction}; const Default: WideString): WideString;
procedure TntAction_SetHint(Action: TCustomAction{TNT-ALLOW TCustomAction}; const Value: WideString);
function TntAction_GetHint(Action: TCustomAction{TNT-ALLOW TCustomAction}): WideString;
function TntAction_GetNewHint(Action: TCustomAction{TNT-ALLOW TCustomAction}; const Default: WideString): WideString;
procedure TntAction_AfterInherited_Assign(Action: TCustomAction{TNT-ALLOW TCustomAction}; Source: TPersistent);

// -- TControl helper routines
function TntControl_GetActionLinkClass(Control: TControl; InheritedLinkClass: TControlActionLinkClass): TControlActionLinkClass;
procedure TntControl_BeforeInherited_ActionChange(Control: TControl; Sender: TObject; CheckDefaults: Boolean);

// -- TControlActionLink helper routines
function TntActionLink_IsCaptionLinked(InheritedIsCaptionLinked: Boolean; Action: TBasicAction; FClient: TControl): Boolean;
function TntActionLink_IsHintLinked(InheritedIsHintLinked: Boolean; Action: TBasicAction; FClient: TControl): Boolean;
procedure TntActionLink_SetCaption(IsCaptionLinked: Boolean; Action: TBasicAction; FClient: TControl; const Value: string{TNT-ALLOW string});
procedure TntActionLink_SetHint(IsHintLinked: Boolean; Action: TBasicAction; FClient: TControl; const Value: string{TNT-ALLOW string});

type
  TUpgradeActionListItemsProc = procedure (ActionList: TTntActionList);

var
  UpgradeActionListItemsProc: TUpgradeActionListItemsProc;

implementation

uses
  SysUtils, TntMenus, TntClasses, TntControls;

{ TActionListList }

type
  TActionListList = class(TList)
  private
    FActionList: TTntActionList;
  protected
    procedure Notify(Ptr: Pointer; Action: TListNotification); override;
  end;

procedure TActionListList.Notify(Ptr: Pointer; Action: TListNotification);
begin
  inherited;
  if (Action = lnAdded) and (FActionList <> nil) and (Ptr <> nil)
  and (not Supports(TObject(Ptr), ITntAction)) then
  begin
    FActionList.FCheckActionsTimer.Enabled := False;
    FActionList.FCheckActionsTimer.Enabled := True;
  end;
end;

{ THackActionList }

type
{$IFDEF COMPILER_6} // verified against VCL source in Delphi 6 and BCB 6
  THackCustomActionList = class(TComponent)
  private
    FActions: TList;
  end;
{$ENDIF}
{$IFDEF DELPHI_7} // verified against VCL source in Delphi 7
  THackCustomActionList = class(TComponent)
  private
    FActions: TList;
  end;
{$ENDIF}
{$IFDEF DELPHI_9} // verified against VCL source in Delphi 9
  THackCustomActionList = class(TComponent)
  private
    FActions: TList;
  end;
{$ENDIF}
{$IFDEF DELPHI_10} // verified against VCL source in Delphi 10
  THackCustomActionList = class(TComponent)
  private
    FActions: TList;
  end;
{$ENDIF}

{ TTntActionList }

constructor TTntActionList.Create(AOwner: TComponent);
begin
  inherited;
  if (csDesigning in ComponentState) then begin
    FCheckActionsTimer := TTimer.Create(Self);
    FCheckActionsTimer.Enabled := False;
    FCheckActionsTimer.Interval := 50;
    FCheckActionsTimer.OnTimer := CheckActions;
    //
    THackCustomActionList(Self).FActions.Free;
    THackCustomActionList(Self).FActions := TActionListList.Create;
    TActionListList(THackCustomActionList(Self).FActions).FActionList := Self;
  end;
end;

procedure TTntActionList.CheckActions(Sender: TObject);
begin
  if FCheckActionsTimer <> nil then begin
    FCheckActionsTimer.Enabled := False;
  end;
  Assert(csDesigning in ComponentState);
  Assert(Assigned(UpgradeActionListItemsProc));
  UpgradeActionListItemsProc(Self);
end;

{ TCustomActionHelper }

type
  TCustomActionHelper = class(TComponent)
  private
    FAction: TCustomAction{TNT-ALLOW TCustomAction};
  private
    FCaption: WideString;
    FSettingNewCaption: Boolean;
    FOldWideCaption: WideString;
    FNewAnsiCaption: AnsiString;
    procedure SetAnsiCaption(const Value: AnsiString);
    function SettingNewCaption: Boolean;
    procedure SetCaption(const Value: WideString);
    function GetCaption: WideString;
  private
    FHint: WideString;
    FSettingNewHint: Boolean;
    FOldWideHint: WideString;
    FNewAnsiHint: AnsiString;
    procedure SetAnsiHint(const Value: AnsiString);
    function SettingNewHint: Boolean;
    procedure SetHint(const Value: WideString);
    function GetHint: WideString;
  end;

procedure TCustomActionHelper.SetAnsiCaption(const Value: AnsiString);
begin
  FAction.Caption := Value;
  if (Value = '') and (FNewAnsiCaption <> '') then
    FOldWideCaption := '';
end;

function TCustomActionHelper.SettingNewCaption: Boolean;
begin
  Result := FSettingNewCaption and (FAction.Caption <> FNewAnsiCaption);
end;

function TCustomActionHelper.GetCaption: WideString;
begin
  if SettingNewCaption then
    Result := FOldWideCaption
  else
    Result := GetSyncedWideString(FCaption, FAction.Caption)
end;

procedure TCustomActionHelper.SetCaption(const Value: WideString);
begin
  FOldWideCaption := GetCaption;
  FNewAnsiCaption := Value;
  FSettingNewCaption := True;
  try
    SetSyncedWideString(Value, FCaption, FAction.Caption, SetAnsiCaption)
  finally
    FSettingNewCaption := False;
  end;
end;

procedure TCustomActionHelper.SetAnsiHint(const Value: AnsiString);
begin
  FAction.Hint := Value;
  if (Value = '') and (FNewAnsiHint <> '') then
    FOldWideHint := '';
end;

function TCustomActionHelper.SettingNewHint: Boolean;
begin
  Result := FSettingNewHint and (FAction.Hint <> FNewAnsiHint);
end;

function TCustomActionHelper.GetHint: WideString;
begin
  if SettingNewHint then
    Result := FOldWideHint
  else
    Result := GetSyncedWideString(FHint, FAction.Hint)
end;

procedure TCustomActionHelper.SetHint(const Value: WideString);
begin
  FOldWideHint := GetHint;
  FNewAnsiHint := Value;
  FSettingNewHint := True;
  try
    SetSyncedWideString(Value, FHint, FAction.Hint, SetAnsiHint)
  finally
    FSettingNewHint := False;
  end;
end;

function FindActionHelper(Action: TCustomAction{TNT-ALLOW TCustomAction}): TCustomActionHelper;
var
  i: integer;
begin
  Assert(Action <> nil);
  Result := nil;
  if Supports(Action, ITntAction) then begin
    for i := 0 to Action.ComponentCount - 1 do begin
      if Action.Components[i] is TCustomActionHelper then begin
        Result := TCustomActionHelper(Action.Components[i]);
        break;
      end;
    end;
    if Result = nil then begin
      Result := TCustomActionHelper.Create(Action);
      Result.FAction := Action;
    end;
  end;
end;

//-- TCustomAction helper routines

procedure TntAction_SetCaption(Action: TCustomAction{TNT-ALLOW TCustomAction}; const Value: WideString);
begin
  if Supports(Action, ITntAction) then
    with FindActionHelper(Action) do
      SetCaption(Value)
  else
    Action.Caption := Value;
end;

function TntAction_GetCaption(Action: TCustomAction{TNT-ALLOW TCustomAction}): WideString;
begin
  if Supports(Action, ITntAction) then
    with FindActionHelper(Action) do
      Result := GetCaption
  else
    Result := Action.Caption;
end;

function TntAction_GetNewCaption(Action: TCustomAction{TNT-ALLOW TCustomAction}; const Default: WideString): WideString;
begin
  Result := Default;
  if Supports(Action, ITntAction) then
    with FindActionHelper(Action) do
      if SettingNewCaption then
        Result := FCaption;
end;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人精品免费视频| 亚洲图片欧美综合| 成a人片国产精品| 亚洲一二三四在线| 欧美精品一区二区精品网| 91香蕉视频污在线| 奇米影视7777精品一区二区| 国产精品美女一区二区三区| 99国产一区二区三精品乱码| 麻豆精品蜜桃视频网站| 国产精品国模大尺度视频| 色综合中文字幕国产| 欧美96一区二区免费视频| 国产精品成人免费在线| 日韩一区二区三区电影| 欧美在线制服丝袜| 国产成人自拍在线| 午夜不卡av免费| 亚洲伊人伊色伊影伊综合网 | 欧美精品久久99| 粉嫩13p一区二区三区| 婷婷丁香激情综合| 久久精品亚洲国产奇米99| 在线免费观看日韩欧美| 岛国av在线一区| 国产精品综合一区二区三区| 天天亚洲美女在线视频| 国产精品国产自产拍在线| 国产亚洲1区2区3区| 欧美一区欧美二区| 91久久精品一区二区二区| 成人精品亚洲人成在线| 精品一区二区日韩| 一区二区三区中文字幕精品精品| 国产精品乱人伦中文| 日韩你懂的电影在线观看| 在线精品视频免费观看| 日本韩国欧美一区| 99这里都是精品| 国产一区二区福利视频| 国内精品写真在线观看| 日韩精品一二区| 亚洲精品第一国产综合野| 综合久久国产九一剧情麻豆| 久久精品夜色噜噜亚洲aⅴ| 欧美一区永久视频免费观看| 91精品中文字幕一区二区三区| 色呦呦国产精品| av一区二区三区| 91国在线观看| 色婷婷综合久久久久中文一区二区 | 日韩美女主播在线视频一区二区三区| 欧美探花视频资源| 91久久精品一区二区三| 国产成人精品影视| av在线免费不卡| 不卡视频在线看| 国产精品影视天天线| 粉嫩欧美一区二区三区高清影视| 精品夜夜嗨av一区二区三区| 视频一区二区三区在线| 国产在线麻豆精品观看| 国产乱子轮精品视频| 日韩精品欧美成人高清一区二区| 美美哒免费高清在线观看视频一区二区 | 欧美亚洲国产一区二区三区| 91麻豆免费在线观看| 91美女视频网站| 91精品国产综合久久久蜜臀图片| 91精品蜜臀在线一区尤物| 欧美一区午夜精品| 中文字幕精品—区二区四季| 国产精品久久久久久久久晋中| 中文字幕中文乱码欧美一区二区| 亚洲一区二区三区在线播放| 视频一区二区三区入口| 久久精品av麻豆的观看方式| 成人小视频免费观看| 91亚洲资源网| 欧美丝袜自拍制服另类| 久久久久久97三级| 亚洲色图20p| 一区二区三区视频在线观看| 日本aⅴ亚洲精品中文乱码| 极品尤物av久久免费看| 国产精品1区2区3区在线观看| 91久久线看在观草草青青| 欧美绝品在线观看成人午夜影视| 日韩久久久精品| 一区二区三区中文字幕电影 | 亚洲国产精品精华液2区45| 国产精品毛片a∨一区二区三区| 国产精品女上位| 日韩av一区二区在线影视| 国产一区二区三区免费在线观看| 激情深爱一区二区| 欧美日韩dvd在线观看| 欧美tk—视频vk| 亚洲人成影院在线观看| 久久成人综合网| 91在线播放网址| 精品国产区一区| 亚洲国产精品天堂| 国产成人在线色| 在线观看日韩一区| 国产精品美女一区二区在线观看| 亚洲va国产天堂va久久en| 天堂一区二区在线| 一本一道久久a久久精品| 精品乱人伦一区二区三区| 久久精品水蜜桃av综合天堂| 奇米色一区二区| 色呦呦一区二区三区| 欧美成人精品二区三区99精品| 国产精品传媒视频| 国产麻豆精品视频| 正在播放一区二区| 亚洲少妇中出一区| 国产激情视频一区二区在线观看| 欧美日韩免费观看一区三区| 国产精品美女一区二区三区| 麻豆一区二区99久久久久| 在线观看中文字幕不卡| 国产日韩一级二级三级| 捆绑调教美女网站视频一区| 欧美视频第二页| 亚洲欧美综合另类在线卡通| 丝袜诱惑制服诱惑色一区在线观看 | 色视频欧美一区二区三区| 国产亚洲一二三区| 免费成人在线观看视频| 日韩欧美中文字幕制服| 亚洲成人在线网站| 色老汉av一区二区三区| 一区二区不卡在线播放| av不卡一区二区三区| 国产女人水真多18毛片18精品视频| 国产一区在线视频| 日韩午夜三级在线| 亚洲成人一区二区| 欧美日韩成人一区二区| 亚洲午夜精品久久久久久久久| 丰满少妇在线播放bd日韩电影| 精品噜噜噜噜久久久久久久久试看 | 亚洲成av人影院在线观看网| 色婷婷精品大在线视频| 一区二区三区中文字幕电影| 色综合久久综合网欧美综合网| 亚洲国产经典视频| 91小视频免费看| 一区二区三区欧美日| 色综合色狠狠天天综合色| 亚洲福利电影网| 欧美日韩精品一区二区在线播放| 亚洲精品乱码久久久久久 | 国产精品99久| 日韩理论片一区二区| 99综合影院在线| 亚洲人快播电影网| 91精品国产综合久久福利软件| 亚洲一区二区3| 欧美亚洲一区三区| 久久综合综合久久综合| 欧美不卡视频一区| 美国av一区二区| 久久久91精品国产一区二区三区| 国产成人av电影在线播放| 亚洲女爱视频在线| 欧美性大战xxxxx久久久| 日韩精品乱码免费| 国产精品看片你懂得| 91亚洲国产成人精品一区二区三| 亚洲天堂2014| 欧美大片日本大片免费观看| 黑人巨大精品欧美黑白配亚洲| 久久久久久久综合狠狠综合| 从欧美一区二区三区| 自拍偷在线精品自拍偷无码专区| 91精品国产综合久久久久久久 | 国产精选一区二区三区| 亚洲欧美日韩国产综合在线| 欧美日韩极品在线观看一区| 日本大胆欧美人术艺术动态| 国产精品高潮久久久久无| 欧美午夜免费电影| 日韩精品欧美成人高清一区二区| 国产精品免费视频网站| 欧美天堂一区二区三区| 国产suv精品一区二区三区| 亚洲午夜在线观看视频在线| 日韩午夜在线播放| 成人av在线影院| 日韩av电影一区| 亚洲美女屁股眼交3| 欧美一区二区三区四区高清 | 国产电影精品久久禁18| 日韩精品乱码免费| 亚洲欧美乱综合| 中文文精品字幕一区二区| 日韩欧美一区二区三区在线|