mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 19:39:30 +02:00
Code cleanup
Shane git-svn-id: trunk@170 -
This commit is contained in:
parent
c93bdb1d05
commit
5eb3c3af49
@ -165,8 +165,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TGrabber.MouseMove(Shift: TShiftState; X, Y: Integer);
|
procedure TGrabber.MouseMove(Shift: TShiftState; X, Y: Integer);
|
||||||
var
|
|
||||||
dx, dy: Integer;
|
|
||||||
begin
|
begin
|
||||||
if (CaptureGrabber<>nil) and (CaptureGrabber<>Self) then begin
|
if (CaptureGrabber<>nil) and (CaptureGrabber<>Self) then begin
|
||||||
CaptureGrabber.CaptureMouseMove(Self,Shift, X, Y);
|
CaptureGrabber.CaptureMouseMove(Self,Shift, X, Y);
|
||||||
@ -180,8 +178,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TGrabber.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
procedure TGrabber.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
var
|
|
||||||
dx, dy: Integer;
|
|
||||||
begin
|
begin
|
||||||
//Writeln('MouseUp in TGrabber');
|
//Writeln('MouseUp in TGrabber');
|
||||||
|
|
||||||
|
@ -1045,7 +1045,6 @@ function GetStrProp(Instance: TObject; PropInfo: PPropInfo): AnsiString;
|
|||||||
var
|
var
|
||||||
Index, IValue: LongInt;
|
Index, IValue: LongInt;
|
||||||
ShortResult: ShortString;
|
ShortResult: ShortString;
|
||||||
AnsiResult: AnsiString;
|
|
||||||
begin
|
begin
|
||||||
SetIndexValues(PropInfo, Index, IValue);
|
SetIndexValues(PropInfo, Index, IValue);
|
||||||
case Propinfo^.PropType^.Kind of
|
case Propinfo^.PropType^.Kind of
|
||||||
@ -1077,8 +1076,6 @@ begin
|
|||||||
Pointer(Result) := Pointer(LongWord(CallIntegerFunc(Instance,
|
Pointer(Result) := Pointer(LongWord(CallIntegerFunc(Instance,
|
||||||
PPointer(Pointer(Instance.ClassType) + LongWord(PropInfo^.GetProc))^, Index, IValue)));
|
PPointer(Pointer(Instance.ClassType) + LongWord(PropInfo^.GetProc))^, Index, IValue)));
|
||||||
end;
|
end;
|
||||||
AnsiResult:=Result;
|
|
||||||
Pointer(AnsiResult):=nil;
|
|
||||||
end;
|
end;
|
||||||
else
|
else
|
||||||
// Property is neither of type AnsiString nor of type ShortString
|
// Property is neither of type AnsiString nor of type ShortString
|
||||||
@ -1133,14 +1130,10 @@ procedure SetAStrProp(Instance : TObject;PropInfo : PPropInfo;
|
|||||||
//Dirty trick based on fact that AnsiString is just a pointer,
|
//Dirty trick based on fact that AnsiString is just a pointer,
|
||||||
//hence can be treated like an integer type.
|
//hence can be treated like an integer type.
|
||||||
var
|
var
|
||||||
s: AnsiString;
|
|
||||||
Index,Ivalue : Longint;
|
Index,Ivalue : Longint;
|
||||||
begin
|
begin
|
||||||
{ Another dirty trick which is necessary to increase the reference
|
{ Another dirty trick which is necessary to increase the reference
|
||||||
counter of Value... }
|
counter of Value... }
|
||||||
s := Value;
|
|
||||||
Pointer(s) := nil;
|
|
||||||
|
|
||||||
SetIndexValues(PropInfo,Index,IValue);
|
SetIndexValues(PropInfo,Index,IValue);
|
||||||
case (PropInfo^.PropProcs shr 2) and 3 of
|
case (PropInfo^.PropProcs shr 2) and 3 of
|
||||||
ptfield:
|
ptfield:
|
||||||
|
@ -38,8 +38,6 @@ type
|
|||||||
|
|
||||||
TCompiler = class(TObject)
|
TCompiler = class(TObject)
|
||||||
private
|
private
|
||||||
FProjectFile: String;
|
|
||||||
FOutputFile: String;
|
|
||||||
FOutputString : TOutString;
|
FOutputString : TOutString;
|
||||||
FOutputList : TStringList;
|
FOutputList : TStringList;
|
||||||
public
|
public
|
||||||
@ -87,7 +85,6 @@ var
|
|||||||
Buf : Array[1..BUFSIZE] of char;
|
Buf : Array[1..BUFSIZE] of char;
|
||||||
I,Count : longint;
|
I,Count : longint;
|
||||||
Texts : String;
|
Texts : String;
|
||||||
NUm : Integer;
|
|
||||||
WriteMessage : Boolean;
|
WriteMessage : Boolean;
|
||||||
|
|
||||||
TheProcess : TProcess;
|
TheProcess : TProcess;
|
||||||
@ -200,29 +197,18 @@ end;
|
|||||||
TCompiler GetMessageType
|
TCompiler GetMessageType
|
||||||
---------------------------------------------------------------------------}
|
---------------------------------------------------------------------------}
|
||||||
function TCompiler.GetMessageType(Value : String) : TErrorType;
|
function TCompiler.GetMessageType(Value : String) : TErrorType;
|
||||||
var
|
|
||||||
Texts : String;
|
|
||||||
num : Integer;
|
|
||||||
Temp : String;
|
|
||||||
begin
|
begin
|
||||||
{This assumes the error message will have the line number
|
{This assumes the error message will have the line number
|
||||||
in the format like:
|
in the format like:
|
||||||
(123,45)
|
(123,45)
|
||||||
}
|
}
|
||||||
|
|
||||||
Result := etNone;
|
Result := etNone;
|
||||||
|
|
||||||
Texts := Value;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{--------------------------------------------------------------------------
|
{--------------------------------------------------------------------------
|
||||||
TCompiler GetUnitname
|
TCompiler GetUnitname
|
||||||
---------------------------------------------------------------------------}
|
---------------------------------------------------------------------------}
|
||||||
function TCompiler.GetUnitName(Value : String) : String;
|
function TCompiler.GetUnitName(Value : String) : String;
|
||||||
var
|
|
||||||
Texts : String;
|
|
||||||
num : Integer;
|
|
||||||
Temp : String;
|
|
||||||
begin
|
begin
|
||||||
{This assumes the error message will have the line number
|
{This assumes the error message will have the line number
|
||||||
in the format like:
|
in the format like:
|
||||||
@ -236,6 +222,10 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.6 2001/02/04 18:24:41 lazarus
|
||||||
|
Code cleanup
|
||||||
|
Shane
|
||||||
|
|
||||||
Revision 1.5 2001/01/31 06:26:23 lazarus
|
Revision 1.5 2001/01/31 06:26:23 lazarus
|
||||||
Removed global unit. CAW
|
Removed global unit. CAW
|
||||||
|
|
||||||
|
@ -288,7 +288,7 @@ type
|
|||||||
btnApply: TButton;
|
btnApply: TButton;
|
||||||
|
|
||||||
{ Other variables }
|
{ Other variables }
|
||||||
fPath: String;
|
// fPath: String;
|
||||||
|
|
||||||
{ Procedures }
|
{ Procedures }
|
||||||
procedure CreateForm(Sender: TObject);
|
procedure CreateForm(Sender: TObject);
|
||||||
@ -327,9 +327,6 @@ const
|
|||||||
{ TCompilerOptions Constructor }
|
{ TCompilerOptions Constructor }
|
||||||
{------------------------------------------------------------------------------}
|
{------------------------------------------------------------------------------}
|
||||||
constructor TCompilerOptions.Create;
|
constructor TCompilerOptions.Create;
|
||||||
var
|
|
||||||
confPath: String;
|
|
||||||
fn: String;
|
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
Assert(False, 'Trace:Compiler Options Class Created');
|
Assert(False, 'Trace:Compiler Options Class Created');
|
||||||
|
@ -39,7 +39,6 @@ type
|
|||||||
TRegisteredComponentPage = class
|
TRegisteredComponentPage = class
|
||||||
// describes the components in a single component page
|
// describes the components in a single component page
|
||||||
private
|
private
|
||||||
FCount:integer;
|
|
||||||
FPageIndex:integer;
|
FPageIndex:integer;
|
||||||
FName:ShortString;
|
FName:ShortString;
|
||||||
FItems:TList;
|
FItems:TList;
|
||||||
|
@ -66,8 +66,6 @@ type
|
|||||||
private
|
private
|
||||||
{The list of @link(TIdeComponent)s used in the IDE.}
|
{The list of @link(TIdeComponent)s used in the IDE.}
|
||||||
FItems : TList;
|
FItems : TList;
|
||||||
{The count of @link(TIdeComponent)s used in the IDE.}
|
|
||||||
FCount : Integer;
|
|
||||||
{Used to count the @link(TIdeComponent)s used in the IDE. Checks FItems.Count}
|
{Used to count the @link(TIdeComponent)s used in the IDE. Checks FItems.Count}
|
||||||
Function GetCount : Integer;
|
Function GetCount : Integer;
|
||||||
public
|
public
|
||||||
|
@ -373,9 +373,10 @@ type
|
|||||||
FMaskHandle: HBITMAP;
|
FMaskHandle: HBITMAP;
|
||||||
FPalette: HPALETTE;
|
FPalette: HPALETTE;
|
||||||
FDIBHandle: HBITMAP;
|
FDIBHandle: HBITMAP;
|
||||||
FDIB: TDIBSection;
|
{ FDIB: TDIBSection;
|
||||||
FOS2Format: Boolean;
|
FOS2Format: Boolean;
|
||||||
FHalftone: Boolean;
|
FHalftone: Boolean;
|
||||||
|
}
|
||||||
protected
|
protected
|
||||||
procedure FreeHandle; override;
|
procedure FreeHandle; override;
|
||||||
public
|
public
|
||||||
@ -475,7 +476,7 @@ type
|
|||||||
procedure CreateHandle; override;
|
procedure CreateHandle; override;
|
||||||
public
|
public
|
||||||
constructor Create(ABitMap : TBitmap);
|
constructor Create(ABitMap : TBitmap);
|
||||||
destructor Destroy;
|
destructor Destroy; override;
|
||||||
// TODO: replace this by property BitmapHandle;
|
// TODO: replace this by property BitmapHandle;
|
||||||
// MWE: Not needed
|
// MWE: Not needed
|
||||||
//property Bitmap: TBitmap read FBitmap;
|
//property Bitmap: TBitmap read FBitmap;
|
||||||
@ -511,6 +512,10 @@ end.
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.4 2001/02/04 18:24:41 lazarus
|
||||||
|
Code cleanup
|
||||||
|
Shane
|
||||||
|
|
||||||
Revision 1.3 2001/01/31 21:16:45 lazarus
|
Revision 1.3 2001/01/31 21:16:45 lazarus
|
||||||
Changed to TCOmboBox focusing.
|
Changed to TCOmboBox focusing.
|
||||||
Shane
|
Shane
|
||||||
|
@ -147,13 +147,8 @@ end;
|
|||||||
|
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
procedure TCanvas.SetAutoReDraw(Value : Boolean);
|
procedure TCanvas.SetAutoReDraw(Value : Boolean);
|
||||||
var
|
|
||||||
Msg : String;
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
|
||||||
FAutoRedraw := Value;
|
FAutoRedraw := Value;
|
||||||
msg := '';
|
|
||||||
If FAutoReDraw then
|
If FAutoReDraw then
|
||||||
CNSendMessage(LM_REDraw, Self, nil);
|
CNSendMessage(LM_REDraw, Self, nil);
|
||||||
end;
|
end;
|
||||||
@ -526,6 +521,10 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.3 2001/02/04 18:24:41 lazarus
|
||||||
|
Code cleanup
|
||||||
|
Shane
|
||||||
|
|
||||||
Revision 1.2 2000/08/10 18:56:24 lazarus
|
Revision 1.2 2000/08/10 18:56:24 lazarus
|
||||||
Added some winapi calls.
|
Added some winapi calls.
|
||||||
Most don't have code yet.
|
Most don't have code yet.
|
||||||
|
@ -19,7 +19,7 @@ var
|
|||||||
BufPtr: ^PChar;
|
BufPtr: ^PChar;
|
||||||
P : PChar;
|
P : PChar;
|
||||||
S : TStringList;
|
S : TStringList;
|
||||||
n, BufIndex: Integer;
|
n : Integer;
|
||||||
t : String;
|
t : String;
|
||||||
begin
|
begin
|
||||||
FreeContext;
|
FreeContext;
|
||||||
@ -34,7 +34,6 @@ begin
|
|||||||
Buf := GetMem(S.Count * SizeOf(PCharArray));
|
Buf := GetMem(S.Count * SizeOf(PCharArray));
|
||||||
BufPtr := Pointer(Buf);
|
BufPtr := Pointer(Buf);
|
||||||
try
|
try
|
||||||
BufIndex := 0;
|
|
||||||
for n := 0 to S.Count - 1 do
|
for n := 0 to S.Count - 1 do
|
||||||
if S.Strings[n][1] = '"'
|
if S.Strings[n][1] = '"'
|
||||||
then begin
|
then begin
|
||||||
@ -42,12 +41,9 @@ begin
|
|||||||
p := @S.Strings[n][2];
|
p := @S.Strings[n][2];
|
||||||
//---
|
//---
|
||||||
BufPtr^ := @S.Strings[n][2];
|
BufPtr^ := @S.Strings[n][2];
|
||||||
// Buf^[BufIndex] := @S.Strings[n][2];
|
|
||||||
P := StrScan(BufPtr^, '"');
|
P := StrScan(BufPtr^, '"');
|
||||||
// P := StrScan(Buf^[BufIndex], '"');
|
|
||||||
if p <> nil then p^ := #0;
|
if p <> nil then p^ := #0;
|
||||||
Inc(BufPtr);
|
Inc(BufPtr);
|
||||||
// Inc(BufIndex);
|
|
||||||
end;
|
end;
|
||||||
if FTransparentColor = clNone
|
if FTransparentColor = clNone
|
||||||
then Handle := CreatePixmapIndirect(Buf, -1)
|
then Handle := CreatePixmapIndirect(Buf, -1)
|
||||||
@ -81,6 +77,10 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.6 2001/02/04 18:24:41 lazarus
|
||||||
|
Code cleanup
|
||||||
|
Shane
|
||||||
|
|
||||||
Revision 1.5 2001/01/04 16:12:54 lazarus
|
Revision 1.5 2001/01/04 16:12:54 lazarus
|
||||||
Removed some writelns and changed the property editor for TStrings a bit.
|
Removed some writelns and changed the property editor for TStrings a bit.
|
||||||
Shane
|
Shane
|
||||||
|
@ -459,6 +459,7 @@ begin
|
|||||||
// your code here
|
// your code here
|
||||||
//TODO:WINAPI call CHARLOWERBUFF
|
//TODO:WINAPI call CHARLOWERBUFF
|
||||||
Writeln('TODO: WINAPI call CHARLOWERBUFF');
|
Writeln('TODO: WINAPI call CHARLOWERBUFF');
|
||||||
|
Result := -1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -944,6 +945,10 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.10 2001/02/04 18:24:42 lazarus
|
||||||
|
Code cleanup
|
||||||
|
Shane
|
||||||
|
|
||||||
Revision 1.9 2001/01/23 19:13:57 lazarus
|
Revision 1.9 2001/01/23 19:13:57 lazarus
|
||||||
Fixxed the errors I commited with Unionrect
|
Fixxed the errors I commited with Unionrect
|
||||||
Shane
|
Shane
|
||||||
|
@ -74,7 +74,6 @@ type
|
|||||||
fRootKey: HKEY;
|
fRootKey: HKEY;
|
||||||
fLazyWrite: Boolean;
|
fLazyWrite: Boolean;
|
||||||
fCurrentPath: string;
|
fCurrentPath: string;
|
||||||
fCloseRootKey: Boolean;
|
|
||||||
|
|
||||||
procedure SetRootKey(Value: HKEY);
|
procedure SetRootKey(Value: HKEY);
|
||||||
protected
|
protected
|
||||||
@ -185,6 +184,10 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.2 2001/02/04 18:24:41 lazarus
|
||||||
|
Code cleanup
|
||||||
|
Shane
|
||||||
|
|
||||||
Revision 1.1 2000/07/13 10:28:24 michael
|
Revision 1.1 2000/07/13 10:28:24 michael
|
||||||
+ Initial import
|
+ Initial import
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user