mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 19:08:03 +02:00
focus fixes, reduced lpi size
git-svn-id: trunk@3749 -
This commit is contained in:
parent
c36de31dd9
commit
3a628d7a0e
@ -63,7 +63,7 @@ type
|
||||
FDebugger: TDebugger;
|
||||
public
|
||||
constructor Create(AOWner: TComponent; const AWatch: TDBGWatch;
|
||||
const ADebugger: TDebugger); //reintroduce;
|
||||
const ADebugger: TDebugger); overload;
|
||||
destructor Destroy; override;
|
||||
published
|
||||
// publish some properties until fpcbug #1888 is fixed
|
||||
|
@ -575,26 +575,26 @@ end;
|
||||
procedure TUnitInfo.SaveToXMLConfig(XMLConfig: TXMLConfig; const Path: string);
|
||||
var AFilename:string;
|
||||
begin
|
||||
XMLConfig.SetValue(Path+'CursorPos/X',fCursorPos.X);
|
||||
XMLConfig.SetValue(Path+'CursorPos/Y',fCursorPos.Y);
|
||||
XMLConfig.SetValue(Path+'EditorIndex/Value',fEditorIndex);
|
||||
XMLConfig.SetDeleteValue(Path+'CursorPos/X',fCursorPos.X,-1);
|
||||
XMLConfig.SetDeleteValue(Path+'CursorPos/Y',fCursorPos.Y,-1);
|
||||
XMLConfig.SetDeleteValue(Path+'EditorIndex/Value',fEditorIndex,-1);
|
||||
AFilename:=Filename;
|
||||
if Assigned(fOnLoadSaveFilename) then
|
||||
fOnLoadSaveFilename(AFilename,false);
|
||||
XMLConfig.SetValue(Path+'Filename/Value',AFilename);
|
||||
XMLConfig.SetValue(Path+'FormName/Value',fFormName);
|
||||
XMLConfig.SetValue(Path+'HasResources/Value',fHasResources);
|
||||
XMLConfig.SetValue(Path+'IsPartOfProject/Value',fIsPartOfProject);
|
||||
XMLConfig.SetValue(Path+'Loaded/Value',fLoaded);
|
||||
XMLConfig.SetValue(Path+'ReadOnly/Value',fReadOnly);
|
||||
XMLConfig.SetDeleteValue(Path+'FormName/Value',fFormName,'');
|
||||
XMLConfig.SetDeleteValue(Path+'HasResources/Value',fHasResources,false);
|
||||
XMLConfig.SetDeleteValue(Path+'IsPartOfProject/Value',fIsPartOfProject,false);
|
||||
XMLConfig.SetDeleteValue(Path+'Loaded/Value',fLoaded,false);
|
||||
XMLConfig.SetDeleteValue(Path+'ReadOnly/Value',fReadOnly,false);
|
||||
AFilename:=FResourceFilename;
|
||||
if Assigned(fOnLoadSaveFilename) then
|
||||
fOnLoadSaveFilename(AFilename,false);
|
||||
XMLConfig.SetValue(Path+'ResourceFilename/Value',AFilename);
|
||||
XMLConfig.SetDeleteValue(Path+'ResourceFilename/Value',AFilename,'');
|
||||
XMLConfig.SetValue(Path+'SyntaxHighlighter/Value'
|
||||
,LazSyntaxHighlighterNames[fSyntaxHighlighter]);
|
||||
XMLConfig.SetValue(Path+'TopLine/Value',fTopLine);
|
||||
XMLConfig.SetValue(Path+'UnitName/Value',fUnitName);
|
||||
XMLConfig.SetDeleteValue(Path+'TopLine/Value',fTopLine,-1);
|
||||
XMLConfig.SetDeleteValue(Path+'UnitName/Value',fUnitName,'');
|
||||
fBreakpoints.SaveToXMLConfig(XMLConfig,Path);
|
||||
end;
|
||||
|
||||
@ -2101,6 +2101,9 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.87 2002/12/28 12:42:38 mattias
|
||||
focus fixes, reduced lpi size
|
||||
|
||||
Revision 1.86 2002/11/16 13:56:20 mattias
|
||||
project now notices, if compiler options changed
|
||||
|
||||
|
@ -265,6 +265,7 @@ type
|
||||
procedure CloseModal;
|
||||
procedure DoCreate;
|
||||
procedure DoDestroy;
|
||||
procedure SetActive(AValue: Boolean);
|
||||
procedure SetActiveControl(AWinControl: TWinControl);
|
||||
procedure SetBorderStyle(Value : TFORMBorderStyle);
|
||||
procedure SetDesigner(Value : TIDesigner);
|
||||
|
@ -225,7 +225,8 @@ Procedure TCustomForm.SetFocus;
|
||||
Begin
|
||||
//writeln('[TCustomForm.SetFocus] A ',Classname);
|
||||
//if not(Visible and Enabled) then Exit;
|
||||
CNSendMessage(LM_SETFOCUS,Self,nil);
|
||||
if HandleAllocated then
|
||||
CNSendMessage(LM_SETFOCUS,Self,nil);
|
||||
//writeln('[TCustomForm.SetFocus] END ',Classname);
|
||||
end;
|
||||
|
||||
@ -259,6 +260,11 @@ begin
|
||||
NewFocusControl := FActiveControl
|
||||
else
|
||||
NewFocusControl := Self;
|
||||
{$IFDEF VerboseFocus}
|
||||
writeln('TCustomForm.SetWindowFocus ',Name,':',Classname ,
|
||||
' NewFocusControl=',NewFocusControl.Name,':',NewFocusControl.ClassName,
|
||||
' HndAlloc=',NewFocusControl.HandleAllocated);
|
||||
{$ENDIF}
|
||||
if not NewFocusControl.HandleAllocated then exit;
|
||||
LCLLinux.SetFocus(NewFocusControl.Handle);
|
||||
if GetFocus = NewFocusControl.Handle then
|
||||
@ -303,6 +309,11 @@ end;
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCustomForm.WMActivate(var Message : TLMActivate);
|
||||
begin
|
||||
{$IFDEF VerboseFocus}
|
||||
writeln('TCustomForm.WMActivate ',Name,':',ClassName,' ',Message.Active);
|
||||
{$ENDIF}
|
||||
if (FormStyle <> fsMDIForm) or (csDesigning in ComponentState) then
|
||||
SetActive(Message.Active {<> WA_INACTIVE});
|
||||
Activate;
|
||||
end;
|
||||
|
||||
@ -435,6 +446,23 @@ begin
|
||||
if Assigned(FOnDestroy) then FOnDestroy(Self);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
procedure TCustomForm.SetActive(AValue: Boolean);
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCustomForm.SetActive(AValue: Boolean);
|
||||
begin
|
||||
FActive := AValue;
|
||||
//if FActiveOleControl <> nil then
|
||||
// FActiveOleControl.Perform(CM_DOCWINDOWACTIVATE, Ord(Value), 0);
|
||||
if FActive then
|
||||
begin
|
||||
if (ActiveControl = nil) and not (csDesigning in ComponentState) then
|
||||
ActiveControl := FindNextControl(nil, True, True, False);
|
||||
//MergeMenu(True);
|
||||
SetWindowFocus;
|
||||
end;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TCustomForm.DoHide
|
||||
Params: none
|
||||
@ -768,6 +796,13 @@ Begin
|
||||
RaiseGDBException(SCannotFocus);
|
||||
// EInvalidOperation.Create(SCannotFocus);
|
||||
FActiveControl := AWinControl;
|
||||
{$IFDEF VerboseFocus}
|
||||
write('TCustomForm.SetActiveControl ',Name,':',ClassName,' ');
|
||||
if FActiveControl<>nil then
|
||||
writeln('FActiveControl=',FActiveControl.Name,':',FActiveControl.ClassName)
|
||||
else
|
||||
writeln('FActiveControl=nil');
|
||||
{$ENDIF}
|
||||
if not (csLoading in ComponentState) then
|
||||
begin
|
||||
if FActive then SetWindowFocus;
|
||||
@ -1225,6 +1260,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.80 2002/12/28 12:42:38 mattias
|
||||
focus fixes, reduced lpi size
|
||||
|
||||
Revision 1.79 2002/12/28 11:29:47 mattias
|
||||
xmlcfg deletion, focus fixes
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user