mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 17:19:19 +02:00
LCL: reduced debug output
git-svn-id: trunk@12693 -
This commit is contained in:
parent
e20a6258bd
commit
ef2d81ca2c
@ -408,12 +408,17 @@ function CodeMacroAddMissingEnd(const Parameter: string;
|
||||
var
|
||||
Line: String;
|
||||
p: TPoint;
|
||||
CodeBuf: TCodeBuffer;
|
||||
begin
|
||||
Result:=true;
|
||||
Value:='';
|
||||
Line:=SrcEdit.CurrentLineText;
|
||||
p:=SrcEdit.CursorTextXY;
|
||||
if p.y<1 then exit;
|
||||
CodeBuf:=SrcEdit.CodeToolsBuffer as TCodeBuffer;
|
||||
if CodeBuf=nil then exit;
|
||||
|
||||
|
||||
while (p.y<=SrcEdit.LineCount) do begin
|
||||
Line:=SrcEdit.Lines[p.y-1];
|
||||
while (p.x<=length(Line)) do begin
|
||||
|
@ -65,7 +65,7 @@ begin
|
||||
if Value = FPosition then
|
||||
exit;
|
||||
|
||||
// scroll content of FControl
|
||||
// scroll logical client area of FControl
|
||||
OldPosition := FPosition;
|
||||
FPosition := Value;
|
||||
if FControl is TScrollingWinControl then
|
||||
|
@ -219,6 +219,7 @@ end;
|
||||
|
||||
procedure TScrollingWinControl.WMHScroll(var Message : TLMHScroll);
|
||||
begin
|
||||
DebugLn(['TScrollingWinControl.WMHScroll ',dbgsName(Self)]);
|
||||
HorzScrollbar.ScrollHandler(Message);
|
||||
end;
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
{off $DEFINE VerboseAutoSizeCtrlData}
|
||||
{off $DEFINE VerboseMouseBugfix}
|
||||
|
||||
{$DEFINE CHECK_POSITION}
|
||||
{off $DEFINE CHECK_POSITION}
|
||||
{$IFDEF CHECK_POSITION}
|
||||
const CheckPostionClassName = 'xxxTButtonPanel';
|
||||
const CheckPostionName = 'xxxBakProjTypeRadioGroup';
|
||||
@ -36,6 +36,8 @@ const CheckPostionParentName = 'xxxInheritedPage';
|
||||
|
||||
function CheckPosition(AControl: TControl): boolean;
|
||||
begin
|
||||
Result:=true;
|
||||
exit;
|
||||
Result:=(CompareText(AControl.ClassName,CheckPostionClassName)=0)
|
||||
or (CompareText(AControl.Name,CheckPostionName)=0)
|
||||
or ((AControl.Parent<>nil)
|
||||
@ -44,7 +46,6 @@ end;
|
||||
{$ENDIF}
|
||||
|
||||
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Autosizing Helper classes
|
||||
-------------------------------------------------------------------------------}
|
||||
|
@ -142,6 +142,71 @@ type
|
||||
|
||||
class function TWin32WSScrollBox.CreateHandle(const AWinControl: TWinControl;
|
||||
const AParams: TCreateParams): HWND;
|
||||
|
||||
{$IFDEF NewScrollingLayer}
|
||||
procedure CreateScrollingLayer(ParentH: HWND);
|
||||
var
|
||||
Params: TCreateWindowExParams;
|
||||
begin
|
||||
// general initialization of Params
|
||||
with Params do
|
||||
begin
|
||||
Flags := WS_CHILD or WS_CLIPSIBLINGS or WS_CLIPCHILDREN;
|
||||
FlagsEx := 0;
|
||||
Window := HWND(nil);
|
||||
Buddy := HWND(nil);
|
||||
Parent := ParentH;
|
||||
SubClassWndProc := @WindowProc;
|
||||
WindowTitle := nil;
|
||||
StrCaption := 'TWin32WSScrollBox.CreateHandle ScrollLayer';
|
||||
WindowTitle := nil;
|
||||
Height := 50;
|
||||
Left := 0;
|
||||
//Parent := AWinControl.Parent;
|
||||
Top := 0;
|
||||
Width := 50;
|
||||
Flags := Flags or WS_VISIBLE;
|
||||
FlagsEx := FlagsEx or WS_EX_CONTROLPARENT;
|
||||
end;
|
||||
// customization of Params
|
||||
with Params do
|
||||
begin
|
||||
pClassName := @ClsName[0];
|
||||
SubClassWndProc := nil;
|
||||
end;
|
||||
// create window
|
||||
with Params do
|
||||
begin
|
||||
MenuHandle := HMENU(nil);
|
||||
|
||||
Window := CreateWindowEx(FlagsEx, pClassName, WindowTitle, Flags,
|
||||
Left, Top, Width, Height, Parent, MenuHandle, HInstance, Nil);
|
||||
|
||||
if Window = 0 then
|
||||
begin
|
||||
raise exception.create('failed to create win32 sub control, error: '+IntToStr(GetLastError()));
|
||||
end;
|
||||
end;
|
||||
with Params do
|
||||
begin
|
||||
if Window <> HWND(Nil) then
|
||||
begin
|
||||
// some controls (combobox) immediately send a message upon setting font
|
||||
{WindowInfo := AllocWindowInfo(Window);
|
||||
if GetWindowInfo(Parent)^.needParentPaint then
|
||||
WindowInfo^.needParentPaint := true;
|
||||
WindowInfo^.WinControl := AWinControl;
|
||||
if SubClassWndProc <> nil then
|
||||
WindowInfo^.DefWndProc := Windows.WNDPROC(SetWindowLong(
|
||||
Window, GWL_WNDPROC, PtrInt(SubClassWndProc)));
|
||||
lhFont := GetStockObject(DEFAULT_GUI_FONT)
|
||||
Windows.SendMessage(Window, WM_SETFONT, WPARAM(lhFont), 0);}
|
||||
end;
|
||||
end;
|
||||
Result := Params.Window;
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
var
|
||||
Params: TCreateWindowExParams;
|
||||
begin
|
||||
@ -159,6 +224,10 @@ begin
|
||||
// create window
|
||||
FinishCreateWindow(AWinControl, Params, false);
|
||||
Result := Params.Window;
|
||||
|
||||
{$IFDEF NewScrollingLayer}
|
||||
CreateScrollingLayer(Result);
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
{ TWin32WSScrollingWinControl }
|
||||
|
Loading…
Reference in New Issue
Block a user