📄 jvqexcomctrls.pas
字号:
procedure Dispatch(var Mesg); override;
function Perform(Msg: Cardinal; WParam, LParam: Longint): Longint;
function IsRightToLeft: Boolean;
property WindowProc: TWndMethod read FWindowProc write FWindowProc;
property MouseOver: Boolean read FMouseOver write FMouseOver;
published
property AboutJVCLX: TJVCLAboutInfo read FAboutJVCL write FAboutJVCL stored False;
property HintColor: TColor read FHintColor write FHintColor default clDefault;
{ QWinControl }
private
FInternalFontChanged: TNotifyEvent;
FOnEvent: TEventEvent;
procedure DoOnFontChanged(Sender: TObject);
procedure CMDesignHitTest(var Mesg: TJvMessage); message CM_DESIGNHITTEST;
protected
procedure CreateWidget; override;
procedure CreateWnd; virtual;
procedure CursorChanged; override;
procedure DoEnter; override;
function DoPaintBackground(Canvas: TCanvas; Param: Integer): Boolean; virtual;
procedure DoExit; override;
procedure DoKillFocus(NextWnd: HWND); dynamic;
procedure DoSetFocus(PreviousWnd: HWND); dynamic;
function EventFilter(Sender: QObjectH; Event: QEventH): Boolean; override;
procedure PaintWindow(PaintDevice: QPaintDeviceH);
procedure RecreateWnd;
procedure ShowingChanged; override;
function WidgetFlags: Integer; override;
public
function ColorToRGB(Value: TColor): TColor;
procedure PaintTo(PaintDevice: QPaintDeviceH; X, Y: Integer);
published
property OnEvent: TEventEvent read FOnEvent write FOnEvent;
{ QWinCustomControl }
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
end;
{ QWinControl Begin }
TJvExCustomViewControl = class(TCustomViewControl)
{ QControl }
private
FAboutJVCL: TJVCLAboutInfo;
FDesktopFont: Boolean;
FDragCursor: TCursor;
FDragKind: TDragKind;
FHintColor: TColor;
FMouseOver: Boolean;
FOnParentColorChanged: TNotifyEvent;
FWindowProc: TWndMethod;
procedure SetDesktopFont(Value: Boolean);
procedure CMHitTest(var Mesg: TJvMessage); message CM_HITTEST;
procedure CMHintShow(var Mesg: TJvMessage); message CM_HINTSHOW;
procedure CMSysFontChanged(var Mesg: TMessage); message CM_SYSFONTCHANGED;
protected
procedure ColorChanged; override;
procedure EnabledChanged; override;
procedure FocusChanged; dynamic;
function HitTest(X, Y: integer): Boolean; override;
procedure MouseEnter(AControl: TControl); override;
procedure MouseLeave(AControl: TControl); override;
procedure ParentColorChanged; override;
procedure TextChanged; override;
procedure VisibleChanged; override;
function HintShow(var HintInfo : THintInfo): Boolean; override;
procedure WndProc(var Mesg: TMessage); dynamic;
property DragCursor: TCursor read FDragCursor write FDragCursor stored False; { not implemented }
property DragKind: TDragKind read FDragKind write FDragKind stored false; { not implemented }
property OnParentColorChange: TNotifyEvent read FOnParentColorChanged write FOnParentColorChanged;
property DesktopFont: Boolean read FDesktopFont write SetDesktopFont default false;
public
procedure Dispatch(var Mesg); override;
function Perform(Msg: Cardinal; WParam, LParam: Longint): Longint;
function IsRightToLeft: Boolean;
property WindowProc: TWndMethod read FWindowProc write FWindowProc;
property MouseOver: Boolean read FMouseOver write FMouseOver;
published
property AboutJVCLX: TJVCLAboutInfo read FAboutJVCL write FAboutJVCL stored False;
property HintColor: TColor read FHintColor write FHintColor default clDefault;
{ QWinControl }
private
FInternalFontChanged: TNotifyEvent;
FOnEvent: TEventEvent;
procedure DoOnFontChanged(Sender: TObject);
procedure CMDesignHitTest(var Mesg: TJvMessage); message CM_DESIGNHITTEST;
protected
procedure CreateWidget; override;
procedure CreateWnd; virtual;
procedure CursorChanged; override;
procedure DoEnter; override;
function DoPaintBackground(Canvas: TCanvas; Param: Integer): Boolean; virtual;
procedure DoExit; override;
procedure DoKillFocus(NextWnd: HWND); dynamic;
procedure DoSetFocus(PreviousWnd: HWND); dynamic;
function EventFilter(Sender: QObjectH; Event: QEventH): Boolean; override;
procedure PaintWindow(PaintDevice: QPaintDeviceH);
procedure RecreateWnd;
procedure ShowingChanged; override;
function WidgetFlags: Integer; override;
public
function ColorToRGB(Value: TColor): TColor;
procedure PaintTo(PaintDevice: QPaintDeviceH; X, Y: Integer);
published
property OnEvent: TEventEvent read FOnEvent write FOnEvent;
{ QWinCustomControl }
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
end;
{ QWinControl Begin }
TJvExCustomListView = class(TCustomListView)
{ QControl }
private
FAboutJVCL: TJVCLAboutInfo;
FDesktopFont: Boolean;
FDragCursor: TCursor;
FDragKind: TDragKind;
FHintColor: TColor;
FMouseOver: Boolean;
FOnParentColorChanged: TNotifyEvent;
FWindowProc: TWndMethod;
procedure SetDesktopFont(Value: Boolean);
procedure CMHitTest(var Mesg: TJvMessage); message CM_HITTEST;
procedure CMHintShow(var Mesg: TJvMessage); message CM_HINTSHOW;
procedure CMSysFontChanged(var Mesg: TMessage); message CM_SYSFONTCHANGED;
protected
procedure ColorChanged; override;
procedure EnabledChanged; override;
procedure FocusChanged; dynamic;
function HitTest(X, Y: integer): Boolean; override;
procedure MouseEnter(AControl: TControl); override;
procedure MouseLeave(AControl: TControl); override;
procedure ParentColorChanged; override;
procedure TextChanged; override;
procedure VisibleChanged; override;
function HintShow(var HintInfo : THintInfo): Boolean; override;
procedure WndProc(var Mesg: TMessage); dynamic;
property DragCursor: TCursor read FDragCursor write FDragCursor stored False; { not implemented }
property DragKind: TDragKind read FDragKind write FDragKind stored false; { not implemented }
property OnParentColorChange: TNotifyEvent read FOnParentColorChanged write FOnParentColorChanged;
property DesktopFont: Boolean read FDesktopFont write SetDesktopFont default false;
public
procedure Dispatch(var Mesg); override;
function Perform(Msg: Cardinal; WParam, LParam: Longint): Longint;
function IsRightToLeft: Boolean;
property WindowProc: TWndMethod read FWindowProc write FWindowProc;
property MouseOver: Boolean read FMouseOver write FMouseOver;
published
property AboutJVCLX: TJVCLAboutInfo read FAboutJVCL write FAboutJVCL stored False;
property HintColor: TColor read FHintColor write FHintColor default clDefault;
{ QWinControl }
private
FInternalFontChanged: TNotifyEvent;
FOnEvent: TEventEvent;
procedure DoOnFontChanged(Sender: TObject);
procedure CMDesignHitTest(var Mesg: TJvMessage); message CM_DESIGNHITTEST;
protected
procedure CreateWidget; override;
procedure CreateWnd; virtual;
procedure CursorChanged; override;
procedure DoEnter; override;
function DoPaintBackground(Canvas: TCanvas; Param: Integer): Boolean; virtual;
procedure DoExit; override;
procedure DoKillFocus(NextWnd: HWND); dynamic;
procedure DoSetFocus(PreviousWnd: HWND); dynamic;
function EventFilter(Sender: QObjectH; Event: QEventH): Boolean; override;
procedure PaintWindow(PaintDevice: QPaintDeviceH);
procedure RecreateWnd;
procedure ShowingChanged; override;
function WidgetFlags: Integer; override;
public
function ColorToRGB(Value: TColor): TColor;
procedure PaintTo(PaintDevice: QPaintDeviceH; X, Y: Integer);
published
property OnEvent: TEventEvent read FOnEvent write FOnEvent;
{ QWinCustomControl }
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
end;
{ QWinControl Begin }
TJvExListView = class(TListView)
{ QControl }
private
FAboutJVCL: TJVCLAboutInfo;
FDesktopFont: Boolean;
FDragCursor: TCursor;
FDragKind: TDragKind;
FHintColor: TColor;
FMouseOver: Boolean;
FOnParentColorChanged: TNotifyEvent;
FWindowProc: TWndMethod;
procedure SetDesktopFont(Value: Boolean);
procedure CMHitTest(var Mesg: TJvMessage); message CM_HITTEST;
procedure CMHintShow(var Mesg: TJvMessage); message CM_HINTSHOW;
procedure CMSysFontChanged(var Mesg: TMessage); message CM_SYSFONTCHANGED;
protected
procedure ColorChanged; override;
procedure EnabledChanged; override;
procedure FocusChanged; dynamic;
function HitTest(X, Y: integer): Boolean; override;
procedure MouseEnter(AControl: TControl); override;
procedure MouseLeave(AControl: TControl); override;
procedure ParentColorChanged; override;
procedure TextChanged; override;
procedure VisibleChanged; override;
function HintShow(var HintInfo : THintInfo): Boolean; override;
procedure WndProc(var Mesg: TMessage); dynamic;
property DragCursor: TCursor read FDragCursor write FDragCursor stored False; { not implemented }
property DragKind: TDragKind read FDragKind write FDragKind stored false; { not implemented }
property OnParentColorChange: TNotifyEvent read FOnParentColorChanged write FOnParentColorChanged;
property DesktopFont: Boolean read FDesktopFont write SetDesktopFont default false;
public
procedure Dispatch(var Mesg); override;
function Perform(Msg: Cardinal; WParam, LParam: Longint): Longint;
function IsRightToLeft: Boolean;
property WindowProc: TWndMethod read FWindowProc write FWindowProc;
property MouseOver: Boolean read FMouseOver write FMouseOver;
published
property AboutJVCLX: TJVCLAboutInfo read FAboutJVCL write FAboutJVCL stored False;
property HintColor: TColor read FHintColor write FHintColor default clDefault;
{ QWinControl }
private
FInternalFontChanged: TNotifyEvent;
FOnEvent: TEventEvent;
procedure DoOnFontChanged(Sender: TObject);
procedure CMDesignHitTest(var Mesg: TJvMessage); message CM_DESIGNHITTEST;
protected
procedure CreateWidget; override;
procedure CreateWnd; virtual;
procedure CursorChanged; override;
procedure DoEnter; override;
function DoPaintBackground(Canvas: TCanvas; Param: Integer): Boolean; virtual;
procedure DoExit; override;
procedure DoKillFocus(NextWnd: HWND); dynamic;
procedure DoSetFocus(PreviousWnd: HWND); dynamic;
function EventFilter(Sender: QObjectH; Event: QEventH): Boolean; override;
procedure PaintWindow(PaintDevice: QPaintDeviceH);
procedure RecreateWnd;
procedure ShowingChanged; override;
function WidgetFlags: Integer; override;
public
function ColorToRGB(Value: TColor): TColor;
procedure PaintTo(PaintDevice: QPaintDeviceH; X, Y: Integer);
published
property OnEvent: TEventEvent read FOnEvent write FOnEvent;
{ QWinCustomControl }
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
end;
{ QWinControl Begin }
TJvExCustomSpinEdit = class(TCustomSpinEdit)
{ QControl }
private
FAboutJVCL: TJVCLAboutInfo;
FDesktopFont: Boolean;
FDragCursor: TCursor;
FDragKind: TDragKind;
FHintColor: TColor;
FMouseOver: Boolean;
FOnParentColorChanged: TNotifyEvent;
FWindowProc: TWndMethod;
procedure SetDesktopFont(Value: Boolean);
procedure CMHitTest(var Mesg: TJvMessage); message CM_HITTEST;
procedure CMHintShow(var Mesg: TJvMessage); message CM_HINTSHOW;
procedure CMSysFontChanged(var Mesg: TMessage); message CM_SYSFONTCHANGED;
protected
procedure ColorChanged; override;
procedure EnabledChanged; override;
procedure FocusChanged; dynamic;
function HitTest(X, Y: integer): Boolean; override;
procedure MouseEnter(AControl: TControl); override;
procedure MouseLeave(AControl: TControl); override;
procedure ParentColorChanged; override;
procedure TextChanged; override;
procedure VisibleChanged; override;
function HintShow(var HintInfo : THintInfo): Boolean; override;
procedure WndProc(var Mesg: TMessage); dynamic;
property DragCursor: TCursor read FDragCursor write FDragCursor stored False; { not implemented }
property DragKind: TDragKind read FDragKind write FDragKind stored false; { not implemented }
property OnParentColorChange: TNotifyEvent read FOnParentColorChanged write FOnParentColorChanged;
property DesktopFont: Boolean read FDesktopFont write SetDesktopFont default false;
public
procedure Dispatch(var Mesg); override;
function Perform(Msg: Cardinal; WParam, LParam: Longint): Longint;
function IsRightToLeft: Boolean;
property WindowProc: TWndMethod read FWindowProc write FWindowProc;
property MouseOver: Boolean read FMouseOver write FMouseOver;
published
property AboutJVCLX: TJVCLAboutInfo read FAboutJVCL write FAboutJVCL stored False;
property HintColor: TColor read FHintColor write FHintColor default clDefault;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -