From: Peter T. <pe...@us...> - 2003-03-23 15:07:44
|
Update of /cvsroot/jvcl/jvcl/source In directory sc8-pr-cvs1:/tmp/cvs-serv20178/source Modified Files: JVCLReg.pas JvCtlReg.pas JvRichEd.pas Log Message: Merged TJvRichEdit with TJvxRichEdit. TJvxRichEdit renamed to TJvRichEdit. JvRichEdit.pas moved to \archive. Done by roko. Index: JVCLReg.pas =================================================================== RCS file: /cvsroot/jvcl/jvcl/source/JVCLReg.pas,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** JVCLReg.pas 23 Mar 2003 14:09:38 -0000 1.50 --- JVCLReg.pas 23 Mar 2003 15:07:39 -0000 1.51 *************** *** 131,135 **** // Win32 JvStatusBar, JvProgressBar, ! JvTabControl, JvRichEdit, JvUpDown, JvHotKey, JvAnimate, JvDateTimePicker, JvMonthCalendar, JvListView, JvHeaderControl, JvToolBar, --- 131,135 ---- // Win32 JvStatusBar, JvProgressBar, ! JvTabControl, {JvRichEdit,} JvUpDown, JvHotKey, JvAnimate, JvDateTimePicker, JvMonthCalendar, JvListView, JvHeaderControl, JvToolBar, *************** *** 295,299 **** // Jv Win32 RegisterComponents(srJvWin32Palette, ! [TJvTabControl, TJvPageControl, TJvRichEdit, TJvTrackBar, {$IFNDEF DelphiPersonalEdition} TJvProgressBar, --- 295,299 ---- // Jv Win32 RegisterComponents(srJvWin32Palette, ! [TJvTabControl, TJvPageControl, {TJvRichEdit, }TJvTrackBar, {$IFNDEF DelphiPersonalEdition} TJvProgressBar, Index: JvCtlReg.pas =================================================================== RCS file: /cvsroot/jvcl/jvcl/source/JvCtlReg.pas,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** JvCtlReg.pas 28 Feb 2003 15:51:48 -0000 1.15 --- JvCtlReg.pas 23 Mar 2003 15:07:40 -0000 1.16 *************** *** 448,452 **** TJvxCheckListBox, TJvxSplitter, TJvxSlider, TJvxLabel, ! TJvxRichEdit, TJvxClock, TJvAnimatedImage, TJvxDrawGrid, TJvxSpeedButton, {$IFDEF USE_JV_GIF} --- 448,452 ---- TJvxCheckListBox, TJvxSplitter, TJvxSlider, TJvxLabel, ! TJvRichEdit, TJvxClock, TJvAnimatedImage, TJvxDrawGrid, TJvxSpeedButton, {$IFDEF USE_JV_GIF} *************** *** 462,466 **** RegisterNonActiveX([TJvCustomComboEdit, TJvCustomDateEdit, TJvCustomNumEdit, ! TJvFileDirEdit, TJvxCustomListBox, TJvxRichEdit], axrComponentOnly); RegisterNonActiveX([TScroller], axrComponentOnly); --- 462,466 ---- RegisterNonActiveX([TJvCustomComboEdit, TJvCustomDateEdit, TJvCustomNumEdit, ! TJvFileDirEdit, TJvxCustomListBox, TJvRichEdit], axrComponentOnly); RegisterNonActiveX([TScroller], axrComponentOnly); Index: JvRichEd.pas =================================================================== RCS file: /cvsroot/jvcl/jvcl/source/JvRichEd.pas,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** JvRichEd.pas 23 Feb 2003 07:32:39 -0000 1.9 --- JvRichEd.pas 23 Mar 2003 15:07:40 -0000 1.10 *************** *** 14,23 **** Copyright (c) 1997, 1998 Fedor Koshevnikov, Igor Pavluk and Serge Korolev Copyright (c) 2001,2002 SGB Software All Rights Reserved. Contributor(s): Polaris Software ! Last Modified: 2002-07-04 You may retrieve the latest version of this file at the Project JEDI's JVCL home page, --- 14,27 ---- Copyright (c) 1997, 1998 Fedor Koshevnikov, Igor Pavluk and Serge Korolev Copyright (c) 2001,2002 SGB Software + Portions created by Sébastien Buysse are Copyright (C) 2001 Sébastien Buysse. All Rights Reserved. Contributor(s): Polaris Software + Sébastien Buysse [sb...@bu...] (original code in JvRichEdit.pas) + Michael Beck [mb...@bi...] (contributor to JvRichEdit.pas) + Roman Kovbasiouk [ro...@us...] (merging JvRichEdit.pas) ! Last Modified: 2003-03-10 You may retrieve the latest version of this file at the Project JEDI's JVCL home page, *************** *** 45,49 **** {$ENDIF} CommCtrl, Messages, SysUtils, Classes, Controls, Forms, Graphics, StdCtrls, ! Dialogs, RichEdit, Menus, ComCtrls; type --- 49,53 ---- {$ENDIF} CommCtrl, Messages, SysUtils, Classes, Controls, Forms, Graphics, StdCtrls, ! Dialogs, RichEdit, Menus, ComCtrls, JVCLVer; type *************** *** 340,343 **** --- 344,357 ---- FOnCloseFindDialog: TRichEditFindCloseEvent; {$ENDIF} + // From JvRichEdit.pas by Sébastien Buysse + FAboutJVCL: TJVCLAboutInfo; + FHintColor, FSavedHintColor: TColor; + FOnMouseEnter: TNotifyEvent; + FOnMouseLeave: TNotifyEvent; + FOnCtl3DChanged: TNotifyEvent; + FOnParentColorChanged: TNotifyEvent; + FOnHorizontalScroll: TNotifyEvent; + FOnVerticalScroll: TNotifyEvent; + function GetAutoURLDetect: Boolean; function GetWordSelection: Boolean; *************** *** 401,404 **** --- 415,425 ---- procedure WMRButtonUp(var Msg: TMessage); message WM_RBUTTONUP; {$ENDIF} + // From JvRichEdit.pas by Sébastien Buysse + procedure CMCtl3DChanged(var Msg: TMessage); message CM_CTL3DCHANGED; + procedure CMParentColorChanged(var Msg: TMessage); message CM_PARENTCOLORCHANGED; + procedure MouseEnter(var Msg: TMessage); message CM_MOUSEENTER; + procedure MouseLeave(var Msg: TMessage); message CM_MOUSELEAVE; + procedure WMHScroll(var Msg: TWMHScroll); message WM_HSCROLL; + procedure WMVScroll(var Msg: TWMVScroll); message WM_VSCROLL; protected procedure CreateParams(var Params: TCreateParams); override; *************** *** 425,428 **** --- 446,450 ---- property AllowInPlace: Boolean read FAllowInPlace write FAllowInPlace default True; {$ENDIF} + property AboutJVCL: TJVCLAboutInfo read FAboutJVCL write FAboutJVCL stored False; property AllowObjects: Boolean read FAllowObjects write SetAllowObjects default True; property AutoURLDetect: Boolean read GetAutoURLDetect write SetAutoURLDetect default True; *************** *** 431,434 **** --- 453,457 ---- property HideScrollBars: Boolean read FHideScrollBars write SetHideScrollBars default True; + property HintColor: TColor read FHintColor write FHintColor default clInfoBk; property Title: string read FTitle write SetTitle; property LangOptions: TRichLangOptions read GetLangOptions write SetLangOptions default [rlAutoFont]; *************** *** 457,460 **** --- 480,490 ---- write FOnCloseFindDialog; {$ENDIF} + // From JvRichEdit.pas by Sébastien Buysse + property OnMouseEnter: TNotifyEvent read FOnMouseEnter write FOnMouseEnter; + property OnMouseLeave: TNotifyEvent read FOnMouseLeave write FOnMouseLeave; + property OnCtl3DChanged: TNotifyEvent read FOnCtl3DChanged write FOnCtl3DChanged; + property OnParentColorChange: TNotifyEvent read FOnParentColorChanged write FOnParentColorChanged; + property OnVerticalScroll: TNotifyEvent read FOnVerticalScroll write FOnVerticalScroll; + property OnHorizontalScroll: TNotifyEvent read FOnHorizontalScroll write FOnHorizontalScroll; public constructor Create(AOwner: TComponent); override; *************** *** 507,512 **** end; ! TJvxRichEdit = class(TJvCustomRichEdit) published property Align; property Alignment; --- 537,543 ---- end; ! TJvRichEdit = class(TJvCustomRichEdit) published + property AboutJVCL; property Align; property Alignment; *************** *** 532,535 **** --- 563,567 ---- property HideSelection; property HideScrollBars; + property HintColor; property Title; {$IFDEF COMPILER3_UP} *************** *** 600,603 **** --- 632,641 ---- {$ENDIF} property OnURLClick; + property OnMouseEnter; + property OnMouseLeave; + property OnCtl3DChanged; + property OnParentColorChange; + property OnVerticalScroll; + property OnHorizontalScroll; end; *************** *** 3655,3659 **** begin inherited Create(AOwner); ! ControlStyle := ControlStyle - [csSetCaption]; FSelAttributes := TJvTextAttributes.Create(Self, atSelected); FDefAttributes := TJvTextAttributes.Create(Self, atDefaultText); --- 3693,3698 ---- begin inherited Create(AOwner); ! FHintColor := clInfoBk; ! ControlStyle := ControlStyle + [csAcceptsControls] - [csSetCaption]; FSelAttributes := TJvTextAttributes.Create(Self, atSelected); FDefAttributes := TJvTextAttributes.Create(Self, atDefaultText); *************** *** 4938,4941 **** --- 4977,5027 ---- end; end; + end; + + // From JvRichEdit.pas by Sébastien Buysse + procedure TJvCustomRichEdit.CMCtl3DChanged(var Msg: TMessage); + begin + inherited; + if Assigned(FOnCtl3DChanged) then + FOnCtl3DChanged(Self); + end; + + procedure TJvCustomRichEdit.CMParentColorChanged(var Msg: TMessage); + begin + inherited; + if Assigned(FOnParentColorChanged) then + FOnParentColorChanged(Self); + end; + + procedure TJvCustomRichEdit.WMHScroll(var Msg: TWMHScroll); + begin + inherited; + if Assigned(FOnHorizontalScroll) then + FOnHorizontalScroll(Self); + end; + + procedure TJvCustomRichEdit.WMVScroll(var Msg: TWMVScroll); + begin + inherited; + if Assigned(FOnVerticalScroll) then + FOnVerticalScroll(Self); + end; + + procedure TJvCustomRichEdit.MouseEnter(var Msg: TMessage); + begin + FSavedHintColor := Application.HintColor; + // for D7... + if csDesigning in ComponentState then + Exit; + Application.HintColor := FHintColor; + if Assigned(FOnMouseEnter) then + FOnMouseEnter(Self); + end; + + procedure TJvCustomRichEdit.MouseLeave(var Msg: TMessage); + begin + Application.HintColor := FSavedHintColor; + if Assigned(FOnMouseLeave) then + FOnMouseLeave(Self); end; |