Skip to content

Commit

Permalink
Update SynEdit component code to v2.0.9 beta from https://github.com/…
Browse files Browse the repository at this point in the history
…SynEdit/SynEdit/releases/tag/SynEdit-2.0.9-beta . Just a few additional highlighter keywords and one code change for background coloring included.
  • Loading branch information
ansgarbecker committed Feb 4, 2017
1 parent 6e9778c commit 712054a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 14 deletions.
28 changes: 20 additions & 8 deletions components/synedit/Source/SynCompletionProposal.pas
Expand Up @@ -162,6 +162,7 @@ TSynBaseCompletionProposalForm = class(TSynForm)
fClSelectText: TColor; fClSelectText: TColor;
FClTitleBackground: TColor; FClTitleBackground: TColor;
fClBackGround: TColor; fClBackGround: TColor;
fClBackgroundBorder: TColor;
Bitmap: TBitmap; // used for drawing Bitmap: TBitmap; // used for drawing
TitleBitmap: TBitmap; // used for title-drawing TitleBitmap: TBitmap; // used for title-drawing
FCurrentEditor: TCustomSynEdit; FCurrentEditor: TCustomSynEdit;
Expand Down Expand Up @@ -274,6 +275,7 @@ TSynBaseCompletionProposalForm = class(TSynForm)
property ClSelect: TColor read FClSelect write FClSelect default clHighlight; property ClSelect: TColor read FClSelect write FClSelect default clHighlight;
property ClSelectedText: TColor read FClSelectText write FClSelectText default clHighlightText; property ClSelectedText: TColor read FClSelectText write FClSelectText default clHighlightText;
property ClBackground: TColor read FClBackGround write FClBackGround default clWindow; property ClBackground: TColor read FClBackGround write FClBackGround default clWindow;
property ClBackgroundBorder: TColor read fClBackgroundBorder write fClBackgroundBorder default clBtnFace;
property ClTitleBackground: TColor read FClTitleBackground write FClTitleBackground default clBtnFace; property ClTitleBackground: TColor read FClTitleBackground write FClTitleBackground default clBtnFace;
property ItemHeight: Integer read FItemHeight write SetItemHeight default 0; property ItemHeight: Integer read FItemHeight write SetItemHeight default 0;
property Margin: Integer read FMargin write FMargin default 2; property Margin: Integer read FMargin write FMargin default 2;
Expand Down Expand Up @@ -338,8 +340,8 @@ TSynBaseCompletionProposal = class(TComponent)
procedure SetParameterToken(const Value: TCompletionParameter); procedure SetParameterToken(const Value: TCompletionParameter);
function GetDefaultKind: SynCompletionType; function GetDefaultKind: SynCompletionType;
procedure SetDefaultKind(const Value: SynCompletionType); procedure SetDefaultKind(const Value: SynCompletionType);
function GetClBack: TColor; function GetClBack(AIndex: Integer): TColor;
procedure SetClBack(const Value: TColor); procedure SetClBack(AIndex: Integer; const Value: TColor);
function GetClSelectedText: TColor; function GetClSelectedText: TColor;
procedure SetClSelectedText(const Value: TColor); procedure SetClSelectedText(const Value: TColor);
function GetEndOfTokenChar: UnicodeString; function GetEndOfTokenChar: UnicodeString;
Expand Down Expand Up @@ -407,7 +409,8 @@ TSynBaseCompletionProposal = class(TComponent)
property NbLinesInWindow: Integer read FNbLinesInWindow write SetNbLinesInWindow default 8; property NbLinesInWindow: Integer read FNbLinesInWindow write SetNbLinesInWindow default 8;
property ClSelect: TColor read GetClSelect write SetClSelect default clHighlight; property ClSelect: TColor read GetClSelect write SetClSelect default clHighlight;
property ClSelectedText: TColor read GetClSelectedText write SetClSelectedText default clHighlightText; property ClSelectedText: TColor read GetClSelectedText write SetClSelectedText default clHighlightText;
property ClBackground: TColor read GetClBack write SetClBack default clWindow; property ClBackground: TColor index 1 read GetClBack write SetClBack default clWindow;
property ClBackgroundBorder: TColor index 2 read GetClBack write SetClBack default clBtnFace;
property ClTitleBackground: TColor read GetClTitleBackground write SetClTitleBackground default clBtnFace; property ClTitleBackground: TColor read GetClTitleBackground write SetClTitleBackground default clBtnFace;
property Width: Integer read FWidth write SetWidth default 260; property Width: Integer read FWidth write SetWidth default 260;
property EndOfTokenChr: UnicodeString read GetEndOfTokenChar write SetEndOfTokenChar; property EndOfTokenChr: UnicodeString read GetEndOfTokenChar write SetEndOfTokenChar;
Expand Down Expand Up @@ -1270,6 +1273,7 @@ constructor TSynBaseCompletionProposalForm.Create(AOwner: TComponent);
ClSelect := clHighlight; ClSelect := clHighlight;
ClSelectedText := clHighlightText; ClSelectedText := clHighlightText;
ClBackground := clWindow; ClBackground := clWindow;
ClBackgroundBorder := clBtnFace;
ClTitleBackground := clBtnFace; ClTitleBackground := clBtnFace;




