jvcllaz: Separation of designtime and runtime code and all packages complete. Use package names and location of the Delphi version (WILL BREAK EXISTING CODE). Update examples.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5436 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2016-12-07 12:23:59 +00:00
parent 2209db658d
commit 52d6d0aa6e
68 changed files with 535 additions and 3458 deletions

View File

@ -0,0 +1,267 @@
{-----------------------------------------------------------------------------
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: JvComponent.PAS, released on 2000-09-22.
The Initial Developer of the Original Code is Joe Doe .
Portions created by Joe Doe are Copyright (C) 1999 Joe Doe.
Portions created by XXXX Corp. are Copyright (C) 1998, 1999 XXXX Corp.
All Rights Reserved.
Contributor(s): -
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: JvComponent.pas 11400 2007-06-28 21:24:06Z ahuser $
// Initial port to Lazarus by Sergio Samayoa - september 2007.
// Conversion is done in incremental way: as types / classes / routines
// are needed they are converted.
{$mode objfpc}{$H+}
unit JvComponent;
interface
uses
Classes, Controls, Forms, LMessages, JvExControls;
type
TJvGraphicControl = TJvExGraphicControl;
//******************** NOT CONVERTED
//TJvPubGraphicControl = TJvExPubGraphicControl;
TJvCustomControl = TJvExCustomControl;
//******************** NOT CONVERTED
//TJvWinControl = TJvExWinControl;
(******************** NOT CONVERTED
TJvForm = class(TJvExForm)
private
FIsFocusable: Boolean;
procedure CMShowingChanged(var Message: TMessage); message CM_SHOWINGCHANGED;
procedure WMMouseActivate(var Msg: TMessage); message WM_MOUSEACTIVATE;
protected
public
constructor Create(AOwner: TComponent); override;
constructor CreateNew(AOwner: TComponent; Dummy: Integer = 0); override;
{$IFDEF USE_DXGETTEXT}
procedure RefreshTranslation; virtual;
{$ENDIF USE_DXGETTEXT}
function ShowModal: Integer; override;
{ ShowNoActivate() shows the form but does not activate it. }
procedure ShowNoActivate(CallActivate: Boolean = False);
published
property IsFocusable: Boolean read FIsFocusable write FIsFocusable default True;
end;
//=== { TJvPopupListBox } ====================================================
type
TJvPopupListBox = class(TJvExCustomListBox)
private
FSearchText: string;
FSearchTickCount: Longint;
protected
procedure CreateParams(var Params: TCreateParams); override;
procedure CreateWnd; override;
procedure KeyPress(var Key: Char); override;
end;
******************** NOT CONVERTED *)
implementation
(******************** NOT CONVERTED
{$IFDEF COMPILER6_UP}
uses
RTLConsts;
{$ELSE}
uses
Consts;
{$ENDIF COMPILER6_UP}
//=== { TJvForm } ============================================================
constructor TJvForm.Create(AOwner: TComponent);
begin
// inherited Create(AOwner);
{$IFDEF CLR}
GlobalNameSpace.AcquireWriterLock(MaxInt);
{$ELSE}
GlobalNameSpace.BeginWrite;
{$ENDIF CLR}
try
CreateNew(AOwner, 0);
if (ClassType <> TJvForm) and not (csDesigning in ComponentState) then
begin
Include(FFormState, fsCreating);
try
if not InitInheritedComponent(Self, TJvForm) then
{$IFDEF CLR}
raise EResNotFound.CreateFmt(SResNotFound, [ClassName]);
{$ELSE}
raise EResNotFound.CreateResFmt(@SResNotFound, [ClassName]);
{$ENDIF CLR}
{$IFDEF USE_DXGETTEXT}
TranslateComponent(Self, cDomainName);
{$ENDIF USE_DXGETTEXT}
finally
Exclude(FFormState, fsCreating);
end;
{$IFNDEF CLR}
if OldCreateOrder then
{$ENDIF !CLR}
DoCreate;
end;
finally
{$IFDEF CLR}
GlobalNameSpace.ReleaseWriterLock;
{$ELSE}
GlobalNameSpace.EndWrite;
{$ENDIF CLR}
end;
end;
constructor TJvForm.CreateNew(AOwner: TComponent; Dummy: Integer);
begin
inherited CreateNew(AOwner, Dummy);
FIsFocusable := True;
end;
{$IFDEF USE_DXGETTEXT}
procedure TJvForm.RefreshTranslation;
begin
ReTranslateComponent(Self, cDomainName);
end;
{$ENDIF USE_DXGETTEXT}
procedure TJvForm.CMShowingChanged(var Message: TMessage);
var
NewParent: HWND;
begin
if Showing and (FormStyle <> fsMDIChild) then
begin
if FormStyle = fsStayOnTop then
begin
// restore StayOnTop
NewParent := Application.Handle;
if GetWindowLong(Handle, GWL_HWNDPARENT) <> Longint(NewParent) then
SetWindowLong(Handle, GWL_HWNDPARENT, Longint(NewParent));
SetWindowPos(Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE or SWP_NOMOVE or SWP_NOACTIVATE);
end
else
begin
// Fixing the Window Ghosting "bug", only for forms that don't have a parent assigned (Mantis 4032)
if not Assigned(Parent) then
begin
NewParent := 0;
if Assigned(Screen.ActiveForm) and (Screen.ActiveForm <> Self) then
begin
if fsModal in Screen.ActiveForm.FormState then
NewParent := Screen.ActiveForm.Handle;
end;
if (NewParent = 0) and Assigned(Application.MainForm) and (Application.MainForm <> Self) then
NewParent := Application.MainForm.Handle;
if NewParent = 0 then
NewParent := Application.Handle;
if GetWindowLong(Handle, GWL_HWNDPARENT) <> Longint(NewParent) then
SetWindowLong(Handle, GWL_HWNDPARENT, Longint(NewParent));
end;
end;
end;
inherited;
end;
function TJvForm.ShowModal: Integer;
var
Msg: TMsg;
begin
while PeekMessage(Msg, 0, WM_ENABLE, WM_ENABLE, PM_REMOVE) do
DispatchMessage(Msg);
Result := inherited ShowModal;
end;
procedure TJvForm.WMMouseActivate(var Msg: TMessage);
begin
if IsFocusable then
inherited
else
Msg.Result := MA_NOACTIVATE;
end;
procedure TJvForm.ShowNoActivate(CallActivate: Boolean);
begin
if CallActivate then
Activate;
SetWindowPos(Handle, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE or SWP_SHOWWINDOW or SWP_NOACTIVATE);
Visible := True;
end;
//=== { TJvPopupListBox } ====================================================
procedure TJvPopupListBox.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
with Params do
begin
Style := Style or WS_BORDER;
ExStyle := WS_EX_TOOLWINDOW or WS_EX_TOPMOST;
AddBiDiModeExStyle(ExStyle);
WindowClass.Style := CS_SAVEBITS;
end;
end;
procedure TJvPopupListBox.CreateWnd;
begin
inherited CreateWnd;
Windows.SetParent(Handle, 0);
CallWindowProc(DefWndProc, Handle, WM_SETFOCUS, 0, 0);
end;
procedure TJvPopupListBox.KeyPress(var Key: Char);
var
TickCount: Int64;
begin
case Key of
BackSpace, Esc:
FSearchText := '';
#32..#255:
begin
TickCount := GetTickCount;
if TickCount < FSearchTickCount then
Inc(TickCount, $100000000); // (ahuser) reduces the overflow
if TickCount - FSearchTickCount >= 4000 then
FSearchText := '';
FSearchTickCount := TickCount;
if Length(FSearchText) < 32 then
FSearchText := FSearchText + Key;
{$IFNDEF CLR}
SendMessage(Handle, LB_SELECTSTRING, WPARAM(-1), LPARAM(PChar(FSearchText)));
{$ELSE}
SendTextMessage(Handle, LB_SELECTSTRING, WPARAM(-1), FSearchText);
{$ENDIF !CLR}
Key := #0;
end;
end;
inherited KeyPress(Key);
end;
******************** NOT CONVERTED *)
end.

View File

@ -0,0 +1,215 @@
{-----------------------------------------------------------------------------
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: JvConst.PAS, released on 2002-07-04.
The Initial Developers of the Original Code are: Fedor Koshevnikov, Igor Pavluk and Serge Korolev
Copyright (c) 1997, 1998 Fedor Koshevnikov, Igor Pavluk and Serge Korolev
Copyright (c) 2001,2002 SGB Software
All Rights Reserved.
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: JvConsts.pas 11414 2007-07-11 21:15:58Z ahuser $
// Initial port to Lazarus by Sergio Samayoa - september 2007.
// Conversion is done in incremental way: as types / classes / routines
// are needed they are converted.
{$mode objfpc}{$H+}
unit JvConsts;
interface
uses
Controls, Classes, LMessages, SysUtils;
//, Forms, Graphics, Windows,
const
{ JvEditor }
JvEditorCompletionChars = #8'0123456789QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm';
{ Various units }
DigitSymbols = ['0'..'9'];
SignSymbols = ['+', '-'];
IdentifierUppercaseLetters = ['A'..'Z'];
IdentifierLowercaseLetters = ['a'..'z'];
HexadecimalUppercaseLetters = ['A'..'F'];
HexadecimalLowercaseLetters = ['a'..'f'];
IdentifierLetters = IdentifierUppercaseLetters + IdentifierLowercaseLetters;
IdentifierFirstSymbols = ['_'] + IdentifierLetters;
IdentifierSymbols = IdentifierFirstSymbols + DigitSymbols;
HexadecimalSymbols = DigitSymbols + HexadecimalUppercaseLetters + HexadecimalLowercaseLetters;
{$IFDEF DELPHI5}
SDelphiKey = 'Software\Borland\Delphi\5.0';
{$ENDIF DELPHI5}
{$IFDEF BCB5}
SDelphiKey = 'Software\Borland\C++Builder\5.0';
{$ENDIF BCB5}
{$IFDEF DELPHI6}
SDelphiKey = 'Software\Borland\Delphi\6.0';
{$ENDIF DELPHI6}
{$IFDEF BCB6}
SDelphiKey = 'Software\Borland\C++Builder\6.0';
{$ENDIF BCB6}
{$IFDEF DELPHI7}
SDelphiKey = 'Software\Borland\Delphi\7.0';
{$ENDIF DELPHI7}
{$IFDEF DELPHI8}
SDelphiKey = 'Software\Borland\BDS\2.0';
{$ENDIF DELPHI8}
{$IFDEF DELPHI9}
SDelphiKey = 'Software\Borland\BDS\3.0';
{$ENDIF DELPHI9}
{$IFDEF DELPHI10}
SDelphiKey = 'Software\Borland\BDS\4.0';
{$ENDIF DELPHI10}
{$IFDEF DELPHI11}
SDelphiKey = 'Software\Borland\BDS\5.0';
{$ENDIF DELPHI11}
{ JvDataProvider constants }
{ Consumer attributes }
DPA_RenderDisabledAsGrayed = 1;
DPA_RendersSingleItem = 2;
DPA_ConsumerDisplaysList = 3;
CM_JVBASE = CM_BASE + 80; // warning VCL improves and comes nearer
{ Command message for JvSpeedbar editor }
CM_SPEEDBARCHANGED = CM_JVBASE + 0;
{ Command message for TJvSpeedButton }
CM_JVBUTTONPRESSED = CM_JVBASE + 1;
// (rom) disabled unused
{ Command messages for TJvWindowHook }
//CM_RECREATEWINDOW = CM_JVBASE + 2;
//CM_DESTROYHOOK = CM_JVBASE + 3;
{ Notify message for TJvxTrayIcon }
//CM_TRAYICON = CM_JVBASE + 4;
CM_FORCESIZE = CM_JVBASE + 5; // used in JvButton
{ Values for WParam for CM_SPEEDBARCHANGED message }
SBR_CHANGED = 0; { change buttons properties }
SBR_DESTROYED = 1; { destroy SpeedBar }
SBR_BTNSELECT = 2; { select button in SpeedBar }
SBR_BTNSIZECHANGED = 3; { button size changed }
{ TBitmap.GetTransparentColor from GRAPHICS.PAS use this value }
PaletteMask = $02000000;
// (outchy) now used
{$IFDEF COMPILER7_UP}
// (outchy) it was defined as $000000FF
DEFAULT_SYSCOLOR_MASK = clSystemColor; // $FF000000
{$ELSE}
DEFAULT_SYSCOLOR_MASK = $80000000;
{$ENDIF COMPILER7_UP}
{$IFDEF COMPILER5}
// Delphi colors not defined in Delphi 5
clMoneyGreen = TColor($C0DCC0);
clSkyBlue = TColor($F0CAA6);
clCream = TColor($F0FBFF);
clMedGray = TColor($A4A0A0);
// (outchy) = TColor(COLOR_XXXXXXXXXXX or $80000000);
clGradientActiveCaption = TColor(COLOR_GRADIENTACTIVECAPTION or DEFAULT_SYSCOLOR_MASK);
clGradientInactiveCaption = TColor(COLOR_GRADIENTINACTIVECAPTION or DEFAULT_SYSCOLOR_MASK);
clHotLight = TColor(COLOR_HOTLIGHT or DEFAULT_SYSCOLOR_MASK);
clMenuHighlight = TColor(COLOR_MENUHILIGHT or DEFAULT_SYSCOLOR_MASK);
clMenuBar = TColor(COLOR_MENUBAR or DEFAULT_SYSCOLOR_MASK);
{$ENDIF COMPILER5}
{$IFDEF COMPILER5}
{$IFDEF MSWINDOWS}
sLineBreak = #13#10;
{$ENDIF MSWINDOWS}
{$IFDEF UNIX}
sLineBreak = #10;
{$ENDIF UNIX}
{$ENDIF COMPILER5}
sLineBreakLen = Length(sLineBreak);
CrLf = #13#10;
Cr = #13;
Lf = #10;
Backspace = #8;
Tab = #9;
Esc = #27;
Del = #127;
CtrlC = ^C;
CtrlH = ^H;
CtrlI = ^I;
CtrlJ = ^J;
CtrlM = ^M;
CtrlV = ^V;
CtrlX = ^X;
{$IFDEF MSWINDOWS}
RegPathDelim = '\';
PathDelim = '\';
DriveDelim = ':';
PathSep = ';';
AllFilePattern = '*.*';
{$ENDIF MSWINDOWS}
{$IFDEF UNIX}
RegPathDelim = '_';
PathDelim = '/';
AllFilePattern = '*';
{$ENDIF UNIX}
(******************** NOT CONVERTED
//TODO: SESS - 25.09.2007 This doesnt compile in fpc
{const Separators is used in GetWordOnPos, JvUtils.ReplaceStrings and SubWord}
Separators: TSysCharSet = [#00, ' ', '-', #13, #10, '.', ',', '/', '\', '#', '"', '''',
':', '+', '%', '*', '(', ')', ';', '=', '{', '}', '[', ']', '{', '}', '<', '>'];
******************** NOT CONVERTED *)
DigitChars = ['0'..'9'];
var
crJVCLFirst: TCursor = 100;
crMultiDragLink: TCursor = 100;
crDragAlt: TCursor = 101;
crMultiDragAlt: TCursor = 102;
crMultiDragLinkAlt: TCursor = 103;
crHand: TCursor = 104;
crDragHand: TCursor = 105;
// this should be incremented to always contain the last default JVCL cursor index
crJVCLLast: TCursor = 105;
const
ROP_DSPDxax = $00E20746;
const
FOURCC_ACON = 'ACON';
FOURCC_IART = 'IART';
FOURCC_INAM = 'INAM';
FOURCC_INFO = 'INFO';
FOURCC_LIST = 'LIST';
FOURCC_RIFF = 'RIFF';
FOURCC_anih = 'anih';
FOURCC_fram = 'fram';
FOURCC_icon = 'icon';
FOURCC_rate = 'rate';
FOURCC_seq = 'seq ';
AF_ICON = $00000001;
AF_SEQUENCE = $00000002;
const
KeyboardShiftStates = [ssShift, ssAlt, ssCtrl];
MouseShiftStates = [ssLeft, ssRight, ssMiddle, ssDouble];
implementation
end.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,395 @@
{-----------------------------------------------------------------------------
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: JvExExtCtrls.pas, released on 2004-01-04
The Initial Developer of the Original Code is Andreas Hausladen [Andreas dott Hausladen att gmx dott de]
Portions created by Andreas Hausladen are Copyright (C) 2004 Andreas Hausladen.
All Rights Reserved.
Contributor(s): -
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: JvExExtCtrls.pas 10613 2006-05-19 19:21:43Z jfudickar $
// Initial port to Lazarus by Sergio Samayoa - september 2007.
// Conversion is done in incremental way: as types / classes / routines
// are needed they are converted.
unit JvExExtCtrls;
{MACROINCLUDE JvExControls.macros}
{*****************************************************************************
* 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.
****************************************************************************}
{$D-} // do not step into this unit
interface
uses
Classes, Controls, ExtCtrls, Forms, Graphics, JvExControls, LCLIntf, LMessages;
type
//******************** NOT CONVERTED
//CONTROL_DECL_DEFAULT(Shape)
//******************** NOT CONVERTED
//CONTROL_DECL_DEFAULT(PaintBox)
//******************** NOT CONVERTED
//CONTROL_DECL_DEFAULT(Image)
//******************** NOT CONVERTED
//CONTROL_DECL_DEFAULT(Bevel)
//******************** NOT CONVERTED
//WINCONTROL_DECL_DEFAULT(CustomPanel)
(******************** NOT CONVERTED
TJvExPubCustomPanel = class(TJvExCustomPanel)
COMMON_PUBLISHED
end;
******************** NOT CONVERTED *)
//******************** NOT CONVERTED
//WINCONTROL_DECL_DEFAULT(CustomRadioGroup)
TJvExSplitter = class(TSplitter)
private
// TODO:
// FAboutJVCL: TJVCLAboutInfo;
FHintColor: TColor;
FMouseOver: Boolean;
FHintWindowClass: THintWindowClass;
FOnMouseEnter: TNotifyEvent;
FOnMouseLeave: TNotifyEvent;
FOnParentColorChanged: TNotifyEvent;
function BaseWndProc(Msg: Integer; WParam: Integer = 0; LParam: Longint = 0): Integer; overload;
function BaseWndProc(Msg: Integer; WParam: Integer; LParam: TControl): Integer; overload;
function BaseWndProcEx(Msg: Integer; WParam: Integer; var LParam): Integer;
protected
procedure WndProc(var Msg: TLMessage); 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;
property MouseOver: Boolean read FMouseOver write FMouseOver;
property HintColor: TColor read FHintColor write FHintColor default clDefault;
property OnMouseEnter: TNotifyEvent read FOnMouseEnter write FOnMouseEnter;
property OnMouseLeave: TNotifyEvent read FOnMouseLeave write FOnMouseLeave;
property OnParentColorChange: TNotifyEvent read FOnParentColorChanged write FOnParentColorChanged;
function GetCaption: TCaption; virtual;
procedure SetCaption(Value: TCaption); virtual;
public
constructor Create(AOwner: TComponent); override;
property Caption: TCaption read GetCaption write SetCaption;
property HintWindowClass: THintWindowClass read FHintWindowClass write FHintWindowClass;
published
// TODO:
// property AboutJVCL: TJVCLAboutInfo read FAboutJVCL write FAboutJVCL stored False;
end;
//******************** NOT CONVERTED
//WINCONTROL_DECL_DEFAULT(CustomControlBar)
//******************** NOT CONVERTED
//WINCONTROL_DECL_DEFAULT(ControlBar)
//******************** NOT CONVERTED
//WINCONTROL_DECL_DEFAULT(Panel)
//******************** NOT CONVERTED
//WINCONTROL_DECL_DEFAULT(RadioGroup)
//******************** NOT CONVERTED
//WINCONTROL_DECL_DEFAULT(Page)
//******************** NOT CONVERTED
//WINCONTROL_DECL_DEFAULT(Notebook)
//******************** NOT CONVERTED
//WINCONTROL_DECL_DEFAULT(Header)
//******************** NOT CONVERTED
//CONTROL_DECL_DEFAULT(BoundLabel)
//******************** NOT CONVERTED
//WINCONTROL_DECL_DEFAULT(CustomLabeledEdit)
//******************** NOT CONVERTED
//WINCONTROL_DECL_DEFAULT(LabeledEdit)
//******************** NOT CONVERTED - Exists in LCL?
//WINCONTROL_DECL_DEFAULT(CustomColorBox)
//******************** NOT CONVERTED - Exists in LCL?
//WINCONTROL_DECL_DEFAULT(ColorBox)
implementation
//******************** NOT CONVERTED
//CONTROL_IMPL_DEFAULT(Shape)
//******************** NOT CONVERTED
//CONTROL_IMPL_DEFAULT(PaintBox)
//******************** NOT CONVERTED
//CONTROL_IMPL_DEFAULT(Image)
//******************** NOT CONVERTED
//CONTROL_IMPL_DEFAULT(Bevel)
//******************** NOT CONVERTED
//WINCONTROL_IMPL_DEFAULT(CustomPanel)
//******************** NOT CONVERTED
//WINCONTROL_IMPL_DEFAULT(CustomRadioGroup)
//******************** NOT CONVERTED
//WINCONTROL_IMPL_DEFAULT(CustomControlBar)
//******************** NOT CONVERTED
//WINCONTROL_IMPL_DEFAULT(ControlBar)
//******************** NOT CONVERTED
//WINCONTROL_IMPL_DEFAULT(Panel)
//******************** NOT CONVERTED
//WINCONTROL_IMPL_DEFAULT(RadioGroup)
//******************** NOT CONVERTED
//WINCONTROL_IMPL_DEFAULT(Page)
//******************** NOT CONVERTED
//WINCONTROL_IMPL_DEFAULT(Notebook)
//******************** NOT CONVERTED
//WINCONTROL_IMPL_DEFAULT(Header)
//******************** NOT CONVERTED
//CONTROL_IMPL_DEFAULT(BoundLabel)
//******************** NOT CONVERTED
//WINCONTROL_IMPL_DEFAULT(CustomLabeledEdit)
//******************** NOT CONVERTED
//WINCONTROL_IMPL_DEFAULT(LabeledEdit)
//******************** NOT CONVERTED - Exists in LCL?
//WINCONTROL_IMPL_DEFAULT(CustomColorBox)
//******************** NOT CONVERTED - Exists in LCL?
//WINCONTROL_IMPL_DEFAULT(ColorBox)
constructor TJvExSplitter.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FHintColor := clDefault;
end;
function TJvExSplitter.BaseWndProc(Msg: Integer; WParam: Integer = 0; LParam: Longint = 0): Integer;
var
Mesg: TLMessage;
begin
Mesg := CreateWMMessage(Msg, WParam, LParam);
inherited WndProc(Mesg);
Result := Mesg.Result;
end;
function TJvExSplitter.BaseWndProc(Msg: Integer; WParam: Integer; LParam: TControl): Integer;
var
Mesg: TLMessage;
begin
Mesg := CreateWMMessage(Msg, WParam, LParam);
inherited WndProc(Mesg);
Result := Mesg.Result;
end;
function TJvExSplitter.BaseWndProcEx(Msg: Integer; WParam: Integer; var LParam): Integer;
var
Mesg: TStructPtrMessage;
begin
Mesg := TStructPtrMessage.Create(Msg, WParam, LParam);
try
inherited WndProc(Mesg.Msg);
finally
Result := Mesg.Msg.Result;
Mesg.Free;
end;
end;
procedure TJvExSplitter.VisibleChanged;
begin
BaseWndProc(CM_VISIBLECHANGED);
end;
procedure TJvExSplitter.EnabledChanged;
begin
BaseWndProc(CM_ENABLEDCHANGED);
end;
procedure TJvExSplitter.TextChanged;
begin
BaseWndProc(CM_TEXTCHANGED);
end;
procedure TJvExSplitter.FontChanged;
begin
BaseWndProc(CM_FONTCHANGED);
end;
procedure TJvExSplitter.ColorChanged;
begin
BaseWndProc(CM_COLORCHANGED);
end;
procedure TJvExSplitter.ParentFontChanged;
begin
// LCL doesn't send this message but left it in case
//BaseWndProc(CM_PARENTFONTCHANGED);
end;
procedure TJvExSplitter.ParentColorChanged;
begin
BaseWndProc(CM_PARENTCOLORCHANGED);
if Assigned(OnParentColorChange) then
OnParentColorChange(Self);
end;
procedure TJvExSplitter.ParentShowHintChanged;
begin
BaseWndProc(CM_PARENTSHOWHINTCHANGED);
end;
function TJvExSplitter.WantKey(Key: Integer; Shift: TShiftState; const KeyText: WideString): Boolean;
begin
Result := BaseWndProc(CM_DIALOGCHAR, Word(Key), ShiftStateToKeyData(Shift)) <> 0;
end;
function TJvExSplitter.HitTest(X, Y: Integer): Boolean;
begin
Result := BaseWndProc(CM_HITTEST, 0, SmallPointToLong(PointToSmallPoint(Point(X, Y)))) <> 0;
end;
function TJvExSplitter.HintShow(var HintInfo: THintInfo): Boolean;
begin
GetHintColor(HintInfo, Self, FHintColor);
if FHintWindowClass <> nil then
HintInfo.HintWindowClass := FHintWindowClass;
Result := BaseWndProcEx(CM_HINTSHOW, 0, HintInfo) <> 0;
end;
procedure TJvExSplitter.MouseEnter(AControl: TControl);
begin
FMouseOver := True;
if Assigned(FOnMouseEnter) then
FOnMouseEnter(Self);
BaseWndProc(CM_MOUSEENTER, 0, AControl);
end;
procedure TJvExSplitter.MouseLeave(AControl: TControl);
begin
FMouseOver := False;
BaseWndProc(CM_MOUSELEAVE, 0, AControl);
if Assigned(FOnMouseLeave) then
FOnMouseLeave(Self);
end;
procedure TJvExSplitter.FocusChanged(AControl: TWinControl);
begin
BaseWndProc(CM_FOCUSCHANGED, 0, AControl);
end;
function TJvExSplitter.GetCaption: TCaption;
begin
Result := inherited Caption;
end;
// 25.09.2007 - SESS:
// I have done this because TextChanged wasn't fired as expected.
// I still don't shure if this problem is only for this reintroduced
// method because the way LCL treats Caption or will have the same
// problem with other reintroduced methods. So far, I tested some
// other events and seems not.
procedure TJvExSplitter.SetCaption(Value: TCaption);
begin
inherited Caption := Value;
TextChanged;
end;
procedure TJvExSplitter.WndProc(var Msg: TLMessage);
begin
if not DispatchIsDesignMsg(Self, Msg) then
case Msg.Msg of
{
// TODO: do we need this? I think not...
CM_DENYSUBCLASSING:
Msg.Result := Ord(GetInterfaceEntry(IJvDenySubClassing) <> nil);
}
CM_DIALOGCHAR:
with TCMDialogChar(Msg) do
Result := Ord(WantKey(CharCode, KeyDataToShiftState(KeyData), WideChar(CharCode)));
CM_HINTSHOW:
with TCMHintShow(Msg) do
Result := Integer(HintShow(HintInfo^));
CM_HITTEST:
with TCMHitTest(Msg) do
Result := Integer(HitTest(XPos, YPos));
CM_MOUSEENTER:
MouseEnter(TControl(Msg.LParam));
CM_MOUSELEAVE:
MouseLeave(TControl(Msg.LParam));
CM_VISIBLECHANGED:
VisibleChanged;
CM_ENABLEDCHANGED:
EnabledChanged;
// LCL doesn't send this message but left it in case
CM_TEXTCHANGED:
TextChanged;
CM_FONTCHANGED:
FontChanged;
CM_COLORCHANGED:
ColorChanged;
CM_FOCUSCHANGED:
FocusChanged(TWinControl(Msg.LParam));
// LCL doesn't send this message but left it in case
//CM_PARENTFONTCHANGED:
// ParentFontChanged;
CM_PARENTCOLORCHANGED:
ParentColorChanged;
CM_PARENTSHOWHINTCHANGED:
ParentShowHintChanged;
else
inherited WndProc(Msg);
end;
end;
//============================================================================
end.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,739 @@
{-----------------------------------------------------------------------------
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: JvTypes.PAS, released on 2001-02-28.
The Initial Developer of the Original Code is S�bastien Buysse [sbuysse att buypin dott com]
Portions created by S�bastien Buysse are Copyright (C) 2001 S�bastien 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: JvTypes.pas 11400 2007-06-28 21:24:06Z ahuser $
// Initial port to Lazarus by Sergio Samayoa - september 2007.
// Conversion is done in incremental way: as types / classes / routines
// are needed they are converted.
{$mode objfpc}{$H+}
unit JvTypes;
interface
uses
Classes, Controls, Forms, Graphics, LMessages, SysUtils;
const
MaxPixelCount = 32767;
(********************
type
TJvBytes = Pointer;
IntPtr = Pointer;
********************)
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 JvConsts.pas.
type
TTimerProc = procedure(hwnd: THandle; Msg: Cardinal; idEvent: Cardinal; dwTime: Cardinal);
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 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;
(********************
PJvRGBArray = ^TJvRGBArray;
TJvRGBArray = array [0..MaxPixelCount] of TJvRGBTriple;
PRGBQuadArray = ^TRGBQuadArray;
TRGBQuadArray = array [0..MaxPixelCount] of TRGBQuad;
PRGBPalette = ^TRGBPalette;
TRGBPalette = array [Byte] of TRGBQuad;
{ (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);
// TOnDelete = procedure(Sender: TObject; Path: string) of object;
TJvParentEvent = procedure(Sender: TObject; ParentWindow: THandle) of object;
// TOnImage = procedure(Sender: TObject; Image: TBitmap) of object; // JvClipboardViewer
// TOnText = procedure(Sender: TObject; Text: string) of object;
// TJvRestart = (rsLogoff, rsShutdown, rsReboot, rsRestart, rsRebootSystem, rsExitAndExecApp);
// TJvRunOption = (roNoBrowse, roNoDefault, roCalcDirectory, roNoLabel, roNoSeparateMem); // JvRunDlg
// TJvRunOptions = set of TJvRunOption; // JvRunDlg
// TJvFileKind = (ftFile, ftPrinter); // JvObjectPropertiesDlg
// TSHFormatDrive = function(Handle: THandle; Drive, ID, Options: Word): LongInt; stdcall; // JvFormatDrive
// TFormatOption = (shQuickFormat, shFull, shSystemFilesOnly); // JvFormatDrive
// TButtonStyle = (bsAbortRetryIgnore, bsOk, bsOkCancel, bsRetryCancel, bsYesNo, bsYesNoCancel); // JvMessageBox
// TButtonDisplay = (bdIconExclamation, bdIconWarning, bdIconInformation, bdIconAsterisk, bdIconQuestion, bdIconStop, bdIconError, bdIconHand); // JvMessageBox
// TDefault = (dbButton1, dbButton2, dbButton3, dbButton4); // JvMessageBox
// TModality = (bmApplModal, bmSystemModal, bmTaskModal); // JvMessageBox
// TButtonOption = (boDefaultDesktopOnly, boHelp, boRight, boRtlReading, boSetForeground, boTopMost); // JvMessageBox
// TButtonOptions = set of TButtonOption; // JvMessageBox
// TButtonResult = (brAbort, brCancel, brIgnore, brNo, brOk, brRetry, brYes); // JvMessageBox
// TMsgStyle = (msBeep, msIconAsterisk, msIconExclamation, msIconHand, msIconQuestion, msOk); // JvMessageBeep
TJvDiskRes = (dsSuccess, dsCancel, dsSkipfile, dsError);
TJvDiskStyle = (idfCheckFirst, idfNoBeep, idfNoBrowse, idfNoCompressed, idfNoDetails,
idfNoForeground, idfNoSkip, idfOemDisk, idfWarnIfSkip);
TJvDiskStyles = set of TJvDiskStyle;
TJvDeleteStyle = (idNoBeep, idNoForeground);
TJvDeleteStyles = set of TJvDeleteStyle;
// TOnOk = procedure(Sender: TObject; Password: string; var Accept: Boolean) of object; // JvPasswordForm
// TCoordChanged = procedure(Sender: TObject; Coord: string) of object;
TJvNotifyParamsEvent = procedure(Sender: TObject; Params: Pointer) of object;
TJvFileInfoRec = record
Attributes: DWORD;
DisplayName: string;
ExeType: Integer;
Icon: HICON;
Location: string;
TypeName: string;
SysIconIndex: Integer;
end;
TJvAnimation = (anLeftRight, anRightLeft, anRightAndLeft, anLeftVumeter, anRightVumeter);
TJvAnimations = set of TJvAnimation;
// TOnFound = procedure(Sender: TObject; Path: string) of object; // JvSearchFile
// TOnChangedDir = procedure(Sender: TObject; Directory: string) of object; // JvSearchFile
// TOnAlarm = procedure(Sender: TObject; Keyword: string) of object; // JvAlarm
{ TAlarm = record
Keyword: string;
DateTime: TDateTime;
end;
} // JvAlarm
// Bianconi - Moved from JvAlarms.pas
TJvTriggerKind =
(tkOneShot, tkEachSecond, tkEachMinute, tkEachHour, tkEachDay, tkEachMonth, tkEachYear);
// End of Bianconi
TJvFourCC = array [0..3] of Char;
PJvAniTag = ^TJvAniTag;
TJvAniTag = packed record
ckID: TJvFourCC;
ckSize: Longint;
end;
TJvAniHeader = packed record
dwSizeof: Longint;
dwFrames: Longint;
dwSteps: Longint;
dwCX: Longint;
dwCY: Longint;
dwBitCount: Longint;
dwPlanes: Longint;
dwJIFRate: Longint;
dwFlags: Longint;
end;
TJvChangeColorEvent = procedure(Sender: TObject; Foreground, Background: TColor) of object;
TJvLayout = (lTop, lCenter, lBottom);
TJvBevelStyle = (bsShape, bsLowered, bsRaised);
{for OnLoseFocus the AFocusControl argument will point at the control that
receives focus while for OnGetFocus it is the control that lost the focus}
TJvFocusChangeEvent = procedure(const ASender: TObject;
const AFocusControl: TWinControl) of object;
// JvJCLUtils
TTickCount = Cardinal;
{**** string handling routines}
TSetOfChar = TSysCharSet;
TCharSet = TSysCharSet;
TDateOrder = (doMDY, doDMY, doYMD);
TDayOfWeekName = (Sun, Mon, Tue, Wed, Thu, Fri, Sat);
TDaysOfWeek = set of TDayOfWeekName;
const
DefaultDateOrder = doDMY;
CenturyOffset: Byte = 60;
NullDate: TDateTime = 0; {-693594}
type
// JvDriveCtrls / JvLookOut
TJvImageSize = (isSmall, isLarge);
TJvImageAlign = (iaLeft, iaCentered);
TJvDriveType = (dtUnknown, dtRemovable, dtFixed, dtRemote, dtCDROM, dtRamDisk);
TJvDriveTypes = set of TJvDriveType;
********************)
type
// Defines how a property (like a HotTrackFont) follows changes in the component's normal Font
TJvTrackFontOption = (
hoFollowFont, // makes HotTrackFont follow changes to the normal Font
hoPreserveCharSet, // don't change HotTrackFont.Charset
hoPreserveColor, // don't change HotTrackFont.Color
hoPreserveHeight, // don't change HotTrackFont.Height (affects Size as well)
hoPreserveName, // don't change HotTrackFont.Name
hoPreservePitch, // don't change HotTrackFont.Pitch
hoPreserveStyle); // don't change HotTrackFont.Style
TJvTrackFontOptions = set of TJvTrackFontOption;
const
DefaultTrackFontOptions = [hoFollowFont, hoPreserveColor, hoPreserveStyle];
(********************
type
// from JvListView.pas
TJvSortMethod = (smAutomatic, smAlphabetic, smNonCaseSensitive, smNumeric, smDate, smTime, smDateTime, smCurrency);
TJvListViewColumnSortEvent = procedure(Sender: TObject; Column: Integer; var AMethod: TJvSortMethod) of object;
// from JvOfficeColorPanel.pas
TJvAddInControlSiteInfo = record
AddInControl: TControl;
BoundsRect: TRect;
SiteInfoData: TObject;
end;
TJvClickColorType =
(cctColors, cctNoneColor, cctDefaultColor, cctCustomColor, cctAddInControl, cctNone);
TJvHoldCustomColorEvent = procedure(Sender: TObject; AColor: TColor) of object;
TJvColorQuadLayOut = (cqlNone, cqlLeft, cqlRight, cqlClient);
TJvGetAddInControlSiteInfoEvent = procedure(Sender: TControl; var ASiteInfo: TJvAddInControlSiteInfo) of object;
// from JvColorProvider.pas
TColorType = (ctStandard, ctSystem, ctCustom);
TDefColorItem = record
Value: TColor;
Constant: string;
Description: string;
end;
const
ColCount = 20;
StandardColCount = 40;
SysColCount = 30;
{$IFDEF COMPILER5}
clSystemColor = TColor($80000000);
clHotLight = TColor(clSystemColor or COLOR_HOTLIGHT);
clGradientActiveCaption = TColor(clSystemColor or COLOR_GRADIENTACTIVECAPTION);
clGradientInactiveCaption = TColor(clSystemColor or COLOR_GRADIENTINACTIVECAPTION);
clMenuHighlight = TColor(clSystemColor or COLOR_MENUHILIGHT);
clMenuBar = TColor(clSystemColor or COLOR_MENUBAR);
{$ENDIF COMPILER5}
{$IFDEF COMPILER6}
{$IF not declared(clHotLight)}
{$MESSAGE ERROR 'You do not have installed Delphi 6 Update 2. Please install this before installing the JVCL. http://www.borland.com/downloads/registered/del6_reg_updates_prompt.html'}
{$IFEND}
{$ENDIF COMPILER6}
ColorValues: array [0 .. ColCount - 1] of TDefColorItem = (
(Value: clBlack; Constant: 'clBlack'; Description: RsClBlack),
(Value: clMaroon; Constant: 'clMaroon'; Description: RsClMaroon),
(Value: clGreen; Constant: 'clGreen'; Description: RsClGreen),
(Value: clOlive; Constant: 'clOlive'; Description: RsClOlive),
(Value: clNavy; Constant: 'clNavy'; Description: RsClNavy),
(Value: clPurple; Constant: 'clPurple'; Description: RsClPurple),
(Value: clTeal; Constant: 'clTeal'; Description: RsClTeal),
(Value: clGray; Constant: 'clGray'; Description: RsClGray),
(Value: clSilver; Constant: 'clSilver'; Description: RsClSilver),
(Value: clRed; Constant: 'clRed'; Description: RsClRed),
(Value: clLime; Constant: 'clLime'; Description: RsClLime),
(Value: clYellow; Constant: 'clYellow'; Description: RsClYellow),
(Value: clBlue; Constant: 'clBlue'; Description: RsClBlue),
(Value: clFuchsia; Constant: 'clFuchsia'; Description: RsClFuchsia),
(Value: clAqua; Constant: 'clAqua'; Description: RsClAqua),
(Value: clWhite; Constant: 'clWhite'; Description: RsClWhite),
(Value: clMoneyGreen; Constant: 'clMoneyGreen'; Description: RsClMoneyGreen),
(Value: clSkyBlue; Constant: 'clSkyBlue'; Description: RsClSkyBlue),
(Value: clCream; Constant: 'clCream'; Description: RsClCream),
(Value: clMedGray; Constant: 'clMedGray'; Description: RsClMedGray)
);
//added by dejoy (2005-04-20)
StandardColorValues: array [0 .. StandardColCount - 1] of TDefColorItem = (
(Value: $00000000; Constant: 'clBlack'; Description: RsClBlack),
(Value: $00003399; Constant: 'clBrown'; Description: RsClBrown),
(Value: $00003333; Constant: 'clOliveGreen'; Description: RsClOliveGreen),
(Value: $00003300; Constant: 'clDarkGreen'; Description: RsClDarkGreen),
(Value: $00663300; Constant: 'clDarkTeal'; Description: RsClDarkTeal),
(Value: $00800000; Constant: 'clDarkBlue'; Description: RsClDarkBlue),
(Value: $00993333; Constant: 'clIndigo'; Description: RsClIndigo),
(Value: $00333333; Constant: 'clGray80'; Description: RsClGray80),
(Value: $00000080; Constant: 'clDarkRed'; Description: RsClDarkRed),
(Value: $000066FF; Constant: 'clOrange'; Description: RsClOrange),
(Value: $00008080; Constant: 'clDarkYellow'; Description: RsClDarkYellow),
(Value: $00008000; Constant: 'clGreen'; Description: RsClGreen),
(Value: $00808000; Constant: 'clTeal'; Description: RsClTeal),
(Value: $00FF0000; Constant: 'clBlue'; Description: RsClBlue),
(Value: $00996666; Constant: 'clBlueGray'; Description: RsClBlueGray),
(Value: $00808080; Constant: 'clGray50'; Description: RsClGray50),
(Value: $000000FF; Constant: 'clRed'; Description: RsClRed),
(Value: $000099FF; Constant: 'clLightOrange'; Description: RsClLightOrange),
(Value: $0000CC99; Constant: 'clLime'; Description: RsClLime),
(Value: $00669933; Constant: 'clSeaGreen'; Description: RsClSeaGreen),
(Value: $00999933; Constant: 'clAqua'; Description: RsClAqua),
(Value: $00FF6633; Constant: 'clLightBlue'; Description: RsClLightBlue),
(Value: $00800080; Constant: 'clViolet'; Description: RsClViolet),
(Value: $00999999; Constant: 'clGray40'; Description: RsClGray40),
(Value: $00FF00FF; Constant: 'clPink'; Description: RsClPink),
(Value: $0000CCFF; Constant: 'clGold'; Description: RsClGold),
(Value: $0000FFFF; Constant: 'clYellow'; Description: RsClYellow),
(Value: $0000FF00; Constant: 'clBrightGreen'; Description: RsClBrightGreen),
(Value: $00FFFF00; Constant: 'clTurquoise'; Description: RsClTurquoise),
(Value: $00F0CAA6; Constant: 'clSkyBlue'; Description: RsClSkyBlue),
(Value: $00663399; Constant: 'clPlum'; Description: RsClPlum),
(Value: $00C0C0C0; Constant: 'clGray25'; Description: RsClGray25),
(Value: $00CC99FF; Constant: 'clRose'; Description: RsClRose),
(Value: $0099CCFF; Constant: 'clTan'; Description: RsClTan),
(Value: $0099FFFF; Constant: 'clLightYellow'; Description: RsClLightYellow),
(Value: $00CCFFCC; Constant: 'clLightGreen'; Description: RsClLightGreen),
(Value: $00FFFFCC; Constant: 'clLightTurquoise'; Description: RsClLightTurquoise),
(Value: $00FFCC99; Constant: 'clPaleBlue'; Description: RsClPaleBlue),
(Value: $00FF99CC; Constant: 'clLavender'; Description: RsClLavender),
(Value: $00FFFFFF; Constant: 'clWhite'; Description: RsClWhite)
);
SysColorValues: array [0 .. SysColCount - 1] of TDefColorItem = (
(Value: clScrollBar; Constant: 'clScrollBar'; Description: RsClScrollBar),
(Value: clBackground; Constant: 'clBackground'; Description: RsClBackground),
(Value: clActiveCaption; Constant: 'clActiveCaption'; Description: RsClActiveCaption),
(Value: clInactiveCaption; Constant: 'clInactiveCaption'; Description: RsClInactiveCaption),
(Value: clMenu; Constant: 'clMenu'; Description: RsClMenu),
(Value: clWindow; Constant: 'clWindow'; Description: RsClWindow),
(Value: clWindowFrame; Constant: 'clWindowFrame'; Description: RsClWindowFrame),
(Value: clMenuText; Constant: 'clMenuText'; Description: RsClMenuText),
(Value: clWindowText; Constant: 'clWindowText'; Description: RsClWindowText),
(Value: clCaptionText; Constant: 'clCaptionText'; Description: RsClCaptionText),
(Value: clActiveBorder; Constant: 'clActiveBorder'; Description: RsClActiveBorder),
(Value: clInactiveBorder; Constant: 'clInactiveBorder'; Description: RsClInactiveBorder),
(Value: clAppWorkSpace; Constant: 'clAppWorkSpace'; Description: RsClAppWorkSpace),
(Value: clHighlight; Constant: 'clHighlight'; Description: RsClHighlight),
(Value: clHighlightText; Constant: 'clHighlightText'; Description: RsClHighlightText),
(Value: clBtnFace; Constant: 'clBtnFace'; Description: RsClBtnFace),
(Value: clBtnShadow; Constant: 'clBtnShadow'; Description: RsClBtnShadow),
(Value: clGrayText; Constant: 'clGrayText'; Description: RsClGrayText),
(Value: clBtnText; Constant: 'clBtnText'; Description: RsClBtnText),
(Value: clInactiveCaptionText; Constant: 'clInactiveCaptionText'; Description: RsClInactiveCaptionText),
(Value: clBtnHighlight; Constant: 'clBtnHighlight'; Description: RsClBtnHighlight),
(Value: cl3DDkShadow; Constant: 'cl3DDkShadow'; Description: RsCl3DDkShadow),
(Value: cl3DLight; Constant: 'cl3DLight'; Description: RsCl3DLight),
(Value: clInfoText; Constant: 'clInfoText'; Description: RsClInfoText),
(Value: clInfoBk; Constant: 'clInfoBk'; Description: RsClInfoBk),
(Value: clGradientActiveCaption; Constant: 'clGradientActiveCaption'; Description: RsGradientActiveCaption),
(Value: clGradientInactiveCaption; Constant: 'clGradientInactiveCaption';Description: RsGradientInactiveCaption),
(Value: clHotLight; Constant: 'clHotLight'; Description: RsHotLight),
(Value: clMenuBar; Constant: 'clMenuBar'; Description: RsMenuBar),
(Value: clMenuHighlight; Constant: 'clMenuHighlight'; Description: RsMenuHighlight)
);
type
TJvSizeRect = packed record
Top: Integer;
Left: Integer;
Width: Integer;
Height: Integer;
end;
{$IFNDEF CLR}
TJvMessage = packed record
Msg: Integer;
case Integer of
0:
(
WParam: Integer;
LParam: Integer;
Result: Integer;
);
1:
(
WParamLo: Word;
WParamHi: Word;
LParamLo: Word;
LParamHi: Word;
ResultLo: Word;
ResultHi: Word;
);
2:
( // WM_NOPARAMS
Unused: array[0..3] of Word;
Handled: LongBool; // "Result"
);
3:
( // WM_SCROLL
Pos: Integer; // WParam
ScrollCode: Integer; // LParam
);
4:
( // WM_TIMER
TimerID: Integer; // WParam
TimerProc: TTimerProc;// LParam
);
5:
( // WM_MOUSEACTIVATE
TopLevel: HWND; // WParam
HitTestCode: Word; // LParamLo
MouseMsg: Word; // LParamHi
);
6:
( // WM_MOUSE(WHEEL) | WM_MOVE
case Integer of
0:
( // WM_MOUSE
Keys: Integer; // WParam
// LParam: Pos | (XPos, YPos)
case Integer of
0:
(
Position: TSmallPoint;
);
1:
(
XPos: Smallint;
YPos: Smallint;
)
);
1:
( // WM_MOUSEWHEEL
WheelDelta: Integer; // WParam
);
);
7:
( // WM_ACTIVATE
Active: Word; { WA_INACTIVE, WA_ACTIVE, WA_CLICKACTIVE } // WParamLo
Minimized: WordBool; // WParamHi
ActiveWindow: HWND; // LParam
);
8:
( // WM_COMMAND
ItemID: Word; // WParamLo
NotifyCode: Word; // WParamHi
Ctl: HWND; // LParam
);
9:
( // WM_GETICON
BigIcon: LongBool;
);
10:
( // CM_(FOCUS|CONTROL)CHANGED | CM_HINTSHOW
Reserved: Integer; // WParam
case Integer of
0:
( // CM_(CONTROL)CHANGED
Child: TControl; // LParam
);
1:
( // CM_FOCUSCHANGED | CM_FORCESIZE }
Sender: TControl; // LParam
);
2:
( //CM_HINTSHOW
HintInfo: PHintInfo;
)
);
11:
( // CM_CONTROLLISTCHANGE | CM_(CONTROL)CHANGED (| CM_BUTTONPRESSED for clx)
Control: TControl; // WParam
case Integer of
0:
( // CM_(CONTROL)CHANGED
Inserting: LongBool; // LParam
);
1: // CM_BUTTONPRESSED (clx)
(
Index: Integer;
)
);
12:
( // CM_HINTSHOWPAUSE
WasActive: LongBool;
Pause: PInteger;
);
13:
( // WM_KEY
CharCode: Word;
NotUsed: Word;
KeyData: Integer;
);
14:
( // WM_GETTEXT
TextMax: Integer;
Text: PChar
);
15:
( // WM_ERASEBKGND | WM_PAINT
DC: HDC;
);
16:
( // WM_KILLFOCUS
FocusedWnd: HWND;
);
17:
(
NewSize: TSmallPoint; //CM_FORCESIZE wParam
);
18:
( { alternative naming for VCL CM_BUTTONPRESSED }
GroupIndex: Integer;
Button: TControl;
);
end;
{$ENDIF !CLR}
***************)
implementation
(***************
{$IFDEF COMPILER6_UP}
constructor TJvPersistent.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
SetSubComponent(True);
Name := 'SubComponent';
end;
{$ENDIF COMPILER6_UP}
{ TJvPersistentProperty }
procedure TJvPersistentProperty.BeginUpdate;
begin
if FUpdateCount = 0 then
SetUpdateState(True);
Inc(FUpdateCount);
end;
procedure TJvPersistentProperty.Changed;
begin
if (FUpdateCount = 0) and Assigned(FOnChange) then
FOnChange(Self);
end;
procedure TJvPersistentProperty.ChangedProperty(const PropName: string);
begin
if Assigned(FOnChangeProperty) then
FOnChangeProperty(Self, PropName);
end;
procedure TJvPersistentProperty.Changing;
begin
if (FUpdateCount = 0) and Assigned(FOnChanging) then
FOnChanging(Self);
end;
procedure TJvPersistentProperty.ChangingProperty(const PropName: string);
begin
if Assigned(FOnChangingProperty) then
FOnChangingProperty(Self, PropName);
end;
procedure TJvPersistentProperty.EndUpdate;
begin
Dec(FUpdateCount);
if FUpdateCount = 0 then
SetUpdateState(False);
end;
procedure TJvPersistentProperty.SetUpdateState(Updating: Boolean);
begin
if Updating then
Changing
else
Changed;
end;
***************)
end.