mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 06:29:29 +02:00
initialize variables at declaration instead in the unit initialization from Florian K�berle
git-svn-id: trunk@7426 -
This commit is contained in:
parent
21a9d058d9
commit
3c8fe5d206
@ -18,6 +18,7 @@ Darius Blaszijk
|
||||
Dean Zobec
|
||||
Eric Chapman
|
||||
Felipe Monteiro de Carvalho
|
||||
Florian Koeberle
|
||||
Francisco Manuel
|
||||
GongYu
|
||||
Hans-Joachim Ott
|
||||
|
@ -2022,8 +2022,8 @@ uses
|
||||
var
|
||||
// The interface knows, which TWinControl has the capture. This stores
|
||||
// what child control of this TWinControl has actually the capture.
|
||||
CaptureControl: TControl;
|
||||
DockSiteHash: TDynHashArray;
|
||||
CaptureControl: TControl=nil;
|
||||
DockSiteHash: TDynHashArray=nil;
|
||||
|
||||
procedure AdjustBorderSpace(var RemainingClientRect, CurBorderSpace: TRect;
|
||||
Left, Top, Right, Bottom: integer);
|
||||
@ -2933,13 +2933,9 @@ end;
|
||||
{$ENDIF not VER1_0}
|
||||
|
||||
initialization
|
||||
|
||||
//DebugLn('controls.pp - initialization');
|
||||
Mouse := TMouse.Create;
|
||||
DragControl := nil;
|
||||
CaptureControl := nil;
|
||||
DefaultDockTreeClass := TDockTree;
|
||||
DockSiteHash := nil;
|
||||
|
||||
RegisterIntegerConsts(TypeInfo(TCursor), @IdentToCursor, @CursorToIdent);
|
||||
|
||||
@ -2952,6 +2948,9 @@ end.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.316 2005/07/26 08:45:15 vincents
|
||||
initialize variables at declaration instead in the unit initialization from Florian Köberle
|
||||
|
||||
Revision 1.315 2005/07/22 11:15:56 mattias
|
||||
updated russian translation for windows from Rostislav Okulov
|
||||
|
||||
|
15
lcl/forms.pp
15
lcl/forms.pp
@ -1202,7 +1202,7 @@ var
|
||||
Application: TApplication;
|
||||
Screen: TScreen;
|
||||
ExceptionObject: TExceptObject;
|
||||
HintWindowClass: THintWindowClass;
|
||||
HintWindowClass: THintWindowClass=THintWindow;
|
||||
|
||||
type
|
||||
TMessageBoxFunction =
|
||||
@ -1222,10 +1222,10 @@ uses
|
||||
WSForms; // Widgetset uses circle is allowed
|
||||
|
||||
var
|
||||
FocusMessages: Boolean;
|
||||
FocusCount: Integer;
|
||||
HandlingException: boolean;
|
||||
HaltingProgram: boolean;
|
||||
FocusMessages: Boolean=True;
|
||||
FocusCount: Integer=0;
|
||||
HandlingException: boolean=False;
|
||||
HaltingProgram: boolean=False;
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
@ -1669,11 +1669,6 @@ end;
|
||||
//==============================================================================
|
||||
|
||||
initialization
|
||||
FocusCount := 0;
|
||||
Focusmessages := True;
|
||||
HandlingException := false;
|
||||
HaltingProgram := false;
|
||||
HintWindowClass := THintWindow;
|
||||
LCLProc.OwnerFormDesignerModifiedProc:=@IfOwnerIsFormThenDesignerModified;
|
||||
Screen:= TScreen.Create(nil);
|
||||
Application:= TApplication.Create(nil);
|
||||
|
@ -1418,8 +1418,8 @@ type
|
||||
FormatID: TClipboardFormat);
|
||||
|
||||
var
|
||||
OnLoadGraphicFromClipboardFormat: TOnLoadGraphicFromClipboardFormat;
|
||||
OnSaveGraphicToClipboardFormat: TOnSaveGraphicToClipboardFormat;
|
||||
OnLoadGraphicFromClipboardFormat: TOnLoadGraphicFromClipboardFormat=nil;
|
||||
OnSaveGraphicToClipboardFormat: TOnSaveGraphicToClipboardFormat=nil;
|
||||
|
||||
function TestStreamBitmapNativeType(const AStream: TStream): TBitmapNativeType;
|
||||
function TestStreamIsBMP(const AStream: TStream): boolean;
|
||||
@ -1435,7 +1435,8 @@ function ReadXPMSize(XPM: PPChar; var Width, Height, ColorCount: integer
|
||||
var
|
||||
{ Stores information about the current screen
|
||||
- initialized on Interface startup }
|
||||
ScreenInfo: TScreenInfo;
|
||||
ScreenInfo: TScreenInfo=(PixelsPerInchX:72;PixelsPerInchY:72;
|
||||
ColorDepth:24;Initialized:false;);
|
||||
|
||||
FontResourceCache: TFontHandleCache;
|
||||
PenResourceCache: TPenHandleCache;
|
||||
@ -1934,14 +1935,6 @@ begin
|
||||
end;
|
||||
|
||||
initialization
|
||||
ScreenInfo.Initialized:=false;
|
||||
ScreenInfo.ColorDepth:=24;
|
||||
ScreenInfo.PixelsPerInchX:=72;
|
||||
ScreenInfo.PixelsPerInchY:=72;
|
||||
PicClipboardFormats:=nil;
|
||||
PicFileFormats:=nil;
|
||||
OnLoadGraphicFromClipboardFormat:=nil;
|
||||
OnSaveGraphicToClipboardFormat:=nil;
|
||||
FontResourceCache:=TFontHandleCache.Create;
|
||||
PenResourceCache:=TPenHandleCache.Create;
|
||||
BrushResourceCache:=TBrushHandleCache.Create;
|
||||
@ -1962,6 +1955,9 @@ end.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.179 2005/07/26 08:45:15 vincents
|
||||
initialize variables at declaration instead in the unit initialization from Florian Köberle
|
||||
|
||||
Revision 1.178 2005/07/19 08:31:21 vincents
|
||||
added ColorBox (from Darius) to LCL
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
}
|
||||
|
||||
var
|
||||
DragControl: TControl; // control, that started the drag
|
||||
DragControl: TControl=nil; // control, that started the drag
|
||||
DragObject: TDragObject; // the drag information object
|
||||
DragObjectAutoFree: Boolean; // True, if DragObject was auto created
|
||||
DragStartPos: TPoint; // mouse position at start of drag
|
||||
@ -362,6 +362,9 @@ end;
|
||||
|
||||
{ =============================================================================
|
||||
$Log$
|
||||
Revision 1.9 2005/07/26 08:45:15 vincents
|
||||
initialize variables at declaration instead in the unit initialization from Florian Köberle
|
||||
|
||||
Revision 1.8 2005/02/05 16:09:52 marc
|
||||
* first 64bit changes
|
||||
|
||||
|
@ -268,8 +268,8 @@ end;
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
var
|
||||
PicClipboardFormats: TPicClipboardFormats;
|
||||
PicFileFormats: TPicFileFormatsList;
|
||||
PicClipboardFormats: TPicClipboardFormats=nil;
|
||||
PicFileFormats: TPicFileFormatsList=nil;
|
||||
|
||||
function GetPicFileFormats: TPicFileFormatsList;
|
||||
begin
|
||||
|
@ -83,7 +83,7 @@ type
|
||||
TInputDialogFunction = Function (const InputCaption, InputPrompt : String;
|
||||
MaskInput : Boolean; var Value : String) : Boolean;
|
||||
var
|
||||
InputDialogFunction: TInputDialogFunction;
|
||||
InputDialogFunction: TInputDialogFunction=nil;
|
||||
|
||||
type
|
||||
TPromptDialogFunction = Function(const DialogCaption, DialogMessage : String;
|
||||
@ -95,7 +95,7 @@ var
|
||||
PromptDialogFunction: TPromptDialogFunction;
|
||||
|
||||
var
|
||||
InterfaceObject: TWidgetSet;
|
||||
InterfaceObject: TWidgetSet=nil;
|
||||
|
||||
implementation
|
||||
|
||||
@ -107,9 +107,6 @@ const
|
||||
{$I intfbasewinapi.inc}
|
||||
{$I intfbaselcl.inc}
|
||||
|
||||
initialization
|
||||
InputDialogFunction:=nil;
|
||||
InterfaceObject:=nil;
|
||||
|
||||
finalization
|
||||
InputDialogFunction:=nil;
|
||||
@ -118,6 +115,9 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.56 2005/07/26 08:45:15 vincents
|
||||
initialize variables at declaration instead in the unit initialization from Florian Köberle
|
||||
|
||||
Revision 1.55 2004/09/24 21:34:14 micha
|
||||
convert LM_CREATE message to interface methods
|
||||
remove SendMsgToInterface, CNSendMessage and related methods
|
||||
|
@ -72,8 +72,8 @@ type
|
||||
|
||||
|
||||
var
|
||||
SendApplicationMessageFunction: TSendApplicationMessageFunction;
|
||||
OwnerFormDesignerModifiedProc: TOwnerFormDesignerModifiedProc;
|
||||
SendApplicationMessageFunction: TSendApplicationMessageFunction=nil;
|
||||
OwnerFormDesignerModifiedProc: TOwnerFormDesignerModifiedProc=nil;
|
||||
|
||||
function SendApplicationMessage(Msg: Cardinal; WParam: WParam; LParam: LParam):Longint;
|
||||
procedure OwnerFormDesignerModified(AComponent: TComponent);
|
||||
@ -1942,8 +1942,6 @@ end;
|
||||
|
||||
initialization
|
||||
InitializeDebugOutput;
|
||||
SendApplicationMessageFunction:=nil;
|
||||
OwnerFormDesignerModifiedProc:=nil;
|
||||
InterfaceFinalizationHandlers:=TList.Create;
|
||||
finalization
|
||||
InterfaceFinalizationHandlers.Free;
|
||||
|
@ -187,8 +187,8 @@ type
|
||||
var
|
||||
LazarusResources: TLResourceList;
|
||||
|
||||
LRSObjectReaderClass: TLRSObjectReaderClass;
|
||||
LRSObjectWriterClass: TLRSObjectWriterClass;
|
||||
LRSObjectReaderClass: TLRSObjectReaderClass=TLRSObjectReader;
|
||||
LRSObjectWriterClass: TLRSObjectWriterClass=TLRSObjectWriter;
|
||||
|
||||
function InitLazResourceComponent(Instance: TComponent;
|
||||
RootAncestor: TClass): Boolean;
|
||||
@ -276,7 +276,7 @@ const
|
||||
|
||||
var
|
||||
ByteToStr: array[char] of shortstring;
|
||||
ByteToStrValid: boolean;
|
||||
ByteToStrValid: boolean=false;
|
||||
|
||||
procedure InitByteToStr;
|
||||
var
|
||||
@ -3155,9 +3155,6 @@ end;
|
||||
procedure InternalInit;
|
||||
begin
|
||||
LazarusResources:=TLResourceList.Create;
|
||||
ByteToStrValid:=false;
|
||||
LRSObjectReaderClass:=TLRSObjectReader;
|
||||
LRSObjectWriterClass:=TLRSObjectWriter;
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
Loading…
Reference in New Issue
Block a user