Expand Down Expand Up @@ -1654,7 +1658,7 @@ procedure TSynBaseCompletionProposalForm.Paint;
with Bitmap do with Bitmap do
begin begin
ResetCanvas; ResetCanvas;
Canvas.Pen.Color := clBtnFace; Canvas.Pen.Color := fClBackgroundBorder;
Canvas.Rectangle(0, 0, ClientWidth - FScrollbar.Width, ClientHeight); Canvas.Rectangle(0, 0, ClientWidth - FScrollbar.Width, ClientHeight);
for i := 0 to Min(FLinesInWindow - 1, FAssignedList.Count - 1) do for i := 0 to Min(FLinesInWindow - 1, FAssignedList.Count - 1) do
begin begin
Expand Down Expand Up @@ -2655,14 +2659,22 @@ procedure TSynBaseCompletionProposal.DefineProperties(Filer: TFiler);
{$ENDIF} {$ENDIF}
end; end;


function TSynBaseCompletionProposal.GetClBack: TColor; function TSynBaseCompletionProposal.GetClBack(AIndex: Integer): TColor;
begin begin
Result := Form.ClBackground; case AIndex of
1: Result := Form.ClBackground;
2: Result := Form.ClBackgroundBorder;
else
Result := clNone;
end;
end; end;


procedure TSynBaseCompletionProposal.SetClBack(const Value: TColor); procedure TSynBaseCompletionProposal.SetClBack(AIndex: Integer; const Value: TColor);
begin begin
Form.ClBackground := Value case AIndex of
1: Form.ClBackground := Value;
2: Form.ClBackgroundBorder := Value;
end;
end; end;


