亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
久久精品理论片| 一本到不卡精品视频在线观看| 一区精品在线播放| 欧美久久久久中文字幕| 成人一级黄色片| 日韩成人免费看| 亚洲精选一二三| 欧美成人精品福利| 欧美日韩免费一区二区三区| 国产91精品久久久久久久网曝门| 午夜精品久久久| 亚洲精品高清视频在线观看| 久久影院午夜论| 欧美另类变人与禽xxxxx| 91理论电影在线观看| 国产一区二区不卡| 日韩综合小视频| 亚洲自拍偷拍欧美| 成人免费在线播放视频| 精品国产一区久久| 欧美一区日本一区韩国一区| 在线观看一区日韩| 色综合天天在线| 北岛玲一区二区三区四区| 国产乱码字幕精品高清av| 美日韩黄色大片| 日韩av中文字幕一区二区三区| 1024成人网| 国产精品久久久久久久久久免费看 | 日本韩国欧美国产| 成人一级黄色片| 成人免费看黄yyy456| 国产老妇另类xxxxx| 国产一区二区影院| 国内精品久久久久影院薰衣草| 日韩不卡在线观看日韩不卡视频| 亚洲 欧美综合在线网络| 亚洲女女做受ⅹxx高潮| 亚洲乱码国产乱码精品精的特点| 国产精品美女久久久久久| 国产片一区二区三区| 久久日韩粉嫩一区二区三区| 337p粉嫩大胆色噜噜噜噜亚洲| 欧美一区二区视频在线观看2022| 欧美日韩1区2区| 欧美精品一二三| 日韩欧美电影一二三| 精品久久久久香蕉网| 精品国产一区二区三区不卡 | 欧美va亚洲va在线观看蝴蝶网| 91精品国产日韩91久久久久久| 欧美精品自拍偷拍| 欧美一区二区三区公司| 精品国偷自产国产一区| 久久精品在这里| 国产精品素人一区二区| 亚洲欧美一区二区三区国产精品| 亚洲视频一区二区免费在线观看| 亚洲视频图片小说| 亚洲一二三区在线观看| 美女视频黄频大全不卡视频在线播放| 日本免费新一区视频| 国产在线一区观看| 成人精品免费网站| 在线观看91视频| 欧美一二三四在线| 国产视频一区二区在线| 国产精品成人午夜| 亚洲国产欧美日韩另类综合 | av亚洲精华国产精华| 91福利资源站| 日韩精品一区二区三区在线 | 最新国产の精品合集bt伙计| 亚洲青青青在线视频| 亚洲va国产天堂va久久en| 国产一区二区三区不卡在线观看| 99精品久久久久久| 在线成人av网站| 日本一区二区三级电影在线观看| 亚洲欧洲综合另类| 九九久久精品视频| 色菇凉天天综合网| 精品剧情v国产在线观看在线| 国产精品每日更新| 国产成人av电影在线播放| 91一区二区在线| 欧美一区二区三区婷婷月色| 国产精品人人做人人爽人人添| 午夜久久久影院| 成人激情电影免费在线观看| 欧美又粗又大又爽| 久久久99精品免费观看| 午夜精品久久久久影视| 99久久亚洲一区二区三区青草| 91精品国产色综合久久| 亚洲免费在线视频| 国产麻豆91精品| 欧美欧美欧美欧美| 亚洲视频一区在线| 成人中文字幕合集| 欧美刺激午夜性久久久久久久| 成人欧美一区二区三区1314| 狠狠色伊人亚洲综合成人| 欧美色电影在线| 综合色天天鬼久久鬼色| 国产精品香蕉一区二区三区| 欧美猛男超大videosgay| 国产精品久久久久aaaa樱花| 久久精品免费观看| 在线成人高清不卡| 亚洲国产欧美在线人成| 一本色道久久综合狠狠躁的推荐| 精品久久一二三区| 日本不卡1234视频| 欧美日韩视频第一区| 亚洲激情综合网| 色哟哟精品一区| 国产精品视频一二三区| 国产乱子伦视频一区二区三区| 欧美一区二区在线免费播放| 亚洲小说春色综合另类电影| 91亚洲精品乱码久久久久久蜜桃| 久久亚区不卡日本| 久久成人免费网站| 欧美成人a视频| 免费成人在线影院| 欧美人妇做爰xxxⅹ性高电影| 亚洲综合偷拍欧美一区色| 91视频你懂的| 悠悠色在线精品| 91成人国产精品| 亚洲在线成人精品| 欧美日韩亚洲另类| 图片区日韩欧美亚洲| 欧美日韩亚洲综合一区| 日韩一区欧美二区| 欧美不卡一区二区| 国产麻豆视频精品| 国产网红主播福利一区二区| 国产老肥熟一区二区三区| 国产免费成人在线视频| 国产大陆精品国产| 国产精品久久综合| 91一区一区三区| 亚洲电影一区二区三区| 7878成人国产在线观看| 美女看a上一区| 久久久久久久久久久久久夜| 国产成人免费xxxxxxxx| 国产精品乱码人人做人人爱 | a在线欧美一区| 亚洲黄色小说网站| 欧美日韩成人综合天天影院| 日韩成人免费在线| 久久久国产精华| 成人av一区二区三区| 亚洲狼人国产精品| 欧美一卡2卡3卡4卡| 国产一区二区三区高清播放| 国产精品黄色在线观看| 欧美亚洲动漫精品| 免费视频最近日韩| 中文在线一区二区| 欧亚一区二区三区| 久草在线在线精品观看| 国产精品国产自产拍高清av| 色偷偷久久人人79超碰人人澡| 亚洲综合视频网| 日韩欧美高清一区| 91小视频免费看| 美女一区二区三区在线观看| 久久久久久电影| 日本丰满少妇一区二区三区| 日韩电影免费在线观看网站| 国产亚洲一本大道中文在线| 欧洲国内综合视频| 国内成+人亚洲+欧美+综合在线| 亚洲色欲色欲www| 精品欧美一区二区三区精品久久| 99国产麻豆精品| 麻豆国产欧美日韩综合精品二区| 国产女主播在线一区二区| 欧美日韩成人综合天天影院| 国产99久久久精品| 日韩和欧美的一区| 综合激情网...| 精品毛片乱码1区2区3区| 99精品久久99久久久久| 久久99国产精品久久99果冻传媒| 亚洲欧美激情小说另类| 精品国产电影一区二区| 91高清在线观看| 成人天堂资源www在线| 日本麻豆一区二区三区视频| 中文字幕在线不卡一区| 欧美成人综合网站| 欧美日韩高清不卡| 色综合激情五月| 成熟亚洲日本毛茸茸凸凹| 免费不卡在线视频|