⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jvexcontrols.macros

📁 East make Tray Icon in delphi
💻 MACROS
📖 第 1 页 / 共 2 页
字号:

// This comment is inserted into every JvExXxx.pas file
(*$DEFINE WARNINGHEADER
{*****************************************************************************
 * WARNING: Do not edit this file.
 * This file is autogenerated from the source in devtools/JvExVCL/src.
 * If you do it despite this warning your changes will be discarded by the next
 * update of this file. Do your changes in the template files.
 ****************************************************************************}
*)

// *************************************************************************
// *************************** INTERFACE MACROS ****************************
// *************************************************************************

(*$DEFINE COMMON_PUBLISHED
  published
    property BiDiMode;
    property DragCursor;
    property DragKind;
    property DragMode;
    property ParentBiDiMode;
    property OnEndDock;
    property OnStartDock;
*)

// ****************** Control ************************
(*$DEFINE CONTROL_DECL
  private
    FAboutJVCL: TJVCLAboutInfo;
    FHintColor: TColor;
    FMouseOver: Boolean;
    {$IFDEF VCL}
    FOnMouseEnter: TNotifyEvent;
    FOnMouseLeave: TNotifyEvent;
    {$ENDIF VCL}
    FOnParentColorChanged: TNotifyEvent;
    function BaseWndProc(Msg: Integer; WParam: Integer = 0; LParam: Integer = 0): Integer;
  protected
    procedure WndProc(var Msg: TMessage); override;
    procedure FocusChanged(AControl: TWinControl); dynamic;
    procedure VisibleChanged; reintroduce; dynamic;
    procedure EnabledChanged; reintroduce; dynamic;
    procedure TextChanged; reintroduce; virtual;
    procedure ColorChanged; reintroduce; dynamic;
    procedure FontChanged; reintroduce; dynamic;
    procedure ParentFontChanged; reintroduce; dynamic;
    procedure ParentColorChanged; reintroduce; dynamic;
    procedure ParentShowHintChanged; reintroduce; dynamic;
    function WantKey(Key: Integer; Shift: TShiftState; const KeyText: WideString): Boolean; reintroduce; virtual;
    function HintShow(var HintInfo: THintInfo): Boolean; reintroduce; dynamic;
    function HitTest(X, Y: Integer): Boolean; reintroduce; virtual;
    procedure MouseEnter(AControl: TControl); reintroduce; dynamic;
    procedure MouseLeave(AControl: TControl); reintroduce; dynamic;
    {$IFDEF COMPILER5}
    {$IFNDEF HASAUTOSIZE}
    procedure CMSetAutoSize(var Msg: TMessage); message CM_SETAUTOSIZE;
    procedure SetAutoSize(Value: Boolean); virtual;
    {$ENDIF !HASAUTOSIZE}
    {$ENDIF COMPILER5}
    property MouseOver: Boolean read FMouseOver write FMouseOver;
    property HintColor: TColor read FHintColor write FHintColor default clDefault;
    {$IFDEF VCL}
    property OnMouseEnter: TNotifyEvent read FOnMouseEnter write FOnMouseEnter;
    property OnMouseLeave: TNotifyEvent read FOnMouseLeave write FOnMouseLeave;
    {$ENDIF VCL}
    property OnParentColorChange: TNotifyEvent read FOnParentColorChanged write FOnParentColorChanged;
  public
    constructor Create(AOwner: TComponent); override;
  published
    property AboutJVCL: TJVCLAboutInfo read FAboutJVCL write FAboutJVCL stored False;
*)

