From: <tw...@us...> - 2020-07-06 09:25:53
|
Revision: 3210 http://sourceforge.net/p/gexperts/code/3210 Author: twm Date: 2020-07-06 09:25:50 +0000 (Mon, 06 Jul 2020) Log Message: ----------- updated to latest version from OSDN Modified Paths: -------------- trunk/ExternalSource/dzlib/dzlib.inc trunk/ExternalSource/dzlib/u_dzFileUtils.pas trunk/ExternalSource/dzlib/u_dzTranslator.pas trunk/ExternalSource/dzlib/u_dzTypes.pas trunk/ExternalSource/dzlib/u_dzVclUtils.pas Modified: trunk/ExternalSource/dzlib/dzlib.inc =================================================================== --- trunk/ExternalSource/dzlib/dzlib.inc 2020-07-05 18:25:42 UTC (rev 3209) +++ trunk/ExternalSource/dzlib/dzlib.inc 2020-07-06 09:25:50 UTC (rev 3210) @@ -87,6 +87,10 @@ {$DEFINE HAS_INTTOHEX_FUNCTION} {$ENDIF} +{$IFOPT T+} +{$DEFINE TYPEDADDRESS_IS_ON} +{$ENDIF} + // we currently support only Windows (and a very small subset of Win64), so we turn platform // warnings off Modified: trunk/ExternalSource/dzlib/u_dzFileUtils.pas =================================================================== --- trunk/ExternalSource/dzlib/u_dzFileUtils.pas 2020-07-05 18:25:42 UTC (rev 3209) +++ trunk/ExternalSource/dzlib/u_dzFileUtils.pas 2020-07-06 09:25:50 UTC (rev 3210) @@ -114,8 +114,18 @@ /// @param IncludePath determines whether the List of filenames includes the full path or not </summary> class function Execute(const _Mask: string; _List: TStrings; _MayHaveAttr: TFileAttributeSet = ALL_FILES_ATTRIB_SET; _IncludePath: Boolean = False; _Sort: Boolean = True): Integer; + /// <summary> + /// creates a TSimpleDirEnumerator, calls its FindAll method and frees it + /// @param List is a string list to which the files will be appended, may be nil + /// @param IncludePath determines whether the List of filenames includes the full path or not </summary> class function EnumFilesOnly(const _Mask: string; _List: TStrings; - _IncludePath: Boolean = False; _Sort: Boolean = True): Integer; + _IncludePath: Boolean = False; _Sort: Boolean = True): Integer; overload; + class function EnumFilesOnly(const _Mask: string; + _IncludePath: Boolean = False; _Sort: Boolean = True): TStringArray; overload; + /// <summary> + /// creates a TSimpleDirEnumerator, calls its FindAll method and frees it + /// @param List is a string list to which the files will be appended, may be nil + /// @param IncludePath determines whether the List of filenames includes the full path or not </summary> class function EnumDirsOnly(const _Mask: string; _List: TStrings; _IncludePath: Boolean = False; _Sort: Boolean = True): Integer; /// <summary> @@ -1113,7 +1123,8 @@ procedure Init(const _s: string); function PartCount: Integer; function Part(_Idx: Integer): string; - procedure GetParts(_Parts: TStrings); + procedure GetParts(_Parts: TStrings); overload; + function GetParts: TStringArray; overload; procedure AssignParts(_Parts: TStrings); class operator Implicit(_sl: TStrings): TSearchPath; class operator Implicit(const _s: string): TSearchPath; @@ -1272,6 +1283,20 @@ end; end; +class function TSimpleDirEnumerator.EnumFilesOnly(const _Mask: string; _IncludePath, + _Sort: Boolean): TStringArray; +var + sl: TStringList; +begin + sl := TStringList.Create; + try + EnumFilesOnly(_Mask, sl, _IncludePath, _Sort); + Result := TStringArray_FromStrings(sl); + finally + FreeAndNil(sl); + end; +end; + class function TSimpleDirEnumerator.EnumFilesOnly(const _Mask: string; _List: TStrings; _IncludePath, _Sort: Boolean): Integer; begin @@ -3653,6 +3678,18 @@ end; end; +function TSearchPath.GetParts: TStringArray; +var + sl: TStringList; +begin + sl := AsStringlist; + try + Result := TStringArray_FromStrings(sl); + finally + FreeAndNil(sl); + end; +end; + procedure TSearchPath.Init(const _s: string); begin FValue := _s; Modified: trunk/ExternalSource/dzlib/u_dzTranslator.pas =================================================================== --- trunk/ExternalSource/dzlib/u_dzTranslator.pas 2020-07-05 18:25:42 UTC (rev 3209) +++ trunk/ExternalSource/dzlib/u_dzTranslator.pas 2020-07-06 09:25:50 UTC (rev 3210) @@ -387,4 +387,3 @@ {$ENDIF gnugettext} end. - Modified: trunk/ExternalSource/dzlib/u_dzTypes.pas =================================================================== --- trunk/ExternalSource/dzlib/u_dzTypes.pas 2020-07-05 18:25:42 UTC (rev 3209) +++ trunk/ExternalSource/dzlib/u_dzTypes.pas 2020-07-06 09:25:50 UTC (rev 3210) @@ -6,6 +6,7 @@ uses SysUtils, + Classes, Types; // for $IF Declared(TBytes) type @@ -38,7 +39,18 @@ type TMethodPointer = procedure of object; +function TStringArray_FromStrings(_sl: TStrings): TStringArray; + implementation +function TStringArray_FromStrings(_sl: TStrings): TStringArray; +var + i: Integer; +begin + SetLength(Result, _sl.count); + for i := 0 to _sl.count - 1 do + Result[i] := _sl[i]; +end; + end. Modified: trunk/ExternalSource/dzlib/u_dzVclUtils.pas =================================================================== --- trunk/ExternalSource/dzlib/u_dzVclUtils.pas 2020-07-05 18:25:42 UTC (rev 3209) +++ trunk/ExternalSource/dzlib/u_dzVclUtils.pas 2020-07-06 09:25:50 UTC (rev 3210) @@ -998,12 +998,14 @@ procedure TRadioGroup_SelectWithoutClickEvent(_rg: TCustomRadioGroup; _Idx: Integer); ///<summary> Gets the object pointer of the selected RadioGroup item -/// @param cmb is the TCustomListbox (descendant) to read from -/// @param Idx is the listbox's ItemIndex, only valid if the function returns true +/// @param cmb is the TCustomRadioGroup (descendant) to read from +/// @param Idx is the radio group's ItemIndex, only valid if the function returns true /// @param Obj is the value of the object pointer of the selected item, only valid /// if the function returns true /// @returns true, if the out parameters are valid </summary> -function TRadioGroup_GetSelectedObject(_rg: TCustomRadioGroup; out _Idx: Integer; out _Obj: Pointer): Boolean; +function TRadioGroup_GetSelectedObject(_rg: TCustomRadioGroup; out _Idx: Integer; out _Obj: Pointer): Boolean; overload; +function TRadioGroup_GetSelectedObject(_rg: TCustomRadioGroup; out _Obj: Pointer): Boolean; overload; +function TRadioGroup_GetSelectedObject(_rg: TCustomRadioGroup; out _ObjAsInt: Integer): Boolean; overload; ///<summary> Writes a TPicture object to a String. The Format is /// <pictureformat>#26<picturedata> </summary> @@ -1787,7 +1789,7 @@ AssignFile(t, _Filename); Rewrite(t); try - write(t, s); + Write(t, s); finally CloseFile(t); end; @@ -2188,7 +2190,6 @@ end; {$IF Declared(TryIso2Time)} - function TEdit_TextHHMMSSToTime(_ed: TCustomEdit; _FocusControl: Boolean = True): TDateTime; var s: string; @@ -3776,6 +3777,22 @@ _Obj := Hack.Items.Objects[_Idx]; end; +function TRadioGroup_GetSelectedObject(_rg: TCustomRadioGroup; out _Obj: Pointer): Boolean; +var + Idx: Integer; +begin + Result := TRadioGroup_GetSelectedObject(_rg, Idx, _Obj); +end; + +function TRadioGroup_GetSelectedObject(_rg: TCustomRadioGroup; out _ObjAsInt: Integer): Boolean; +var + Obj: Pointer; +begin + Result := TRadioGroup_GetSelectedObject(_rg, Obj); + if Result then + _ObjAsInt := Integer(Obj); +end; + function TRichEdit_WriteToString(_Re: TRichEdit): string; var st: TMemoryStream; @@ -3949,7 +3966,7 @@ procedure TControl_SetHint(_Ctrl: TControl; const _Hint: string); begin - _Ctrl.hint := _Hint; + _Ctrl.Hint := _Hint; _Ctrl.ShowHint := True; end; @@ -5377,12 +5394,12 @@ begin inherited Create; FCtrl := _Ctrl; - SendMessage(FCtrl.Handle, WM_SETREDRAW, wParam(LongBool(False)), 0); + SendMessage(FCtrl.Handle, WM_SETREDRAW, WPARAM(LongBool(False)), 0); end; destructor TWinControlLocker.Destroy; begin - SendMessage(FCtrl.Handle, WM_SETREDRAW, wParam(LongBool(True)), 0); + SendMessage(FCtrl.Handle, WM_SETREDRAW, WPARAM(LongBool(True)), 0); RedrawWindow(FCtrl.Handle, nil, 0, RDW_ERASE or RDW_INVALIDATE or RDW_ALLCHILDREN); inherited; end; @@ -5438,8 +5455,8 @@ procedure TdzButtonedEdit.Loaded; begin inherited; - if RightButton.Visible and (RightButton.hint = '') then begin - RightButton.hint := _('Ctrl+Return to ''click'' right button.'); + if RightButton.Visible and (RightButton.Hint = '') then begin + RightButton.Hint := _('Ctrl+Return to ''click'' right button.'); ShowHint := True; end; end; @@ -6443,7 +6460,7 @@ tb: TTrackBar; begin tb := TrackBar; - tb.hint := IntToStr(tb.Position); + tb.Hint := IntToStr(tb.Position); Application.ActivateHint(Mouse.CursorPos); doOnChange(_Sender); end; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |