📄 rm_jvtypes.pas
字号:
{-----------------------------------------------------------------------------
The contents of this file are subject to the Mozilla Public License
Version 1.1 (the "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/MPL-1.1.html
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for
the specific language governing rights and limitations under the License.
The Original Code is: rm_JvTypes.PAS, released on 2001-02-28.
The Initial Developer of the Original Code is S閎astien Buysse [sbuysse att buypin dott com]
Portions created by S閎astien Buysse are Copyright (C) 2001 S閎astien Buysse.
All Rights Reserved.
Contributor(s): Michael Beck [mbeck att bigfoot dott com].
Peter Thornqvist
Oliver Giesen
Gustavo Bianconi
dejoy
You may retrieve the latest version of this file at the Project JEDI's JVCL home page,
located at http://jvcl.sourceforge.net
Known Issues:
-----------------------------------------------------------------------------}
// $Id: rm_JvTypes.pas 10258 2006-02-14 14:17:17Z ahuser $
unit rm_JvTypes;
{$I rm_jvcl.inc}
interface
uses
{$IFDEF UNITVERSIONING}
rm_JclUnitVersioning,
{$ENDIF UNITVERSIONING}
{$IFDEF CLR}
System.Runtime.InteropServices,
{$ENDIF CLR}
SysUtils, Classes,
Windows, Messages, Controls, Forms, Graphics,
{$IFDEF VisualCLX}
Qt, JclWideStrings,
{$ENDIF VisualCLX}
{$IFDEF COMPILER5}
rm_JvWin32,
{$ENDIF COMPILER5}
rm_JvConsts, rm_JvResources;
const
MaxPixelCount = 32767;
{$HPPEMIT '#ifndef TDate'}
{$IFDEF VCL}
{$HPPEMIT '#define TDate Controls::TDate'}
{$HPPEMIT '#define TTime Controls::TTime'}
{$ENDIF VCL}
{$IFDEF VisualCLX}
{$HPPEMIT '#define TDate TDateTime'}
{$HPPEMIT '#define TTime TDateTime'}
type
TDate = type TDateTime;
{$EXTERNALSYM TDate}
TTime = type TDateTime;
{$EXTERNALSYM TTime}
{$ENDIF VisualCLX}
{$HPPEMIT '#endif'}
{$IFNDEF CLR}
type
TBytes = Pointer;
IntPtr = Pointer;
{$ENDIF !CLR}
{$IFDEF VCL}
type
PCaptionChar = PChar;
// used in JvSpeedButton, JvArrowButton, JvButton CM_JVBUTTONPRESSED
// asn: can also be used with CM_BUTTONPRESSED
TCMButtonPressed = packed record
Msg: Cardinal;
Index: Integer; { clx has Index and Control switched }
Control: TControl;
Result: Longint;
end;
THintString = string;
THintStringList = TStringList;
{ JvExVCL classes }
TInputKey = (ikAll, ikArrows, ikChars, ikButton, ikTabs, ikEdit, ikNative{, ikNav, ikEsc});
TInputKeys = set of TInputKey;
{$IFDEF CLR}
[StructLayout(LayoutKind.Sequential)]
{$ENDIF CLR}
TJvRGBTriple = packed record
rgbBlue: Byte;
rgbGreen: Byte;
rgbRed: Byte;
end;
const
NullHandle = 0;
// (rom) deleted fbs constants. They are already in rm_JvConsts.pas.
{$ENDIF VCL}
type
TTimerProc = procedure(hwnd: THandle; Msg: Cardinal; idEvent: Cardinal; dwTime: Cardinal);
{$IFDEF VisualCLX}
type
// used in JvSpeedButton, JvArrowButton, JvButton CM_BUTTONPRESSED
// can be used with (VisualCLX) CM_BUTTONPRESSED
TCMButtonPressed = packed record
Msg: Cardinal;
Control: TControl; { with VCL Control & Indez are switched }
Index: Integer;
Result: Longint; { QButtons.TCMButtonPressed has no Result }
end;
PCaptionChar = PWideChar;
THintString = WideString;
THintStringList = TWideStringList;
TJvRGBTriple = TRGBQuad; { VisualCLX does not support pf24bit }
const
NullHandle = nil; { clx uses typed pointers ! }
ikButton = ikReturns;
{$ENDIF VisualCLX}
type
{$IFDEF COMPILER5}
EOSError = class(EWin32Error);
IInterface = IUnknown;
{$M+}
IInvokable = interface(IInterface)
end;
{$M-}
{$ENDIF COMPILER5}
{$IFDEF CLR}
IUnknown = IInterface;
{$ENDIF CLR}
// Base class for persistent properties that can show events.
// By default, Delphi and BCB don't show the events of a class
// derived from TPersistent unless it also derives from
// TComponent. However, up until version 5, you couldn't have
// a Component as a Sub Component of another one, thus preventing
// from having events for a sub property.
// The design time editor associated with TJvPersistent will display
// the events, thus mimicking a Sub Component.
{$IFDEF COMPILER6_UP}
TJvPersistent = class(TComponent)
public
constructor Create(AOwner: TComponent); override;
end;
{$ELSE}
TJvPersistent = class(TPersistent);
{$ENDIF COMPILER6_UP}
// Added by dejoy (2005-04-20)
// A lot of TJVxxx control persistent properties used TPersistent,
// So and a TJvPersistentProperty to do this job. make to support batch-update mode
// and property change notify.
TJvPropertyChangeEvent = procedure(Sender: TObject; const PropName: string) of object;
TJvPersistentProperty = class(TPersistent)//?? TJvPersistent
private
FUpdateCount: Integer;
FOnChanging: TNotifyEvent;
FOnChange: TNotifyEvent;
FOnChangingProperty: TJvPropertyChangeEvent;
FOnChangeProperty: TJvPropertyChangeEvent;
protected
procedure Changed; virtual;
procedure Changing; virtual;
procedure ChangedProperty(const PropName: string); virtual;
procedure ChangingProperty(const PropName: string); virtual;
procedure SetUpdateState(Updating: Boolean); virtual;
property UpdateCount: Integer read FUpdateCount;
public
procedure BeginUpdate; virtual;
procedure EndUpdate; virtual;
property OnChange: TNotifyEvent read FOnChange write FOnChange;
property OnChanging: TNotifyEvent read FOnChanging write FOnChanging;
property OnChangeProperty: TJvPropertyChangeEvent read FOnChangeProperty write FOnChangeProperty;
property OnChangingProperty: TJvPropertyChangeEvent read FOnChangingProperty write FOnChangingProperty;
end;
TJvRegKey = (hkClassesRoot, hkCurrentUser, hkLocalMachine, hkUsers,
hkPerformanceData, hkCurrentConfig, hkDynData);
TJvRegKeys = set of TJvRegKey;
// base JVCL Exception class to derive from
EJVCLException = class(Exception);
TJvLinkClickEvent = procedure(Sender: TObject; Link: string) of object;
// TOnRegistryChangeKey = procedure(Sender: TObject; RootKey: HKEY; Path: string) of object;
// TAngle = 0..360;
TJvOutputMode = (omFile, omStream);
// TLabelDirection = (sdLeftToRight, sdRightToLeft); // JvScrollingLabel
TJvDoneFileEvent = procedure(Sender: TObject; FileName: string; FileSize: Integer; Url: string) of object;
TJvDoneStreamEvent = procedure(Sender: TObject; Stream: TStream; StreamSize: Integer; Url: string) of object;
TJvHTTPProgressEvent = procedure(Sender: TObject; UserData, Position: Integer; TotalSize: Integer; Url: string; var Continue: Boolean) of object;
TJvFTPProgressEvent = procedure(Sender: TObject; Position: Integer; Url: string) of object;
// from rm_JvComponent.pas
TJvClipboardCommand = (caCopy, caCut, caPaste, caClear, caUndo);
TJvClipboardCommands = set of TJvClipboardCommand;
// used in JvButton
TCMForceSize = record
Msg: Cardinal;
NewSize: TSmallPoint;
Sender: TControl;
Result: Longint;
end;
{$IFDEF VCL}
PJvRGBArray = ^TJvRGBArray;
TJvRGBArray = array [0..MaxPixelCount] of TJvRGBTriple;
PRGBQuadArray = ^TRGBQuadArray;
TRGBQuadArray = array [0..MaxPixelCount] of TRGBQuad;
PRGBPalette = ^TRGBPalette;
TRGBPalette = array [Byte] of TRGBQuad;
{$ENDIF VCL}
{ (rom) unused
TJvPoint = class(TPersistent)
protected
FX: Integer;
FY: Integer;
published
property X: Integer read FX write FX;
property Y: Integer read FY write FY;
end;
}
TJvErrorEvent = procedure(Sender: TObject; ErrorMsg: string) of object;
TJvWaveLocation = (frFile, frResource, frRAM);
TJvPopupPosition = (ppNone, ppForm, ppApplication);
// TJvDirMask = (dmFileNameChange, dmDirnameChange, dmAttributesChange, dmSizeChange, dmLastWriteChange, dmSecurityChange); //JvDirectorySpy
// TJvDirMasks = set of TJvDirMask;
// EJvDirectoryError = class(EJVCLException); // JvDirectorySpy
// TListEvent = procedure(Sender: TObject; Title: string; Handle: THandle) of object; // JvWindowsTitle
TJvProgressEvent = procedure(Sender: TObject; Current, Total: Integer) of object;
TJvNextPageEvent = procedure(Sender: TObject; PageNumber: Integer) of object;
TJvBitmapStyle = (bsNormal, bsCentered, bsStretched);
// TOnOpened = procedure(Sender: TObject; Value: string) of object; // archive
// TOnOpenCanceled = procedure(Sender: TObject) of object; // archive
{$IFDEF COMPILER5}
{ TStream seek origins }
// TSeekOrigin = (soFromBeginning, soFromCurrent, soFromEnd);
// (outchy)
// TStream.Seek can not be used with TSeekOrigin
// soFromBeginning, soFromCurrent and soFromEnd are defined in Classes.pas
TWMNCPaint = packed record
Msg: Cardinal;
RGN: HRGN;
Unused: Longint;
Result: Longint;
end;
// (outchy) defined in Windows.pas
// PInteger = ^Integer;
// PDouble = ^Double;
PBoolean = ^Boolean;
PWordBool = ^WordBool;
PCardinal = ^Cardinal;
// PByte = ^Byte;
TVarType = Word;
{$ENDIF COMPILER5}
TJvGradientStyle = (grFilled, grEllipse, grHorizontal, grVertical, grPyramid, grMount);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -