mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-08 14:35:58 +02:00
MG: fixed persistent caret and implemented Form.BorderStyle=bsNone
git-svn-id: trunk@1744 -
This commit is contained in:
parent
c570141b4b
commit
930552f748
@ -469,7 +469,11 @@ begin
|
||||
Canvas.Draw(1, 1, bitmap);
|
||||
// draw a rectangle around the window
|
||||
{$ENDIF}
|
||||
Canvas.Pen.Color := ClBlack;
|
||||
{$IFDEF SYN_LAZARUS}
|
||||
Canvas.Pen.Color := TextColor;
|
||||
{$ELSE}
|
||||
Canvas.Pen.Color := clBlack;
|
||||
{$ENDIF}
|
||||
Canvas.Moveto(0, 0);
|
||||
Canvas.LineTo(Width - 1, 0);
|
||||
Canvas.LineTo(Width - 1, Height - 1);
|
||||
|
@ -1811,7 +1811,7 @@ begin
|
||||
BeginDrag(false);
|
||||
end;
|
||||
end else if (ssLeft in Shift) and MouseCapture then begin
|
||||
//writeln('AAA TCustomSynEdit.MouseMove CAPTURE Mouse=',X,',',Y,' Caret=',CaretX,',',CaretY,', BlockBegin=',BlockBegin.X,',',BlockBegin.Y,' BlockEnd=',BlockEnd.X,',',BlockEnd.Y,' Client=',ClientWidth-ScrollBarWidth,',',ClientHeight-ScrollBarWidth);
|
||||
//writeln(' TCustomSynEdit.MouseMove CAPTURE Mouse=',X,',',Y,' Caret=',CaretX,',',CaretY,', BlockBegin=',BlockBegin.X,',',BlockBegin.Y,' BlockEnd=',BlockEnd.X,',',BlockEnd.Y,' Client=',ClientWidth-ScrollBarWidth,',',ClientHeight-ScrollBarWidth);
|
||||
if (X >= fGutterWidth)
|
||||
and (X < ClientWidth{$IFDEF SYN_LAZARUS}-ScrollBarWidth{$ENDIF})
|
||||
and (Y >= 0)
|
||||
@ -3601,16 +3601,17 @@ end;
|
||||
|
||||
procedure TCustomSynEdit.ShowCaret;
|
||||
begin
|
||||
//writeln(' [TCustomSynEdit.ShowCaret] ShowCaret ',Name,' ',sfCaretVisible in fStateFlags);
|
||||
if not (eoNoCaret in Options) and not (sfCaretVisible in fStateFlags) then
|
||||
begin
|
||||
if {$IFDEF SYN_LAZARUS}LCLLinux{$ELSE}Windows{$ENDIF}.ShowCaret(Handle) then
|
||||
begin
|
||||
//writeln('[TCustomSynEdit.ShowCaret] A ',Name);
|
||||
Include(fStateFlags, sfCaretVisible)
|
||||
end;
|
||||
{$IFDEF SYN_LAZARUS}
|
||||
SetCaretRespondToFocus(Handle,not (eoPersistentCaret in fOptions));
|
||||
{$ENDIF}
|
||||
if {$IFDEF SYN_LAZARUS}LCLLinux{$ELSE}Windows{$ENDIF}.ShowCaret(Handle) then
|
||||
begin
|
||||
//writeln('[TCustomSynEdit.ShowCaret] A ',Name);
|
||||
Include(fStateFlags, sfCaretVisible);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -3637,10 +3638,10 @@ begin
|
||||
{$ELSE}
|
||||
SetCaretPos(CX, CY);
|
||||
{$ENDIF}
|
||||
//writeln('[TCustomSynEdit.UpdateCaret] ShowCaret ',Name);
|
||||
//writeln(' [TCustomSynEdit.UpdateCaret] ShowCaret ',Name);
|
||||
ShowCaret;
|
||||
end else begin
|
||||
//writeln('[TCustomSynEdit.UpdateCaret] HideCaret ',Name);
|
||||
//writeln(' [TCustomSynEdit.UpdateCaret] HideCaret ',Name);
|
||||
HideCaret;
|
||||
{$IFDEF SYN_LAZARUS}
|
||||
SetCaretPosEx(Handle,CX, CY);
|
||||
|
@ -5082,7 +5082,7 @@ begin
|
||||
SaveCurCodeTemplate;
|
||||
|
||||
// save all values
|
||||
SynOptions:=PreviewEdits[1].Options;
|
||||
SynOptions:=PreviewEdits[1].Options-[eoNoSelection,eoNoCaret];
|
||||
if BracketHighlightCheckBox.Checked then
|
||||
Include(SynOptions,eoBracketHighlight)
|
||||
else
|
||||
|
@ -82,13 +82,26 @@ end;
|
||||
is used for the second part of the initialization of a widget.
|
||||
-------------------------------------------------------------------------------}
|
||||
function GTKRealizeCB(Widget: PGtkWidget; Data: Pointer): GBoolean; cdecl;
|
||||
var
|
||||
WinWidgetInfo: PWinWidgetInfo;
|
||||
begin
|
||||
EventTrace('realize', nil);
|
||||
// set extra signal masks after the widget window is created
|
||||
// define extra events we're interrested in
|
||||
WinWidgetInfo:=GetWidgetInfo(Widget,true);
|
||||
gdk_window_set_events(Widget^.Window,
|
||||
gdk_window_get_events(Widget^.Window) or TGdkEventMask(Data));
|
||||
|
||||
gdk_window_get_events(Widget^.Window) or WinWidgetInfo^.EventMask);
|
||||
|
||||
if Data<>nil then begin
|
||||
if TObject(Data) is TWinControl then begin
|
||||
if TWinControl(Data) is TCustomForm then begin
|
||||
if TCustomForm(Data).BorderStyle=bsNone then begin
|
||||
gdk_window_set_decorations(Widget^.Window,0);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
@ -1910,6 +1923,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.83 2002/06/09 14:00:41 lazarus
|
||||
MG: fixed persistent caret and implemented Form.BorderStyle=bsNone
|
||||
|
||||
Revision 1.82 2002/06/09 07:08:43 lazarus
|
||||
MG: fixed window jumping
|
||||
|
||||
|
@ -109,6 +109,7 @@ type
|
||||
Style: Integer;
|
||||
ExStyle: Integer;
|
||||
UserData: Integer;
|
||||
EventMask: TGdkEventMask;
|
||||
end;
|
||||
|
||||
// clipboard
|
||||
@ -141,6 +142,9 @@ end.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.9 2002/06/09 14:00:41 lazarus
|
||||
MG: fixed persistent caret and implemented Form.BorderStyle=bsNone
|
||||
|
||||
Revision 1.8 2002/06/04 15:17:23 lazarus
|
||||
MG: improved TFont for XLFD font names
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user