From: Robert M. <mar...@us...> - 2004-01-13 15:09:03
|
Update of /cvsroot/jvcl/dev/JVCL3/run In directory sc8-pr-cvs1:/tmp/cvs-serv28539/JVCL3/run Modified Files: JvBDEProgress.pas JvLoginForm.pas JvMarkupLabel.pas JvMaskEdit.pas JvRas32.pas JvSAL.pas JvTimerList.pas JvTypes.pas QWinCursors.pas Log Message: style cleaning Index: JvBDEProgress.pas =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/run/JvBDEProgress.pas,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** JvBDEProgress.pas 5 Jan 2004 22:37:41 -0000 1.3 --- JvBDEProgress.pas 13 Jan 2004 15:09:00 -0000 1.4 *************** *** 34,38 **** Bde, Controls, DB, DBTables, ! JvTimer {, JvComponent}; type --- 34,38 ---- Bde, Controls, DB, DBTables, ! JvTimer, JvComponent; type *************** *** 40,47 **** TOnPercentChange = procedure(Sender: TObject; PercentDone: Integer) of object; TOnProgressEvent = procedure(Sender: TObject; var AbortQuery: Boolean) of object; ! TOnTraceEvent = procedure(Sender: TObject; Flag: TTraceFlag; ! const Msg: string) of object; ! TJvDBProgress = class(TComponent) private FActive: Boolean; --- 40,46 ---- TOnPercentChange = procedure(Sender: TObject; PercentDone: Integer) of object; TOnProgressEvent = procedure(Sender: TObject; var AbortQuery: Boolean) of object; ! TOnTraceEvent = procedure(Sender: TObject; Flag: TTraceFlag; const Msg: string) of object; ! TJvDBProgress = class(TJvComponent) private FActive: Boolean; *************** *** 101,105 **** end; ! { TJvDBCallback - for internal use only } type --- 100,113 ---- end; ! implementation ! ! uses ! Windows, Forms, SysUtils, StdCtrls, Math, ! JvProgressUtils; ! ! const ! cbQRYPROGRESS = cbRESERVED4; ! ! //=== TJvDBCallback ========================================================== type *************** *** 129,143 **** end; - implementation - - uses - Math, - Windows, - Forms, SysUtils, StdCtrls, - JvProgressUtils; - - const - cbQRYPROGRESS = cbRESERVED4; - function BdeCallBack(CallType: CBType; Data: Longint; CBInfo: Pointer): CBRType; stdcall; begin --- 137,140 ---- *************** *** 150,155 **** end; - //=== TJvDBCallback ========================================================== - constructor TJvDBCallback.Create(AOwner: TObject; CBType: CBType; CBBufSize: Cardinal; CallbackEvent: TJvDBCallbackEvent; --- 147,150 ---- *************** *** 241,245 **** //=== TJvSessionLink ========================================================= - type TJvSessionLink = class(TDatabase) --- 236,239 ---- *************** *** 368,372 **** end else ! if not Value and (FGenProgressCallback <> nil) then begin Sessions.CurrentSession := GetDBSession; --- 362,366 ---- end else ! if not Value and (FGenProgressCallback <> nil) then begin Sessions.CurrentSession := GetDBSession; *************** *** 588,595 **** end; with CallInfo^ do - begin PcntDone := (stepsCompleted / Max(1, stepsInQry)) * (elemCompleted / Max(1, totElemInStep)); - end; SetPercent(Round(PcntDone * 100)); end; --- 582,587 ---- Index: JvLoginForm.pas =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/run/JvLoginForm.pas,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** JvLoginForm.pas 5 Jan 2004 10:04:03 -0000 1.16 --- JvLoginForm.pas 13 Jan 2004 15:09:00 -0000 1.17 *************** *** 59,63 **** FUpdateCaption: TUpdateCaption; FAppStorage: TJvCustomAppStorage; ! FAppStoragePath : String; FLocked: Boolean; FUnlockDlgShowing: Boolean; --- 59,63 ---- FUpdateCaption: TUpdateCaption; FAppStorage: TJvCustomAppStorage; ! FAppStoragePath: string; FLocked: Boolean; FUnlockDlgShowing: Boolean; *************** *** 69,77 **** FOnIconDblClick: TNotifyEvent; {$IFDEF VCL} ! FPasswordChar: char; ! {$ENDIF} function GetLoggedUser: string; function UnlockHook(var Msg: TMessage): Boolean; ! procedure SeTJvAppStorage(Value : TJvCustomAppStorage); protected function CheckUnlock(const UserName, Password: string): Boolean; dynamic; --- 69,77 ---- FOnIconDblClick: TNotifyEvent; {$IFDEF VCL} ! FPasswordChar: Char; ! {$ENDIF VCL} function GetLoggedUser: string; function UnlockHook(var Msg: TMessage): Boolean; ! procedure SetAppStorage(Value: TJvCustomAppStorage); protected function CheckUnlock(const UserName, Password: string): Boolean; dynamic; *************** *** 91,96 **** property UpdateCaption: TUpdateCaption read FUpdateCaption write FUpdateCaption default ucNoChange; {$IFDEF VCL} ! property PasswordChar:char read FPasswordChar write FPasswordChar default '*'; ! {$ENDIF} property AfterLogin: TNotifyEvent read FAfterLogin write FAfterLogin; property BeforeLogin: TNotifyEvent read FBeforeLogin write FBeforeLogin; --- 91,96 ---- property UpdateCaption: TUpdateCaption read FUpdateCaption write FUpdateCaption default ucNoChange; {$IFDEF VCL} ! property PasswordChar: Char read FPasswordChar write FPasswordChar default '*'; ! {$ENDIF VCL} property AfterLogin: TNotifyEvent read FAfterLogin write FAfterLogin; property BeforeLogin: TNotifyEvent read FBeforeLogin write FBeforeLogin; *************** *** 98,103 **** property OnUnlockApp: TUnlockAppEvent read FOnUnlockApp write FOnUnlockApp; property OnIconDblClick: TNotifyEvent read FOnIconDblClick write FOnIconDblClick; ! property AppStorage: TJvCustomAppStorage read FAppStorage write SeTJvAppStorage; ! property AppStoragePath : String read FAppStoragePath write FAppStoragePath; public constructor Create(AOwner: TComponent); override; --- 98,103 ---- property OnUnlockApp: TUnlockAppEvent read FOnUnlockApp write FOnUnlockApp; property OnIconDblClick: TNotifyEvent read FOnIconDblClick write FOnIconDblClick; ! property AppStorage: TJvCustomAppStorage read FAppStorage write SetAppStorage; ! property AppStoragePath: string read FAppStoragePath write FAppStoragePath; public constructor Create(AOwner: TComponent); override; *************** *** 227,231 **** end; ! procedure TJvCustomLogin.SeTJvAppStorage(Value : TJvCustomAppStorage); begin FAppStorage := Value; --- 227,231 ---- end; ! procedure TJvCustomLogin.SetAppStorage(Value : TJvCustomAppStorage); begin FAppStorage := Value; *************** *** 371,376 **** PasswordEdit.MaxLength := FMaxPasswordLen; {$IFDEF VCL} ! PasswordEdit.PasswordChar := PassWordChar; ! {$ENDIF} AttemptNumber := Self.AttemptNumber; end; --- 371,376 ---- PasswordEdit.MaxLength := FMaxPasswordLen; {$IFDEF VCL} ! PasswordEdit.PasswordChar := PasswordChar; ! {$ENDIF VCL} AttemptNumber := Self.AttemptNumber; end; *************** *** 409,415 **** if (Popup <> 0) and IsWindowVisible(Popup) and (WindowClassName(Popup) = TJvLoginForm.ClassName) then - begin SetForegroundWindow(Popup); - end; Result := False; Exit; --- 409,413 ---- *************** *** 441,445 **** UnlockHook := not DoUnlock; WM_SYSCOMMAND: ! if (WParam and $FFF0 = SC_RESTORE) or (WParam and $FFF0 = SC_ZOOM) then UnlockHook := not DoUnlock; end; --- 439,443 ---- UnlockHook := not DoUnlock; WM_SYSCOMMAND: ! if ((WParam and $FFF0) = SC_RESTORE) or ((WParam and $FFF0) = SC_ZOOM) then UnlockHook := not DoUnlock; end; *************** *** 456,463 **** inherited Loaded; if not (csDesigning in ComponentState) and Loading then - begin if Active and not Login then TerminateApplication; - end; end; --- 454,459 ---- *************** *** 497,501 **** begin if Assigned(AppStorage) then ! AppStorage.WriteString (AppStorage.ConcatPaths([AppStoragePath, RsLastLoginUserName]), UserName); end; --- 493,497 ---- begin if Assigned(AppStorage) then ! AppStorage.WriteString(AppStorage.ConcatPaths([AppStoragePath, RsLastLoginUserName]), UserName); end; *************** *** 503,507 **** begin if Assigned(AppStorage) then ! Result := AppStorage.ReadString (AppStorage.ConcatPaths([AppStoragePath, RsLastLoginUserName]), UserName) else Result := UserName; --- 499,503 ---- begin if Assigned(AppStorage) then ! Result := AppStorage.ReadString(AppStorage.ConcatPaths([AppStoragePath, RsLastLoginUserName]), UserName) else Result := UserName; *************** *** 539,543 **** if Icon.Empty then Icon.Handle := LoadIcon(0, IDI_APPLICATION); ! {$ENDIF} AppIcon.Picture.Assign(Icon); AppTitleLabel.Caption := Format(RsAppTitleLabel, [Application.Title]); --- 535,539 ---- if Icon.Empty then Icon.Handle := LoadIcon(0, IDI_APPLICATION); ! {$ENDIF VCL} AppIcon.Picture.Assign(Icon); AppTitleLabel.Caption := Format(RsAppTitleLabel, [Application.Title]); Index: JvMarkupLabel.pas =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/run/JvMarkupLabel.pas,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** JvMarkupLabel.pas 13 Jan 2004 09:20:20 -0000 1.17 --- JvMarkupLabel.pas 13 Jan 2004 15:09:00 -0000 1.18 *************** *** 17,21 **** Contributor(s): Robert Love [rl...@sl...]. ! Lionel Renaud Last Modified: 2004-01-10 --- 17,21 ---- Contributor(s): Robert Love [rl...@sl...]. ! Lionel Reynaud Last Modified: 2004-01-10 Index: JvMaskEdit.pas =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/run/JvMaskEdit.pas,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** JvMaskEdit.pas 12 Jan 2004 11:28:48 -0000 1.16 --- JvMaskEdit.pas 13 Jan 2004 15:09:00 -0000 1.17 *************** *** 143,147 **** property OnSetFocus: TJvFocusChangeEvent read FOnSetFocus write FOnSetFocus; property OnKillFocus: TJvFocusChangeEvent read FOnKillFocus write FOnKillFocus; ! {$ENDIF} published property AboutJVCL: TJVCLAboutInfo read FAboutJVCL write FAboutJVCL stored False; --- 143,147 ---- property OnSetFocus: TJvFocusChangeEvent read FOnSetFocus write FOnSetFocus; property OnKillFocus: TJvFocusChangeEvent read FOnKillFocus write FOnKillFocus; ! {$ENDIF VCL} published property AboutJVCL: TJVCLAboutInfo read FAboutJVCL write FAboutJVCL stored False; *************** *** 219,229 **** implementation - procedure TJvCustomMaskEdit.ParentColorChanged; - begin - inherited ParentColorChanged; - if Assigned(FOnParentColorChanged) then - FOnParentColorChanged(Self); - end; - constructor TJvCustomMaskEdit.Create(AOwner: TComponent); begin --- 219,222 ---- *************** *** 234,238 **** FCaret := TJvCaret.Create(Self); FCaret.OnChanged := CaretChanged; - // ControlStyle := ControlStyle + [csAcceptsControls]; FDisabledColor := clWindow; FDisabledTextColor := clGrayText; --- 227,230 ---- *************** *** 250,256 **** end; procedure TJvCustomMaskEdit.EnabledChanged; begin ! inherited EnabledChanged; Invalidate; if Assigned(FOnEnabledChanged) then --- 242,255 ---- end; + procedure TJvCustomMaskEdit.ParentColorChanged; + begin + inherited ParentColorChanged; + if Assigned(FOnParentColorChanged) then + FOnParentColorChanged(Self); + end; + procedure TJvCustomMaskEdit.EnabledChanged; begin ! inherited EnabledChanged; Invalidate; if Assigned(FOnEnabledChanged) then *************** *** 337,349 **** if Assigned(Owner) then for I := 0 to Owner.ComponentCount - 1 do - begin if (Owner.Components[i] is TJvCustomMaskEdit) then with TJvCustomMaskEdit(Owner.Components[i]) do - begin if (Name <> Self.Name) and (GroupIndex <> -1) and ! (GroupIndex = Self.GroupIndex) then Clear; - end; - end; end; --- 336,344 ---- if Assigned(Owner) then for I := 0 to Owner.ComponentCount - 1 do if (Owner.Components[i] is TJvCustomMaskEdit) then with TJvCustomMaskEdit(Owner.Components[i]) do if (Name <> Self.Name) and (GroupIndex <> -1) and ! (GroupIndex = Self.GroupIndex) then Clear; end; *************** *** 370,396 **** {$IFDEF VCL} procedure TJvCustomMaskEdit.WMCopy(var Msg: TWMCopy); - {$ELSE} - procedure TJvCustomMaskEdit.CopyTopClipboard; - {$ENDIF VCL} begin if caCopy in ClipboardCommands then inherited; end; {$IFDEF VCL} procedure TJvCustomMaskEdit.WMCut(var Msg: TWMCut); - {$ELSE} - procedure TJvCustomMaskEdit.CutToClipboard; - {$ENDIF VCL} begin if caCut in ClipboardCommands then inherited; end; {$IFDEF VCL} procedure TJvCustomMaskEdit.WMPaste(var Msg: TWMPaste); - {$ELSE} - procedure TJvCustomMaskEdit.PasteFromClipboard; - {$ENDIF VCL} begin if caPaste in ClipboardCommands then --- 365,400 ---- {$IFDEF VCL} procedure TJvCustomMaskEdit.WMCopy(var Msg: TWMCopy); begin if caCopy in ClipboardCommands then inherited; end; + {$ENDIF VCL} + + {$IFDEF VisualCLX} + procedure TJvCustomMaskEdit.CopyToClipboard; + begin + if caCopy in ClipboardCommands then + inherited CopyToClipboard; + end; + {$ENDIF VisualCLX} {$IFDEF VCL} procedure TJvCustomMaskEdit.WMCut(var Msg: TWMCut); begin if caCut in ClipboardCommands then inherited; end; + {$ENDIF VCL} + + {$IFDEF VisualCLX} + procedure TJvCustomMaskEdit.CutToClipboard; + begin + if caCut in ClipboardCommands then + inherited CutToClipboard; + end; + {$ENDIF VisualCLX} {$IFDEF VCL} procedure TJvCustomMaskEdit.WMPaste(var Msg: TWMPaste); begin if caPaste in ClipboardCommands then *************** *** 398,403 **** --- 402,418 ---- UpdateEdit; end; + {$ENDIF VCL} + + {$IFDEF VisualCLX} + procedure TJvCustomMaskEdit.PasteFromClipboard; + begin + if caPaste in ClipboardCommands then + inherited PasteFromClipboard; + UpdateEdit; + end; + {$ENDIF VisualCLX} {$IFDEF VCL} + procedure TJvCustomMaskEdit.WMUndo(var Msg: TWMUndo); begin *************** *** 405,414 **** inherited; end; - {$ENDIF VCL} - {$IFDEF VCL} procedure TJvCustomMaskEdit.WMPaint(var Msg: TWMPaint); const ! AlignmentValues: array[False..True, TAlignment] of TAlignment = ((taLeftJustify, taRightJustify, taCenter), (taRightJustify, taLeftJustify, taCenter)); --- 420,427 ---- inherited; end; procedure TJvCustomMaskEdit.WMPaint(var Msg: TWMPaint); const ! AlignmentValues: array [False..True, TAlignment] of TAlignment = ((taLeftJustify, taRightJustify, taCenter), (taRightJustify, taLeftJustify, taCenter)); *************** *** 431,435 **** if (Style and ES_RIGHT) <> 0 then AAlignment := AlignmentValues[UseRightToLeftAlignment, taRightJustify] ! else if (Style and ES_CENTER) <> 0 then AAlignment := taCenter else --- 444,449 ---- if (Style and ES_RIGHT) <> 0 then AAlignment := AlignmentValues[UseRightToLeftAlignment, taRightJustify] ! else ! if (Style and ES_CENTER) <> 0 then AAlignment := taCenter else *************** *** 444,454 **** Canvas := nil; ! if not PaintEdit(Self, Text, AAlignment, False, {ButtonWidth,} FDisabledTextColor, ! Focused, Canvas, Msg) then inherited; Canvas.Free; end; end; {$ENDIF VCL} {$IFDEF VisualCLX} procedure TJvCustomMaskEdit.Paint; --- 458,470 ---- Canvas := nil; ! if not PaintEdit(Self, Text, AAlignment, False, {ButtonWidth,} ! FDisabledTextColor, Focused, Canvas, Msg) then inherited; Canvas.Free; end; end; + {$ENDIF VCL} + {$IFDEF VisualCLX} procedure TJvCustomMaskEdit.Paint; *************** *** 458,468 **** // Paint if Enabled then ! inherited else begin ACanvas := nil; ! if not PaintEdit(Self, Text, taLeftJustify, False, {0,} FDisabledTextColor, ! Focused, ACanvas) then ! inherited; ACanvas.Free; end; --- 474,484 ---- // Paint if Enabled then ! inherited Paint else begin ACanvas := nil; ! if not PaintEdit(Self, Text, taLeftJustify, False, {0,} ! FDisabledTextColor, Focused, ACanvas) then ! inherited Paint; ACanvas.Free; end; *************** *** 494,500 **** {$IFDEF VCL} procedure TJvCustomMaskEdit.WMSetFocus(var Msg: TMessage); - {$ELSE} - procedure TJvCustomMaskEdit.DoEnter; - {$ENDIF VCL} begin FEntering := True; --- 510,513 ---- *************** *** 502,518 **** inherited; FCaret.CreateCaret; - {$IFDEF VCL} DoSetFocus(FindControl(Msg.WParam)); - {$ENDIF VCL} finally FEntering := False; end; end; {$IFDEF VCL} procedure TJvCustomMaskEdit.WMKillFocus(var Msg: TMessage); - {$ELSE} - procedure TJvCustomMaskEdit.DoExit; - {$ENDIF VCL} begin FLeaving := True; --- 515,540 ---- inherited; FCaret.CreateCaret; DoSetFocus(FindControl(Msg.WParam)); finally FEntering := False; end; end; + {$ENDIF VCL} + + {$IFDEF VisualCLX} + procedure TJvCustomMaskEdit.DoEnter; + begin + FEntering := True; + try + inherited DoEnter; + FCaret.CreateCaret; + finally + FEntering := False; + end; + end; + {$ENDIF VisualCLX} {$IFDEF VCL} procedure TJvCustomMaskEdit.WMKillFocus(var Msg: TMessage); begin FLeaving := True; *************** *** 520,530 **** FCaret.DestroyCaret; inherited; - {$IFDEF VCL} DoKillFocus(FindControl(Msg.WParam)); - {$ENDIF VCL} finally FLeaving := False; end; end; procedure TJvCustomMaskEdit.KeyDown(var Key: Word; Shift: TShiftState); --- 542,564 ---- FCaret.DestroyCaret; inherited; DoKillFocus(FindControl(Msg.WParam)); finally FLeaving := False; end; end; + {$ENDIF VCL} + + {$IFDEF VisualCLX} + procedure TJvCustomMaskEdit.DoExit; + begin + FLeaving := True; + try + FCaret.DestroyCaret; + inherited DoExit; + finally + FLeaving := False; + end; + end; + {$ENDIF VisualCLX} procedure TJvCustomMaskEdit.KeyDown(var Key: Word; Shift: TShiftState); *************** *** 571,574 **** --- 605,609 ---- {$IFDEF VCL} + procedure TJvCustomMaskEdit.DefaultHandler(var Msg); begin *************** *** 594,597 **** --- 629,633 ---- FOnSetFocus(Self, APreviousControl); end; + {$ENDIF VCL} Index: JvRas32.pas =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/run/JvRas32.pas,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** JvRas32.pas 11 Jan 2004 16:37:37 -0000 1.8 --- JvRas32.pas 13 Jan 2004 15:09:00 -0000 1.9 *************** *** 275,282 **** begin if FPath <> '' then ! r := FRasDial(nil, PChar(FPath), @RASDialParams, $FFFFFFFF, FHandle, FConnection) else ! r := FRasDial(nil, nil, @RASDialParams, $FFFFFFFF, FHandle, FConnection); ! Result := r = 0; end else --- 275,282 ---- begin if FPath <> '' then ! R := FRasDial(nil, PChar(FPath), @RASDialParams, $FFFFFFFF, FHandle, FConnection) else ! R := FRasDial(nil, nil, @RASDialParams, $FFFFFFFF, FHandle, FConnection); ! Result := R = 0; end else *************** *** 362,366 **** Break; end; ! sleep(10); Inc(I); if I > 9 then --- 362,366 ---- Break; end; ! Sleep(10); Inc(I); if I > 9 then *************** *** 404,410 **** if Assigned(FRasGetEntryDialParams) then - begin if FRasGetEntryDialParams(nil, RasDial, Res) = 0 then - begin with RasDial do begin --- 404,408 ---- *************** *** 415,420 **** FPhone := StrPas(szPhoneNumber); end; - end; - end; end; end; --- 413,416 ---- *************** *** 497,501 **** end else ! Msg.Result := DefWindowProc(FHandle, Msg.Msg, Msg.wParam, Msg.lParam); end; --- 493,497 ---- end else ! Msg.Result := DefWindowProc(FHandle, Msg.Msg, Msg.WParam, Msg.LParam); end; Index: JvSAL.pas =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/run/JvSAL.pas,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** JvSAL.pas 13 Dec 2003 07:17:08 -0000 1.10 --- JvSAL.pas 13 Jan 2004 15:09:00 -0000 1.11 *************** *** 24,27 **** --- 24,28 ---- Known Issues: -----------------------------------------------------------------------------} + {$I jvcl.inc} *************** *** 38,74 **** QGraphics, QControls, QForms, QDialogs, {$ENDIF} [...1155 lines suppressed...] ! procedure TJvSAL.xNoParser; begin // do nothing end; ! //=== TJvSALProcAtom ========================================================= ! procedure TJvSALProcAtom.SetActor(const Value: TJvSALProc); begin ! FActor := Value; end; ! procedure TJvSALProcAtom.SetParser(const Value: TJvSALProc); begin ! FParser := Value; end; end. + Index: JvTimerList.pas =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/run/JvTimerList.pas,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** JvTimerList.pas 5 Jan 2004 22:37:44 -0000 1.11 --- JvTimerList.pas 13 Jan 2004 15:09:00 -0000 1.12 *************** *** 61,68 **** TJvTimerEvent = class; ! TJvTimerList = class; {$IFNDEF COMPILER6_UP} TCollectionNotification = (cnAdded, cnDeleted); ! {$ENDIF} // (rom) used THandle where needed TJvTimerEvents = class(TOwnedCollection) --- 61,69 ---- TJvTimerEvent = class; ! TJvTimerList = class; {$IFNDEF COMPILER6_UP} TCollectionNotification = (cnAdded, cnDeleted); ! {$ENDIF COMPILER6_UP} ! // (rom) used THandle where needed TJvTimerEvents = class(TOwnedCollection) *************** *** 72,84 **** FSequence: Longint; FParent: TJvTimerList; ! function GetItem(Index: integer): TJvTimerEvent; ! procedure SetItem(Index: integer; const Value: TJvTimerEvent); protected procedure CalculateInterval(StartTicks: Longint); procedure UpdateEvents(StartTicks: Longint); function ProcessEvents: Boolean; ! procedure Notify(Item: TCollectionItem; Action: TCollectionNotification); {$IFDEF COMPILER6_UP}override;{$ENDIF} public ! constructor Create(AOwner:TPersistent); procedure Activate; procedure Deactivate; --- 73,86 ---- FSequence: Longint; FParent: TJvTimerList; ! function GetItem(Index: Integer): TJvTimerEvent; ! procedure SetItem(Index: Integer; const Value: TJvTimerEvent); protected procedure CalculateInterval(StartTicks: Longint); procedure UpdateEvents(StartTicks: Longint); function ProcessEvents: Boolean; ! procedure Notify(Item: TCollectionItem; Action: TCollectionNotification); ! {$IFDEF COMPILER6_UP} override; {$ENDIF} public ! constructor Create(AOwner: TPersistent); procedure Activate; procedure Deactivate; *************** *** 90,97 **** procedure Sort; ! function Add:TJvTimerEvent; ! procedure Assign(Source:TPersistent);override; ! property Items[Index:integer]:TJvTimerEvent read GetItem write SetItem;default; ! property EnabledCount:Integer read GetEnabledCount; end; --- 92,99 ---- procedure Sort; ! function Add: TJvTimerEvent; ! procedure Assign(Source: TPersistent); override; ! property Items[Index: Integer]: TJvTimerEvent read GetItem write SetItem; default; ! property EnabledCount: Integer read GetEnabledCount; end; *************** *** 118,122 **** property ExecCount: Integer read FExecCount; property TimerList: TJvTimerList read FParentList; ! constructor Create(ACollection:TCollection);override; published property Cycled: Boolean read FCycled write FCycled default True; --- 120,124 ---- property ExecCount: Integer read FExecCount; property TimerList: TJvTimerList read FParentList; ! constructor Create(ACollection: TCollection); override; published property Cycled: Boolean read FCycled write FCycled default True; *************** *** 163,171 **** var ! IsDesigning:Boolean = false; //=== TJvTimerEvent ========================================================== ! constructor TJvTimerEvent.Create(ACollection:TCollection); begin inherited Create(ACollection); --- 165,173 ---- var ! IsDesigning: Boolean = False; //=== TJvTimerEvent ========================================================== ! constructor TJvTimerEvent.Create(ACollection: TCollection); begin inherited Create(ACollection); *************** *** 247,251 **** inherited Create(AOwner); IsDesigning := csDesigning in ComponentState; ! FEvents := TJvTimerEvents.Create(self); FWndHandle := INVALID_HANDLE_VALUE; Events.Deactivate; --- 249,253 ---- inherited Create(AOwner); IsDesigning := csDesigning in ComponentState; ! FEvents := TJvTimerEvents.Create(Self); FWndHandle := INVALID_HANDLE_VALUE; Events.Deactivate; *************** *** 317,335 **** procedure TJvTimerList.UpdateTimer; var ! FTimerInterval: Cardinal; begin if not (csDesigning in ComponentState) then begin if Events.FInterval <= MaxTimerInterval then ! FTimerInterval := Events.FInterval else if (Events.FInterval - Events.FStartInterval) <= MaxTimerInterval then begin ! FTimerInterval := Cardinal(Events.FInterval - Events.FStartInterval); Events.FStartInterval := 0; end else begin ! FTimerInterval := MaxTimerInterval; Events.FStartInterval := Events.FStartInterval + MaxTimerInterval; end; --- 319,337 ---- procedure TJvTimerList.UpdateTimer; var ! TimerInterval: Cardinal; begin if not (csDesigning in ComponentState) then begin if Events.FInterval <= MaxTimerInterval then ! TimerInterval := Events.FInterval else if (Events.FInterval - Events.FStartInterval) <= MaxTimerInterval then begin ! TimerInterval := Cardinal(Events.FInterval - Events.FStartInterval); Events.FStartInterval := 0; end else begin ! TimerInterval := MaxTimerInterval; Events.FStartInterval := Events.FStartInterval + MaxTimerInterval; end; *************** *** 341,345 **** else if Events.FInterval > 0 then ! if SetTimer(FWndHandle, 1, FTimerInterval, nil) = 0 then begin Events.Deactivate; --- 343,347 ---- else if Events.FInterval > 0 then ! if SetTimer(FWndHandle, 1, TimerInterval, nil) = 0 then begin Events.Deactivate; *************** *** 355,359 **** end; - procedure TJvTimerList.SetActive(Value: Boolean); var --- 357,360 ---- *************** *** 396,400 **** end; ! { TJvTimerEvents } procedure TJvTimerEvents.Activate; --- 397,409 ---- end; ! //===TJvTimerEvents ========================================================== ! ! constructor TJvTimerEvents.Create(AOwner: TPersistent); ! begin ! if not (AOwner is TJvTimerList) then ! raise EJVCLException.Create(RsEOwnerMustBeTJvTimerList); ! inherited Create(AOwner, TJvTimerEvent); ! FParent := TJvTimerList(AOwner); ! end; procedure TJvTimerEvents.Activate; *************** *** 409,427 **** // (p3) yuk! some hack... Notify(Result, cnAdded); ! {$ENDIF} end; - procedure TJvTimerEvents.Assign(Source: TPersistent); ! var i:integer; begin if Source is TJvTimerEvents then begin Clear; ! for i := 0 to TJvTimerEvents(Source).Count - 1 do ! Add.Assign(TJvTimerEvents(Source).Items[i]); Exit; end; ! inherited; end; --- 418,436 ---- // (p3) yuk! some hack... Notify(Result, cnAdded); ! {$ENDIF COMPILER6_UP} end; procedure TJvTimerEvents.Assign(Source: TPersistent); ! var ! I: Integer; begin if Source is TJvTimerEvents then begin Clear; ! for I := 0 to TJvTimerEvents(Source).Count - 1 do ! Add.Assign(TJvTimerEvents(Source).Items[I]); Exit; end; ! inherited Assign(Source); end; *************** *** 472,483 **** end; - constructor TJvTimerEvents.Create(AOwner: TPersistent); - begin - if not (AOwner is TJvTimerList) then - raise EJVCLException.Create(RsEOwnerMustBeTJvTimerList); - inherited Create(AOwner,TJvTimerEvent); - FParent := TJvTimerList(AOwner); - end; - procedure TJvTimerEvents.Deactivate; begin --- 481,484 ---- *************** *** 510,514 **** end; ! function TJvTimerEvents.GetItem(Index: integer): TJvTimerEvent; begin Result := TJvTimerEvent(inherited Items[Index]); --- 511,515 ---- end; ! function TJvTimerEvents.GetItem(Index: Integer): TJvTimerEvent; begin Result := TJvTimerEvent(inherited Items[Index]); *************** *** 543,556 **** Action: TCollectionNotification); begin ! inherited; if Action = cnAdded then ! with TJvTimerEvent(Item) do ! begin ! FHandle := NextHandle; ! FParentList := self.FParent; ! CalculateInterval(GetTickCount); ! Sort; ! FParent.UpdateTimer; ! end; end; --- 544,557 ---- Action: TCollectionNotification); begin ! inherited Notify(Item, Action); if Action = cnAdded then ! with TJvTimerEvent(Item) do ! begin ! FHandle := NextHandle; ! FParentList := Self.FParent; ! CalculateInterval(GetTickCount); ! Sort; ! FParent.UpdateTimer; ! end; end; *************** *** 583,588 **** end; ! procedure TJvTimerEvents.SetItem(Index: integer; ! const Value: TJvTimerEvent); begin inherited Items[Index] := Value; --- 584,588 ---- end; ! procedure TJvTimerEvents.SetItem(Index: Integer; const Value: TJvTimerEvent); begin inherited Items[Index] := Value; *************** *** 618,623 **** end; - - end. --- 618,621 ---- Index: JvTypes.pas =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/run/JvTypes.pas,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** JvTypes.pas 7 Jan 2004 21:52:47 -0000 1.44 --- JvTypes.pas 13 Jan 2004 15:09:00 -0000 1.45 *************** *** 93,98 **** end; - {$IFDEF VisualCLX} // HWND = QWidgetH; HCURSOR = QCursorH; --- 93,98 ---- end; {$IFDEF VisualCLX} + // HWND = QWidgetH; HCURSOR = QCursorH; *************** *** 134,138 **** --- 134,140 ---- TJvRGBTriple = TRGBQuad; // VisualCLX does not support pf24bit + {$ELSE} + TJvRGBTriple = packed record rgbBlue: Byte; *************** *** 140,143 **** --- 142,146 ---- rgbRed: Byte; end; + {$ENDIF VisualCLX} *************** *** 147,161 **** TRGBQuadArray = array [0..MaxPixelCount - 1] of TRGBQuad; PRGBPalette = ^TRGBPalette; ! TRGBPalette = array[Byte] of TRGBQuad; TBalance = 0..100; TJvVolumeRec = record ! case Byte of ! 0: ! (LongVolume: Longint); ! 1: ! (LeftVolume: Word; ! RightVolume: Word); end; --- 150,164 ---- TRGBQuadArray = array [0..MaxPixelCount - 1] of TRGBQuad; PRGBPalette = ^TRGBPalette; ! TRGBPalette = array [Byte] of TRGBQuad; TBalance = 0..100; TJvVolumeRec = record ! case Byte of ! 0: ! (LongVolume: Longint); ! 1: ! (LeftVolume: Word; ! RightVolume: Word); end; Index: QWinCursors.pas =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/run/QWinCursors.pas,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** QWinCursors.pas 11 Dec 2003 20:58:06 -0000 1.3 --- QWinCursors.pas 13 Jan 2004 15:09:00 -0000 1.4 *************** *** 28,35 **** --- 28,39 ---- {-------------------------------------------------------------------------------------------------} + {$I jvcl.inc} + unit QWinCursors; + {$R-} interface + uses Classes, SysUtils, Types, *************** *** 133,137 **** end; - type TCustomCursor = record Bits: array of Byte; --- 137,140 ---- *************** *** 139,143 **** end; - type tagLocalHeader = packed record XHotSpot: Word; --- 142,145 ---- *************** *** 151,155 **** begin inherited Create; - FHandle := nil; FWidth := 0; --- 153,156 ---- *************** *** 163,167 **** begin inherited Create; - FHandle := AHandle; FOwnsHandle := False; --- 164,167 ---- *************** *** 172,176 **** if FOwnsHandle then FreeCursor; - inherited Destroy; end; --- 172,175 ---- *************** *** 179,186 **** var ResourceStream: TResourceStream; ! CURSORDIR: TCURSORDIR; ResDir: TResCursorDir; BmpInfo: TBITMAPINFOHEADER; ! localHeader: tagLocalHeader; begin ResourceStream := TResourceStream.Create(Instance, ResourceName, PChar(12)); --- 178,185 ---- var ResourceStream: TResourceStream; ! CursorDir: TCURSORDIR; ResDir: TResCursorDir; BmpInfo: TBITMAPINFOHEADER; ! LocalHeader: tagLocalHeader; begin ResourceStream := TResourceStream.Create(Instance, ResourceName, PChar(12)); *************** *** 225,229 **** procedure TWinCursor.LoadFromStream(Stream: TStream); var ! CURSORDIR: TCURSORDIR; Entry: TCURSORDIRENTRY; BitmapInfo: TBITMAPINFOHEADER; --- 224,228 ---- procedure TWinCursor.LoadFromStream(Stream: TStream); var ! CursorDir: TCURSORDIR; Entry: TCURSORDIRENTRY; BitmapInfo: TBITMAPINFOHEADER; |