function TSynBaseCompletionProposal.GetClSelectedText: TColor; function TSynBaseCompletionProposal.GetClSelectedText: TColor;
Expand Down
12 changes: 6 additions & 6 deletions components/synedit/Source/SynHighlighterSQL.pas
Expand Up @@ -354,7 +354,7 @@ implementation
'FAST,FAST_START_IO_TARGET,FAST_START_MTTR_TARGET,' + 'FAST,FAST_START_IO_TARGET,FAST_START_MTTR_TARGET,' +
'FAST_START_PARALLEL_ROLLBACK,FILE,FILE_MAPPING,FILESYSTEMIO_OPTIONS,' + 'FAST_START_PARALLEL_ROLLBACK,FILE,FILE_MAPPING,FILESYSTEMIO_OPTIONS,' +
'FIXED_DATE,FLUSH,FOR,FORCE,FOREIGN,FORTRAN,FREELIST,FREELISTS,FRESH,' + 'FIXED_DATE,FLUSH,FOR,FORCE,FOREIGN,FORTRAN,FREELIST,FREELISTS,FRESH,' +
'FROM,FROM_TZ,FUNCTIONS,GC_FILES_TO_LOCKS,GENERATED,GLOBAL,' + 'FROM,FROM_TZ,FUNCTIONS,FULL,GC_FILES_TO_LOCKS,GENERATED,GLOBAL,' +
'GLOBAL_CONTEXT_POOL_SIZE,GLOBAL_NAME,GLOBAL_NAMES,GLOBALLY,GO,GRANT,' + 'GLOBAL_CONTEXT_POOL_SIZE,GLOBAL_NAME,GLOBAL_NAMES,GLOBALLY,GO,GRANT,' +
'GROUP,GROUPS,HASH,HASH_AREA_SIZE,HASH_JOIN_ENABLED,HASHKEYS,HAVING,HEAP,' + 'GROUP,GROUPS,HASH,HASH_AREA_SIZE,HASH_JOIN_ENABLED,HASHKEYS,HAVING,HEAP,' +
'HI_SHARED_MEMORY_ADDRESS,HIERARCHY,HS_AUTOREGISTER,IDENTIFIED,IDLE_TIME,' + 'HI_SHARED_MEMORY_ADDRESS,HIERARCHY,HS_AUTOREGISTER,IDENTIFIED,IDLE_TIME,' +
Expand All @@ -363,7 +363,7 @@ implementation
'INSTANCE_GROUPS,INSTANCE_NAME,INSTANCE_NUMBER,INT,INTERSECT,INTO,' + 'INSTANCE_GROUPS,INSTANCE_NAME,INSTANCE_NUMBER,INT,INTERSECT,INTO,' +
'INVALIDATE,IS,ISOLATION,JAVA,JAVA_MAX_SESSIONSPACE_SIZE,JAVA_POOL_SIZE,' + 'INVALIDATE,IS,ISOLATION,JAVA,JAVA_MAX_SESSIONSPACE_SIZE,JAVA_POOL_SIZE,' +
'JAVA_SOFT_SESSIONSPACE_LIMIT,JOB_QUEUE_PROCESSES,JOIN,KEEP,KEY,KILL,' + 'JAVA_SOFT_SESSIONSPACE_LIMIT,JOB_QUEUE_PROCESSES,JOIN,KEEP,KEY,KILL,' +
'LARGE_POOL_SIZE,LAYERLISTS,LEVEL,LIBRARY,LICENSE_MAX_SESSIONS,' + 'LARGE_POOL_SIZE,LAYERLISTS,LEFT,LEVEL,LIBRARY,LICENSE_MAX_SESSIONS,' +
'LICENSE_MAX_USERS,LICENSE_SESSIONS_WARNING,LIKE,LIMIT,LINK,LIST,LOB,' + 'LICENSE_MAX_USERS,LICENSE_SESSIONS_WARNING,LIKE,LIMIT,LINK,LIST,LOB,' +
'LOCAL,LOCAL_LISTENER,LOCATOR,LOCK,LOCK_NAME_SPACE,LOCK_SGA,' + 'LOCAL,LOCAL_LISTENER,LOCATOR,LOCK,LOCK_NAME_SPACE,LOCK_SGA,' +
'LOG_ARCHIVE_DEST,LOG_ARCHIVE_DUPLEX_DEST,LOG_ARCHIVE_FORMAT,' + 'LOG_ARCHIVE_DEST,LOG_ARCHIVE_DUPLEX_DEST,LOG_ARCHIVE_FORMAT,' +
Expand Down Expand Up @@ -394,7 +394,7 @@ implementation
'OPTION,OR,ORACLE_TRACE_COLLECTION_NAME,ORACLE_TRACE_COLLECTION_PATH,' + 'OPTION,OR,ORACLE_TRACE_COLLECTION_NAME,ORACLE_TRACE_COLLECTION_PATH,' +
'ORACLE_TRACE_COLLECTION_SIZE,ORACLE_TRACE_ENABLE,' + 'ORACLE_TRACE_COLLECTION_SIZE,ORACLE_TRACE_ENABLE,' +
'ORACLE_TRACE_FACILITY_NAME,ORACLE_TRACE_FACILITY_PATH,ORDER,' + 'ORACLE_TRACE_FACILITY_NAME,ORACLE_TRACE_FACILITY_PATH,ORDER,' +
'OS_AUTHENT_PREFIX,OS_ROLES,OUTLINE,OVERFLOW,OWN,PACKAGES,PARALLEL,' + 'OS_AUTHENT_PREFIX,OS_ROLES,OUTER,OUTLINE,OVERFLOW,OWN,PACKAGES,PARALLEL,' +
'PARALLEL_ADAPTIVE_MULTI_USER,PARALLEL_AUTOMATIC_TUNING,' + 'PARALLEL_ADAPTIVE_MULTI_USER,PARALLEL_AUTOMATIC_TUNING,' +
'PARALLEL_EXECUTION_MESSAGE_SIZE,PARALLEL_INSTANCE_GROUP,' + 'PARALLEL_EXECUTION_MESSAGE_SIZE,PARALLEL_INSTANCE_GROUP,' +
'PARALLEL_MAX_SERVERS,PARALLEL_MIN_PERCENT,PARALLEL_MIN_SERVERS,' + 'PARALLEL_MAX_SERVERS,PARALLEL_MIN_PERCENT,PARALLEL_MIN_SERVERS,' +
Expand All @@ -410,13 +410,13 @@ implementation
'PRIMARY,PRIOR,PRIVATE_SGA,PRIVILEGES,PROCESSES,PROFILE,PUBLIC,QUERY,' + 'PRIMARY,PRIOR,PRIVATE_SGA,PRIVILEGES,PROCESSES,PROFILE,PUBLIC,QUERY,' +
'QUERY_REWRITE_ENABLED,QUERY_REWRITE_INTEGRITY,QUIESCE,QUOTA,' + 'QUERY_REWRITE_ENABLED,QUERY_REWRITE_INTEGRITY,QUIESCE,QUOTA,' +
'RDBMS_SERVER_DN,READ,READ_ONLY_OPEN_DELAYED,REBUILD,RECORDS_PER_BLOCK,' + 'RDBMS_SERVER_DN,READ,READ_ONLY_OPEN_DELAYED,REBUILD,RECORDS_PER_BLOCK,' +
'RECOVER,RECOVERABLE,RECOVERY,RECOVERY_PARALLELISM,RECYCLE,REDUCED,' + 'RECOVER,RECOVERABLE,RECOVERY,RECOVERY_PARALLELISM,RECYCLE,RECYCLEBIN,REDUCED,' +
'REFERENCES,REFRESH,REGISTER,RELY,REMOTE_ARCHIVE_ENABLE,' + 'REFERENCES,REFRESH,REGISTER,RELY,REMOTE_ARCHIVE_ENABLE,' +
'REMOTE_DEPENDENCIES_MODE,REMOTE_LISTENER,REMOTE_LOGIN_PASSWORDFILE,' + 'REMOTE_DEPENDENCIES_MODE,REMOTE_LISTENER,REMOTE_LOGIN_PASSWORDFILE,' +
'REMOTE_OS_AUTHENT,REMOTE_OS_ROLES,RENAME,' + 'REMOTE_OS_AUTHENT,REMOTE_OS_ROLES,RENAME,' +
'REPLICATION_DEPENDENCY_TRACKING,RESET,RESETLOGS,RESIZE,RESOLVE,RESOLVER,' + 'REPLICATION_DEPENDENCY_TRACKING,RESET,RESETLOGS,RESIZE,RESOLVE,RESOLVER,' +
'RESOURCE,RESOURCE_LIMIT,RESOURCE_MANAGER_PLAN,RESTRICT,RESTRICTED,' + 'RESOURCE,RESOURCE_LIMIT,RESOURCE_MANAGER_PLAN,RESTRICT,RESTRICTED,' +
'RESUMABLE,RESUME,REUSE,REVOKE,REWRITE,RNDS,RNPS,ROLE,ROLES,' + 'RESUMABLE,RESUME,REUSE,REVOKE,REWRITE,RIGHT,RNDS,RNPS,ROLE,ROLES,' +
'ROLLBACK_SEGMENTS,ROW,ROW_LOCKING,ROWDEPENDENCIES,ROWLABEL,ROWNUM,' + 'ROLLBACK_SEGMENTS,ROW,ROW_LOCKING,ROWDEPENDENCIES,ROWLABEL,ROWNUM,' +
'ROWS,SAMPLE,SCN,SCOPE,SECTION,SEGMENT,SELECT,SELECTIVITY,SEQUENCE,' + 'ROWS,SAMPLE,SCN,SCOPE,SECTION,SEGMENT,SELECT,SELECTIVITY,SEQUENCE,' +
'SERIAL_REUSE,SERVICE_NAMES,SESSION,SESSION_CACHED_CURSORS,' + 'SERIAL_REUSE,SERVICE_NAMES,SESSION,SESSION_CACHED_CURSORS,' +
Expand Down Expand Up @@ -745,7 +745,7 @@ implementation
'COMPAT,COMPATIBILITY,CON,CONN,COPY,COPYC,COPYCOMMIT,COPYTYPECHECK,DEF,' + 'COMPAT,COMPATIBILITY,CON,CONN,COPY,COPYC,COPYCOMMIT,COPYTYPECHECK,DEF,' +
'DEFINE,DESC,DESCR,DESCRI,DESCRIB,DESCRIBE,DISC,DISCO,DISCON,DISCONN,' + 'DEFINE,DESC,DESCR,DESCRI,DESCRIB,DESCRIBE,DISC,DISCO,DISCON,DISCONN,' +
'DISCONNE,DISCONNEC,DISCONNECT,EA,ECHO,EDITF,EDITFILE,EMB,' + 'DISCONNE,DISCONNEC,DISCONNECT,EA,ECHO,EDITF,EDITFILE,EMB,' +
'EMBEDDED,ESC,EXEC,EXECUTE,FAILURE,FEED,FEEDBACK,FLAGGER,FLU,FULL,GET,' + 'EMBEDDED,ESC,EXEC,EXECUTE,FAILURE,FEED,FEEDBACK,FLAGGER,FLU,GET,' +
'HEA,HEADING,HEADS,HEADSEP,HELP,HO,HOST,INPUT,INTERMED,INTERMEDIATE,INV,' + 'HEA,HEADING,HEADS,HEADSEP,HELP,HO,HOST,INPUT,INTERMED,INTERMEDIATE,INV,' +
'INVISIBLE,LIN,LINESIZE,LO,LOBOF,LOBOFFSET,LOGON,LOGSOURCE,LONGC,' + 'INVISIBLE,LIN,LINESIZE,LO,LOBOF,LOBOFFSET,LOGON,LOGSOURCE,LONGC,' +
'LONGCHUNKSIZE,MARKUP,MAXDATA,MIX,MIXED,NATIVE,NEWP,NEWPAGE,NUM,' + 'LONGCHUNKSIZE,MARKUP,MAXDATA,MIX,MIXED,NATIVE,NEWP,NEWPAGE,NUM,' +
Expand Down

0 comments on commit 712054a

Please sign in to comment.