[Notes2-team] =?ISO-8859-1?Q?Not=EDcias_quent=EDsssisssiisssssimas?=
Brought to you by:
andersonrb
|
From: Anderson R. B. <no...@ig...> - 2003-11-24 02:18:18
|
{
eu usei uma array din=E2mica pra guardar os resultados da busca aki...
SetLength( MyArray, Length(MyArray) + 1 );
MyArray[ High(MyArray) ] :=3D 'jonas';
}
//
// TNotesBehaviour - Classe que permite controlar
// o comportamento do SynEdit.
//
// Notes, http://notes.codigolivre.org.br
// Copyright (C) 2003-2004, Equipe do Notes.
//
// This program is free software; you can redistribute it and/or modif=
y
// it under the terms of the GNU General Public License as published b=
y
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-130=
7 USA
//
//
// The Original Code is: SynEditPythonBehaviour.pas, released 2000-06-=
23.
// The Original Code is based on odPythonBehaviour.pas by Olivier Deck=
myn, part
// of the mwEdit component suite.
//
// Contributors to the SynEdit and mwEdit projects are listed in the
// Contributors.txt file.
unit NotesBehaviour;
interface
uses
SysUtils, Classes, Windows, Messages, Graphics,
Controls, Forms, Dialogs, SynEdit, SynEditKeyCmds;
const
ecNotesIndent =3D ecUserFirst + 999;
type
TNotesBehaviour =3D class(TComponent)
private
fEditor: TSynEdit;
fFormerKeyPress: TKeyPressEvent;
fFormProcessUserCommand: TProcessCommandEvent;
fIndent: integer;
fCloseHTMLTags: boolean;
fAutoclose: boolean;
fDefaultComment: string;
fNoBackspaceAtLineStart: boolean;
fCanVKLeftGoUp: boolean;
fHighlightLine: boolean;
fBlockIndent: boolean;
fHighlightSymbols: boolean;
fWebHelp: string;
fBlockEndTokens: string;
fBlockStartTokens: string;
fSymbolscolor: TColor;
fHLineColor: TColor;
fBlockStart: Array of string;
fBlockEnd: Array of String;
function GetTabAsSpace: boolean;
function GetTabIndent: boolean;
function GetTabSize: integer;
procedure SetAutoClose(const Value: boolean);
procedure SetCloseHTMLTags(const Value: boolean);
procedure SetTabAsSpace(const Value: boolean);
procedure SetTabIndent(const Value: boolean);
function GetAutoIndent: boolean;
function GetCursorPastEof: boolean;
function GetCursorPastEol: boolean;
procedure SetAutoIndent(const Value: boolean);
procedure setBlockEndTokens(const Value: string);
procedure SetBlockIndent(const Value: boolean);
procedure setBlockStartTokens(const Value: string);
procedure SetCurosrPastEol(const Value: boolean);
procedure SetCursorPastEof(const Value: boolean);
procedure SetHighlightLine(const Value: boolean);
procedure SetHLineColor(const Value: TColor);
procedure SetSymbolsColor(const Value: TColor);
procedure SetCursorPastEol(const Value: boolean);
procedure SetSynEditorOption(AOption: TSynEditorOption; Value: boolea=
n);
function GetSynEditorOptionValue(AOption: TSynEditorOption): boolean=
;
protected
procedure SetEditor(Value: TSynEdit); virtual;
procedure doKeyPress(Sender: TObject; var Key: Char); virtual;
procedure doProcessUserCommand(Sender: TObject;
var Command: TSynEditorCommand; var AChar: Char; Data: Pointer); vi=
rtual;
public
procedure Loaded; override;
procedure AttachFormerEvents;
constructor Create(aOwner: TComponent); override;
procedure Notification(AComponent: TComponent; Operation: TOperation)=
;
override;
procedure LoadFromFile(AFile: string);
procedure SaveToFile (AFile: string);
function ExecuteWebHelp: boolean;
published
property SynEditor: TSynEdit read FEditor write SetEditor;
property IndentSize: integer read fIndent write fIndent default 4;
property TabSize: integer read GetTabSize write GetTabSize default 8;
property TabAsSpace: boolean read GetTabAsSpace write SetTabAsSpace;
property TabIndent: boolean read GetTabIndent write SetTabIndent;
property DefaultComment: string read fDefaultComment write fDefaultCo=
mment;
property CloseHTMLTags: boolean read fCloseHTMLTags write SetCloseHTM=
LTags;
property AutoClose: boolean read fAutoclose write SetAutoClose;
property highlightSymbols: boolean read fHighlightSymbols write fHigh=
lightSymbols;
property highlightLine: boolean read fHighlightLine write SetHighlig=
htLine;
property highlightSymbolsColor: TColor read fSymbolscolor write SetSy=
mbolsColor;
property highlightLineColor: TColor read fHLineColor write SetHLineCo=
lor;
property CursorPastEol: boolean read GetCursorPastEol write SetCurosr=
PastEol;
property CursorPastEof: boolean read GetCursorPastEof write SetCursor=
PastEof;
property CanVKLeftGoUp: boolean read fCanVKLeftGoUp write fCanVKLeftG=
oUp;
property NoBackspaceAtLineStart: boolean read fNoBackspaceAtLineStart=
write fNoBackspaceAtLineStart;
property AutoIndent: boolean read GetAutoIndent write SetAutoIndent;
property BlockIndent: boolean read fBlockIndent write SetBlockIndent;
property BlockStartTokens: string read fBlockStartTokens write setBlo=
ckStartTokens;
property BlockEndTokens: string read fBlockEndTokens write setBlockEn=
dTokens;
property WebHelp: string read fWebHelp write fWebHelp;
end;
procedure Register;
implementation
uses
ShellApi;
procedure Register;
begin
RegisterComponents('notes 2004', [TNotesBehaviour]);
end;
{ TNotesBehaviour }
//-----------------------------------------------------------------
(**
* Procedimento: TNotesBehaviour.AttachFormerEvents
* Descri=E7=E3o: Anexa-se aos eventos do SynEdit
* Autor: Anderson R. Barbieri
* Data: 23-nov-2003
* Argumentos: None
* Resultado: None
*)
procedure TNotesBehaviour.AttachFormerEvents;
begin
if assigned(FEditor) then begin
FFormerKeyPress :=3D FEditor.OnKeyPress;
FFormProcessUserCommand :=3D FEditor.OnProcessUserCommand;
FEditor.OnKeyPress :=3D doKeyPress;
FEditor.OnProcessUserCommand :=3D doProcessUserCommand;
end;
end;
//-----------------------------------------------------------------
(**
* Procedimento: TNotesBehaviour.Create
* Descri=E7=E3o: Inicializa o componente
* Autor: Anderson R. Barbieri
* Data: 23-nov-2003
* Argumentos: aOwner: TComponent
* Resultado: None
*)
constructor TNotesBehaviour.Create(aOwner: TComponent);
begin
inherited Create(AOwner);
FFormerKeyPress :=3D nil;
FFormProcessUserCommand :=3D nil;
fIndent :=3D 4;
end;
//-----------------------------------------------------------------
(**
* Procedimento: TNotesBehaviour.SetEditor
* Descri=E7=E3o: Seta o SynEdit ao qual estar=E1 anexado
* Autor: Anderson R. Barbieri
* Data: 23-nov-2003
* Argumentos: Value: TSynEdit
* Resultado: None
*)
procedure TNotesBehaviour.SetEditor(Value: TSynEdit);
begin
if FEditor <> Value then begin
if not (csDesigning in ComponentState) and not (csLoading in Componen=
tState)
and assigned(FEditor)
then begin
if assigned(FFormerKeyPress) then begin
FEditor.OnKeypress :=3D FFormerKeyPress;
FFormerKeyPress :=3D nil;
end;
if assigned(FFormProcessUserCommand) then begin
FEditor.OnProcessUserCommand :=3D FFormProcessUserCommand;
FFormProcessUserCommand :=3D nil;
end;
end;
FEditor :=3D Value;
if ComponentState * [csDesigning, csLoading] =3D [] then
AttachFormerEvents;
end;
end;
//-----------------------------------------------------------------
(**
* Procedimento: TNotesBehaviour.doKeyPress
* Descri=E7=E3o:
* Autor: Anderson R. Barbieri
* Data: 23-nov-2003
* Argumentos: Sender: TObject; var Key: Char
* Resultado: None
*)
procedure TNotesBehaviour.doKeyPress(Sender: TObject; var Key: Char);
begin
//
end;
//-----------------------------------------------------------------
(**
* Procedimento: TNotesBehaviour.doProcessUserCommand
* Descri=E7=E3o:
* Autor: Anderson R. Barbieri
* Data: 23-nov-2003
* Argumentos: Sender: TObject; var Command: TSynEditorCommand; var ACh=
ar: Char; Data: Pointer
* Resultado: None
*)
procedure TNotesBehaviour.doProcessUserCommand(Sender: TObject;
var Command: TSynEditorCommand; var AChar: Char; Data: Pointer);
begin
//
end;
//-----------------------------------------------------------------
(**
* Procedimento: TNotesBehaviour.ExecuteWebHelp
* Descri=E7=E3o: Executa a Web Help
* Autor: Anderson R. Barbieri
* Data: 23-nov-2003
* Argumentos: None
* Resultado: boolean
*)
function TNotesBehaviour.ExecuteWebHelp: boolean;
Var
S: string;
begin
if fEditor =3D nil then Exit;
if fEditor.SelEnd > fEditor.SelStart then
S:=3D fEditor.SelText
else
S:=3D fEditor.WordAtCursor;
S:=3D StringReplace(fWebSearch, '%ss%', S, [rfReplaceAll, rfIgnoreCase]=
);
ShellExecute(fEditor.Handle, 'open', PChar(S), PChar(''), nil, SW_SHOWN=
ORMAL);
end;
//-----------------------------------------------------------------
(**
* Procedimento: TNotesBehaviour.Loaded
* Descri=E7=E3o:
* Autor: Anderson R. Barbieri
* Data: 23-nov-2003
* Argumentos: None
* Resultado: None
*)
procedure TNotesBehaviour.Loaded;
begin
inherited;
//
end;
//-----------------------------------------------------------------
(**
* Procedimento: TNotesBehaviour.Notification
* Descri=E7=E3o: Suporte para quando o componente=B4for removido
* Autor: Anderson R. Barbieri
* Data: 23-nov-2003
* Argumentos: AComponent: TComponent; Operation: TOperation
* Resultado: None
*)
procedure TNotesBehaviour.Notification(AComponent: TComponent;
Operation: TOperation);
begin
if (Operation =3D opRemove) and (aComponent =3D FEditor) then
FEditor :=3D nil;
inherited
end;
//=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
//
// PROCEDIMENTOS PARA SALVAR/CARREGAR OP=C7=D5ES
//
//=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
//-----------------------------------------------------------------
(**
* Procedimento: TNotesBehaviour.LoadFromFile
* Descri=E7=E3o:
* Autor: Anderson R. Barbieri
* Data: 23-nov-2003
* Argumentos: AFile: string
* Resultado: None
*)
procedure TNotesBehaviour.LoadFromFile(AFile: string);
begin
//
end;
//-----------------------------------------------------------------
(**
* Procedimento: TNotesBehaviour.SaveToFile
* Descri=E7=E3o:
* Autor: Anderson R. Barbieri
* Data: 23-nov-2003
* Argumentos: AFile: string
* Resultado: None
*)
procedure TNotesBehaviour.SaveToFile(AFile: string);
begin
//
end;
//=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
//
// GET/SET DAS PROPRIEDADES INTRODUZIDAS PELO COMPONENTE
// LIGADAS A NOVOS COMPORTAMENTOS E OP=C7=D5ES, ETC.
//
//=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
//-----------------------------------------------------------------
(**
* Procedimento: TNotesBehaviour.SetAutoClose
* Descri=E7=E3o:
* Autor: Anderson R. Barbieri
* Data: 23-nov-2003
* Argumentos: const Value: boolean
* Resultado: None
*)
procedure TNotesBehaviour.SetAutoClose(const Value: boolean);
begin
fAutoclose :=3D Value;
end;
//-----------------------------------------------------------------
(**
* Procedimento: TNotesBehaviour.setBlockEndTokens
* Descri=E7=E3o:
* Autor: Anderson R. Barbieri
* Data: 22-nov-2003
* Argumentos: const Value: string
* Resultado: None
*)
procedure TNotesBehaviour.setBlockEndTokens(const Value: string);
Var
Len, I, SCount, V: integer;
begin
fBlockEndTokens :=3D Trim(Value);
Len:=3D length(fBlockEndTokens);
if Len =3D 0 then
begin
SetLength(fBlockEnd, 0);
Exit;
end;
// descobrimos quantos tokens possu=ED a string
SCount:=3D 1;
for I:=3D1 to Len+1 do
if fBlockEndTokens[I]=3D #32 then
inc(SCount);
// setamos o n=FAmero de items do array conforme SCount
Setlength(fBlockEnd, SCount);
if SCount < 1 then
begin
SCount:=3D 1;
V:=3D 0;
// pegamos cada um dos tokens, que est=E3o separados por espa=E7os
for I:=3D to Len do
if fBlockEndTokens[I]=3D #32 then
begin
fBlockEnd[V]=3D Copy(fBlockEndtokens, SCount, I-1);
inc(V);
SCount:=3D I +1;
end;
end else
begin
// pequena otimiza=E7=E3o para casos em que temos apenas um token
fBlockend[0]=3D fBlockEndTokens;
end;
end;
//-----------------------------------------------------------------
(**
* Procedimento: TNotesBehaviour.SetBlockIndent
* Descri=E7=E3o:
* Autor: Anderson R. Barbieri
* Data: 22-nov-2003
* Argumentos: const Value: boolean
* Resultado: None
*)
procedure TNotesBehaviour.SetBlockIndent(const Value: boolean);
begin
fBlockIndent :=3D Value;
end;
//-----------------------------------------------------------------
(**
* Procedimento: TNotesBehaviour.setBlockStartTokens
* Descri=E7=E3o:
* Autor: Anderson R. Barbieri
* Data: 22-nov-2003
* Argumentos: const Value: string
* Resultado: None
*)
procedure TNotesBehaviour.setBlockStartTokens(const Value: string);
begin
fBlockStartTokens :=3D Value;
end;
//-----------------------------------------------------------------
(**
* Procedimento: TNotesBehaviour.SetCloseHTMLTags
* Descri=E7=E3o:
* Autor: Anderson R. Barbieri
* Data: 22-nov-2003
* Argumentos: const Value: boolean
* Resultado: None
*)
procedure TNotesBehaviour.SetCloseHTMLTags(const Value: boolean);
begin
fCloseHTMLTags :=3D Value;
end;
//-----------------------------------------------------------------
(**
* Procedimento: TNotesBehaviour.SetHighlightLine
* Descri=E7=E3o:
* Autor: Anderson R. Barbieri
* Data: 22-nov-2003
* Argumentos: const Value: boolean
* Resultado: None
*)
procedure TNotesBehaviour.SetHighlightLine(const Value: boolean);
begin
if fEditor =3D nil then Exit;
fHighlightLine :=3D Value;
end;
//-----------------------------------------------------------------
(**
* Procedimento: TNotesBehaviour.SetHLineColor
* Descri=E7=E3o:
* Autor: Anderson R. Barbieri
* Data: 22-nov-2003
* Argumentos: const Value: TColor
* Resultado: None
*)
procedure TNotesBehaviour.SetHLineColor(const Value: TColor);
begin
if fEditor =3D nil then Exit;
fHLineColor :=3D Value;
end;
(**
* Procedimento: TNotesBehaviour.SetSymbolsColor
* Descri=E7=E3o:
* Autor: Anderson R. Barbieri
* Data: 22-nov-2003
* Argumentos: const Value: TColor
* Resultado: None
*)
procedure TNotesBehaviour.SetSymbolsColor(const Value: TColor);
begin
if fEditor =3D nil then Exit;
fSymbolscolor :=3D Value;
end;
//-----------------------------------------------------------------
(**
* Procedimento: TNotesBehaviour.GetTabSize
* Descri=E7=E3o:
* Autor: Anderson R. Barbieri
* Data: 23-nov-2003
* Argumentos: None
* Resultado: integer
*)
function TNotesBehaviour.GetTabSize: integer;
begin
if fEditor =3D nil then Exit;
Result:=3D fEditor.TabWidth;
end;
//=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
//
// O C=D3DIGO ABAIXO SERVE PARA LER/ESCREVER NAS
// OP=C7=D5ES DO SYNEDIT DO TIPO TSynEditorOption
//
//=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
//-----------------------------------------------------------------
(**
* Procedimento: TNotesBehaviour.SetSynEditorOption
* Descri=E7=E3o: Seta uma op=E7=E3o do tipo TSynEditorOption do Edito=
r
* Autor: Anderson R. Barbieri
* Data: 23-nov-2003
* Argumentos: AOption: TSynEditorOption; Value: boolean
* Resultado: None
*)
procedure TNotesBehaviour.SetSynEditorOption(AOption: TSynEditorOption;
Value: boolean);
begin
if fEditor =3D nil then Exit;
if value then
begin
if [AOption] in fEditor.Options then
fEditor.Options :=3D fEditor.Options + [AOption];
end else
fEditor.Options :=3D fEditor.Options - [AOption];
end;
//-----------------------------------------------------------------
(**
* Procedimento: TNotesBehaviour.SetCursorPastEol
* Descri=E7=E3o: Seta a op=E7=E3o eoScrollPastEol do SynEdit
* Autor: Anderson R. Barbieri
* Data: 22-nov-2003
* Argumentos: const Value: boolean
* Resultado: None
*)
procedure TNotesBehaviour.SetCursorPastEol(const Value: boolean);
begin
SetSynEditorOption(eoScrollPastEol, Value);
end;
//-----------------------------------------------------------------
(**
* Procedimento: TNotesBehaviour.SetCursorPastEof
* Descri=E7=E3o: Seta a op=E7=E3o eoScrollPastEof do SynEdit
* Autor: Anderson R. Barbieri
* Data: 22-nov-2003
* Argumentos: const Value: boolean
* Resultado: None
*)
procedure TNotesBehaviour.SetCursorPastEof(const Value: boolean);
begin
SetSynEditorOption(eoScrollPastEof, Value);
end;
//-----------------------------------------------------------------
(**
* Procedimento: TNotesBehaviour.SetTabAsSpace
* Descri=E7=E3o: Seta a op=E7=E3o eoTabsToSpaces do SynEdit
* Autor: Anderson R. Barbieri
* Data: 22-nov-2003
* Argumentos: const Value: boolean
* Resultado: None
*)
procedure TNotesBehaviour.SetTabAsSpace(const Value: boolean);
begin
SetSynEditorOption(eoTabsToSpaces, Value);
end;
//-----------------------------------------------------------------
(**
* Procedimento: TNotesBehaviour.SetTabIndent
* Descri=E7=E3o: Seta eoTabIndent no SynEdit
* Autor: Anderson R. Barbieri
* Data: 22-nov-2003
* Argumentos: const Value: boolean
* Resultado: None
*)
procedure TNotesBehaviour.SetTabIndent(const Value: boolean);
begin
SetSynEditorOption(eoTabIndent, Value);
end;
//-----------------------------------------------------------------
(**
* Procedimento: TNotesBehaviour.SetCurosrPastEol
* Descri=E7=E3o: Seta eoScrollPastEol no SynEdit
* Autor: Anderson R. Barbieri
* Data: 23-nov-2003
* Argumentos: const Value: boolean
* Resultado: None
*)
procedure TNotesBehaviour.SetCurosrPastEol(const Value: boolean);
begin
SetSynEditorOption(eoScrollPastEol, Value);
end;
//-----------------------------------------------------------------
(**
* Procedimento: TNotesBehaviour.SetAutoIndent
* Descri=E7=E3o: Seta a op=E7=E3o eoAutoIndent do SynEdit
* Autor: Anderson R. Barbieri
* Data: 22-nov-2003
* Argumentos: const Value: boolean
* Resultado: None
*)
procedure TNotesBehaviour.SetAutoIndent(const Value: boolean);
begin
SetSynEditorOption(eoScrollPastEol, Value);
end;
//-----------------------------------------------------------------
(**
* Procedimento: TNotesBehaviour.GetSynEditorOptionValue
* Descri=E7=E3o: Pega op=E7=E3o do tipo TSynEditorOption do SynEdit
* Autor: Anderson R. Barbieri
* Data: 23-nov-2003
* Argumentos: AOption: TSynEditorOption
* Resultado: boolean
*)
function TNotesBehaviour.GetSynEditorOptionValue(
AOption: TSynEditorOption): boolean;
begin
Result:=3D False;
if fEditor =3D nil then Exit;
if [eoAutoIndent] in fEditor.Options then
result:=3D true;
end;
//-----------------------------------------------------------------
(**
* Procedimento: TNotesBehaviour.GetAutoIndent
* Descri=E7=E3o: Retorna o valor da op=E7=E3o eoAutoIndent do SynEdit
* Autor: Anderson R. Barbieri
* Data: 23-nov-2003
* Argumentos: None
* Resultado: boolean
*)
function TNotesBehaviour.GetAutoIndent: boolean;
begin
Result:=3D GetSynEditorOptionValue(eoAutoIndent);
end;
//-----------------------------------------------------------------
(**
* Procedimento: TNotesBehaviour.GetCursorPastEof
* Descri=E7=E3o: Pega a op=E7=E3o eoScrollPastEof do SynEdit
* Autor: Anderson R. Barbieri
* Data: 23-nov-2003
* Argumentos: None
* Resultado: boolean
*)
function TNotesBehaviour.GetCursorPastEof: boolean;
begin
Result:=3D GetSynEditorOptionValue(eoScrollPastEof);
end;
//-----------------------------------------------------------------
(**
* Procedimento: TNotesBehaviour.GetCursorPastEol
* Descri=E7=E3o: Pega a op=E7=E3o eoScrollPastEol do SynEdit
* Autor: Anderson R. Barbieri
* Data: 23-nov-2003
* Argumentos: None
* Resultado: boolean
*)
function TNotesBehaviour.GetCursorPastEol: boolean;
begin
Result:=3D GetSynEditorOptionValue(eoScrollPastEol);
end;
//-----------------------------------------------------------------
(**
* Procedimento: TNotesBehaviour.GetTabAsSpace
* Descri=E7=E3o: Pega a op=E7=E3o eoTabsToSpaces do SynEdit
* Autor: Anderson R. Barbieri
* Data: 23-nov-2003
* Argumentos: None
* Resultado: boolean
*)
function TNotesBehaviour.GetTabAsSpace: boolean;
begin
Result:=3D GetSynEditorOptionValue(eoTabsToSpaces);
end;
//-----------------------------------------------------------------
(**
* Procedimento: TNotesBehaviour.GetTabIndent
* Descri=E7=E3o: Pega a op=E7=E3o eoTabIndent do SynEdit
* Autor: Anderson R. Barbieri
* Data: 23-nov-2003
* Argumentos: None
* Resultado: boolean
*)
function TNotesBehaviour.GetTabIndent: boolean;
begin
Result:=3D GetSynEditorOptionValue(eoTabIndent);
end;
end.
|