// ****************** WinControl *********************
((*$DEFINE WINCONTROL_DECL
  CONTROL_DECL
  protected
    procedure BoundsChanged; reintroduce; virtual;
    procedure CursorChanged; reintroduce; dynamic;
    procedure ShowingChanged; reintroduce; dynamic;
    procedure ShowHintChanged; reintroduce; dynamic;
    procedure ControlsListChanging(Control: TControl; Inserting: Boolean); reintroduce; dynamic;
    procedure ControlsListChanged(Control: TControl; Inserting: Boolean); reintroduce; dynamic;
    procedure GetDlgCode(var Code: TDlgCodes); virtual;
    procedure FocusSet(PrevWnd: HWND); virtual;
    procedure FocusKilled(NextWnd: HWND); virtual;
    function DoEraseBackground(Canvas: TCanvas; Param: Integer): Boolean; virtual;
  {$IFDEF JVCLThemesEnabledD56}
  private
    function GetParentBackground: Boolean;
  protected
    procedure SetParentBackground(Value: Boolean); virtual;
    property ParentBackground: Boolean read GetParentBackground write SetParentBackground;
  {$ENDIF JVCLThemesEnabledD56}
*)

// ****************** EditControl ********************
(*$DEFINE EDITCONTROL_DECL
  WINCONTROL_DECL
  private
    FClipboardCommands: TJvClipboardCommands;
  protected
    procedure SetClipboardCommands(const Value: TJvClipboardCommands); virtual;
    property ClipboardCommands: TJvClipboardCommands read FClipboardCommands write SetClipboardCommands default [caCopy..caUndo];
*)

// *************************************************************************
// *************************************************************************

// ****************** Default-Helpers ********************

(*$DEFINE CONTROL_DECL_DEFAULT(ClassName)
  TJvEx##ClassName = class(T##ClassName, IJvExControl)
  CONTROL_DECL
  end;
*)

(*$DEFINE WINCONTROL_DECL_DEFAULT(ClassName)
  TJvEx##ClassName = class(T##ClassName, IJvExControl)
  WINCONTROL_DECL
  end;
*)

(*$DEFINE EDITCONTROL_DECL_DEFAULT(ClassName)
  TJvEx##ClassName = class(T##ClassName, IJvExControl)
  EDITCONTROL_DECL
  end;
*)

// *************************************************************************
// ************************ IMPLEMENTATION MACROS **************************
// *************************************************************************

// ****************** Constructors *******************
(*$DEFINE BEGIN_CONTROL_CONSTRUCTOR(ClassName)
constructor TJvEx##ClassName.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
  FHintColor := clDefault;
*)

(*$DEFINE BEGIN_WINCONTROL_CONSTRUCTOR(ClassName)
BEGIN_CONTROL_CONSTRUCTOR(ClassName)
*)

(*$DEFINE BEGIN_EDITCONTROL_CONSTRUCTOR(ClassName)
BEGIN_WINCONTROL_CONSTRUCTOR(ClassName)
  FClipboardCommands := [caCopy..caUndo];
*)

(*$DEFINE END_CONSTRUCTOR
end;
*)


// ****************** Control implementation *******************
(*$DEFINE CONTROL_IMPL(ClassName)
function TJvEx##ClassName.BaseWndProc(Msg: Integer; WParam: Integer = 0; LParam: Integer = 0): Integer;
var
  Mesg: TMessage;
begin
  Mesg.Msg := Msg;
  Mesg.WParam := WParam;
  Mesg.LParam := LParam;
  Mesg.Result := 0;
  inherited WndProc(Mesg);
  Result := Mesg.Result;
end;

procedure TJvEx##ClassName.VisibleChanged;
begin
  BaseWndProc(CM_VISIBLECHANGED);
end;

procedure TJvEx##ClassName.EnabledChanged;
begin
  BaseWndProc(CM_ENABLEDCHANGED);
end;

procedure TJvEx##ClassName.TextChanged;
begin
  BaseWndProc(CM_TEXTCHANGED);
end;

procedure TJvEx##ClassName.FontChanged;
begin
  BaseWndProc(CM_FONTCHANGED);
end;

procedure TJvEx##ClassName.ColorChanged;
begin
  BaseWndProc(CM_COLORCHANGED);
end;

procedure TJvEx##ClassName.ParentFontChanged;
begin
  BaseWndProc(CM_PARENTFONTCHANGED);
end;

procedure TJvEx##ClassName.ParentColorChanged;
begin
  BaseWndProc(CM_PARENTCOLORCHANGED);
  if Assigned(OnParentColorChange) then
    OnParentColorChange(Self);
end;

procedure TJvEx##ClassName.ParentShowHintChanged;
begin
  BaseWndProc(CM_PARENTSHOWHINTCHANGED);
end;

function TJvEx##ClassName.WantKey(Key: Integer; Shift: TShiftState; const KeyText: WideString): Boolean;
begin
  Result := BaseWndProc(CM_DIALOGCHAR, Word(Key), ShiftStateToKeyData(Shift)) <> 0;
end;

function TJvEx##ClassName.HitTest(X, Y: Integer): Boolean;
begin
  Result := BaseWndProc(CM_HITTEST, 0, Integer(PointToSmallPoint(Point(X, Y)))) <> 0;
end;

function TJvEx##ClassName.HintShow(var HintInfo: THintInfo): Boolean;
begin
  GetHintColor(HintInfo, Self, FHintColor);
  Result := BaseWndProc(CM_HINTSHOW, 0, Integer(@HintInfo)) <> 0;
end;

procedure TJvEx##ClassName.MouseEnter(AControl: TControl);
begin
  FMouseOver := True;
  {$IFDEF VCL}
  if Assigned(FOnMouseEnter) then
    FOnMouseEnter(Self);
  {$ENDIF VCL}
  BaseWndProc(CM_MOUSEENTER, 0, Integer(AControl));
end;

procedure TJvEx##ClassName.MouseLeave(AControl: TControl);
begin
  FMouseOver := False;
  BaseWndProc(CM_MOUSELEAVE, 0, Integer(AControl));
  {$IFDEF VCL}
  if Assigned(FOnMouseLeave) then
    FOnMouseLeave(Self);
  {$ENDIF VCL}
end;

procedure TJvEx##ClassName.FocusChanged(AControl: TWinControl);
begin
  BaseWndProc(CM_FOCUSCHANGED, 0, Integer(AControl));
end;

{$IFDEF COMPILER5}
{$IFNDEF HASAUTOSIZE}

procedure TJvEx##ClassName.CMSetAutoSize(var Msg: TMessage);
begin
  SetAutoSize(Msg.WParam <> 0);
end;

procedure TJvEx##ClassName.SetAutoSize(Value: Boolean);
begin
  TOpenControl_SetAutoSize(Self, Value);
end;

{$ENDIF !HASAUTOSIZE}
{$ENDIF COMPILER5}
*)

// ****************** WinControl implementation *******************
((*$DEFINE WINCONTROL_IMPL(ClassName)
CONTROL_IMPL(ClassName)

procedure TJvEx##ClassName.BoundsChanged;
begin
end;

procedure TJvEx##ClassName.CursorChanged;
begin
  BaseWndProc(CM_CURSORCHANGED);
end;

procedure TJvEx##ClassName.ShowingChanged;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -