[sword-cvs] sword/apps/windoze/CBuilder5/BibleCS/TntUnicodeControls TntActnList.pas,NONE,1.1 TntExtActns.pas,NONE,1.1 TntListActns.pas,NONE,1.1 TntStdActns.pas,NONE,1.1 TntButtons.pas,1.1,1.2 TntCheckLst.pas,1.1,1.2 TntComCtrls.pas,1.2,1.3 TntControls.pas,1.2,1.3 TntExtCtrls.pas,1.1,1.2 TntForms.pas,1.2,1.3 TntGrids.pas,1.1,1.2 TntMenus.pas,1.1,1.2 TntStdCtrls.pas,1.2,1.3

sword@www.crosswire.org sword@www.crosswire.org
Mon, 27 Jan 2003 01:52:34 -0700


Update of /usr/local/cvsroot/sword/apps/windoze/CBuilder5/BibleCS/TntUnicodeControls
In directory www:/tmp/cvs-serv10426/apps/windoze/CBuilder5/BibleCS/TntUnicodeControls

Modified Files:
	TntButtons.pas TntCheckLst.pas TntComCtrls.pas TntControls.pas 
	TntExtCtrls.pas TntForms.pas TntGrids.pas TntMenus.pas 
	TntStdCtrls.pas 
Added Files:
	TntActnList.pas TntExtActns.pas TntListActns.pas 
	TntStdActns.pas 
Log Message:
update to Tnt January 23, 2003 (was hoping it would fix a bug that turned out not to be there)

--- NEW FILE: TntActnList.pas ---
unit TntActnList;

interface

uses Classes, Controls, ActnList, Buttons, TntControls, 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
//---------------------------------------------------------------------------------------------

{$IFNDEF VER130}

{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;
  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
//---------------------------------------------------------------------------------------------

procedure TntAction_SetCaption(Action: TCustomAction{TNT-ALLOW TCustomAction}; const Value: WideString);
function TntAction_GetCaption(Action: TCustomAction{TNT-ALLOW TCustomAction}): WideString;
procedure TntAction_SetHint(Action: TCustomAction{TNT-ALLOW TCustomAction}; const Value: WideString);
function TntAction_GetHint(Action: TCustomAction{TNT-ALLOW TCustomAction}): WideString;

procedure TntAction_AfterInherited_Assign(Action: TCustomAction{TNT-ALLOW TCustomAction}; Source: TPersistent);

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

type
  TUpgradeActionListItemsProc = procedure (ActionList: TTntActionList);

var
  UpgradeActionListItemsProc: TUpgradeActionListItemsProc;

implementation

uses TntWideStrPropHelper, SysUtils, TntMenus;

{$IFDEF VER130}
function Supports(const Instance: TObject; const IID: TGUID): Boolean;
var
  Temp: IUnknown;
begin
  Result := Instance.GetInterface(IID, Temp);
end;
{$ENDIF}

{ 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 VER130} // Delphi 5
  THackCustomActionList = class(TComponent)
  private
    FActions: TList;
  end;
{$ENDIF}
{$IFDEF VER140} // Delphi 6
  THackCustomActionList = class(TComponent)
  private
    FActions: TList;
  end;
{$ENDIF}
{$IFDEF VER150} // Delphi 7
  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;
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;
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
      else
        raise Exception.Create('TNT Internal Error: SettingNewCaption was expected.');
end;

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

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

function TntAction_GetNewHint(Action: TCustomAction{TNT-ALLOW TCustomAction}; const Default: WideString): WideString;
begin
  Result := Default;
  if Supports(Action, ITntAction) then
    with FindActionHelper(Action) do
      if SettingNewHint then
        Result := FHint
      else
        raise Exception.Create('TNT Internal Error: SettingNewHint was expected.');
end;

procedure TntAction_AfterInherited_Assign(Action: TCustomAction{TNT-ALLOW TCustomAction}; Source: TPersistent);
begin
  with Action do begin
    if (Source is TCustomAction{TNT-ALLOW TCustomAction}) then begin
      Caption := TntAction_GetCaption(Source as TCustomAction{TNT-ALLOW TCustomAction});
      Hint := TntAction_GetHint(Source as TCustomAction{TNT-ALLOW TCustomAction});
    end else if (Source is TControl) then begin
      Caption := TntControl_GetText(Source as TControl);
      Hint := TntControl_GetHint(Source as TControl);
    end;
  end;
end;

// -- TControl helper routines

function TntControl_GetActionLinkClass(Control: TControl; InheritedLinkClass: TControlActionLinkClass): TControlActionLinkClass;
begin
  {$IFNDEF VER130}
  if Control is TCustomListView{TNT-ALLOW TCustomListView} then
    Result := TTntListViewActionLink
  else if Control is TComboBoxEx then
    Result := TTntComboBoxExActionLink
  else if Control is TSpeedButton{TNT-ALLOW TSpeedButton} then
    Result := TTntSpeedButtonActionLink
  else
  {$ENDIF}
  begin
    if Control is TToolButton then
      Result := TTntToolButtonActionLink
    else if Control is TButtonControl then
      Result := TTntButtonActionLink
    else if Control is TWinControl then
      Result := TTntWinControlActionLink
    else
      Result := TTntControlActionLink;
  end;

  Assert(Result.ClassParent = InheritedLinkClass);
end;

procedure TntControl_BeforeInherited_ActionChange(Control: TControl; Sender: TObject; CheckDefaults: Boolean);
begin
  if (Sender is TCustomAction{TNT-ALLOW TCustomAction}) and Supports(Sender, ITntAction) then begin
    if not CheckDefaults or (TntControl_GetText(Control) = '') or (TntControl_GetText(Control) = Control.Name) then
      TntControl_SetText(Control, TntAction_GetCaption(TCustomAction{TNT-ALLOW TCustomAction}(Sender)));
    if not CheckDefaults or (TntControl_GetHint(Control) = '') then
      TntControl_SetHint(Control, TntAction_GetHint(TCustomAction{TNT-ALLOW TCustomAction}(Sender)));
  end;
end;

// -- TControlActionLink helper routines

function TntActionLink_IsCaptionLinked(InheritedIsCaptionLinked: Boolean; Action: TBasicAction; FClient: TControl): Boolean;
begin
  Result := InheritedIsCaptionLinked
    and (TntAction_GetCaption(Action as TCustomAction{TNT-ALLOW TCustomAction}) = TntControl_GetText(FClient));
end;

function TntActionLink_IsHintLinked(InheritedIsHintLinked: Boolean; Action: TBasicAction; FClient: TControl): Boolean;
begin
  Result := InheritedIsHintLinked
        and (TntAction_GetHint(Action as TCustomAction{TNT-ALLOW TCustomAction}) = TntControl_GetHint(FClient));
end;

procedure TntActionLink_SetCaption(IsCaptionLinked: Boolean; Action: TBasicAction; FClient: TControl; const Value: string{TNT-ALLOW string});
begin
  if IsCaptionLinked then
    TntControl_SetText(FClient, TntAction_GetNewCaption(Action as TCustomAction{TNT-ALLOW TCustomAction}, Value));
end;

procedure TntActionLink_SetHint(IsHintLinked: Boolean; Action: TBasicAction; FClient: TControl; const Value: string{TNT-ALLOW string});
begin
  if IsHintLinked then
    TntControl_SetHint(FClient, TntAction_GetNewHint(Action as TCustomAction{TNT-ALLOW TCustomAction}, Value));
end;

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

{ TTntCustomAction }

procedure TTntCustomAction.Assign(Source: TPersistent);
begin
  inherited;
  TntAction_AfterInherited_Assign(Self, Source);
end;

procedure TTntCustomAction.DefineProperties(Filer: TFiler);
begin
  inherited;
  DefineWideProperties(Filer, Self);
end;

function TTntCustomAction.GetCaption: WideString;
begin
  Result := TntAction_GetCaption(Self);
end;

procedure TTntCustomAction.SetCaption(const Value: WideString);
begin
  TntAction_SetCaption(Self, Value);
end;

function TTntCustomAction.GetHint: WideString;
begin
  Result := TntAction_GetHint(Self);
end;

procedure TTntCustomAction.SetHint(const Value: WideString);
begin
  TntAction_SetHint(Self, Value);
end;

{ TTntAction }

procedure TTntAction.Assign(Source: TPersistent);
begin
  inherited;
  TntAction_AfterInherited_Assign(Self, Source);
end;

procedure TTntAction.DefineProperties(Filer: TFiler);
begin
  inherited;
  DefineWideProperties(Filer, Self);
end;

function TTntAction.GetCaption: WideString;
begin
  Result := TntAction_GetCaption(Self);
end;

procedure TTntAction.SetCaption(const Value: WideString);
begin
  TntAction_SetCaption(Self, Value);
end;

function TTntAction.GetHint: WideString;
begin
  Result := TntAction_GetHint(Self);
end;

procedure TTntAction.SetHint(const Value: WideString);
begin
  TntAction_SetHint(Self, Value);
end;

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

{ TTntMenuActionLink }

function TTntMenuActionLink.IsCaptionLinked: Boolean;
begin
  Result := inherited IsCaptionLinked
    and WideSameCaption(TntAction_GetCaption(Action as TCustomAction{TNT-ALLOW TCustomAction}), (FClient as TTntMenuItem).Caption);
end;

function TTntMenuActionLink.IsHintLinked: Boolean;
begin
  Result := inherited IsHintLinked
        and (TntAction_GetHint(Action as TCustomAction{TNT-ALLOW TCustomAction}) = (FClient as TTntMenuItem).Hint);
end;

procedure TTntMenuActionLink.SetCaption(const Value: string{TNT-ALLOW string});
begin
  if IsCaptionLinked then
    (FClient as TTntMenuItem).Caption := TntAction_GetNewCaption(Action as TCustomAction{TNT-ALLOW TCustomAction}, Value);
end;

procedure TTntMenuActionLink.SetHint(const Value: string{TNT-ALLOW string});
begin
  if IsHintLinked then
    (FClient as TTntMenuItem).Hint := TntAction_GetNewHint(Action as TCustomAction{TNT-ALLOW TCustomAction}, Value);
end;

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

{$IFNDEF VER130}

{ TTntListViewActionLink }

function TTntListViewActionLink.IsCaptionLinked: Boolean;
begin
  Result := TntActionLink_IsCaptionLinked(inherited IsCaptionLinked, Action, FClient);
end;

function TTntListViewActionLink.IsHintLinked: Boolean;
begin
  Result := TntActionLink_IsHintLinked(inherited IsHintLinked, Action, FClient);
end;

procedure TTntListViewActionLink.SetCaption(const Value: string{TNT-ALLOW string});
begin
  TntActionLink_SetCaption(IsCaptionLinked, Action, FClient, Value);
end;

procedure TTntListViewActionLink.SetHint(const Value: string{TNT-ALLOW string});
begin
  TntActionLink_SetHint(IsHintLinked, Action, FClient, Value);
end;

{ TTntComboBoxExActionLink }

function TTntComboBoxExActionLink.IsCaptionLinked: Boolean;
begin
  Result := TntActionLink_IsCaptionLinked(inherited IsCaptionLinked, Action, FClient);
end;

function TTntComboBoxExActionLink.IsHintLinked: Boolean;
begin
  Result := TntActionLink_IsHintLinked(inherited IsHintLinked, Action, FClient);
end;

procedure TTntComboBoxExActionLink.SetCaption(const Value: string{TNT-ALLOW string});
begin
  TntActionLink_SetCaption(IsCaptionLinked, Action, FClient, Value);
end;

procedure TTntComboBoxExActionLink.SetHint(const Value: string{TNT-ALLOW string});
begin
  TntActionLink_SetHint(IsHintLinked, Action, FClient, Value);
end;

{ TTntSpeedButtonActionLink }

function TTntSpeedButtonActionLink.IsCaptionLinked: Boolean;
begin
  Result := TntActionLink_IsCaptionLinked(inherited IsCaptionLinked, Action, FClient);
end;

function TTntSpeedButtonActionLink.IsHintLinked: Boolean;
begin
  Result := TntActionLink_IsHintLinked(inherited IsHintLinked, Action, FClient);
end;

procedure TTntSpeedButtonActionLink.SetCaption(const Value: string{TNT-ALLOW string});
begin
  TntActionLink_SetCaption(IsCaptionLinked, Action, FClient, Value);
end;

procedure TTntSpeedButtonActionLink.SetHint(const Value: string{TNT-ALLOW string});
begin
  TntActionLink_SetHint(IsHintLinked, Action, FClient, Value);
end;

{$ENDIF}

{ TTntToolButtonActionLink }

function TTntToolButtonActionLink.IsCaptionLinked: Boolean;
begin
  Result := TntActionLink_IsCaptionLinked(inherited IsCaptionLinked, Action, FClient);
end;

function TTntToolButtonActionLink.IsHintLinked: Boolean;
begin
  Result := TntActionLink_IsHintLinked(inherited IsHintLinked, Action, FClient);
end;

procedure TTntToolButtonActionLink.SetCaption(const Value: string{TNT-ALLOW string});
begin
  TntActionLink_SetCaption(IsCaptionLinked, Action, FClient, Value);
end;

procedure TTntToolButtonActionLink.SetHint(const Value: string{TNT-ALLOW string});
begin
  TntActionLink_SetHint(IsHintLinked, Action, FClient, Value);
end;

{ TTntButtonActionLink }

function TTntButtonActionLink.IsCaptionLinked: Boolean;
begin
  Result := TntActionLink_IsCaptionLinked(inherited IsCaptionLinked, Action, FClient);
end;

function TTntButtonActionLink.IsHintLinked: Boolean;
begin
  Result := TntActionLink_IsHintLinked(inherited IsHintLinked, Action, FClient);
end;

procedure TTntButtonActionLink.SetCaption(const Value: string{TNT-ALLOW string});
begin
  TntActionLink_SetCaption(IsCaptionLinked, Action, FClient, Value);
end;

procedure TTntButtonActionLink.SetHint(const Value: string{TNT-ALLOW string});
begin
  TntActionLink_SetHint(IsHintLinked, Action, FClient, Value);
end;

{ TTntWinControlActionLink }

function TTntWinControlActionLink.IsCaptionLinked: Boolean;
begin
  Result := TntActionLink_IsCaptionLinked(inherited IsCaptionLinked, Action, FClient);
end;

function TTntWinControlActionLink.IsHintLinked: Boolean;
begin
  Result := TntActionLink_IsHintLinked(inherited IsHintLinked, Action, FClient);
end;

procedure TTntWinControlActionLink.SetCaption(const Value: string{TNT-ALLOW string});
begin
  TntActionLink_SetCaption(IsCaptionLinked, Action, FClient, Value);
end;

procedure TTntWinControlActionLink.SetHint(const Value: string{TNT-ALLOW string});
begin
  TntActionLink_SetHint(IsHintLinked, Action, FClient, Value);
end;

{ TTntControlActionLink }

function TTntControlActionLink.IsCaptionLinked: Boolean;
begin
  Result := TntActionLink_IsCaptionLinked(inherited IsCaptionLinked, Action, FClient);
end;

function TTntControlActionLink.IsHintLinked: Boolean;
begin
  Result := TntActionLink_IsHintLinked(inherited IsHintLinked, Action, FClient);
end;

procedure TTntControlActionLink.SetCaption(const Value: string{TNT-ALLOW string});
begin
  TntActionLink_SetCaption(IsCaptionLinked, Action, FClient, Value);
end;

procedure TTntControlActionLink.SetHint(const Value: string{TNT-ALLOW string});
begin
  TntActionLink_SetHint(IsHintLinked, Action, FClient, Value);
end;

end.

--- NEW FILE: TntExtActns.pas ---
unit TntExtActns;

interface

uses Classes, ActnList, TntActnList, TntStdActns, ExtActns;

type
{TNT-WARN TCustomFileRun}
  TTntCustomFileRun = class(TCustomFileRun{TNT-ALLOW TCustomFileRun}, 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
[...1346 lines suppressed...]
begin
  Result := TntAction_GetCaption(Self);
end;

procedure TTntListControlMoveSelection.SetCaption(const Value: WideString);
begin
  TntAction_SetCaption(Self, Value);
end;

function TTntListControlMoveSelection.GetHint: WideString;
begin
  Result := TntAction_GetHint(Self);
end;

procedure TTntListControlMoveSelection.SetHint(const Value: WideString);
begin
  TntAction_SetHint(Self, Value);
end;

end.

--- NEW FILE: TntListActns.pas ---
unit TntListActns;

interface

uses Classes, ActnList, TntActnList, ListActns;

type
{TNT-WARN TCustomListAction}
  TTntCustomListAction = class(TCustomListAction{TNT-ALLOW TCustomListAction}, 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 TStaticListAction}
  TTntStaticListAction = class(TStaticListAction{TNT-ALLOW TStaticListAction}, 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 TVirtualListAction}
  TTntVirtualListAction = class(TVirtualListAction{TNT-ALLOW TVirtualListAction}, 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;

implementation

uses TntWideStrPropHelper;

{TNT-IGNORE-UNIT}

type TAccessCustomListAction = class(TCustomListAction);

procedure TntListActn_AfterInherited_Assign(Action: TCustomAction{TNT-ALLOW TCustomAction}; Source: TPersistent);
begin
  TntAction_AfterInherited_Assign(Action, Source);
  // TCustomListAction
  if (Action is TCustomListAction) and (Source is TCustomListAction) then begin
    TAccessCustomListAction(Action).Images         := TAccessCustomListAction(Source).Images;
    TAccessCustomListAction(Action).OnGetItemCount := TAccessCustomListAction(Source).OnGetItemCount;
    TAccessCustomListAction(Action).OnItemSelected := TAccessCustomListAction(Source).OnItemSelected;
    TAccessCustomListAction(Action).Active         := TAccessCustomListAction(Source).Active;
    TAccessCustomListAction(Action).ItemIndex      := TAccessCustomListAction(Source).ItemIndex;
  end;
  // TStaticListAction
  if (Action is TStaticListAction) and (Source is TStaticListAction) then begin
    TStaticListAction(Action).Items     := TStaticListAction(Source).Items;
    TStaticListAction(Action).OnGetItem := TStaticListAction(Source).OnGetItem;
  end;
  // TVirtualListAction
  if (Action is TVirtualListAction) and (Source is TVirtualListAction) then begin
    TVirtualListAction(Action).OnGetItem := TVirtualListAction(Source).OnGetItem;
  end;
end;

//-------------------------
//    TNT LIST ACTNS
//-------------------------

{ TTntCustomListAction }

procedure TTntCustomListAction.Assign(Source: TPersistent);
begin
  inherited;
  TntListActn_AfterInherited_Assign(Self, Source);
end;

procedure TTntCustomListAction.DefineProperties(Filer: TFiler);
begin
  inherited;
  DefineWideProperties(Filer, Self);
end;

function TTntCustomListAction.GetCaption: WideString;
begin
  Result := TntAction_GetCaption(Self);
end;

procedure TTntCustomListAction.SetCaption(const Value: WideString);
begin
  TntAction_SetCaption(Self, Value);
end;

function TTntCustomListAction.GetHint: WideString;
begin
  Result := TntAction_GetHint(Self);
end;

procedure TTntCustomListAction.SetHint(const Value: WideString);
begin
  TntAction_SetHint(Self, Value);
end;

{ TTntStaticListAction }

procedure TTntStaticListAction.Assign(Source: TPersistent);
begin
  inherited;
  TntListActn_AfterInherited_Assign(Self, Source);
end;

procedure TTntStaticListAction.DefineProperties(Filer: TFiler);
begin
  inherited;
  DefineWideProperties(Filer, Self);
end;

function TTntStaticListAction.GetCaption: WideString;
begin
  Result := TntAction_GetCaption(Self);
end;

procedure TTntStaticListAction.SetCaption(const Value: WideString);
begin
  TntAction_SetCaption(Self, Value);
end;

function TTntStaticListAction.GetHint: WideString;
begin
  Result := TntAction_GetHint(Self);
end;

procedure TTntStaticListAction.SetHint(const Value: WideString);
begin
  TntAction_SetHint(Self, Value);
end;

{ TTntVirtualListAction }

procedure TTntVirtualListAction.Assign(Source: TPersistent);
begin
  inherited;
  TntListActn_AfterInherited_Assign(Self, Source);
end;

procedure TTntVirtualListAction.DefineProperties(Filer: TFiler);
begin
  inherited;
  DefineWideProperties(Filer, Self);
end;

function TTntVirtualListAction.GetCaption: WideString;
begin
  Result := TntAction_GetCaption(Self);
end;

procedure TTntVirtualListAction.SetCaption(const Value: WideString);
begin
  TntAction_SetCaption(Self, Value);
end;

function TTntVirtualListAction.GetHint: WideString;
begin
  Result := TntAction_GetHint(Self);
end;

procedure TTntVirtualListAction.SetHint(const Value: WideString);
begin
  TntAction_SetHint(Self, Value);
end;

end.

--- NEW FILE: TntStdActns.pas ---
unit TntStdActns;

interface

uses Classes, ActnList, TntActnList, StdActns;

type
{TNT-WARN THintAction}
  TTntHintAction = class(THintAction{TNT-ALLOW THintAction}, 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
[...1824 lines suppressed...]
end;

procedure TTntPrintDlg.SetCaption(const Value: WideString);
begin
  TntAction_SetCaption(Self, Value);
end;

function TTntPrintDlg.GetHint: WideString;
begin
  Result := TntAction_GetHint(Self);
end;

procedure TTntPrintDlg.SetHint(const Value: WideString);
begin
  TntAction_SetHint(Self, Value);
end;

{$ENDIF}

end.

Index: TntButtons.pas
===================================================================
RCS file: /usr/local/cvsroot/sword/apps/windoze/CBuilder5/BibleCS/TntUnicodeControls/TntButtons.pas,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TntButtons.pas	23 Jan 2003 00:02:43 -0000	1.1
--- TntButtons.pas	27 Jan 2003 08:52:31 -0000	1.2
***************
*** 24,27 ****
--- 24,29 ----
      procedure Paint; override;
      procedure DefineProperties(Filer: TFiler); override;
+     function GetActionLinkClass: TControlActionLinkClass; override;
+     procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
    published
      property Caption: TWideCaption read GetCaption write SetCaption stored IsCaptionStored;
***************
*** 49,52 ****
--- 51,56 ----
      procedure CreateWindowHandle(const Params: TCreateParams); override;
      procedure DefineProperties(Filer: TFiler); override;
+     function GetActionLinkClass: TControlActionLinkClass; override;
+     procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
    published
      property Caption: TWideCaption read GetCaption write SetCaption stored IsCaptionStored;
***************
*** 61,65 ****
  
  uses SysUtils, TypInfo, {$IFDEF VER130} Consts, {$ELSE} RTLConsts, {$ENDIF}
!   {$IFDEF VER150} Themes, {$ENDIF} TntClasses, TntGraphics;
  
  // Many routines in this unit are nearly the same as those found in Buttons.pas.  They are
--- 65,69 ----
  
  uses SysUtils, TypInfo, {$IFDEF VER130} Consts, {$ELSE} RTLConsts, {$ENDIF}
!   {$IFDEF VER150} Themes, {$ENDIF} TntClasses, TntGraphics, TntActnList, ActnList;
  
  // Many routines in this unit are nearly the same as those found in Buttons.pas.  They are
***************
*** 367,396 ****
  function TTntSpeedButton.IsCaptionStored: Boolean;
  begin
!   Result := TntIsCaptionStored(Self)
  end;
  
  function TTntSpeedButton.GetCaption: TWideCaption;
  begin
!   Result := WideGetWindowText(Self);
  end;
  
  procedure TTntSpeedButton.SetCaption(const Value: TWideCaption);
  begin
!   WideSetWindowText(Self, Value);
  end;
  
  function TTntSpeedButton.IsHintStored: Boolean;
  begin
!   Result := TntIsHintStored(Self)
  end;
  
  function TTntSpeedButton.GetHint: WideString;
  begin
!   Result := WideGetWindowHint(Self)
  end;
  
  procedure TTntSpeedButton.SetHint(const Value: WideString);
  begin
!   WideSetWindowHint(Self, Value);
  end;
  
--- 371,400 ----
  function TTntSpeedButton.IsCaptionStored: Boolean;
  begin
!   Result := TntControl_IsCaptionStored(Self)
  end;
  
  function TTntSpeedButton.GetCaption: TWideCaption;
  begin
!   Result := TntControl_GetText(Self);
  end;
  
  procedure TTntSpeedButton.SetCaption(const Value: TWideCaption);
  begin
!   TntControl_SetText(Self, Value);
  end;
  
  function TTntSpeedButton.IsHintStored: Boolean;
  begin
!   Result := TntControl_IsHintStored(Self)
  end;
  
  function TTntSpeedButton.GetHint: WideString;
  begin
!   Result := TntControl_GetHint(Self)
  end;
  
  procedure TTntSpeedButton.SetHint(const Value: WideString);
  begin
!   TntControl_SetHint(Self, Value);
  end;
  
***************
*** 558,561 ****
--- 562,576 ----
  end;
  
+ function TTntSpeedButton.GetActionLinkClass: TControlActionLinkClass;
+ begin
+   Result := TntControl_GetActionLinkClass(Self, inherited GetActionLinkClass);
+ end;
+ 
+ procedure TTntSpeedButton.ActionChange(Sender: TObject; CheckDefaults: Boolean);
+ begin
+   TntControl_BeforeInherited_ActionChange(Self, Sender, CheckDefaults);
+   inherited;
+ end;
+ 
  { TTntButton }
  
***************
*** 584,608 ****
  function TTntBitBtn.GetCaption: TWideCaption;
  begin
!   Result := WideGetWindowText(Self)
  end;
  
  procedure TTntBitBtn.SetCaption(const Value: TWideCaption);
  begin
!   WideSetWindowText(Self, Value);
  end;
  
  function TTntBitBtn.IsHintStored: Boolean;
  begin
!   Result := TntIsHintStored(Self)
  end;
  
  function TTntBitBtn.GetHint: WideString;
  begin
!   Result := WideGetWindowHint(Self)
  end;
  
  procedure TTntBitBtn.SetHint(const Value: WideString);
  begin
!   WideSetWindowHint(Self, Value);
  end;
  
--- 599,623 ----
  function TTntBitBtn.GetCaption: TWideCaption;
  begin
!   Result := TntControl_GetText(Self)
  end;
  
  procedure TTntBitBtn.SetCaption(const Value: TWideCaption);
  begin
!   TntControl_SetText(Self, Value);
  end;
  
  function TTntBitBtn.IsHintStored: Boolean;
  begin
!   Result := TntControl_IsHintStored(Self)
  end;
  
  function TTntBitBtn.GetHint: WideString;
  begin
!   Result := TntControl_GetHint(Self)
  end;
  
  procedure TTntBitBtn.SetHint(const Value: WideString);
  begin
!   TntControl_SetHint(Self, Value);
  end;
  
***************
*** 771,774 ****
--- 786,800 ----
    FMouseInControl := False;
    inherited;
+ end;
+ 
+ procedure TTntBitBtn.ActionChange(Sender: TObject; CheckDefaults: Boolean);
+ begin
+   TntControl_BeforeInherited_ActionChange(Self, Sender, CheckDefaults);
+   inherited;
+ end;
+ 
+ function TTntBitBtn.GetActionLinkClass: TControlActionLinkClass;
+ begin
+   Result := TntControl_GetActionLinkClass(Self, inherited GetActionLinkClass);
  end;
  

Index: TntCheckLst.pas
===================================================================
RCS file: /usr/local/cvsroot/sword/apps/windoze/CBuilder5/BibleCS/TntUnicodeControls/TntCheckLst.pas,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TntCheckLst.pas	23 Jan 2003 00:02:43 -0000	1.1
--- TntCheckLst.pas	27 Jan 2003 08:52:31 -0000	1.2
***************
*** 20,23 ****
--- 20,25 ----
      procedure CreateWindowHandle(const Params: TCreateParams); override;
      procedure DefineProperties(Filer: TFiler); override;
+     function GetActionLinkClass: TControlActionLinkClass; override;
+     procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
      procedure CreateWnd; override;
      procedure DestroyWnd; override;
***************
*** 37,41 ****
  implementation
  
! uses SysUtils, TntWideStrPropHelper, TntStdCtrls;
  
  { TTntCheckListBox }
--- 39,43 ----
  implementation
  
! uses SysUtils, TntWideStrPropHelper, TntStdCtrls, TntActnList;
  
  { TTntCheckListBox }
***************
*** 94,108 ****
  function TTntCheckListBox.IsHintStored: Boolean;
  begin
!   Result := TntIsHintStored(Self)
  end;
  
  function TTntCheckListBox.GetHint: WideString;
  begin
!   Result := WideGetWindowHint(Self)
  end;
  
  procedure TTntCheckListBox.SetHint(const Value: WideString);
  begin
!   WideSetWindowHint(Self, Value);
  end;
  
--- 96,110 ----
  function TTntCheckListBox.IsHintStored: Boolean;
  begin
!   Result := TntControl_IsHintStored(Self)
  end;
  
  function TTntCheckListBox.GetHint: WideString;
  begin
!   Result := TntControl_GetHint(Self)
  end;
  
  procedure TTntCheckListBox.SetHint(const Value: WideString);
  begin
!   TntControl_SetHint(Self, Value);
  end;
  
***************
*** 118,121 ****
--- 120,134 ----
  end;
  {$ENDIF}
+ 
+ procedure TTntCheckListBox.ActionChange(Sender: TObject; CheckDefaults: Boolean);
+ begin
+   TntControl_BeforeInherited_ActionChange(Self, Sender, CheckDefaults);
+   inherited;
+ end;
+ 
+ function TTntCheckListBox.GetActionLinkClass: TControlActionLinkClass;
+ begin
+   Result := TntControl_GetActionLinkClass(Self, inherited GetActionLinkClass);
+ end;
  
  end.

Index: TntComCtrls.pas
===================================================================
RCS file: /usr/local/cvsroot/sword/apps/windoze/CBuilder5/BibleCS/TntUnicodeControls/TntComCtrls.pas,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TntComCtrls.pas	23 Jan 2003 00:02:43 -0000	1.2
--- TntComCtrls.pas	27 Jan 2003 08:52:31 -0000	1.3
***************
*** 124,127 ****
--- 124,129 ----
      procedure CreateWindowHandle(const Params: TCreateParams); override;
      procedure DefineProperties(Filer: TFiler); override;
+     function GetActionLinkClass: TControlActionLinkClass; override;
+     procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
      procedure CreateWnd; override;
      procedure DestroyWnd; override;
***************
*** 275,278 ****
--- 277,282 ----
      procedure CreateWnd; override;
      procedure DefineProperties(Filer: TFiler); override;
+     function GetActionLinkClass: TControlActionLinkClass; override;
+     procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
      function GetSelText: string{TNT-ALLOW string}; override;
      function CharPosToGet(CharPos: Integer): Integer;
***************
*** 378,381 ****
--- 382,387 ----
      procedure CreateWindowHandle(const Params: TCreateParams); override;
      procedure DefineProperties(Filer: TFiler); override;
+     function GetActionLinkClass: TControlActionLinkClass; override;
+     procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
      procedure CreateWnd; override;
      procedure DestroyWnd; override;
***************
*** 462,465 ****
--- 468,473 ----
      procedure CreateWindowHandle(const Params: TCreateParams); override;
      procedure DefineProperties(Filer: TFiler); override;
+     function GetActionLinkClass: TControlActionLinkClass; override;
+     procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
    published
      property Caption: TWideCaption read GetCaption write SetCaption stored IsCaptionStored;
***************
*** 480,483 ****
--- 488,493 ----
      procedure CreateWindowHandle(const Params: TCreateParams); override;
      procedure DefineProperties(Filer: TFiler); override;
+     function GetActionLinkClass: TControlActionLinkClass; override;
+     procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
      procedure WndProc(var Message: TMessage); override;
      procedure DoAddDockClient(Client: TControl; const ARect: TRect); override;
***************
*** 495,498 ****
--- 505,510 ----
      procedure CreateWindowHandle(const Params: TCreateParams); override;
      procedure DefineProperties(Filer: TFiler); override;
+     function GetActionLinkClass: TControlActionLinkClass; override;
+     procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
    published
      property Hint: WideString read GetHint write SetHint stored IsHintStored;
***************
*** 508,511 ****
--- 520,525 ----
      procedure CreateWindowHandle(const Params: TCreateParams); override;
      procedure DefineProperties(Filer: TFiler); override;
+     function GetActionLinkClass: TControlActionLinkClass; override;
+     procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
    published
      property Hint: WideString read GetHint write SetHint stored IsHintStored;
***************
*** 521,524 ****
--- 535,540 ----
      procedure CreateWindowHandle(const Params: TCreateParams); override;
      procedure DefineProperties(Filer: TFiler); override;
+     function GetActionLinkClass: TControlActionLinkClass; override;
+     procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
    published
      property Hint: WideString read GetHint write SetHint stored IsHintStored;
***************
*** 568,571 ****
--- 584,589 ----
      procedure CreateWindowHandle(const Params: TCreateParams); override;
      procedure DefineProperties(Filer: TFiler); override;
+     function GetActionLinkClass: TControlActionLinkClass; override;
+     procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
    published
      property Hint: WideString read GetHint write SetHint stored IsHintStored;
***************
*** 583,586 ****
--- 601,606 ----
      procedure CreateWindowHandle(const Params: TCreateParams); override;
      procedure DefineProperties(Filer: TFiler); override;
+     function GetActionLinkClass: TControlActionLinkClass; override;
+     procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
    public
      procedure ForceGetMonthInfo;
***************
*** 599,602 ****
--- 619,624 ----
      procedure CreateWindowHandle(const Params: TCreateParams); override;
      procedure DefineProperties(Filer: TFiler); override;
+     function GetActionLinkClass: TControlActionLinkClass; override;
+     procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
    published
      property Hint: WideString read GetHint write SetHint stored IsHintStored;
***************
*** 606,610 ****
  
  uses SysUtils, Forms, TntGraphics, Graphics, ImgList, TntStdCtrls, StdCtrls,
!   RichEdit, TntWideStrPropHelper, ActiveIMM_TLB, Printers, TntForms, ComStrs;
  
  procedure CreateUnicodeHandle_ComCtl(Control: TWinControl; const Params: TCreateParams;
--- 628,632 ----
  
  uses SysUtils, Forms, TntGraphics, Graphics, ImgList, TntStdCtrls, StdCtrls,
!   RichEdit, TntWideStrPropHelper, ActiveIMM_TLB, Printers, TntForms, ComStrs, TntActnList;
  
  procedure CreateUnicodeHandle_ComCtl(Control: TWinControl; const Params: TCreateParams;
***************
*** 1172,1176 ****
    if Assigned(Action) then
    begin
!     if Action is TCustomListAction then
        Result := False
      else
--- 1194,1198 ----
    if Assigned(Action) then
    begin
!     if Action is TCustomListAction{TNT-ALLOW TCustomListAction} then
        Result := False
      else
***************
*** 1659,1673 ****
  function TTntCustomListView.IsHintStored: Boolean;
  begin
!   Result := TntIsHintStored(Self);
  end;
  
  function TTntCustomListView.GetHint: WideString;
  begin
!   Result := WideGetWindowHint(Self)
  end;
  
  procedure TTntCustomListView.SetHint(const Value: WideString);
  begin
!   WideSetWindowHint(Self, Value);
  end;
  
--- 1681,1706 ----
  function TTntCustomListView.IsHintStored: Boolean;
  begin
!   Result := TntControl_IsHintStored(Self);
  end;
  
  function TTntCustomListView.GetHint: WideString;
  begin
!   Result := TntControl_GetHint(Self)
  end;
  
  procedure TTntCustomListView.SetHint(const Value: WideString);
  begin
!   TntControl_SetHint(Self, Value);
! end;
! 
! procedure TTntCustomListView.ActionChange(Sender: TObject; CheckDefaults: Boolean);
! begin
!   TntControl_BeforeInherited_ActionChange(Self, Sender, CheckDefaults);
!   inherited;
! end;
! 
! function TTntCustomListView.GetActionLinkClass: TControlActionLinkClass;
! begin
!   Result := TntControl_GetActionLinkClass(Self, inherited GetActionLinkClass);
  end;
  
***************
*** 1906,1916 ****
  function TTntCustomRichEdit.GetText: WideString;
  begin
!   if (not IsWindowUnicode(WindowHandle)) then
!     Result := WideGetWindowText(Self)
!   else begin
!     Result := WideGetWindowText(Self);
!     if (LineBreakStyle <> tlbsCRLF) then
!       Result := TntAdjustLineBreaks(Result, tlbsCRLF);
!   end;
  end;
  
--- 1939,1945 ----
  function TTntCustomRichEdit.GetText: WideString;
  begin
!   Result := TntControl_GetText(Self);
!   if IsWindowUnicode(WindowHandle) and (LineBreakStyle <> tlbsCRLF) then
!     Result := TntAdjustLineBreaks(Result, tlbsCRLF);
  end;
  
***************
*** 1918,1939 ****
  begin
    if (not IsWindowUnicode(WindowHandle)) then
!     WideSetWindowText(Self, Value)
    else
!     WideSetWindowText(Self, TntAdjustLineBreaks(Value, LineBreakStyle));
  end;
  
  function TTntCustomRichEdit.IsHintStored: Boolean;
  begin
!   Result := TntIsHintStored(Self);
  end;
  
  function TTntCustomRichEdit.GetHint: WideString;
  begin
!   Result := WideGetWindowHint(Self);
  end;
  
  procedure TTntCustomRichEdit.SetHint(const Value: WideString);
  begin
!   WideSetWindowHint(Self, Value);
  end;
  
--- 1947,1968 ----
  begin
    if (not IsWindowUnicode(WindowHandle)) then
!     TntControl_SetText(Self, Value)
    else
!     TntControl_SetText(Self, TntAdjustLineBreaks(Value, LineBreakStyle));
  end;
  
  function TTntCustomRichEdit.IsHintStored: Boolean;
  begin
!   Result := TntControl_IsHintStored(Self);
  end;
  
  function TTntCustomRichEdit.GetHint: WideString;
  begin
!   Result := TntControl_GetHint(Self);
  end;
  
  procedure TTntCustomRichEdit.SetHint(const Value: WideString);
  begin
!   TntControl_SetHint(Self, Value);
  end;
  
***************
*** 2058,2062 ****
--- 2087,2103 ----
  end;
  
+ procedure TTntCustomRichEdit.ActionChange(Sender: TObject; CheckDefaults: Boolean);
+ begin
+   TntControl_BeforeInherited_ActionChange(Self, Sender, CheckDefaults);
+   inherited;
+ end;
+ 
+ function TTntCustomRichEdit.GetActionLinkClass: TControlActionLinkClass;
+ begin
+   Result := TntControl_GetActionLinkClass(Self, inherited GetActionLinkClass);
+ end;
+ 
  { TTntTabStrings }
+ 
  type TAccessCustomTabControl = class(TCustomTabControl{TNT-ALLOW TCustomTabControl});
  
***************
*** 2236,2250 ****
  function TTntCustomTabControl.IsHintStored: Boolean;
  begin
!   Result := TntIsHintStored(Self);
  end;
  
  function TTntCustomTabControl.GetHint: WideString;
  begin
!   Result := WideGetWindowHint(Self);
  end;
  
  procedure TTntCustomTabControl.SetHint(const Value: WideString);
  begin
!   WideSetWindowHint(Self, Value);
  end;
  
--- 2277,2291 ----
  function TTntCustomTabControl.IsHintStored: Boolean;
  begin
!   Result := TntControl_IsHintStored(Self);
  end;
  
  function TTntCustomTabControl.GetHint: WideString;
  begin
!   Result := TntControl_GetHint(Self);
  end;
  
  procedure TTntCustomTabControl.SetHint(const Value: WideString);
  begin
!   TntControl_SetHint(Self, Value);
  end;
  
***************
*** 2267,2270 ****
--- 2308,2322 ----
  end;
  
+ procedure TTntCustomTabControl.ActionChange(Sender: TObject; CheckDefaults: Boolean);
+ begin
+   TntControl_BeforeInherited_ActionChange(Self, Sender, CheckDefaults);
+   inherited;
+ end;
+ 
+ function TTntCustomTabControl.GetActionLinkClass: TControlActionLinkClass;
+ begin
+   Result := TntControl_GetActionLinkClass(Self, inherited GetActionLinkClass);
+ end;
+ 
  { TTntTabSheet }
  
***************
*** 2276,2290 ****
  function TTntTabSheet.IsCaptionStored: Boolean;
  begin
!   Result := TntIsCaptionStored(Self);
  end;
  
  function TTntTabSheet.GetCaption: TWideCaption;
  begin
!   Result := WideGetWindowText(Self);
  end;
  
  procedure TTntTabSheet.SetCaption(const Value: TWideCaption);
  begin
!   WideSetWindowText(Self, Value);
  end;
  
--- 2328,2342 ----
  function TTntTabSheet.IsCaptionStored: Boolean;
  begin
!   Result := TntControl_IsCaptionStored(Self);
  end;
  
  function TTntTabSheet.GetCaption: TWideCaption;
  begin
!   Result := TntControl_GetText(Self);
  end;
  
  procedure TTntTabSheet.SetCaption(const Value: TWideCaption);
  begin
!   TntControl_SetText(Self, Value);
  end;
  
***************
*** 2297,2311 ****
  function TTntTabSheet.IsHintStored: Boolean;
  begin
!   Result := TntIsHintStored(Self);
  end;
  
  function TTntTabSheet.GetHint: WideString;
  begin
!   Result := WideGetWindowHint(Self);
  end;
  
  procedure TTntTabSheet.SetHint(const Value: WideString);
  begin
!   WideSetWindowHint(Self, Value);
  end;
  
--- 2349,2363 ----
  function TTntTabSheet.IsHintStored: Boolean;
  begin
!   Result := TntControl_IsHintStored(Self);
  end;
  
  function TTntTabSheet.GetHint: WideString;
  begin
!   Result := TntControl_GetHint(Self);
  end;
  
  procedure TTntTabSheet.SetHint(const Value: WideString);
  begin
!   TntControl_SetHint(Self, Value);
  end;
  
***************
*** 2314,2318 ****
    if (not Win32PlatformIsUnicode)
    or (HandleAllocated)
!   or (Message.Text = AnsiString(WideGetWindowText(Self)))
    or (Force_Inherited_WMSETTEXT) then
      inherited
--- 2366,2370 ----
    if (not Win32PlatformIsUnicode)
    or (HandleAllocated)
!   or (Message.Text = AnsiString(TntControl_GetText(Self)))
    or (Force_Inherited_WMSETTEXT) then
      inherited
***************
*** 2321,2325 ****
      Force_Inherited_WMSETTEXT := True;
      try
!       WideSetWindowText(Self, Message.Text) { sync WideCaption with ANSI Caption }
      finally
        Force_Inherited_WMSETTEXT := FALSE;
--- 2373,2377 ----
      Force_Inherited_WMSETTEXT := True;
      try
!       TntControl_SetText(Self, Message.Text) { sync WideCaption with ANSI Caption }
      finally
        Force_Inherited_WMSETTEXT := FALSE;
***************
*** 2328,2331 ****
--- 2380,2394 ----
  end;
  
+ procedure TTntTabSheet.ActionChange(Sender: TObject; CheckDefaults: Boolean);
+ begin
+   TntControl_BeforeInherited_ActionChange(Self, Sender, CheckDefaults);
+   inherited;
+ end;
+ 
+ function TTntTabSheet.GetActionLinkClass: TControlActionLinkClass;
+ begin
+   Result := TntControl_GetActionLinkClass(Self, inherited GetActionLinkClass);
+ end;
+ 
  { TTntPageControl }
  
***************
*** 2343,2357 ****
  function TTntPageControl.IsHintStored: Boolean;
  begin
!   Result := TntIsHintStored(Self);
  end;
  
  function TTntPageControl.GetHint: WideString;
  begin
!   Result := WideGetWindowHint(Self);
  end;
  
  procedure TTntPageControl.SetHint(const Value: WideString);
  begin
!   WideSetWindowHint(Self, Value);
  end;
  
--- 2406,2420 ----
  function TTntPageControl.IsHintStored: Boolean;
  begin
!   Result := TntControl_IsHintStored(Self);
  end;
  
  function TTntPageControl.GetHint: WideString;
  begin
!   Result := TntControl_GetHint(Self);
  end;
  
  procedure TTntPageControl.SetHint(const Value: WideString);
  begin
!   TntControl_SetHint(Self, Value);
  end;
  
***************
*** 2491,2494 ****
--- 2554,2568 ----
  end;
  
+ procedure TTntPageControl.ActionChange(Sender: TObject; CheckDefaults: Boolean);
+ begin
+   TntControl_BeforeInherited_ActionChange(Self, Sender, CheckDefaults);
+   inherited;
+ end;
+ 
+ function TTntPageControl.GetActionLinkClass: TControlActionLinkClass;
+ begin
+   Result := TntControl_GetActionLinkClass(Self, inherited GetActionLinkClass);
+ end;
+ 
  { TTntTrackBar }
  
***************
*** 2506,2520 ****
  function TTntTrackBar.IsHintStored: Boolean;
  begin
!   Result := TntIsHintStored(Self);
  end;
  
  function TTntTrackBar.GetHint: WideString;
  begin
!   Result := WideGetWindowHint(Self);
  end;
  
  procedure TTntTrackBar.SetHint(const Value: WideString);
  begin
!   WideSetWindowHint(Self, Value);
  end;
  
--- 2580,2605 ----
  function TTntTrackBar.IsHintStored: Boolean;
  begin
!   Result := TntControl_IsHintStored(Self);
  end;
  
  function TTntTrackBar.GetHint: WideString;
  begin
!   Result := TntControl_GetHint(Self);
  end;
  
  procedure TTntTrackBar.SetHint(const Value: WideString);
  begin
!   TntControl_SetHint(Self, Value);
! end;
! 
! procedure TTntTrackBar.ActionChange(Sender: TObject; CheckDefaults: Boolean);
! begin
!   TntControl_BeforeInherited_ActionChange(Self, Sender, CheckDefaults);
!   inherited;
! end;
! 
! function TTntTrackBar.GetActionLinkClass: TControlActionLinkClass;
! begin
!   Result := TntControl_GetActionLinkClass(Self, inherited GetActionLinkClass);
  end;
  
***************
*** 2534,2548 ****
  function TTntProgressBar.IsHintStored: Boolean;
  begin
!   Result := TntIsHintStored(Self);
  end;
  
  function TTntProgressBar.GetHint: WideString;
  begin
!   Result := WideGetWindowHint(Self);
  end;
  
  procedure TTntProgressBar.SetHint(const Value: WideString);
  begin
!   WideSetWindowHint(Self, Value);
  end;
  
--- 2619,2644 ----
  function TTntProgressBar.IsHintStored: Boolean;
  begin
!   Result := TntControl_IsHintStored(Self);
  end;
  
  function TTntProgressBar.GetHint: WideString;
  begin
!   Result := TntControl_GetHint(Self);
  end;
  
  procedure TTntProgressBar.SetHint(const Value: WideString);
  begin
!   TntControl_SetHint(Self, Value);
! end;
! 
! procedure TTntProgressBar.ActionChange(Sender: TObject; CheckDefaults: Boolean);
! begin
!   TntControl_BeforeInherited_ActionChange(Self, Sender, CheckDefaults);
!   inherited;
! end;
! 
! function TTntProgressBar.GetActionLinkClass: TControlActionLinkClass;
! begin
!   Result := TntControl_GetActionLinkClass(Self, inherited GetActionLinkClass);
  end;
  
***************
*** 2562,2576 ****
  function TTntCustomUpDown.IsHintStored: Boolean;
  begin
!   Result := TntIsHintStored(Self);
  end;
  
  function TTntCustomUpDown.GetHint: WideString;
  begin
!   Result := WideGetWindowHint(Self);
  end;
  
  procedure TTntCustomUpDown.SetHint(const Value: WideString);
  begin
!   WideSetWindowHint(Self, Value);
  end;
  
--- 2658,2683 ----
  function TTntCustomUpDown.IsHintStored: Boolean;
  begin
!   Result := TntControl_IsHintStored(Self);
  end;
  
  function TTntCustomUpDown.GetHint: WideString;
  begin
!   Result := TntControl_GetHint(Self);
  end;
  
  procedure TTntCustomUpDown.SetHint(const Value: WideString);
  begin
!   TntControl_SetHint(Self, Value);
! end;
! 
! procedure TTntCustomUpDown.ActionChange(Sender: TObject; CheckDefaults: Boolean);
! begin
!   TntControl_BeforeInherited_ActionChange(Self, Sender, CheckDefaults);
!   inherited;
! end;
! 
! function TTntCustomUpDown.GetActionLinkClass: TControlActionLinkClass;
! begin
!   Result := TntControl_GetActionLinkClass(Self, inherited GetActionLinkClass);
  end;
  
***************
*** 2590,2604 ****
  function TTntDateTimePicker.IsHintStored: Boolean;
  begin
!   Result := TntIsHintStored(Self);
  end;
  
  function TTntDateTimePicker.GetHint: WideString;
  begin
!   Result := WideGetWindowHint(Self);
  end;
  
  procedure TTntDateTimePicker.SetHint(const Value: WideString);
  begin
!   WideSetWindowHint(Self, Value);
  end;
  
--- 2697,2722 ----
  function TTntDateTimePicker.IsHintStored: Boolean;
  begin
!   Result := TntControl_IsHintStored(Self);
  end;
  
  function TTntDateTimePicker.GetHint: WideString;
  begin
!   Result := TntControl_GetHint(Self);
  end;
  
  procedure TTntDateTimePicker.SetHint(const Value: WideString);
  begin
!   TntControl_SetHint(Self, Value);
! end;
! 
! procedure TTntDateTimePicker.ActionChange(Sender: TObject; CheckDefaults: Boolean);
! begin
!   TntControl_BeforeInherited_ActionChange(Self, Sender, CheckDefaults);
!   inherited;
! end;
! 
! function TTntDateTimePicker.GetActionLinkClass: TControlActionLinkClass;
! begin
!   Result := TntControl_GetActionLinkClass(Self, inherited GetActionLinkClass);
  end;
  
***************
*** 2641,2655 ****
  function TTntMonthCalendar.IsHintStored: Boolean;
  begin
!   Result := TntIsHintStored(Self);
  end;
  
  function TTntMonthCalendar.GetHint: WideString;
  begin
!   Result := WideGetWindowHint(Self);
  end;
  
  procedure TTntMonthCalendar.SetHint(const Value: WideString);
  begin
!   WideSetWindowHint(Self, Value);
  end;
  
--- 2759,2773 ----
  function TTntMonthCalendar.IsHintStored: Boolean;
  begin
!   Result := TntControl_IsHintStored(Self);
  end;
  
  function TTntMonthCalendar.GetHint: WideString;
  begin
!   Result := TntControl_GetHint(Self);
  end;
  
  procedure TTntMonthCalendar.SetHint(const Value: WideString);
  begin
!   TntControl_SetHint(Self, Value);
  end;
  
***************
*** 2664,2667 ****
--- 2782,2796 ----
  end;
  
+ procedure TTntMonthCalendar.ActionChange(Sender: TObject; CheckDefaults: Boolean);
+ begin
+   TntControl_BeforeInherited_ActionChange(Self, Sender, CheckDefaults);
+   inherited;
+ end;
+ 
+ function TTntMonthCalendar.GetActionLinkClass: TControlActionLinkClass;
+ begin
+   Result := TntControl_GetActionLinkClass(Self, inherited GetActionLinkClass);
+ end;
+ 
  { TTntPageScroller }
  
***************
*** 2679,2693 ****
  function TTntPageScroller.IsHintStored: Boolean;
  begin
!   Result := TntIsHintStored(Self);
  end;
  
  function TTntPageScroller.GetHint: WideString;
  begin
!   Result := WideGetWindowHint(Self);
  end;
  
  procedure TTntPageScroller.SetHint(const Value: WideString);
  begin
!   WideSetWindowHint(Self, Value);
  end;
  
--- 2808,2833 ----
  function TTntPageScroller.IsHintStored: Boolean;
  begin
!   Result := TntControl_IsHintStored(Self);
  end;
  
  function TTntPageScroller.GetHint: WideString;
  begin
!   Result := TntControl_GetHint(Self);
  end;
  
  procedure TTntPageScroller.SetHint(const Value: WideString);
  begin
!   TntControl_SetHint(Self, Value);
! end;
! 
! procedure TTntPageScroller.ActionChange(Sender: TObject; CheckDefaults: Boolean);
! begin
!   TntControl_BeforeInherited_ActionChange(Self, Sender, CheckDefaults);
!   inherited;
! end;
! 
! function TTntPageScroller.GetActionLinkClass: TControlActionLinkClass;
! begin
!   Result := TntControl_GetActionLinkClass(Self, inherited GetActionLinkClass);
  end;
  

Index: TntControls.pas
===================================================================
RCS file: /usr/local/cvsroot/sword/apps/windoze/CBuilder5/BibleCS/TntUnicodeControls/TntControls.pas,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TntControls.pas	23 Jan 2003 00:02:43 -0000	1.2
--- TntControls.pas	27 Jan 2003 08:52:31 -0000	1.3
***************
*** 51,54 ****
--- 51,55 ----
            override DefineProperties and call DefineWideProperties.
      8)  Check if TTntThemeManager needs to be updated.
+     9)  Override GetActionLinkClass() and ActionChange().
  }
  
***************
*** 59,63 ****
  {$ENDIF}
  
! uses Classes, Windows, Messages, Controls, Forms, TntClasses, TypInfo;
  
  {TNT-WARN TCaption}
--- 60,64 ----
  {$ENDIF}
  
! uses Classes, Windows, Messages, Controls, Forms, TntClasses, TypInfo, ActnList, Menus, TntMenus;
  
  {TNT-WARN TCaption}
***************
*** 71,83 ****
  
  // caption/text management
! function TntIsCaptionStored(Control: TControl): Boolean;
! function GetWideStoredText(Control: TControl; const Default: WideString): WideString;
! function WideGetWindowText(Control: TControl): WideString;
! procedure WideSetWindowText(Control: TControl; const Text: WideString);
  
  // hint management
! function TntIsHintStored(Control: TControl): Boolean;
! function WideGetWindowHint(Control: TControl): WideString;
! procedure WideSetWindowHint(Control: TControl; const Value: WideString);
  function WideGetShortHint(const Hint: WideString): WideString;
  function WideGetLongHint(const Hint: WideString): WideString;
--- 72,85 ----
  
  // caption/text management
! function TntControl_IsCaptionStored(Control: TControl): Boolean;
! function TntControl_GetStoredText(Control: TControl; const Default: WideString): WideString;
! function TntControl_GetText(Control: TControl): WideString;
! procedure TntControl_SetText(Control: TControl; const Text: WideString);
  
  // hint management
! function TntControl_IsHintStored(Control: TControl): Boolean;
! function TntControl_GetHint(Control: TControl): WideString;
! procedure TntControl_SetHint(Control: TControl; const Value: WideString);
! 
  function WideGetShortHint(const Hint: WideString): WideString;
  function WideGetLongHint(const Hint: WideString): WideString;
***************
*** 135,139 ****
    TAccessControl = class(TControl);
    TAccessWinControl = class(TWinControl);
!   TAccessControlActionLink = class(TControlActionLink);
  
  function GetSyncedWideString(var WideStr: WideString; const AnsiStr: AnsiString): WideString;
--- 137,141 ----
    TAccessControl = class(TControl);
    TAccessWinControl = class(TWinControl);
!   TAccessControlActionLink = class(TControlActionLink{TNT-ALLOW TControlActionLink});
  
  function GetSyncedWideString(var WideStr: WideString; const AnsiStr: AnsiString): WideString;
***************
*** 227,231 ****
  //----------------------------------------------- GET/SET WINDOW CAPTION/HINT -------------
  
! function TntIsCaptionStored(Control: TControl): Boolean;
  begin
    with TAccessControl(Control) do
--- 229,233 ----
  //----------------------------------------------- GET/SET WINDOW CAPTION/HINT -------------
  
! function TntControl_IsCaptionStored(Control: TControl): Boolean;
  begin
    with TAccessControl(Control) do
***************
*** 233,237 ****
  end;
  
! function GetWideStoredText(Control: TControl; const Default: WideString): WideString;
  var
    WideCaptionHolder: TWideCaptionHolder;
--- 235,239 ----
  end;
  
! function TntControl_GetStoredText(Control: TControl; const Default: WideString): WideString;
  var
    WideCaptionHolder: TWideCaptionHolder;
***************
*** 244,253 ****
  end;
  
! procedure SetWideStoredText(Control: TControl; const Value: WideString);
  begin
    FindWideCaptionHolder(Control).FWideCaption := Value
  end;
  
! function WideGetWindowText(Control: TControl): WideString;
  var
    WideCaptionHolder: TWideCaptionHolder;
--- 246,255 ----
  end;
  
! procedure TntControl_SetStoredText(Control: TControl; const Value: WideString);
  begin
    FindWideCaptionHolder(Control).FWideCaption := Value
  end;
  
! function TntControl_GetText(Control: TControl): WideString;
  var
    WideCaptionHolder: TWideCaptionHolder;
***************
*** 266,270 ****
    or (not IsWindowUnicode(TWinControl(Control).Handle)) then begin
      // NO HANDLE -OR- NOT UNICODE
!     Result := GetWideStoredText(Control, TAccessControl(Control).Text)
    end else begin
      // UNICODE & HANDLE
--- 268,272 ----
    or (not IsWindowUnicode(TWinControl(Control).Handle)) then begin
      // NO HANDLE -OR- NOT UNICODE
!     Result := TntControl_GetStoredText(Control, TAccessControl(Control).Text)
    end else begin
      // UNICODE & HANDLE
***************
*** 275,279 ****
  end;
  
! procedure WideSetWindowText(Control: TControl; const Text: WideString);
  begin
    if (not Win32PlatformIsUnicode) then
--- 277,281 ----
  end;
  
! procedure TntControl_SetText(Control: TControl; const Text: WideString);
  begin
    if (not Win32PlatformIsUnicode) then
***************
*** 287,293 ****
    or (not IsWindowUnicode(TWinControl(Control).Handle)) then begin
      // NO HANDLE -OR- NOT UNICODE
!     SetWideStoredText(Control, Text);
      TAccessWinControl(Control).Text := Text
!   end else if WideGetWindowText(Control) <> Text then begin
      // UNICODE & HANDLE
      SetWindowTextW(TWinControl(Control).Handle, PWideChar(Text));
--- 289,295 ----
    or (not IsWindowUnicode(TWinControl(Control).Handle)) then begin
      // NO HANDLE -OR- NOT UNICODE
!     TntControl_SetStoredText(Control, Text);
      TAccessWinControl(Control).Text := Text
!   end else if TntControl_GetText(Control) <> Text then begin
      // UNICODE & HANDLE
      SetWindowTextW(TWinControl(Control).Handle, PWideChar(Text));
***************
*** 298,302 ****
  // hint management -----------------------------------------------------------------------
  
! function TntIsHintStored(Control: TControl): Boolean;
  begin
    with TAccessControl(Control) do
--- 300,304 ----
  // hint management -----------------------------------------------------------------------
  
! function TntControl_IsHintStored(Control: TControl): Boolean;
  begin
    with TAccessControl(Control) do
***************
*** 304,308 ****
  end;
  
! function WideGetWindowHint(Control: TControl): WideString;
  var
    WideCaptionHolder: TWideCaptionHolder;
--- 306,310 ----
  end;
  
! function TntControl_GetHint(Control: TControl): WideString;
  var
    WideCaptionHolder: TWideCaptionHolder;
***************
*** 316,320 ****
  end;
  
! procedure WideSetWindowHint(Control: TControl; const Value: WideString);
  begin
    Control.Hint := Value;
--- 318,322 ----
  end;
  
! procedure TntControl_SetHint(Control: TControl; const Value: WideString);
  begin
    Control.Hint := Value;
***************
*** 327,335 ****
  begin
    while Control <> nil do
!     if WideGetWindowHint(Control) = '' then
        Control := Control.Parent
      else
      begin
!       Result := WideGetWindowHint(Control);
        Exit;
      end;
--- 329,337 ----
  begin
    while Control <> nil do
!     if TntControl_GetHint(Control) = '' then
        Control := Control.Parent
      else
      begin
!       Result := TntControl_GetHint(Control);
        Exit;
      end;
***************
*** 520,524 ****
  
    // For some reason, caption gets garbled after calling SetWindowLongW(.., GWL_WNDPROC).
!   WideSetWindowText(FControl, GetWideStoredText(FControl, Params_Caption));
  end;
  
--- 522,526 ----
  
    // For some reason, caption gets garbled after calling SetWindowLongW(.., GWL_WNDPROC).
!   TntControl_SetText(FControl, TntControl_GetStoredText(FControl, Params_Caption));
  end;
  
***************
*** 535,539 ****
    // remember caption for future window creation
    if not (csDestroying in FControl.ComponentState) then
!     SetWideStoredText(FControl, WideGetWindowText(FControl));
  
    // restore window procs (restore WindowProc only if we are still the direct subclass)
--- 537,541 ----
    // remember caption for future window creation
    if not (csDestroying in FControl.ComponentState) then
!     TntControl_SetStoredText(FControl, TntControl_GetText(FControl));
  
    // restore window procs (restore WindowProc only if we are still the direct subclass)
***************
*** 838,841 ****
--- 840,869 ----
  end;
  
+ function ExtractTntHintCaption(AData: Pointer): WideString;
+ var
+   Control: TControl;
+   WideHint: WideString;
+   AnsiHintWithShortCut: AnsiString;
+   ShortCut: TShortCut;
+ begin
+   Result := PHintInfo(AData).HintStr;
+   if Result <> '' then begin
+     Control := PHintInfo(AData).HintControl;
+     WideHint := WideGetShortHint(WideGetHint(Control));
+     if (AnsiString(WideHint) = PHintInfo(AData).HintStr) then
+       Result := WideHint
+     else if Application.HintShortCuts and (Control <> nil)
+     and (Control.Action is TCustomAction{TNT-ALLOW TCustomAction}) then begin
+       ShortCut := TCustomAction{TNT-ALLOW TCustomAction}(Control.Action).ShortCut;
+       if (ShortCut <> scNone) then
+       begin
+         AnsiHintWithShortCut := Format{TNT-ALLOW Format}('%s (%s)', [WideHint, ShortCutToText{TNT-ALLOW ShortCutToText}(ShortCut)]);
+         if AnsiHintWithShortCut = PHintInfo(AData).HintStr then
+           Result := WideFormat('%s (%s)', [WideHint, WideShortCutToText(ShortCut)]);
+       end;
+     end;
+   end;
+ end;
+ 
  { TTntHintWindow procs }
  
***************
*** 858,867 ****
  function TTntHintWindow.GetCaption: TWideCaption;
  begin
!   Result := WideGetWindowText(Self)
  end;
  
  procedure TTntHintWindow.SetCaption(const Value: TWideCaption);
  begin
!   WideSetWindowText(Self, Value);
  end;
  
--- 886,895 ----
  function TTntHintWindow.GetCaption: TWideCaption;
  begin
!   Result := TntControl_GetText(Self)
  end;
  
  procedure TTntHintWindow.SetCaption(const Value: TWideCaption);
  begin
!   TntControl_SetText(Self, Value);
  end;
  
***************
*** 905,910 ****
  begin
    if (not Win32PlatformIsUnicode)
!   or (not DataPointsToHintInfoForTnt(AData))
!   or (OriginalHintStr <> PHintInfo(AData).HintStr) then
      inherited
    else begin
--- 933,937 ----
  begin
    if (not Win32PlatformIsUnicode)
!   or (not DataPointsToHintInfoForTnt(AData)) then
      inherited
    else begin
***************
*** 912,916 ****
      try
        inherited;
!       Caption := WideGetShortHint(WideGetHint(PHintInfo(AData).HintControl));
      finally
        FBlockPaint := False;
--- 939,943 ----
      try
        inherited;
!       Caption := ExtractTntHintCaption(AData);
      finally
        FBlockPaint := False;
***************
*** 925,933 ****
  begin
    if (not Win32PlatformIsUnicode)
!   or (not DataPointsToHintInfoForTnt(AData))
!   or (OriginalHintStr <> PHintInfo(AData).HintStr) then
      Result := inherited CalcHintRect(MaxWidth, AHint, AData)
    else begin
!     WideHintStr := WideGetShortHint(WideGetHint(PHintInfo(AData).HintControl));
      Result := Rect(0, 0, MaxWidth, 0);
      DrawTextW(Canvas.Handle, PWideChar(WideHintStr), -1, Result, DT_CALCRECT or DT_LEFT or
--- 952,959 ----
  begin
    if (not Win32PlatformIsUnicode)
!   or (not DataPointsToHintInfoForTnt(AData)) then
      Result := inherited CalcHintRect(MaxWidth, AHint, AData)
    else begin
!     WideHintStr := ExtractTntHintCaption(AData);
      Result := Rect(0, 0, MaxWidth, 0);
      DrawTextW(Canvas.Handle, PWideChar(WideHintStr), -1, Result, DT_CALCRECT or DT_LEFT or

Index: TntExtCtrls.pas
===================================================================
RCS file: /usr/local/cvsroot/sword/apps/windoze/CBuilder5/BibleCS/TntUnicodeControls/TntExtCtrls.pas,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TntExtCtrls.pas	23 Jan 2003 00:02:43 -0000	1.1
--- TntExtCtrls.pas	27 Jan 2003 08:52:31 -0000	1.2
***************
*** 15,18 ****
--- 15,20 ----
    protected
      procedure DefineProperties(Filer: TFiler); override;
+     function GetActionLinkClass: TControlActionLinkClass; override;
+     procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
    published
      property Hint: WideString read GetHint write SetHint stored IsHintStored;
***************
*** 28,31 ****
--- 30,35 ----
    protected
      procedure DefineProperties(Filer: TFiler); override;
+     function GetActionLinkClass: TControlActionLinkClass; override;
+     procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
    published
      property Hint: WideString read GetHint write SetHint stored IsHintStored;
***************
*** 41,44 ****
--- 45,50 ----
    protected
      procedure DefineProperties(Filer: TFiler); override;
+     function GetActionLinkClass: TControlActionLinkClass; override;
+     procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
    published
      property Hint: WideString read GetHint write SetHint stored IsHintStored;
***************
*** 54,57 ****
--- 60,65 ----
    protected
      procedure DefineProperties(Filer: TFiler); override;
+     function GetActionLinkClass: TControlActionLinkClass; override;
+     procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
    published
      property Hint: WideString read GetHint write SetHint stored IsHintStored;
***************
*** 71,74 ****
--- 79,84 ----
      procedure CreateWindowHandle(const Params: TCreateParams); override;
      procedure DefineProperties(Filer: TFiler); override;
+     function GetActionLinkClass: TControlActionLinkClass; override;
+     procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
      property Caption: TWideCaption read GetCaption write SetCaption stored IsCaptionStored;
    published
***************
*** 149,152 ****
--- 159,164 ----
      procedure CreateWindowHandle(const Params: TCreateParams); override;
      procedure DefineProperties(Filer: TFiler); override;
+     function GetActionLinkClass: TControlActionLinkClass; override;
+     procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
    published
      property Hint: WideString read GetHint write SetHint stored IsHintStored;
***************
*** 222,226 ****
  
  uses Windows, TntWideStrPropHelper, TntClasses, Graphics, {$IFDEF VER150} Themes, {$ENDIF}
!   TntGraphics;
  
  { TTntShape }
--- 234,238 ----
  
  uses Windows, TntWideStrPropHelper, TntClasses, Graphics, {$IFDEF VER150} Themes, {$ENDIF}
!   TntGraphics, TntActnList;
  
  { TTntShape }
***************
*** 234,248 ****
  function TTntShape.IsHintStored: Boolean;
  begin
!   Result := TntIsHintStored(Self)
  end;
  
  function TTntShape.GetHint: WideString;
  begin
!   Result := WideGetWindowHint(Self)
  end;
  
  procedure TTntShape.SetHint(const Value: WideString);
  begin
!   WideSetWindowHint(Self, Value);
  end;
  
--- 246,260 ----
  function TTntShape.IsHintStored: Boolean;
  begin
!   Result := TntControl_IsHintStored(Self)
  end;
  
  function TTntShape.GetHint: WideString;
  begin
!   Result := TntControl_GetHint(Self)
  end;
  
  procedure TTntShape.SetHint(const Value: WideString);
  begin
!   TntControl_SetHint(Self, Value);
  end;
  
***************
*** 253,256 ****
--- 265,279 ----
  end;
  
+ procedure TTntShape.ActionChange(Sender: TObject; CheckDefaults: Boolean);
+ begin
+   TntControl_BeforeInherited_ActionChange(Self, Sender, CheckDefaults);
+   inherited;
+ end;
+ 
+ function TTntShape.GetActionLinkClass: TControlActionLinkClass;
+ begin
+   Result := TntControl_GetActionLinkClass(Self, inherited GetActionLinkClass);
+ end;
+ 
  { TTntPaintBox }
  
***************
*** 263,277 ****
  function TTntPaintBox.IsHintStored: Boolean;
  begin
!   Result := TntIsHintStored(Self)
  end;
  
  function TTntPaintBox.GetHint: WideString;
  begin
!   Result := WideGetWindowHint(Self)
  end;
  
  procedure TTntPaintBox.SetHint(const Value: WideString);
  begin
!   WideSetWindowHint(Self, Value);
  end;
  
--- 286,300 ----
  function TTntPaintBox.IsHintStored: Boolean;
  begin
!   Result := TntControl_IsHintStored(Self)
  end;
  
  function TTntPaintBox.GetHint: WideString;
  begin
!   Result := TntControl_GetHint(Self)
  end;
  
  procedure TTntPaintBox.SetHint(const Value: WideString);
  begin
!   TntControl_SetHint(Self, Value);
  end;
  
***************
*** 282,285 ****
--- 305,319 ----
  end;
  
+ procedure TTntPaintBox.ActionChange(Sender: TObject; CheckDefaults: Boolean);
+ begin
+   TntControl_BeforeInherited_ActionChange(Self, Sender, CheckDefaults);
+   inherited;
+ end;
+ 
+ function TTntPaintBox.GetActionLinkClass: TControlActionLinkClass;
+ begin
+   Result := TntControl_GetActionLinkClass(Self, inherited GetActionLinkClass);
+ end;
+ 
  { TTntImage }
  
***************
*** 292,306 ****
  function TTntImage.IsHintStored: Boolean;
  begin
!   Result := TntIsHintStored(Self)
  end;
  
  function TTntImage.GetHint: WideString;
  begin
!   Result := WideGetWindowHint(Self)
  end;
  
  procedure TTntImage.SetHint(const Value: WideString);
  begin
!   WideSetWindowHint(Self, Value);
  end;
  
--- 326,340 ----
  function TTntImage.IsHintStored: Boolean;
  begin
!   Result := TntControl_IsHintStored(Self)
  end;
  
  function TTntImage.GetHint: WideString;
  begin
!   Result := TntControl_GetHint(Self)
  end;
  
  procedure TTntImage.SetHint(const Value: WideString);
  begin
!   TntControl_SetHint(Self, Value);
  end;
  
***************
*** 311,314 ****
--- 345,359 ----
  end;
  
+ procedure TTntImage.ActionChange(Sender: TObject; CheckDefaults: Boolean);
+ begin
+   TntControl_BeforeInherited_ActionChange(Self, Sender, CheckDefaults);
+   inherited;
+ end;
+ 
+ function TTntImage.GetActionLinkClass: TControlActionLinkClass;
+ begin
+   Result := TntControl_GetActionLinkClass(Self, inherited GetActionLinkClass);
+ end;
+ 
  { TTntBevel }
  
***************
*** 321,335 ****
  function TTntBevel.IsHintStored: Boolean;
  begin
!   Result := TntIsHintStored(Self)
  end;
  
  function TTntBevel.GetHint: WideString;
  begin
!   Result := WideGetWindowHint(Self)
  end;
  
  procedure TTntBevel.SetHint(const Value: WideString);
  begin
!   WideSetWindowHint(Self, Value);
  end;
  
--- 366,380 ----
  function TTntBevel.IsHintStored: Boolean;
  begin
!   Result := TntControl_IsHintStored(Self)
  end;
  
  function TTntBevel.GetHint: WideString;
  begin
!   Result := TntControl_GetHint(Self)
  end;
  
  procedure TTntBevel.SetHint(const Value: WideString);
  begin
!   TntControl_SetHint(Self, Value);
  end;
  
***************
*** 340,343 ****
--- 385,399 ----
  end;
  
+ procedure TTntBevel.ActionChange(Sender: TObject; CheckDefaults: Boolean);
+ begin
+   TntControl_BeforeInherited_ActionChange(Self, Sender, CheckDefaults);
+   inherited;
+ end;
+ 
+ function TTntBevel.GetActionLinkClass: TControlActionLinkClass;
+ begin
+   Result := TntControl_GetActionLinkClass(Self, inherited GetActionLinkClass);
+ end;
+ 
  { TTntCustomPanel }
  
***************
*** 355,369 ****
  function TTntCustomPanel.IsCaptionStored: Boolean;
  begin
!   Result := TntIsCaptionStored(Self);
  end;
  
  function TTntCustomPanel.GetCaption: TWideCaption;
  begin
!   Result := WideGetWindowText(Self)
  end;
  
  procedure TTntCustomPanel.SetCaption(const Value: TWideCaption);
  begin
!   WideSetWindowText(Self, Value);
  end;
  
--- 411,425 ----
  function TTntCustomPanel.IsCaptionStored: Boolean;
  begin
!   Result := TntControl_IsCaptionStored(Self);
  end;
  
  function TTntCustomPanel.GetCaption: TWideCaption;
  begin
!   Result := TntControl_GetText(Self)
  end;
  
  procedure TTntCustomPanel.SetCaption(const Value: TWideCaption);
  begin
!   TntControl_SetText(Self, Value);
  end;
  
***************
*** 434,448 ****
  function TTntCustomPanel.IsHintStored: Boolean;
  begin
!   Result := TntIsHintStored(Self)
  end;
  
  function TTntCustomPanel.GetHint: WideString;
  begin
!   Result := WideGetWindowHint(Self);
  end;
  
  procedure TTntCustomPanel.SetHint(const Value: WideString);
  begin
!   WideSetWindowHint(Self, Value);
  end;
  
--- 490,515 ----
  function TTntCustomPanel.IsHintStored: Boolean;
  begin
!   Result := TntControl_IsHintStored(Self)
  end;
  
  function TTntCustomPanel.GetHint: WideString;
  begin
!   Result := TntControl_GetHint(Self);
  end;
  
  procedure TTntCustomPanel.SetHint(const Value: WideString);
  begin
!   TntControl_SetHint(Self, Value);
! end;
! 
! procedure TTntCustomPanel.ActionChange(Sender: TObject; CheckDefaults: Boolean);
! begin
!   TntControl_BeforeInherited_ActionChange(Self, Sender, CheckDefaults);
!   inherited;
! end;
! 
! function TTntCustomPanel.GetActionLinkClass: TControlActionLinkClass;
! begin
!   Result := TntControl_GetActionLinkClass(Self, inherited GetActionLinkClass);
  end;
  
***************
*** 462,476 ****
  function TTntCustomControlBar.IsHintStored: Boolean;
  begin
!   Result := TntIsHintStored(Self);
  end;
  
  function TTntCustomControlBar.GetHint: WideString;
  begin
!   Result := WideGetWindowHint(Self);
  end;
  
  procedure TTntCustomControlBar.SetHint(const Value: WideString);
  begin
!   WideSetWindowHint(Self, Value);
  end;
  
--- 529,554 ----
  function TTntCustomControlBar.IsHintStored: Boolean;
  begin
!   Result := TntControl_IsHintStored(Self);
  end;
  
  function TTntCustomControlBar.GetHint: WideString;
  begin
!   Result := TntControl_GetHint(Self);
  end;
  
  procedure TTntCustomControlBar.SetHint(const Value: WideString);
  begin
!   TntControl_SetHint(Self, Value);
! end;
! 
! procedure TTntCustomControlBar.ActionChange(Sender: TObject; CheckDefaults: Boolean);
! begin
!   TntControl_BeforeInherited_ActionChange(Self, Sender, CheckDefaults);
!   inherited;
! end;
! 
! function TTntCustomControlBar.GetActionLinkClass: TControlActionLinkClass;
! begin
!   Result := TntControl_GetActionLinkClass(Self, inherited GetActionLinkClass);
  end;
  

Index: TntForms.pas
===================================================================
RCS file: /usr/local/cvsroot/sword/apps/windoze/CBuilder5/BibleCS/TntUnicodeControls/TntForms.pas,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TntForms.pas	23 Jan 2003 00:02:43 -0000	1.2
--- TntForms.pas	27 Jan 2003 08:52:31 -0000	1.3
***************
*** 30,33 ****
--- 30,35 ----
      procedure CreateWindowHandle(const Params: TCreateParams); override;
      procedure DefineProperties(Filer: TFiler); override;
+     function GetActionLinkClass: TControlActionLinkClass; override;
+     procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
    published
      property Hint: WideString read GetHint write SetHint stored IsHintStored;
***************
*** 43,46 ****
--- 45,50 ----
      procedure CreateWindowHandle(const Params: TCreateParams); override;
      procedure DefineProperties(Filer: TFiler); override;
+     function GetActionLinkClass: TControlActionLinkClass; override;
+     procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
    published
      property Hint: WideString read GetHint write SetHint stored IsHintStored;
***************
*** 115,118 ****
--- 119,124 ----
      procedure CreateWindowHandle(const Params: TCreateParams); override;
      procedure DefineProperties(Filer: TFiler); override;
+     function GetActionLinkClass: TControlActionLinkClass; override;
+     procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
    public
      constructor Create(AOwner: TComponent); override;
***************
*** 137,141 ****
  
  uses SysUtils, Consts, {$IFNDEF VER130} RTLConsts, {$ENDIF} TntMenus, TntWideStrPropHelper,
!   {$IFDEF JCL} JclUnicode {$ELSE} Unicode {$ENDIF};
  
  {$IFDEF VER130}
--- 143,147 ----
  
  uses SysUtils, Consts, {$IFNDEF VER130} RTLConsts, {$ENDIF} TntMenus, TntWideStrPropHelper,
!   {$IFDEF JCL} JclUnicode, {$ELSE} Unicode, {$ENDIF} TntActnList;
  
  {$IFDEF VER130}
***************
*** 200,214 ****
  function TTntScrollBox.IsHintStored: Boolean;
  begin
!   Result := TntIsHintStored(Self);
  end;
  
  function TTntScrollBox.GetHint: WideString;
  begin
!   Result := WideGetWindowHint(Self);
  end;
  
  procedure TTntScrollBox.SetHint(const Value: WideString);
  begin
!   WideSetWindowHint(Self, Value);
  end;
  
--- 206,231 ----
  function TTntScrollBox.IsHintStored: Boolean;
  begin
!   Result := TntControl_IsHintStored(Self);
  end;
  
  function TTntScrollBox.GetHint: WideString;
  begin
!   Result := TntControl_GetHint(Self);
  end;
  
  procedure TTntScrollBox.SetHint(const Value: WideString);
  begin
!   TntControl_SetHint(Self, Value);
! end;
! 
! procedure TTntScrollBox.ActionChange(Sender: TObject; CheckDefaults: Boolean);
! begin
!   TntControl_BeforeInherited_ActionChange(Self, Sender, CheckDefaults);
!   inherited;
! end;
! 
! function TTntScrollBox.GetActionLinkClass: TControlActionLinkClass;
! begin
!   Result := TntControl_GetActionLinkClass(Self, inherited GetActionLinkClass);
  end;
  
***************
*** 228,242 ****
  function TTntCustomFrame.IsHintStored: Boolean;
  begin
!   Result := TntIsHintStored(Self);
  end;
  
  function TTntCustomFrame.GetHint: WideString;
  begin
!   Result := WideGetWindowHint(Self);
  end;
  
  procedure TTntCustomFrame.SetHint(const Value: WideString);
  begin
!   WideSetWindowHint(Self, Value);
  end;
  
--- 245,270 ----
  function TTntCustomFrame.IsHintStored: Boolean;
  begin
!   Result := TntControl_IsHintStored(Self);
  end;
  
  function TTntCustomFrame.GetHint: WideString;
  begin
!   Result := TntControl_GetHint(Self);
  end;
  
  procedure TTntCustomFrame.SetHint(const Value: WideString);
  begin
!   TntControl_SetHint(Self, Value);
! end;
! 
! procedure TTntCustomFrame.ActionChange(Sender: TObject; CheckDefaults: Boolean);
! begin
!   TntControl_BeforeInherited_ActionChange(Self, Sender, CheckDefaults);
!   inherited;
! end;
! 
! function TTntCustomFrame.GetActionLinkClass: TControlActionLinkClass;
! begin
!   Result := TntControl_GetActionLinkClass(Self, inherited GetActionLinkClass);
  end;
  
***************
*** 306,335 ****
  function TTntForm{TNT-ALLOW TTntForm}.IsCaptionStored: Boolean;
  begin
!   Result := TntIsCaptionStored(Self);
  end;
  
  function TTntForm{TNT-ALLOW TTntForm}.GetCaption: TWideCaption;
  begin
!   Result := WideGetWindowText(Self)
  end;
  
  procedure TTntForm{TNT-ALLOW TTntForm}.SetCaption(const Value: TWideCaption);
  begin
!   WideSetWindowText(Self, Value)
  end;
  
  function TTntForm{TNT-ALLOW TTntForm}.IsHintStored: Boolean;
  begin
!   Result := TntIsHintStored(Self);
  end;
  
  function TTntForm{TNT-ALLOW TTntForm}.GetHint: WideString;
  begin
!   Result := WideGetWindowHint(Self)
  end;
  
  procedure TTntForm{TNT-ALLOW TTntForm}.SetHint(const Value: WideString);
  begin
!   WideSetWindowHint(Self, Value);
  end;
  
--- 334,374 ----
  function TTntForm{TNT-ALLOW TTntForm}.IsCaptionStored: Boolean;
  begin
!   Result := TntControl_IsCaptionStored(Self);
  end;
  
  function TTntForm{TNT-ALLOW TTntForm}.GetCaption: TWideCaption;
  begin
!   Result := TntControl_GetText(Self)
  end;
  
  procedure TTntForm{TNT-ALLOW TTntForm}.SetCaption(const Value: TWideCaption);
  begin
!   TntControl_SetText(Self, Value)
  end;
  
  function TTntForm{TNT-ALLOW TTntForm}.IsHintStored: Boolean;
  begin
!   Result := TntControl_IsHintStored(Self);
  end;
  
  function TTntForm{TNT-ALLOW TTntForm}.GetHint: WideString;
  begin
!   Result := TntControl_GetHint(Self)
  end;
  
  procedure TTntForm{TNT-ALLOW TTntForm}.SetHint(const Value: WideString);
  begin
!   TntControl_SetHint(Self, Value);
! end;
! 
! procedure TTntForm{TNT-ALLOW TTntForm}.ActionChange(Sender: TObject; CheckDefaults: Boolean);
! begin
!   TntControl_BeforeInherited_ActionChange(Self, Sender, CheckDefaults);
!   inherited;
! end;
! 
! function TTntForm{TNT-ALLOW TTntForm}.GetActionLinkClass: TControlActionLinkClass;
! begin
!   Result := TntControl_GetActionLinkClass(Self, inherited GetActionLinkClass);
  end;
  

Index: TntGrids.pas
===================================================================
RCS file: /usr/local/cvsroot/sword/apps/windoze/CBuilder5/BibleCS/TntUnicodeControls/TntGrids.pas,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TntGrids.pas	23 Jan 2003 00:02:43 -0000	1.1
--- TntGrids.pas	27 Jan 2003 08:52:31 -0000	1.2
***************
*** 61,64 ****
--- 61,66 ----
      procedure ShowEditorChar(Ch: WideChar); dynamic;
      procedure DefineProperties(Filer: TFiler); override;
+     function GetActionLinkClass: TControlActionLinkClass; override;
+     procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
      property OnGetEditText: TTntGetEditEvent read FOnGetEditText write FOnGetEditText;
      property OnSetEditText: TTntSetEditEvent read FOnSetEditText write FOnSetEditText;
***************
*** 194,197 ****
--- 196,201 ----
      procedure ShowEditorChar(Ch: WideChar); dynamic;
      procedure DefineProperties(Filer: TFiler); override;
+     function GetActionLinkClass: TControlActionLinkClass; override;
+     procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
    public
      constructor Create(AOwner: TComponent); override;
***************
*** 209,213 ****
  
  uses SysUtils, TntGraphics, TntControls, TntStdCtrls, TntWideStrPropHelper,
!   {$IFDEF JCL} JclUnicode {$ELSE} Unicode {$ENDIF};
  
  { TTntInplaceEdit }
--- 213,217 ----
  
  uses SysUtils, TntGraphics, TntControls, TntStdCtrls, TntWideStrPropHelper,
!   {$IFDEF JCL} JclUnicode, {$ELSE} Unicode, {$ENDIF} TntActnList;
  
  { TTntInplaceEdit }
***************
*** 220,229 ****
  function TTntInplaceEdit.GetText: WideString;
  begin
!   Result := WideGetWindowText(Self);
  end;
  
  procedure TTntInplaceEdit.SetText(const Value: WideString);
  begin
!   WideSetWindowText(Self, Value);
  end;
  
--- 224,233 ----
  function TTntInplaceEdit.GetText: WideString;
  begin
!   Result := TntControl_GetText(Self);
  end;
  
  procedure TTntInplaceEdit.SetText(const Value: WideString);
  begin
!   TntControl_SetText(Self, Value);
  end;
  
***************
*** 279,293 ****
  function TTntCustomDrawGrid.IsHintStored: Boolean;
  begin
!   Result := TntIsHintStored(Self);
  end;
  
  function TTntCustomDrawGrid.GetHint: WideString;
  begin
!   Result := WideGetWindowHint(Self);
  end;
  
  procedure TTntCustomDrawGrid.SetHint(const Value: WideString);
  begin
!   WideSetWindowHint(Self, Value);
  end;
  
--- 283,297 ----
  function TTntCustomDrawGrid.IsHintStored: Boolean;
  begin
!   Result := TntControl_IsHintStored(Self);
  end;
  
  function TTntCustomDrawGrid.GetHint: WideString;
  begin
!   Result := TntControl_GetHint(Self);
  end;
  
  procedure TTntCustomDrawGrid.SetHint(const Value: WideString);
  begin
!   TntControl_SetHint(Self, Value);
  end;
  
***************
*** 301,305 ****
  begin
    if not FSettingEditText then
!     SetEditText(ACol, ARow, WideGetWindowText(InplaceEditor));
  end;
  
--- 305,309 ----
  begin
    if not FSettingEditText then
!     SetEditText(ACol, ARow, TntControl_GetText(InplaceEditor));
  end;
  
***************
*** 330,333 ****
--- 334,348 ----
  end;
  
+ procedure TTntCustomDrawGrid.ActionChange(Sender: TObject; CheckDefaults: Boolean);
+ begin
+   TntControl_BeforeInherited_ActionChange(Self, Sender, CheckDefaults);
+   inherited;
+ end;
+ 
+ function TTntCustomDrawGrid.GetActionLinkClass: TControlActionLinkClass;
+ begin
+   Result := TntControl_GetActionLinkClass(Self, inherited GetActionLinkClass);
+ end;
+ 
  { TTntStringGridStrings }
  
***************
*** 484,498 ****
  function TTntStringGrid.IsHintStored: Boolean;
  begin
!   Result := TntIsHintStored(Self);
  end;
  
  function TTntStringGrid.GetHint: WideString;
  begin
!   Result := WideGetWindowHint(Self)
  end;
  
  procedure TTntStringGrid.SetHint(const Value: WideString);
  begin
!   WideSetWindowHint(Self, Value);
  end;
  
--- 499,513 ----
  function TTntStringGrid.IsHintStored: Boolean;
  begin
!   Result := TntControl_IsHintStored(Self);
  end;
  
  function TTntStringGrid.GetHint: WideString;
  begin
!   Result := TntControl_GetHint(Self)
  end;
  
  procedure TTntStringGrid.SetHint(const Value: WideString);
  begin
!   TntControl_SetHint(Self, Value);
  end;
  
***************
*** 572,576 ****
  begin
    if not FSettingEditText then
!     SetEditText(ACol, ARow, WideGetWindowText(InplaceEditor));
  end;
  
--- 587,591 ----
  begin
    if not FSettingEditText then
!     SetEditText(ACol, ARow, TntControl_GetText(InplaceEditor));
  end;
  
***************
*** 605,608 ****
--- 620,634 ----
        PostMessageA(InplaceEditor.Handle, WM_CHAR, Word(Ch), 0);
    end;
+ end;
+ 
+ procedure TTntStringGrid.ActionChange(Sender: TObject; CheckDefaults: Boolean);
+ begin
+   TntControl_BeforeInherited_ActionChange(Self, Sender, CheckDefaults);
+   inherited;
+ end;
+ 
+ function TTntStringGrid.GetActionLinkClass: TControlActionLinkClass;
+ begin
+   Result := TntControl_GetActionLinkClass(Self, inherited GetActionLinkClass);
  end;
  

Index: TntMenus.pas
===================================================================
RCS file: /usr/local/cvsroot/sword/apps/windoze/CBuilder5/BibleCS/TntUnicodeControls/TntMenus.pas,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TntMenus.pas	23 Jan 2003 00:02:43 -0000	1.1
--- TntMenus.pas	27 Jan 2003 08:52:31 -0000	1.2
***************
*** 39,42 ****
--- 39,44 ----
    protected
      procedure DefineProperties(Filer: TFiler); override;
+     function GetActionLinkClass: TMenuActionLinkClass; override;
+     procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
      procedure MenuChanged(Rebuild: Boolean); override;
      procedure AdvancedDrawItem(ACanvas: TCanvas; ARect: TRect;
***************
*** 99,103 ****
  implementation
  
! uses SysUtils, TntWideStrPropHelper, ActnList, Consts, TntControls, ImgList, TntGraphics, Forms;
  
  function WideNewSubMenu(const ACaption: WideString; hCtx: THelpContext;
--- 101,106 ----
  implementation
  
! uses SysUtils, TntWideStrPropHelper, ActnList, Consts, TntControls, ImgList, TntGraphics, Forms,
!   TntActnList;
  
  function WideNewSubMenu(const ACaption: WideString; hCtx: THelpContext;
***************
*** 430,434 ****
      FxxxxGroupIndex: Byte;
      FxxxxImageIndex: TImageIndex;
!     FxxxxActionLink: TMenuActionLink;
      FxxxxBreak: TMenuBreak;
      FBitmap: TBitmap;
--- 433,437 ----
      FxxxxGroupIndex: Byte;
      FxxxxImageIndex: TImageIndex;
!     FxxxxActionLink: TMenuActionLink{TNT-ALLOW TMenuActionLink};
      FxxxxBreak: TMenuBreak;
      FBitmap: TBitmap;
***************
*** 450,454 ****
      FxxxxGroupIndex: Byte;
      FxxxxImageIndex: TImageIndex;
!     FxxxxActionLink: TMenuActionLink;
      FxxxxBreak: TMenuBreak;
      FBitmap: TBitmap;
--- 453,457 ----
      FxxxxGroupIndex: Byte;
      FxxxxImageIndex: TImageIndex;
!     FxxxxActionLink: TMenuActionLink{TNT-ALLOW TMenuActionLink};
      FxxxxBreak: TMenuBreak;
      FBitmap: TBitmap;
***************
*** 470,474 ****
      FxxxxGroupIndex: Byte;
      FxxxxImageIndex: TImageIndex;
!     FxxxxActionLink: TMenuActionLink;
      FxxxxBreak: TMenuBreak;
      FBitmap: TBitmap;
--- 473,477 ----
      FxxxxGroupIndex: Byte;
      FxxxxImageIndex: TImageIndex;
!     FxxxxActionLink: TMenuActionLink{TNT-ALLOW TMenuActionLink};
      FxxxxBreak: TMenuBreak;
      FBitmap: TBitmap;
***************
*** 893,896 ****
--- 896,924 ----
        System.Break;
      end;
+ end;
+ 
+ function TTntMenuItem.GetActionLinkClass: TMenuActionLinkClass;
+ begin
+   Result := TTntMenuActionLink;
+ end;
+ 
+ {$IFDEF VER130}
+ function Supports(const Instance: TObject; const IID: TGUID): Boolean;
+ var
+   Temp: IUnknown;
+ begin
+   Result := Instance.GetInterface(IID, Temp);
+ end;
+ {$ENDIF}
+ 
+ procedure TTntMenuItem.ActionChange(Sender: TObject; CheckDefaults: Boolean);
+ begin
+   if (Sender is TCustomAction{TNT-ALLOW TCustomAction}) and Supports(Sender, ITntAction) then begin
+     if not CheckDefaults or (Caption = '') then
+       Caption := TntAction_GetCaption(TCustomAction{TNT-ALLOW TCustomAction}(Sender));
+     if not CheckDefaults or (Hint = '') then
+       Hint := TntAction_GetHint(TCustomAction{TNT-ALLOW TCustomAction}(Sender));
+   end;
+   inherited;
  end;
  

Index: TntStdCtrls.pas
===================================================================
RCS file: /usr/local/cvsroot/sword/apps/windoze/CBuilder5/BibleCS/TntUnicodeControls/TntStdCtrls.pas,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TntStdCtrls.pas	23 Jan 2003 00:02:43 -0000	1.2
--- TntStdCtrls.pas	27 Jan 2003 08:52:31 -0000	1.3
***************
*** 30,33 ****
--- 30,35 ----
      procedure CreateWindowHandle(const Params: TCreateParams); override;
      procedure DefineProperties(Filer: TFiler); override;
+     function GetActionLinkClass: TControlActionLinkClass; override;
+     procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
    public
      property SelText: WideString read GetSelText write SetSelText;
***************
*** 134,137 ****
--- 136,141 ----
[...1124 lines suppressed...]
  begin
!   Result := TntControl_GetHint(Self)
  end;
  
  procedure TTntCustomStaticText.SetHint(const Value: WideString);
  begin
!   TntControl_SetHint(Self, Value);
! end;
! 
! procedure TTntCustomStaticText.ActionChange(Sender: TObject; CheckDefaults: Boolean);
! begin
!   TntControl_BeforeInherited_ActionChange(Self, Sender, CheckDefaults);
!   inherited;
! end;
! 
! function TTntCustomStaticText.GetActionLinkClass: TControlActionLinkClass;
! begin
!   Result := TntControl_GetActionLinkClass(Self, inherited GetActionLinkClass);
  end;