From dcaeea43014ae2dd5891531e603154ee927b24ae Mon Sep 17 00:00:00 2001
From: kenmo-pb <25482520+kenmo-pb@users.noreply.github.com>
Date: Sat, 28 Sep 2024 23:06:24 -0400
Subject: [PATCH 01/10] Add ColorSchemes.pb, scan for external color schemes
and combine with the built-in ones
---
PureBasicIDE/ColorSchemes.pb | 324 ++++++++++++++++++++++++++++++++++
PureBasicIDE/Common.pb | 5 +
PureBasicIDE/Language.pb | 2 +-
PureBasicIDE/Preferences.pb | 106 ++---------
PureBasicIDE/PureBasic.pb | 1 +
PureBasicIDE/PureBasicIDE.pbp | 2 +
6 files changed, 352 insertions(+), 88 deletions(-)
create mode 100644 PureBasicIDE/ColorSchemes.pb
diff --git a/PureBasicIDE/ColorSchemes.pb b/PureBasicIDE/ColorSchemes.pb
new file mode 100644
index 00000000..c8a1597a
--- /dev/null
+++ b/PureBasicIDE/ColorSchemes.pb
@@ -0,0 +1,324 @@
+; --------------------------------------------------------------------------------------------
+; Copyright (c) Fantaisie Software. All rights reserved.
+; Dual licensed under the GPL and Fantaisie Software licenses.
+; See LICENSE and LICENSE-FANTAISIE in the project root for license information.
+; --------------------------------------------------------------------------------------------
+
+
+; Store color names in an array, for indexable lookup
+Global Dim ColorName.s(#COLOR_Last_IncludingToolsPanel)
+
+; Color Scheme structure
+Structure ColorSchemeStruct
+ Name.s
+ File.s
+
+ ColorValue.l[#COLOR_Last_IncludingToolsPanel + 1]
+
+ IsIDEDefault.i
+ IsAccessibility.i
+EndStructure
+
+; Global list of built-in / found schemes
+Global NewList ColorScheme.ColorSchemeStruct()
+
+; Color values with special meanings
+#ColorSchemeValue_UseSysColor = -1
+#ColorSchemeValue_Undefined = -2
+
+
+; These (from Preferences.pb) are used
+Global PreferenceToolsPanelFrontColor, PreferenceToolsPanelBackColor
+Declare UpdatePreferenceSyntaxColor(ColorIndex, Color)
+Declare UpdateImageColorGadget(Gadget, Image, Color)
+
+
+; Returns #True if the specified color scheme matches the user's current color settings, otherwise #False
+Procedure.i ColorSchemeMatchesCurrentSettings(*ColorScheme.ColorSchemeStruct)
+ Protected Result.i = #True
+
+ For i = 0 To #COLOR_Last
+ If ((i <> #COLOR_Selection) And (i <> #COLOR_SelectionFront)) ; selection colors may follow OS, so skip them for scheme match check
+ If (*ColorScheme\ColorValue[i] >= 0)
+ If (*ColorScheme\ColorValue[i] <> Colors(i)\UserValue)
+ Result = #False
+ Break
+ EndIf
+ EndIf
+ EndIf
+ Next i
+
+ ProcedureReturn (Result)
+EndProcedure
+
+; Returns *ColorScheme which matches the user's current settings, otherwise #Null if no match
+Procedure.i FindCurrentColorScheme()
+ Protected *ColorScheme.ColorSchemeStruct = #Null
+
+ ForEach ColorScheme()
+ If (ColorSchemeMatchesCurrentSettings(@ColorScheme()))
+ *ColorScheme = @ColorScheme()
+ Break
+ EndIf
+ Next
+
+ ProcedureReturn (*ColorScheme)
+EndProcedure
+
+; Guess the specified color for a given Color Scheme, falling back to its basic background/text colors
+Procedure.i GuessColorSchemeColor(*ColorScheme.ColorSchemeStruct, index.i)
+ Select (index)
+ Case #COLOR_GlobalBackground
+ Color = #White
+ Case #COLOR_NormalText
+ Color = $FFFFFF - *ColorScheme\ColorValue[#COLOR_GlobalBackground]
+
+ Case #COLOR_CurrentLine, #COLOR_DisabledBack, #COLOR_LineNumberBack, #COLOR_PlainBackground, #COLOR_ProcedureBack, #COLOR_ToolsPanelBackColor
+ Color = *ColorScheme\ColorValue[#COLOR_GlobalBackground] ; assume it should match global background
+ Case #COLOR_DebuggerBreakPoint, #COLOR_DebuggerError, #COLOR_DebuggerLine, #COLOR_DebuggerWarning
+ Color = *ColorScheme\ColorValue[#COLOR_GlobalBackground]
+
+ Case #COLOR_SelectionFront
+ CompilerIf (#CompileWindows)
+ Color = GetSysColor_(#COLOR_HIGHLIGHTTEXT)
+ CompilerElse
+ Color = *ColorScheme\ColorValue[#COLOR_GlobalBackground]
+ CompilerEndIf
+ Case #COLOR_Selection, #COLOR_SelectionRepeat
+ CompilerIf (#CompileWindows)
+ Color = GetSysColor_(#COLOR_HIGHLIGHT)
+ CompilerElse
+ Color = *ColorScheme\ColorValue[#COLOR_NormalText]
+ CompilerEndIf
+
+ Default
+ Color = *ColorScheme\ColorValue[#COLOR_NormalText] ; otherwise, assume it should match normal foreground color
+ EndSelect
+
+ ProcedureReturn (Color)
+EndProcedure
+
+; Disable color preference gadgets if appropriate (eg. disable Selection and SelectionFront when Accessibility mode expects them to match system colors)
+Procedure DisableSelectionColorGadgets(*ColorScheme.ColorSchemeStruct)
+ CompilerIf #CompileWindows
+ ShouldDisable = #False
+
+ If (EnableAccessibility)
+ ShouldDisable = #True ; Accessibility mode enabled - use system selection colors, don't allow user to change them
+ Else
+ If (*ColorScheme)
+ If (*ColorScheme\IsAccessibility)
+ ShouldDisable = #True ; Accessibility scheme selected - use system selection colors, don't allow user to change them
+ ElseIf (*ColorScheme\ColorValue[#COLOR_Selection] = #ColorSchemeValue_UseSysColor) Or (*ColorScheme\ColorValue[#COLOR_SelectionFront] = #ColorSchemeValue_UseSysColor)
+ ShouldDisable = #True ; Value of -1 (use system color) specified
+ EndIf
+ EndIf
+ EndIf
+
+ DisableGadget(#GADGET_Preferences_FirstColorText + #COLOR_Selection, ShouldDisable)
+ DisableGadget(#GADGET_Preferences_FirstSelectColor + #COLOR_Selection, ShouldDisable)
+ DisableGadget(#GADGET_Preferences_FirstColorText + #COLOR_SelectionFront, ShouldDisable)
+ DisableGadget(#GADGET_Preferences_FirstSelectColor + #COLOR_SelectionFront, ShouldDisable)
+ CompilerEndIf
+EndProcedure
+
+; Load the specified *ColorScheme to the Preferences gadgets
+Procedure LoadColorSchemeToPreferencesWindow(*ColorScheme.ColorSchemeStruct)
+ If (*ColorScheme)
+
+ PreferenceToolsPanelFrontColor = *ColorScheme\ColorValue[#COLOR_ToolsPanelFrontColor]
+ PreferenceToolsPanelBackColor = *ColorScheme\ColorValue[#COLOR_ToolsPanelBackColor]
+
+ For i = 0 To #COLOR_Last
+ Colors(i)\PrefsValue = *ColorScheme\ColorValue[i]
+ Next i
+
+ CompilerIf #CompileWindows
+ ; Special thing: On windows we always default back to the system colors in
+ ; the PB standard scheme for screenreader support. The 'Accessibility'
+ ; scheme has a special option to always use these colors, so it is not needed here.
+ ;
+ If *ColorScheme\IsIDEDefault Or *ColorScheme\IsAccessibility Or EnableAccessibility Or (Colors(#COLOR_Selection)\PrefsValue = #ColorSchemeValue_UseSysColor)
+ Colors(#COLOR_Selection)\PrefsValue = GetSysColor_(#COLOR_HIGHLIGHT)
+ Colors(#COLOR_SelectionFront)\PrefsValue = GetSysColor_(#COLOR_HIGHLIGHTTEXT)
+ EndIf
+ CompilerEndIf
+
+ For i = 0 To #COLOR_Last
+ If (Colors(i)\PrefsValue >= 0)
+ UpdatePreferenceSyntaxColor(i, Colors(i)\PrefsValue)
+ Else
+ Colors(i)\PrefsValue = GuessColorSchemeColor(*ColorScheme, i)
+ UpdatePreferenceSyntaxColor(i, Colors(i)\PrefsValue)
+ EndIf
+ Next i
+
+ DisableSelectionColorGadgets(*ColorScheme)
+
+ If (PreferenceToolsPanelFrontColor < 0)
+ PreferenceToolsPanelFrontColor = GuessColorSchemeColor(*ColorScheme, #COLOR_ToolsPanelFrontColor)
+ EndIf
+ If (PreferenceToolsPanelBackColor < 0)
+ PreferenceToolsPanelBackColor = GuessColorSchemeColor(*ColorScheme, #COLOR_ToolsPanelBackColor)
+ EndIf
+
+ If IsImage(#IMAGE_Preferences_ToolsPanelFrontColor)
+ UpdateImageColorGadget(#GADGET_Preferences_ToolsPanelFrontColor, #IMAGE_Preferences_ToolsPanelFrontColor, PreferenceToolsPanelFrontColor)
+ EndIf
+ If IsImage(#IMAGE_Preferences_ToolsPanelBackColor)
+ UpdateImageColorGadget(#GADGET_Preferences_ToolsPanelBackColor, #IMAGE_Preferences_ToolsPanelBackColor, PreferenceToolsPanelBackColor)
+ EndIf
+
+ EndIf
+EndProcedure
+
+; Find and remove a known color scheme by its name
+Procedure RemoveColorSchemeIfExists(Name.s)
+ If (Name <> "")
+ ForEach ColorScheme()
+ If (ColorScheme()\Name = Name)
+ DeleteElement(ColorScheme())
+ Break
+ EndIf
+ Next
+ EndIf
+EndProcedure
+
+; Read the specified *ColorScheme from data section (for built-in schemes)
+Procedure.i ReadColorSchemeFromDataSection(*ColorScheme.ColorSchemeStruct)
+ If (*ColorScheme)
+ ; This assumes the NAME STRING data has already been read!
+ With *ColorScheme
+ \File = ""
+ Read.l \ColorValue[#COLOR_ToolsPanelFrontColor]
+ Read.l \ColorValue[#COLOR_ToolsPanelBackColor]
+ For i = 0 To #COLOR_Last
+ Read.l \ColorValue[i]
+ Next i
+ EndWith
+ EndIf
+
+ ProcedureReturn (*ColorScheme)
+EndProcedure
+
+; Load the specified *ColorScheme from file on disk (for external schemes)
+Procedure.i LoadColorSchemeFromFile(*ColorScheme.ColorSchemeStruct, File.s)
+ Protected Result.i = #Null
+
+ If (File)
+ ; Basic validation of color scheme file...
+ If (OpenPreferences(File))
+ Name.s = GetFilePart(File, #PB_FileSystem_NoExtension)
+ If (#True);(PreferenceGroup("Sections") And (ReadPreferenceLong("IncludeColors", 0) = 1))
+ If (PreferenceGroup("Colors"))
+
+ If (*ColorScheme) ; struct already specified - part of InitColorSchemes() list
+ ; Intentionally overwrite schemes of existing names - allows you to tweak the default themes, if desired
+ RemoveColorSchemeIfExists(Name)
+ Else ; NULL --> dynamically allocate a struct now - NOT part of InitColorSchemes() list!
+ *ColorScheme = AllocateStructure(ColorSchemeStruct)
+ EndIf
+
+ If (*ColorScheme)
+ With *ColorScheme
+ \Name = Name
+ \File = File
+
+ ; Load all defined colors into map...
+ For i = 0 To #COLOR_Last_IncludingToolsPanel
+ \ColorValue[i] = #ColorSchemeValue_Undefined
+ ColorValueString.s = ReadPreferenceString(ColorName(i), "")
+ If (ColorValueString <> "")
+ If (ReadPreferenceLong(ColorName(i) + "_Used", 1) = 1)
+ If (FindString(ColorValueString, "RGB", 1, #PB_String_NoCase))
+ \ColorValue[i] = ColorFromRGBString(ColorValueString)
+ Else
+ \ColorValue[i] = Val(ColorValueString) & $00FFFFFF
+ EndIf
+ EndIf
+ EndIf
+ Next i
+ Result = *ColorScheme
+
+ EndWith
+ EndIf
+
+ EndIf
+ EndIf
+ ClosePreferences()
+ EndIf
+ EndIf
+
+ ProcedureReturn (Result)
+EndProcedure
+
+; Initialize color names, built-in color schemes, and external found color schemes
+Procedure InitColorSchemes()
+
+ ; Only need to initialize color schemes once
+ If (NbSchemes > 0)
+ ProcedureReturn
+ EndIf
+
+ ; Read color key names into indexable array
+ Restore ColorKeys
+ For i = 0 To #COLOR_Last
+ Read.s ColorName(i)
+ Next i
+ ColorName(#COLOR_ToolsPanelFrontColor) = "ToolsPanel_FrontColor"
+ ColorName(#COLOR_ToolsPanelBackColor) = "ToolsPanel_BackColor"
+
+
+ ; First, load embedded DataSection default color schemes
+ ClearList(ColorScheme())
+ Restore DefaultColorSchemes
+ Read.s Name.s
+ While (Name <> "")
+ AddElement(ColorScheme())
+ ColorScheme()\Name = Name
+ ReadColorSchemeFromDataSection(@ColorScheme())
+ If (ListIndex(ColorScheme()) = 0)
+ ColorScheme()\IsIDEDefault = #True
+ EndIf
+ Read.s Name
+ Wend
+ NbSchemes = ListSize(ColorScheme())
+
+ ; Then, scan 'themes' subfolder!
+ If (PureBasicPath$)
+ Dir = ExamineDirectory(#PB_Any, PureBasicPath$ + #DEFAULT_ThemePath, "*")
+ If (Dir)
+ While (NextDirectoryEntry(Dir))
+ If (DirectoryEntryType(Dir) = #PB_DirectoryEntry_File)
+ File.s = PureBasicPath$ + #DEFAULT_ThemePath + #PS$ + DirectoryEntryName(Dir)
+ Select (LCase(GetExtensionPart(File)))
+ Case "prefs", "scheme", "theme", "ini" ; only attempt to load certain file extensions
+ AddElement(ColorScheme())
+ If (LoadColorSchemeFromFile(@ColorScheme(), File))
+ ; OK
+ Else
+ DeleteElement(ColorScheme())
+ EndIf
+ EndSelect
+ EndIf
+ Wend
+ FinishDirectory(Dir)
+ EndIf
+ EndIf
+
+
+ ; If additional schemes were found, sort schemes alphabetically, because it could become a long list
+ If (ListSize(ColorScheme()) > NbSchemes)
+ NbSchemes = ListSize(ColorScheme())
+ SortStructuredList(ColorScheme(), #PB_Sort_Ascending | #PB_Sort_NoCase, OffsetOf(ColorSchemeStruct\Name), #PB_String)
+ EndIf
+
+ ; Ensure "Accessibility" scheme always at bottom of list, for special handling
+ ForEach ColorScheme()
+ If (ColorScheme()\Name = "Accessibility")
+ ColorScheme()\IsAccessibility = #True
+ MoveElement(ColorScheme(), #PB_List_Last)
+ EndIf
+ Next
+
+EndProcedure
diff --git a/PureBasicIDE/Common.pb b/PureBasicIDE/Common.pb
index 65a9cadd..adc876ad 100644
--- a/PureBasicIDE/Common.pb
+++ b/PureBasicIDE/Common.pb
@@ -75,6 +75,11 @@ Enumeration 0
#COLOR_PlainBackground
#COLOR_Last = #COLOR_PlainBackground
+
+ ; Special cases beyond "Last"
+ #COLOR_ToolsPanelFrontColor = #COLOR_Last + 1
+ #COLOR_ToolsPanelBackColor
+ #COLOR_Last_IncludingToolsPanel = #COLOR_Last + 2
EndEnumeration
diff --git a/PureBasicIDE/Language.pb b/PureBasicIDE/Language.pb
index fd884c79..230bf593 100644
--- a/PureBasicIDE/Language.pb
+++ b/PureBasicIDE/Language.pb
@@ -825,7 +825,7 @@ DataSection
Data$ "EnableMarkers", "Enable Line Markers"
Data$ "ExtraWordChars", "Extra characters included in word selection"
Data$ "SelectFont", "Select Font"
- Data$ "DefaultColors", "Default Color Schemes"
+ Data$ "DefaultColors", "Color Schemes"
Data$ "ShowWhiteSpace", "Show whitespace characters"
Data$ "ShowIndentGuides", "Show indentation guides"
Data$ "UseTabIndentForSplittedLines", "Use tab indent for splitted lines"
diff --git a/PureBasicIDE/Preferences.pb b/PureBasicIDE/Preferences.pb
index 7f8b6b17..35b582ca 100644
--- a/PureBasicIDE/Preferences.pb
+++ b/PureBasicIDE/Preferences.pb
@@ -64,6 +64,8 @@ EndProcedure
Procedure LoadPreferences()
+ InitColorSchemes()
+
OpenPreferences(PreferencesFile$)
;- - Global
@@ -2531,6 +2533,9 @@ Procedure ApplyPreferences()
ApplyPrefsTheme()
+ ; Disable some color gadgets for special color schemes
+ DisableSelectionColorGadgets(FindCurrentColorScheme())
+
; Update Scintilla word chars
ApplyWordChars()
@@ -2969,43 +2974,26 @@ Procedure OpenPreferencesWindow()
UpdatePreferenceSyntaxColor(i, Color)
EndIf
-
- If Colors(i)\PrefsValue = -1
- DisableGadget(#GADGET_Preferences_FirstColorText+i, 1)
- DisableGadget(#GADGET_Preferences_FirstSelectColor+i, 1)
- EndIf
Next i
- Restore DefaultColorSchemes
- NbSchemes = 0 ; Number of Default Color Schemes is automatically counted below
-
CurrentScheme = -1
- Read.s Name$
- While Name$ <> "" ; Empty Name$ indicates end of color schemes
- AddGadgetItem(#GADGET_Preferences_ColorSchemes, -1, Name$)
- ; also read the 2 toolspanel colors
- Read.l color
- Read.l color
- IsMatch = #True
- For c = 0 To #COLOR_Last
- Read.l color
- If Colors(c)\Enabled And (c <> #COLOR_Selection) And (c <> #COLOR_SelectionFront)
- If color <> Colors(c)\UserValue
- IsMatch = #False
- EndIf
- EndIf
- Next c
- If IsMatch
- CurrentScheme = NbSchemes
+ ForEach ColorScheme()
+ AddGadgetItem(#GADGET_Preferences_ColorSchemes, ListIndex(ColorScheme()), ColorScheme()\Name)
+ SetGadgetItemData(#GADGET_Preferences_ColorSchemes, ListIndex(ColorScheme()), @ColorScheme())
+ If (ColorSchemeMatchesCurrentSettings(@ColorScheme()))
+ CurrentScheme = ListIndex(ColorScheme())
EndIf
-
- NbSchemes + 1
- Read.s Name$
- Wend
+ Next
SetGadgetItemText(#GADGET_Preferences_ColorSchemes, CountGadgetItems(#GADGET_Preferences_ColorSchemes)-1, Language("Preferences", "Accessibility"), 0)
+ ;AddGadgetItem(#GADGET_Preferences_ColorSchemes, -1, "")
If CurrentScheme >= 0
SetGadgetState(#GADGET_Preferences_ColorSchemes, CurrentScheme)
+ DisableSelectionColorGadgets(GetGadgetItemData(#GADGET_Preferences_ColorSchemes, CurrentScheme))
+ Else
+ ;SetGadgetState(#GADGET_Preferences_ColorSchemes, CountGadgetItems(#GADGET_Preferences_ColorSchemes)-1)
+ SetGadgetState(#GADGET_Preferences_ColorSchemes, -1)
+ DisableSelectionColorGadgets(#Null)
EndIf
;- ------> Custom Keywords
@@ -4983,66 +4971,10 @@ Procedure PreferencesWindowEvents(EventID)
Case #GADGET_Preferences_ColorSchemes
index = GetGadgetState(#GADGET_Preferences_ColorSchemes)
-
- Restore DefaultColorSchemes
-
- If index >= 0 And index < NbSchemes
-
- ; skip all schemes before the index
- For i = 1 To index
- Read.s Name$
- For c = 0 To #COLOR_Last+2 ; skip colors+toolspanel colors
- Read.l color
- Next c
- Next i
-
- Read.s Name$ ; skip name
-
- ; read the toolspanel colors
- Read.l PreferenceToolsPanelFrontColor
- Read.l PreferenceToolsPanelBackColor
-
- ; read the highlight colors
- For i = 0 To #COLOR_Last
- Read.l Colors(i)\PrefsValue
- Next i
-
- CompilerIf #CompileWindows
- ; Special thing: On windows we always default back to the system colors in
- ; the PB standard scheme for screenreader support. The 'Accessibility'
- ; scheme has a special option to always use these colors, so it is not needed here.
- ;
- If index = 0
- Colors(#COLOR_Selection)\PrefsValue = GetSysColor_(#COLOR_HIGHLIGHT)
- Colors(#COLOR_SelectionFront)\PrefsValue = GetSysColor_(#COLOR_HIGHLIGHTTEXT)
- EndIf
- CompilerEndIf
-
- ; apply the colors to the gadgets
- For i = 0 To #COLOR_Last
- If Colors(i)\PrefsValue <> -1
- Color = Colors(i)\PrefsValue
- DisableGadget(#GADGET_Preferences_FirstColorText+i, 0)
- DisableGadget(#GADGET_Preferences_FirstSelectColor+i, 0)
- Else
- Color = $C0C0C0
- DisableGadget(#GADGET_Preferences_FirstColorText+i, 1)
- DisableGadget(#GADGET_Preferences_FirstSelectColor+i,1)
- EndIf
-
- UpdatePreferenceSyntaxColor(i, Color)
- Next i
-
- If IsImage(#IMAGE_Preferences_ToolsPanelFrontColor)
- UpdateImageColorGadget(#GADGET_Preferences_ToolsPanelFrontColor, #IMAGE_Preferences_ToolsPanelFrontColor, PreferenceToolsPanelFrontColor)
- EndIf
-
- If IsImage(#IMAGE_Preferences_ToolsPanelBackColor)
- UpdateImageColorGadget(#GADGET_Preferences_ToolsPanelBackColor, #IMAGE_Preferences_ToolsPanelBackColor, PreferenceToolsPanelBackColor)
- EndIf
+ If (index >= 0)
+ LoadColorSchemeToPreferencesWindow(GetGadgetItemData(#GADGET_Preferences_ColorSchemes, index))
EndIf
-
Case #GADGET_Preferences_GetExportFile
File$ = SaveFileRequester(Language("Misc","SaveFile"), GetGadgetText(#GADGET_Preferences_ExportFile), Language("Preferences","PrefExportPattern"), 0)
If File$ <> ""
diff --git a/PureBasicIDE/PureBasic.pb b/PureBasicIDE/PureBasic.pb
index a650fe4d..307f1580 100644
--- a/PureBasicIDE/PureBasic.pb
+++ b/PureBasicIDE/PureBasic.pb
@@ -111,6 +111,7 @@ XIncludeFile "CompilerWindow.pb"
XIncludeFile "CompilerWarnings.pb"
XIncludeFile "CompilerOptions.pb"
XIncludeFile "AddHelpFiles.pb"
+XIncludeFile "ColorSchemes.pb"
XIncludeFile "AutoComplete.pb"
XIncludeFile "Preferences.pb"
XIncludeFile "Preferences.pb"
diff --git a/PureBasicIDE/PureBasicIDE.pbp b/PureBasicIDE/PureBasicIDE.pbp
index 1d73f1e6..996bd11d 100644
--- a/PureBasicIDE/PureBasicIDE.pbp
+++ b/PureBasicIDE/PureBasicIDE.pbp
@@ -356,6 +356,8 @@
+
+
From e9652191052289782aeadc8a823614f332245755 Mon Sep 17 00:00:00 2001
From: kenmo-pb <25482520+kenmo-pb@users.noreply.github.com>
Date: Tue, 7 Jan 2025 08:30:57 -0500
Subject: [PATCH 02/10] scan-for-color-schemes: Do not use With/EndWith
---
PureBasicIDE/ColorSchemes.pb | 50 +++++++++++++++++-------------------
1 file changed, 23 insertions(+), 27 deletions(-)
diff --git a/PureBasicIDE/ColorSchemes.pb b/PureBasicIDE/ColorSchemes.pb
index c8a1597a..930084b0 100644
--- a/PureBasicIDE/ColorSchemes.pb
+++ b/PureBasicIDE/ColorSchemes.pb
@@ -188,14 +188,12 @@ EndProcedure
Procedure.i ReadColorSchemeFromDataSection(*ColorScheme.ColorSchemeStruct)
If (*ColorScheme)
; This assumes the NAME STRING data has already been read!
- With *ColorScheme
- \File = ""
- Read.l \ColorValue[#COLOR_ToolsPanelFrontColor]
- Read.l \ColorValue[#COLOR_ToolsPanelBackColor]
- For i = 0 To #COLOR_Last
- Read.l \ColorValue[i]
- Next i
- EndWith
+ *ColorScheme\File = ""
+ Read.l *ColorScheme\ColorValue[#COLOR_ToolsPanelFrontColor]
+ Read.l *ColorScheme\ColorValue[#COLOR_ToolsPanelBackColor]
+ For i = 0 To #COLOR_Last
+ Read.l *ColorScheme\ColorValue[i]
+ Next i
EndIf
ProcedureReturn (*ColorScheme)
@@ -220,27 +218,25 @@ Procedure.i LoadColorSchemeFromFile(*ColorScheme.ColorSchemeStruct, File.s)
EndIf
If (*ColorScheme)
- With *ColorScheme
- \Name = Name
- \File = File
-
- ; Load all defined colors into map...
- For i = 0 To #COLOR_Last_IncludingToolsPanel
- \ColorValue[i] = #ColorSchemeValue_Undefined
- ColorValueString.s = ReadPreferenceString(ColorName(i), "")
- If (ColorValueString <> "")
- If (ReadPreferenceLong(ColorName(i) + "_Used", 1) = 1)
- If (FindString(ColorValueString, "RGB", 1, #PB_String_NoCase))
- \ColorValue[i] = ColorFromRGBString(ColorValueString)
- Else
- \ColorValue[i] = Val(ColorValueString) & $00FFFFFF
- EndIf
+ *ColorScheme\Name = Name
+ *ColorScheme\File = File
+
+ ; Load all defined colors into map...
+ For i = 0 To #COLOR_Last_IncludingToolsPanel
+ *ColorScheme\ColorValue[i] = #ColorSchemeValue_Undefined
+ ColorValueString.s = ReadPreferenceString(ColorName(i), "")
+ If (ColorValueString <> "")
+ If (ReadPreferenceLong(ColorName(i) + "_Used", 1) = 1)
+ If (FindString(ColorValueString, "RGB", 1, #PB_String_NoCase))
+ *ColorScheme\ColorValue[i] = ColorFromRGBString(ColorValueString)
+ Else
+ *ColorScheme\ColorValue[i] = Val(ColorValueString) & $00FFFFFF
EndIf
EndIf
- Next i
- Result = *ColorScheme
-
- EndWith
+ EndIf
+ Next i
+ Result = *ColorScheme
+
EndIf
EndIf
From 775106dea5312c92437da536abbd4e1c6578cc30 Mon Sep 17 00:00:00 2001
From: kenmo-pb <25482520+kenmo-pb@users.noreply.github.com>
Date: Tue, 7 Jan 2025 08:38:37 -0500
Subject: [PATCH 03/10] scan-for-color-schemes: Scan a dedicated 'ColorSchemes'
subfolder rather than 'Themes'
---
PureBasicIDE/ColorSchemes.pb | 6 +++---
PureBasicIDE/CompilerFlags.pb | 3 +++
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/PureBasicIDE/ColorSchemes.pb b/PureBasicIDE/ColorSchemes.pb
index 930084b0..dbeb2f1f 100644
--- a/PureBasicIDE/ColorSchemes.pb
+++ b/PureBasicIDE/ColorSchemes.pb
@@ -280,13 +280,13 @@ Procedure InitColorSchemes()
Wend
NbSchemes = ListSize(ColorScheme())
- ; Then, scan 'themes' subfolder!
+ ; Then, scan 'ColorSchemes' subfolder!
If (PureBasicPath$)
- Dir = ExamineDirectory(#PB_Any, PureBasicPath$ + #DEFAULT_ThemePath, "*")
+ Dir = ExamineDirectory(#PB_Any, PureBasicPath$ + #DEFAULT_ColorSchemePath, "*")
If (Dir)
While (NextDirectoryEntry(Dir))
If (DirectoryEntryType(Dir) = #PB_DirectoryEntry_File)
- File.s = PureBasicPath$ + #DEFAULT_ThemePath + #PS$ + DirectoryEntryName(Dir)
+ File.s = PureBasicPath$ + #DEFAULT_ColorSchemePath + #PS$ + DirectoryEntryName(Dir)
Select (LCase(GetExtensionPart(File)))
Case "prefs", "scheme", "theme", "ini" ; only attempt to load certain file extensions
AddElement(ColorScheme())
diff --git a/PureBasicIDE/CompilerFlags.pb b/PureBasicIDE/CompilerFlags.pb
index 51e22211..13b77538 100644
--- a/PureBasicIDE/CompilerFlags.pb
+++ b/PureBasicIDE/CompilerFlags.pb
@@ -159,6 +159,7 @@ CompilerSelect #PB_Compiler_OS
#DEFAULT_CatalogPath = "Catalogs\"
#DEFAILT_LibraryViewerPlugin= "Debugger\"
#DEFAULT_ThemePath = "Themes\"
+ #DEFAULT_ColorSchemePath = "ColorSchemes\"
#DEFAULT_HelpPath = "Help\"
@@ -226,6 +227,7 @@ CompilerSelect #PB_Compiler_OS
#DEFAULT_HelpPath = "help/"
#DEFAILT_LibraryViewerPlugin= "debugger/"
#DEFAULT_ThemePath = "themes/"
+ #DEFAULT_ColorSchemePath = "colorschemes/"
DefaultEditorFontName$ = "Monospace" ; "Misc Fixed" doesn't seems to exists anymore on modern distro
#DEFAULT_SplitterWidth = 6
@@ -285,6 +287,7 @@ CompilerSelect #PB_Compiler_OS
#DEFAULT_HelpPath = "help/"
#DEFAILT_LibraryViewerPlugin= "debugger/"
#DEFAULT_ThemePath = "themes/"
+ #DEFAULT_ColorSchemePath = "colorschemes/"
DefaultEditorFontName$ = "Monaco"
#DEFAULT_EditorFontSize = 14
From 793e9586798bf8ed04369432ed6d85579f0974f2 Mon Sep 17 00:00:00 2001
From: kenmo-pb <25482520+kenmo-pb@users.noreply.github.com>
Date: Tue, 7 Jan 2025 08:40:36 -0500
Subject: [PATCH 04/10] scan-for-color-schemes: Re-enable prefs section
validation check
---
PureBasicIDE/ColorSchemes.pb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PureBasicIDE/ColorSchemes.pb b/PureBasicIDE/ColorSchemes.pb
index dbeb2f1f..6d70d9b7 100644
--- a/PureBasicIDE/ColorSchemes.pb
+++ b/PureBasicIDE/ColorSchemes.pb
@@ -207,7 +207,7 @@ Procedure.i LoadColorSchemeFromFile(*ColorScheme.ColorSchemeStruct, File.s)
; Basic validation of color scheme file...
If (OpenPreferences(File))
Name.s = GetFilePart(File, #PB_FileSystem_NoExtension)
- If (#True);(PreferenceGroup("Sections") And (ReadPreferenceLong("IncludeColors", 0) = 1))
+ If (PreferenceGroup("Sections") And (ReadPreferenceLong("IncludeColors", 0) = 1))
If (PreferenceGroup("Colors"))
If (*ColorScheme) ; struct already specified - part of InitColorSchemes() list
From c5fa2944084d70aed0bf01e76ed92dd4012cc6c4 Mon Sep 17 00:00:00 2001
From: kenmo-pb <25482520+kenmo-pb@users.noreply.github.com>
Date: Tue, 7 Jan 2025 08:42:00 -0500
Subject: [PATCH 05/10] scan-for-color-schemes: Only accept ".prefs" file
extension
---
PureBasicIDE/ColorSchemes.pb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PureBasicIDE/ColorSchemes.pb b/PureBasicIDE/ColorSchemes.pb
index 6d70d9b7..7c5b832d 100644
--- a/PureBasicIDE/ColorSchemes.pb
+++ b/PureBasicIDE/ColorSchemes.pb
@@ -288,7 +288,7 @@ Procedure InitColorSchemes()
If (DirectoryEntryType(Dir) = #PB_DirectoryEntry_File)
File.s = PureBasicPath$ + #DEFAULT_ColorSchemePath + #PS$ + DirectoryEntryName(Dir)
Select (LCase(GetExtensionPart(File)))
- Case "prefs", "scheme", "theme", "ini" ; only attempt to load certain file extensions
+ Case "prefs"
AddElement(ColorScheme())
If (LoadColorSchemeFromFile(@ColorScheme(), File))
; OK
From 4a6489d449ece4fa28054f6fcb400f49a70f50a4 Mon Sep 17 00:00:00 2001
From: kenmo-pb <25482520+kenmo-pb@users.noreply.github.com>
Date: Tue, 7 Jan 2025 08:49:14 -0500
Subject: [PATCH 06/10] scan-for-color-schemes: Move Globals and Declares to
Common.pb and Declarations.pb
---
PureBasicIDE/ColorSchemes.pb | 5 -----
PureBasicIDE/Common.pb | 1 +
PureBasicIDE/Declarations.pb | 2 ++
3 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/PureBasicIDE/ColorSchemes.pb b/PureBasicIDE/ColorSchemes.pb
index 7c5b832d..866802ef 100644
--- a/PureBasicIDE/ColorSchemes.pb
+++ b/PureBasicIDE/ColorSchemes.pb
@@ -27,11 +27,6 @@ Global NewList ColorScheme.ColorSchemeStruct()
#ColorSchemeValue_Undefined = -2
-; These (from Preferences.pb) are used
-Global PreferenceToolsPanelFrontColor, PreferenceToolsPanelBackColor
-Declare UpdatePreferenceSyntaxColor(ColorIndex, Color)
-Declare UpdateImageColorGadget(Gadget, Image, Color)
-
; Returns #True if the specified color scheme matches the user's current color settings, otherwise #False
Procedure.i ColorSchemeMatchesCurrentSettings(*ColorScheme.ColorSchemeStruct)
diff --git a/PureBasicIDE/Common.pb b/PureBasicIDE/Common.pb
index adc876ad..d9cb7f75 100644
--- a/PureBasicIDE/Common.pb
+++ b/PureBasicIDE/Common.pb
@@ -2693,6 +2693,7 @@ Global FakeToolsPanelID ; for the windows vertical toolspanel (only non-XP windo
Global AlwaysHideLog, ErrorLogVisible
Global CustomKeywordFile$
Global ToolsPanelUseFont, ToolsPanelUseColors
+Global PreferenceToolsPanelFrontColor, PreferenceToolsPanelBackColor
; OS specific highlighting color representation:
;
diff --git a/PureBasicIDE/Declarations.pb b/PureBasicIDE/Declarations.pb
index 68d252bd..58b4927c 100644
--- a/PureBasicIDE/Declarations.pb
+++ b/PureBasicIDE/Declarations.pb
@@ -499,6 +499,8 @@ Declare ApplyPreferences() ; apply prefs changes to the editor and al
Declare OpenPreferencesWindow()
Declare UpdatePreferenceWindow()
Declare PreferencesWindowEvents(EventID)
+Declare UpdatePreferenceSyntaxColor(ColorIndex, Color)
+Declare UpdateImageColorGadget(Gadget, Image, Color)
;- ProcedureBrowser.pb
;
From 742bc173f081df5c6eb428275c324ffd068dd081 Mon Sep 17 00:00:00 2001
From: kenmo-pb <25482520+kenmo-pb@users.noreply.github.com>
Date: Tue, 7 Jan 2025 09:54:51 -0500
Subject: [PATCH 07/10] scan-for-color-schemes: Follow the PBIDE source code
standards
---
PureBasicIDE/ColorSchemes.pb | 132 +++++++++++++++++------------------
PureBasicIDE/Preferences.pb | 6 +-
2 files changed, 69 insertions(+), 69 deletions(-)
diff --git a/PureBasicIDE/ColorSchemes.pb b/PureBasicIDE/ColorSchemes.pb
index 866802ef..ead50c90 100644
--- a/PureBasicIDE/ColorSchemes.pb
+++ b/PureBasicIDE/ColorSchemes.pb
@@ -10,8 +10,8 @@ Global Dim ColorName.s(#COLOR_Last_IncludingToolsPanel)
; Color Scheme structure
Structure ColorSchemeStruct
- Name.s
- File.s
+ Name$
+ File$
ColorValue.l[#COLOR_Last_IncludingToolsPanel + 1]
@@ -29,13 +29,13 @@ Global NewList ColorScheme.ColorSchemeStruct()
; Returns #True if the specified color scheme matches the user's current color settings, otherwise #False
-Procedure.i ColorSchemeMatchesCurrentSettings(*ColorScheme.ColorSchemeStruct)
- Protected Result.i = #True
+Procedure ColorSchemeMatchesCurrentSettings(*ColorScheme.ColorSchemeStruct)
+ Protected Result = #True
For i = 0 To #COLOR_Last
- If ((i <> #COLOR_Selection) And (i <> #COLOR_SelectionFront)) ; selection colors may follow OS, so skip them for scheme match check
- If (*ColorScheme\ColorValue[i] >= 0)
- If (*ColorScheme\ColorValue[i] <> Colors(i)\UserValue)
+ If i <> #COLOR_Selection And i <> #COLOR_SelectionFront ; selection colors may follow OS, so skip them for scheme match check
+ If *ColorScheme\ColorValue[i] >= 0
+ If *ColorScheme\ColorValue[i] <> Colors(i)\UserValue
Result = #False
Break
EndIf
@@ -43,26 +43,26 @@ Procedure.i ColorSchemeMatchesCurrentSettings(*ColorScheme.ColorSchemeStruct)
EndIf
Next i
- ProcedureReturn (Result)
+ ProcedureReturn Result
EndProcedure
; Returns *ColorScheme which matches the user's current settings, otherwise #Null if no match
-Procedure.i FindCurrentColorScheme()
+Procedure FindCurrentColorScheme()
Protected *ColorScheme.ColorSchemeStruct = #Null
ForEach ColorScheme()
- If (ColorSchemeMatchesCurrentSettings(@ColorScheme()))
+ If ColorSchemeMatchesCurrentSettings(@ColorScheme())
*ColorScheme = @ColorScheme()
Break
EndIf
Next
- ProcedureReturn (*ColorScheme)
+ ProcedureReturn *ColorScheme
EndProcedure
; Guess the specified color for a given Color Scheme, falling back to its basic background/text colors
-Procedure.i GuessColorSchemeColor(*ColorScheme.ColorSchemeStruct, index.i)
- Select (index)
+Procedure GuessColorSchemeColor(*ColorScheme.ColorSchemeStruct, index)
+ Select index
Case #COLOR_GlobalBackground
Color = #White
Case #COLOR_NormalText
@@ -74,13 +74,13 @@ Procedure.i GuessColorSchemeColor(*ColorScheme.ColorSchemeStruct, index.i)
Color = *ColorScheme\ColorValue[#COLOR_GlobalBackground]
Case #COLOR_SelectionFront
- CompilerIf (#CompileWindows)
+ CompilerIf #CompileWindows
Color = GetSysColor_(#COLOR_HIGHLIGHTTEXT)
CompilerElse
Color = *ColorScheme\ColorValue[#COLOR_GlobalBackground]
CompilerEndIf
Case #COLOR_Selection, #COLOR_SelectionRepeat
- CompilerIf (#CompileWindows)
+ CompilerIf #CompileWindows
Color = GetSysColor_(#COLOR_HIGHLIGHT)
CompilerElse
Color = *ColorScheme\ColorValue[#COLOR_NormalText]
@@ -90,7 +90,7 @@ Procedure.i GuessColorSchemeColor(*ColorScheme.ColorSchemeStruct, index.i)
Color = *ColorScheme\ColorValue[#COLOR_NormalText] ; otherwise, assume it should match normal foreground color
EndSelect
- ProcedureReturn (Color)
+ ProcedureReturn Color
EndProcedure
; Disable color preference gadgets if appropriate (eg. disable Selection and SelectionFront when Accessibility mode expects them to match system colors)
@@ -98,13 +98,13 @@ Procedure DisableSelectionColorGadgets(*ColorScheme.ColorSchemeStruct)
CompilerIf #CompileWindows
ShouldDisable = #False
- If (EnableAccessibility)
+ If EnableAccessibility
ShouldDisable = #True ; Accessibility mode enabled - use system selection colors, don't allow user to change them
Else
- If (*ColorScheme)
- If (*ColorScheme\IsAccessibility)
+ If *ColorScheme
+ If *ColorScheme\IsAccessibility
ShouldDisable = #True ; Accessibility scheme selected - use system selection colors, don't allow user to change them
- ElseIf (*ColorScheme\ColorValue[#COLOR_Selection] = #ColorSchemeValue_UseSysColor) Or (*ColorScheme\ColorValue[#COLOR_SelectionFront] = #ColorSchemeValue_UseSysColor)
+ ElseIf *ColorScheme\ColorValue[#COLOR_Selection] = #ColorSchemeValue_UseSysColor Or *ColorScheme\ColorValue[#COLOR_SelectionFront] = #ColorSchemeValue_UseSysColor
ShouldDisable = #True ; Value of -1 (use system color) specified
EndIf
EndIf
@@ -119,7 +119,7 @@ EndProcedure
; Load the specified *ColorScheme to the Preferences gadgets
Procedure LoadColorSchemeToPreferencesWindow(*ColorScheme.ColorSchemeStruct)
- If (*ColorScheme)
+ If *ColorScheme
PreferenceToolsPanelFrontColor = *ColorScheme\ColorValue[#COLOR_ToolsPanelFrontColor]
PreferenceToolsPanelBackColor = *ColorScheme\ColorValue[#COLOR_ToolsPanelBackColor]
@@ -140,7 +140,7 @@ Procedure LoadColorSchemeToPreferencesWindow(*ColorScheme.ColorSchemeStruct)
CompilerEndIf
For i = 0 To #COLOR_Last
- If (Colors(i)\PrefsValue >= 0)
+ If Colors(i)\PrefsValue >= 0
UpdatePreferenceSyntaxColor(i, Colors(i)\PrefsValue)
Else
Colors(i)\PrefsValue = GuessColorSchemeColor(*ColorScheme, i)
@@ -150,10 +150,10 @@ Procedure LoadColorSchemeToPreferencesWindow(*ColorScheme.ColorSchemeStruct)
DisableSelectionColorGadgets(*ColorScheme)
- If (PreferenceToolsPanelFrontColor < 0)
+ If PreferenceToolsPanelFrontColor < 0
PreferenceToolsPanelFrontColor = GuessColorSchemeColor(*ColorScheme, #COLOR_ToolsPanelFrontColor)
EndIf
- If (PreferenceToolsPanelBackColor < 0)
+ If PreferenceToolsPanelBackColor < 0
PreferenceToolsPanelBackColor = GuessColorSchemeColor(*ColorScheme, #COLOR_ToolsPanelBackColor)
EndIf
@@ -168,10 +168,10 @@ Procedure LoadColorSchemeToPreferencesWindow(*ColorScheme.ColorSchemeStruct)
EndProcedure
; Find and remove a known color scheme by its name
-Procedure RemoveColorSchemeIfExists(Name.s)
- If (Name <> "")
+Procedure RemoveColorSchemeIfExists(Name$)
+ If Name$ <> ""
ForEach ColorScheme()
- If (ColorScheme()\Name = Name)
+ If ColorScheme()\Name$ = Name$
DeleteElement(ColorScheme())
Break
EndIf
@@ -180,10 +180,10 @@ Procedure RemoveColorSchemeIfExists(Name.s)
EndProcedure
; Read the specified *ColorScheme from data section (for built-in schemes)
-Procedure.i ReadColorSchemeFromDataSection(*ColorScheme.ColorSchemeStruct)
- If (*ColorScheme)
+Procedure ReadColorSchemeFromDataSection(*ColorScheme.ColorSchemeStruct)
+ If *ColorScheme
; This assumes the NAME STRING data has already been read!
- *ColorScheme\File = ""
+ *ColorScheme\File$ = ""
Read.l *ColorScheme\ColorValue[#COLOR_ToolsPanelFrontColor]
Read.l *ColorScheme\ColorValue[#COLOR_ToolsPanelBackColor]
For i = 0 To #COLOR_Last
@@ -191,41 +191,41 @@ Procedure.i ReadColorSchemeFromDataSection(*ColorScheme.ColorSchemeStruct)
Next i
EndIf
- ProcedureReturn (*ColorScheme)
+ ProcedureReturn *ColorScheme
EndProcedure
; Load the specified *ColorScheme from file on disk (for external schemes)
-Procedure.i LoadColorSchemeFromFile(*ColorScheme.ColorSchemeStruct, File.s)
- Protected Result.i = #Null
+Procedure LoadColorSchemeFromFile(*ColorScheme.ColorSchemeStruct, File$)
+ Protected Result = #Null
- If (File)
+ If File$
; Basic validation of color scheme file...
- If (OpenPreferences(File))
- Name.s = GetFilePart(File, #PB_FileSystem_NoExtension)
- If (PreferenceGroup("Sections") And (ReadPreferenceLong("IncludeColors", 0) = 1))
- If (PreferenceGroup("Colors"))
+ If OpenPreferences(File$)
+ Name$ = GetFilePart(File$, #PB_FileSystem_NoExtension)
+ If PreferenceGroup("Sections") And (ReadPreferenceLong("IncludeColors", 0) = 1)
+ If PreferenceGroup("Colors")
- If (*ColorScheme) ; struct already specified - part of InitColorSchemes() list
+ If *ColorScheme ; struct already specified - part of InitColorSchemes() list
; Intentionally overwrite schemes of existing names - allows you to tweak the default themes, if desired
- RemoveColorSchemeIfExists(Name)
+ RemoveColorSchemeIfExists(Name$)
Else ; NULL --> dynamically allocate a struct now - NOT part of InitColorSchemes() list!
*ColorScheme = AllocateStructure(ColorSchemeStruct)
EndIf
- If (*ColorScheme)
- *ColorScheme\Name = Name
- *ColorScheme\File = File
+ If *ColorScheme
+ *ColorScheme\Name$ = Name$
+ *ColorScheme\File$ = File$
; Load all defined colors into map...
For i = 0 To #COLOR_Last_IncludingToolsPanel
*ColorScheme\ColorValue[i] = #ColorSchemeValue_Undefined
- ColorValueString.s = ReadPreferenceString(ColorName(i), "")
- If (ColorValueString <> "")
- If (ReadPreferenceLong(ColorName(i) + "_Used", 1) = 1)
- If (FindString(ColorValueString, "RGB", 1, #PB_String_NoCase))
- *ColorScheme\ColorValue[i] = ColorFromRGBString(ColorValueString)
+ ColorValueString$ = ReadPreferenceString(ColorName(i), "")
+ If ColorValueString$ <> ""
+ If ReadPreferenceLong(ColorName(i) + "_Used", 1) = 1
+ If FindString(ColorValueString$, "RGB", 1, #PB_String_NoCase)
+ *ColorScheme\ColorValue[i] = ColorFromRGBString(ColorValueString$)
Else
- *ColorScheme\ColorValue[i] = Val(ColorValueString) & $00FFFFFF
+ *ColorScheme\ColorValue[i] = Val(ColorValueString$) & $00FFFFFF
EndIf
EndIf
EndIf
@@ -240,14 +240,14 @@ Procedure.i LoadColorSchemeFromFile(*ColorScheme.ColorSchemeStruct, File.s)
EndIf
EndIf
- ProcedureReturn (Result)
+ ProcedureReturn Result
EndProcedure
; Initialize color names, built-in color schemes, and external found color schemes
Procedure InitColorSchemes()
; Only need to initialize color schemes once
- If (NbSchemes > 0)
+ If NbSchemes > 0
ProcedureReturn
EndIf
@@ -263,29 +263,29 @@ Procedure InitColorSchemes()
; First, load embedded DataSection default color schemes
ClearList(ColorScheme())
Restore DefaultColorSchemes
- Read.s Name.s
- While (Name <> "")
+ Read.s Name$
+ While Name$ <> ""
AddElement(ColorScheme())
- ColorScheme()\Name = Name
+ ColorScheme()\Name$ = Name$
ReadColorSchemeFromDataSection(@ColorScheme())
- If (ListIndex(ColorScheme()) = 0)
+ If ListIndex(ColorScheme()) = 0
ColorScheme()\IsIDEDefault = #True
EndIf
- Read.s Name
+ Read.s Name$
Wend
NbSchemes = ListSize(ColorScheme())
; Then, scan 'ColorSchemes' subfolder!
- If (PureBasicPath$)
+ If PureBasicPath$
Dir = ExamineDirectory(#PB_Any, PureBasicPath$ + #DEFAULT_ColorSchemePath, "*")
- If (Dir)
- While (NextDirectoryEntry(Dir))
- If (DirectoryEntryType(Dir) = #PB_DirectoryEntry_File)
- File.s = PureBasicPath$ + #DEFAULT_ColorSchemePath + #PS$ + DirectoryEntryName(Dir)
- Select (LCase(GetExtensionPart(File)))
+ If Dir
+ While NextDirectoryEntry(Dir)
+ If DirectoryEntryType(Dir) = #PB_DirectoryEntry_File
+ File$ = PureBasicPath$ + #DEFAULT_ColorSchemePath + #PS$ + DirectoryEntryName(Dir)
+ Select LCase(GetExtensionPart(File$))
Case "prefs"
AddElement(ColorScheme())
- If (LoadColorSchemeFromFile(@ColorScheme(), File))
+ If LoadColorSchemeFromFile(@ColorScheme(), File$)
; OK
Else
DeleteElement(ColorScheme())
@@ -299,14 +299,14 @@ Procedure InitColorSchemes()
; If additional schemes were found, sort schemes alphabetically, because it could become a long list
- If (ListSize(ColorScheme()) > NbSchemes)
+ If ListSize(ColorScheme()) > NbSchemes
NbSchemes = ListSize(ColorScheme())
- SortStructuredList(ColorScheme(), #PB_Sort_Ascending | #PB_Sort_NoCase, OffsetOf(ColorSchemeStruct\Name), #PB_String)
+ SortStructuredList(ColorScheme(), #PB_Sort_Ascending | #PB_Sort_NoCase, OffsetOf(ColorSchemeStruct\Name$), #PB_String)
EndIf
; Ensure "Accessibility" scheme always at bottom of list, for special handling
ForEach ColorScheme()
- If (ColorScheme()\Name = "Accessibility")
+ If ColorScheme()\Name$ = "Accessibility"
ColorScheme()\IsAccessibility = #True
MoveElement(ColorScheme(), #PB_List_Last)
EndIf
diff --git a/PureBasicIDE/Preferences.pb b/PureBasicIDE/Preferences.pb
index 35b582ca..be11e20b 100644
--- a/PureBasicIDE/Preferences.pb
+++ b/PureBasicIDE/Preferences.pb
@@ -2978,9 +2978,9 @@ Procedure OpenPreferencesWindow()
CurrentScheme = -1
ForEach ColorScheme()
- AddGadgetItem(#GADGET_Preferences_ColorSchemes, ListIndex(ColorScheme()), ColorScheme()\Name)
+ AddGadgetItem(#GADGET_Preferences_ColorSchemes, ListIndex(ColorScheme()), ColorScheme()\Name$)
SetGadgetItemData(#GADGET_Preferences_ColorSchemes, ListIndex(ColorScheme()), @ColorScheme())
- If (ColorSchemeMatchesCurrentSettings(@ColorScheme()))
+ If ColorSchemeMatchesCurrentSettings(@ColorScheme())
CurrentScheme = ListIndex(ColorScheme())
EndIf
Next
@@ -4971,7 +4971,7 @@ Procedure PreferencesWindowEvents(EventID)
Case #GADGET_Preferences_ColorSchemes
index = GetGadgetState(#GADGET_Preferences_ColorSchemes)
- If (index >= 0)
+ If index >= 0
LoadColorSchemeToPreferencesWindow(GetGadgetItemData(#GADGET_Preferences_ColorSchemes, index))
EndIf
From 0b496b41cfacc3401efde9a59315ec3b3f9790c3 Mon Sep 17 00:00:00 2001
From: kenmo-pb <25482520+kenmo-pb@users.noreply.github.com>
Date: Tue, 7 Jan 2025 10:09:33 -0500
Subject: [PATCH 08/10] scan-for-color-schemes: Remove structure allocation
intended for a future feature
---
PureBasicIDE/ColorSchemes.pb | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/PureBasicIDE/ColorSchemes.pb b/PureBasicIDE/ColorSchemes.pb
index ead50c90..74dd4f06 100644
--- a/PureBasicIDE/ColorSchemes.pb
+++ b/PureBasicIDE/ColorSchemes.pb
@@ -205,14 +205,8 @@ Procedure LoadColorSchemeFromFile(*ColorScheme.ColorSchemeStruct, File$)
If PreferenceGroup("Sections") And (ReadPreferenceLong("IncludeColors", 0) = 1)
If PreferenceGroup("Colors")
- If *ColorScheme ; struct already specified - part of InitColorSchemes() list
- ; Intentionally overwrite schemes of existing names - allows you to tweak the default themes, if desired
- RemoveColorSchemeIfExists(Name$)
- Else ; NULL --> dynamically allocate a struct now - NOT part of InitColorSchemes() list!
- *ColorScheme = AllocateStructure(ColorSchemeStruct)
- EndIf
-
If *ColorScheme
+ RemoveColorSchemeIfExists(Name$)
*ColorScheme\Name$ = Name$
*ColorScheme\File$ = File$
From 66a2ace7ff278be9b6af0afb1e3a18a22f2e2e8d Mon Sep 17 00:00:00 2001
From: kenmo-pb <25482520+kenmo-pb@users.noreply.github.com>
Date: Tue, 7 Jan 2025 10:45:50 -0500
Subject: [PATCH 09/10] scan-for-color-schemes: Move (8) embedded schemes into
external .prefs files
---
PureBasicIDE/Preferences.pb | 341 ------------------
.../DefaultColorSchemes/Black Style.prefs | 86 +++++
.../data/DefaultColorSchemes/Blue Style.prefs | 86 +++++
.../data/DefaultColorSchemes/Dark Mode.prefs | 86 +++++
.../data/DefaultColorSchemes/Grey Style.prefs | 86 +++++
.../data/DefaultColorSchemes/Monokai.prefs | 87 +++++
.../DefaultColorSchemes/PHP Extended.prefs | 86 +++++
.../DefaultColorSchemes/Visual Studio.prefs | 86 +++++
.../DefaultColorSchemes/White Style.prefs | 86 +++++
9 files changed, 689 insertions(+), 341 deletions(-)
create mode 100644 PureBasicIDE/data/DefaultColorSchemes/Black Style.prefs
create mode 100644 PureBasicIDE/data/DefaultColorSchemes/Blue Style.prefs
create mode 100644 PureBasicIDE/data/DefaultColorSchemes/Dark Mode.prefs
create mode 100644 PureBasicIDE/data/DefaultColorSchemes/Grey Style.prefs
create mode 100644 PureBasicIDE/data/DefaultColorSchemes/Monokai.prefs
create mode 100644 PureBasicIDE/data/DefaultColorSchemes/PHP Extended.prefs
create mode 100644 PureBasicIDE/data/DefaultColorSchemes/Visual Studio.prefs
create mode 100644 PureBasicIDE/data/DefaultColorSchemes/White Style.prefs
diff --git a/PureBasicIDE/Preferences.pb b/PureBasicIDE/Preferences.pb
index be11e20b..6d2327dc 100644
--- a/PureBasicIDE/Preferences.pb
+++ b/PureBasicIDE/Preferences.pb
@@ -5466,347 +5466,6 @@ DataSection
Data.l $DFFFFF ; #COLOR_PlainBackground
- Data$ "Visual Studio"
- Data.l $000000 ; ToolsPanelFrontColor
- Data.l $FFFFFF ; ToolsPanelBackColor
- Data.l $800000 ; #COLOR_ASMKeyword
- Data.l $FFFFFF ; #COLOR_GlobalBackground
- Data.l $FF0000 ; #COLOR_BasicKeyword
- Data.l $008000 ; #COLOR_Comment
- Data.l $000000 ; #COLOR_Constant
- Data.l $000000 ; #COLOR_Label
- Data.l $000000 ; #COLOR_NormalText
- Data.l $000000 ; #COLOR_Number
- Data.l $000000 ; #COLOR_Operator
- Data.l $000000 ; #COLOR_Pointer
- Data.l $000000 ; #COLOR_PureKeyword
- Data.l $000000 ; #COLOR_Separator
- Data.l $000000 ; #COLOR_String
- Data.l $000000 ; #COLOR_Structure
- Data.l $808080 ; #COLOR_LineNumber
- Data.l $F0F0F0 ; #COLOR_LineNumberBack
- Data.l $000000 ; #COLOR_Marker
- Data.l $F0F0F0 ; #COLOR_CurrentLine
- Data.l $6A240A ; #COLOR_Selection
- Data.l $FFFFFF ; #COLOR_SelectionFront
- Data.l $000000 ; #COLOR_Cursor
- Data.l $00FFFF ; #COLOR_DebuggerLine
- Data.l $00FFFF ; #COLOR_DebuggerLineSymbol
- Data.l $0000FF ; #COLOR_DebuggerError
- Data.l $0000FF ; #COLOR_DebuggerErrorSymbol
- Data.l $FFFF00 ; #COLOR_DebuggerBreakPoint
- Data.l $FFFF00 ; #COLOR_DebuggerBreakpointSymbol
- Data.l $F5F5F5 ; #COLOR_DisabledBack
- Data.l $FF0000 ; #COLOR_GoodBrace
- Data.l $0000FF ; #COLOR_BadBrace
- Data.l $FFFFFF ; #COLOR_ProcedureBack
- Data.l 0 ; #COLOR_CustomKeyword
- Data.l $0080FF ; #COLOR_DebuggerWarning
- Data.l $0080FF ; #COLOR_DebuggerWarningSymbol
- Data.l $008000 ; #COLOR_Whitespace
- Data.l $000000 ; #COLOR_Module
- Data.l $F9D6CA ; #COLOR_SelectionRepeat
- Data.l $FFFFFF ; #COLOR_PlainBackground
-
-
- Data$ "PHP Extended"
- Data.l $000000 ; ToolsPanelFrontColor
- Data.l $F4F4F4 ; ToolsPanelBackColor
- Data.l $724B92 ; #COLOR_ASMKeyword
- Data.l $FFFFFF ; #COLOR_GlobalBackground
- Data.l $008000 ; #COLOR_BasicKeyword
- Data.l $0080FF ; #COLOR_Comment
- Data.l $724B92 ; #COLOR_Constant
- Data.l $A00000 ; #COLOR_Label
- Data.l $A00000 ; #COLOR_NormalText
- Data.l $FF0000 ; #COLOR_Number
- Data.l $008080 ; #COLOR_Operator
- Data.l $000000 ; #COLOR_Pointer
- Data.l $008000 ; #COLOR_PureKeyword
- Data.l $000000 ; #COLOR_Separator
- Data.l $0000FF ; #COLOR_String
- Data.l $800000 ; #COLOR_Structure
- Data.l $000000 ; #COLOR_LineNumber
- Data.l $F0F0F0 ; #COLOR_LineNumberBack
- Data.l $AAAA00 ; #COLOR_Marker
- Data.l $F5F5F5 ; #COLOR_CurrentLine
- Data.l $C0C0C0 ; #COLOR_Selection
- Data.l $000000 ; #COLOR_SelectionFront
- Data.l $000000 ; #COLOR_Cursor
- Data.l $FFE8E8 ; #COLOR_DebuggerLine
- Data.l $FFE8E8 ; #COLOR_DebuggerLineSymbol
- Data.l $8080FF ; #COLOR_DebuggerError
- Data.l $0000FF ; #COLOR_DebuggerErrorSymbol
- Data.l $00D0FF ; #COLOR_DebuggerBreakPoint
- Data.l $00D0FF ; #COLOR_DebuggerBreakpointSymbol
- Data.l $F5F5F5 ; #COLOR_DisabledBack
- Data.l $008000 ; #COLOR_GoodBrace
- Data.l $0000FF ; #COLOR_BadBrace
- Data.l $FFFFFF ; #COLOR_ProcedureBack
- Data.l 0 ; #COLOR_CustomKeyword
- Data.l $FFFF00 ; #COLOR_DebuggerWarning
- Data.l $FFFF00 ; #COLOR_DebuggerWarningSymbol
- Data.l $0080FF ; #COLOR_Whitespace
- Data.l $A00000 ; #COLOR_Module
- Data.l $DCDCDC ; #COLOR_SelectionRepeat
- Data.l $FFFFFF ; #COLOR_PlainBackground
-
- Data$ "Black Style"
- Data.l $008000 ; ToolsPanelFrontColor
- Data.l $000000 ; ToolsPanelBackColor
- Data.l $FFFFFF ; #COLOR_ASMKeyword
- Data.l $000000 ; #COLOR_GlobalBackground
- Data.l $00CCCC ; #COLOR_BasicKeyword
- Data.l $808080 ; #COLOR_Comment
- Data.l $808000 ; #COLOR_Constant
- Data.l $FFFF80 ; #COLOR_Label
- Data.l $C08000 ; #COLOR_NormalText
- Data.l $808080 ; #COLOR_Number
- Data.l $808080 ; #COLOR_Operator
- Data.l $E6E600 ; #COLOR_Pointer
- Data.l $008000 ; #COLOR_PureKeyword
- Data.l $00CCCC ; #COLOR_Separator
- Data.l $FFFFFF ; #COLOR_String
- Data.l $808000 ; #COLOR_Structure
- Data.l $FF8080 ; #COLOR_LineNumber
- Data.l $5E0000 ; #COLOR_LineNumberBack
- Data.l $AAAA00 ; #COLOR_Marker
- Data.l $292929 ; #COLOR_CurrentLine
- Data.l $C0C0C0 ; #COLOR_Selection
- Data.l $000000 ; #COLOR_SelectionFront
- Data.l $FFFFFF ; #COLOR_Cursor
- Data.l $FFFFFF ; #COLOR_DebuggerLine
- Data.l $FFFFFF ; #COLOR_DebuggerLineSymbol
- Data.l $0000FF ; #COLOR_DebuggerError
- Data.l $0000FF ; #COLOR_DebuggerErrorSymbol
- Data.l $99994D ; #COLOR_DebuggerBreakPoint
- Data.l $99994D ; #COLOR_DebuggerBreakpointSymbol
- Data.l $3C0000 ; #COLOR_DisabledBack
- Data.l $00CCCC ; #COLOR_GoodBrace
- Data.l $0000FF ; #COLOR_BadBrace
- Data.l $000000 ; #COLOR_ProcedureBack
- Data.l $D0D0D0 ; #COLOR_CustomKeyword
- Data.l $0080FF ; #COLOR_DebuggerWarning
- Data.l $0080FF ; #COLOR_DebuggerWarningSymbol
- Data.l $808080 ; #COLOR_Whitespace
- Data.l $C08000 ; #COLOR_Module
- Data.l $464646 ; #COLOR_SelectionRepeat
- Data.l $000000 ; #COLOR_PlainBackground
-
- ; Based on the Monokai color scheme, copyright by Wimer Hazenberg (https://monokai.nl)
- Data$ "Monokai"
- Data.l $C2CFCF ; ToolsPanelFrontColor
- Data.l $222827 ; ToolsPanelBackColor
- Data.l $EFD966 ; #COLOR_ASMKeyword
- Data.l $222827 ; #COLOR_GlobalBackground
- Data.l $7226F9 ; #COLOR_BasicKeyword
- Data.l $5E7175 ; #COLOR_Comment
- Data.l $FF81AE ; #COLOR_Constant
- Data.l $669FE6 ; #COLOR_Label
- Data.l $F2F8F8 ; #COLOR_NormalText
- Data.l $FF81AE ; #COLOR_Number
- Data.l $7226F9 ; #COLOR_Operator
- Data.l $FF81AE ; #COLOR_Pointer
- Data.l $2EE2A6 ; #COLOR_PureKeyword
- Data.l $F0F8F8 ; #COLOR_Separator
- Data.l $74DBE6 ; #COLOR_String
- Data.l $2EE2A6 ; #COLOR_Structure
- Data.l $808080 ; #COLOR_LineNumber
- Data.l $222827 ; #COLOR_LineNumberBack
- Data.l $AAAA00 ; #COLOR_Marker
- Data.l $292929 ; #COLOR_CurrentLine
- Data.l $C0C0C0 ; #COLOR_Selection
- Data.l $000000 ; #COLOR_SelectionFront
- Data.l $F0F8F8 ; #COLOR_Cursor
- Data.l $F2F8F8 ; #COLOR_DebuggerLine
- Data.l $F2F8F8 ; #COLOR_DebuggerLineSymbol
- Data.l $0000FF ; #COLOR_DebuggerError
- Data.l $0000FF ; #COLOR_DebuggerErrorSymbol
- Data.l $99994D ; #COLOR_DebuggerBreakPoint
- Data.l $99994D ; #COLOR_DebuggerBreakpointSymbol
- Data.l $1E1E1E ; #COLOR_DisabledBack
- Data.l $669FE6 ; #COLOR_GoodBrace
- Data.l $7226F9 ; #COLOR_BadBrace
- Data.l $222827 ; #COLOR_ProcedureBack
- Data.l $EFD966 ; #COLOR_CustomKeyword
- Data.l $0080FF ; #COLOR_DebuggerWarning
- Data.l $0080FF ; #COLOR_DebuggerWarningSymbol
- Data.l $808080 ; #COLOR_Whitespace
- Data.l $2EE2A6 ; #COLOR_Module
- Data.l $464646 ; #COLOR_SelectionRepeat
- Data.l $222827 ; #COLOR_PlainBackground
-
- Data$ "Blue Style"
- Data.l $80FFFF ; ToolsPanelFrontColor
- Data.l $804000 ; ToolsPanelBackColor
- Data.l $724B92 ; #COLOR_ASMKeyword
- Data.l $FFEAD9 ; #COLOR_GlobalBackground
- Data.l $800000 ; #COLOR_BasicKeyword
- Data.l $006400 ; #COLOR_Comment
- Data.l $000080 ; #COLOR_Constant
- Data.l $000000 ; #COLOR_Label
- Data.l $000000 ; #COLOR_NormalText
- Data.l $0000FF ; #COLOR_Number
- Data.l $0000FF ; #COLOR_Operator
- Data.l $000000 ; #COLOR_Pointer
- Data.l $FF0000 ; #COLOR_PureKeyword
- Data.l $000000 ; #COLOR_Separator
- Data.l $646464 ; #COLOR_String
- Data.l $000000 ; #COLOR_Structure
- Data.l $80FFFF ; #COLOR_LineNumber
- Data.l $804000 ; #COLOR_LineNumberBack
- Data.l $AAAA00 ; #COLOR_Marker
- Data.l $FFF1E6 ; #COLOR_CurrentLine
- Data.l $C0C0C0 ; #COLOR_Selection
- Data.l $000000 ; #COLOR_SelectionFront
- Data.l $000000 ; #COLOR_Cursor
- Data.l $FFE8E8 ; #COLOR_DebuggerLine
- Data.l $FFE8E8 ; #COLOR_DebuggerLineSymbol
- Data.l $0000FF ; #COLOR_DebuggerError
- Data.l $0000FF ; #COLOR_DebuggerErrorSymbol
- Data.l $AAAA00 ; #COLOR_DebuggerBreakPoint
- Data.l $AAAA00 ; #COLOR_DebuggerBreakpointSymbol
- Data.l $FFEAD9 ; #COLOR_DisabledBack
- Data.l $800000 ; #COLOR_GoodBrace
- Data.l $0000FF ; #COLOR_BadBrace
- Data.l $FFEAD9 ; #COLOR_ProcedureBack
- Data.l 0 ; #COLOR_CustomKeyword
- Data.l $0080FF ; #COLOR_DebuggerWarning
- Data.l $0080FF ; #COLOR_DebuggerWarningSymbol
- Data.l $006400 ; #COLOR_Whitespace
- Data.l $000000 ; #COLOR_Module
- Data.l $FFD8B7 ; #COLOR_SelectionRepeat
- Data.l $FFEAD9 ; #COLOR_PlainBackground
-
- Data$ "White Style"
- Data.l $000000 ; ToolsPanelFrontColor
- Data.l $FFFFFF ; ToolsPanelBackColor
- Data.l $0000FF ; #COLOR_ASMKeyword
- Data.l $FFFFFF ; #COLOR_GlobalBackground
- Data.l $800000 ; #COLOR_BasicKeyword
- Data.l $008000 ; #COLOR_Comment
- Data.l $000080 ; #COLOR_Constant
- Data.l $808080 ; #COLOR_Label
- Data.l $C08080 ; #COLOR_NormalText
- Data.l $800000 ; #COLOR_Number
- Data.l $800000 ; #COLOR_Operator
- Data.l $C08080 ; #COLOR_Pointer
- Data.l $FF0000 ; #COLOR_PureKeyword
- Data.l $800000 ; #COLOR_Separator
- Data.l $0080FF ; #COLOR_String
- Data.l $C08080 ; #COLOR_Structure
- Data.l $6F6F6F ; #COLOR_LineNumber
- Data.l $E8E8E8 ; #COLOR_LineNumberBack
- Data.l $AAAA00 ; #COLOR_Marker
- Data.l $FFFFFF ; #COLOR_CurrentLine
- Data.l $DED4D6 ; #COLOR_Selection
- Data.l $000000 ; #COLOR_SelectionFront
- Data.l $000000 ; #COLOR_Cursor
- Data.l $FFE8E8 ; #COLOR_DebuggerLine
- Data.l $FFE8E8 ; #COLOR_DebuggerLineSymbol
- Data.l $0000FF ; #COLOR_DebuggerError
- Data.l $0000FF ; #COLOR_DebuggerErrorSymbol
- Data.l $AAAA00 ; #COLOR_DebuggerBreakPoint
- Data.l $AAAA00 ; #COLOR_DebuggerBreakpointSymbol
- Data.l $FFFFFF ; #COLOR_DisabledBack
- Data.l $800000 ; #COLOR_GoodBrace
- Data.l $0000FF ; #COLOR_BadBrace
- Data.l $FFFFFF ; #COLOR_ProcedureBack
- Data.l 0 ; #COLOR_CustomKeyword
- Data.l $0080FF ; #COLOR_DebuggerWarning
- Data.l $0080FF ; #COLOR_DebuggerWarningSymbol
- Data.l $008000 ; #COLOR_Whitespace
- Data.l $C08080 ; #COLOR_Module
- Data.l $EDE7E8 ; #COLOR_SelectionRepeat
- Data.l $FFFFFF ; #COLOR_PlainBackground
-
-
- Data$ "Grey Style"
- Data.l $6F3F00 ; ToolsPanelFrontColor
- Data.l $8F8F8F ; ToolsPanelBackColor
- Data.l $FF0000 ; #COLOR_ASMKeyword
- Data.l $AFAFAF ; #COLOR_GlobalBackground
- Data.l $000000 ; #COLOR_BasicKeyword
- Data.l $FFFFFF ; #COLOR_Comment
- Data.l $7F007F ; #COLOR_Constant
- Data.l $FF0000 ; #COLOR_Label
- Data.l $000000 ; #COLOR_NormalText
- Data.l $0000AF ; #COLOR_Number
- Data.l $000000 ; #COLOR_Operator
- Data.l $005FAF ; #COLOR_Pointer
- Data.l $FF0000 ; #COLOR_PureKeyword
- Data.l $000000 ; #COLOR_Separator
- Data.l $007F00 ; #COLOR_String
- Data.l $005FAF ; #COLOR_Structure
- Data.l $6F3F00 ; #COLOR_LineNumber
- Data.l $8F8F8F ; #COLOR_LineNumberBack
- Data.l $9F9F00 ; #COLOR_Marker
- Data.l $AFAFAF ; #COLOR_CurrentLine
- Data.l $AF6F00 ; #COLOR_Selection
- Data.l $FFFFFF ; #COLOR_SelectionFront
- Data.l $000000 ; #COLOR_Cursor
- Data.l $FFDFDF ; #COLOR_DebuggerLine
- Data.l $FFDFDF ; #COLOR_DebuggerLineSymbol
- Data.l $0000FF ; #COLOR_DebuggerError
- Data.l $0000FF ; #COLOR_DebuggerErrorSymbol
- Data.l $9F9F00 ; #COLOR_DebuggerBreakPoint
- Data.l $9F9F00 ; #COLOR_DebuggerBreakpointSymbol
- Data.l $AFAFAF ; #COLOR_DisabledBack
- Data.l $000000 ; #COLOR_GoodBrace
- Data.l $0000FF ; #COLOR_BadBrace
- Data.l $AFAFAF ; #COLOR_ProcedureBack
- Data.l 0 ; #COLOR_CustomKeyword
- Data.l $0080FF ; #COLOR_DebuggerWarning
- Data.l $0080FF ; #COLOR_DebuggerWarningSymbol
- Data.l $FFFFFF ; #COLOR_Whitespace
- Data.l $000000 ; #COLOR_Module
- Data.l $FFA915 ; #COLOR_SelectionRepeat
- Data.l $FFFFFF ; #COLOR_PlainBackground
-
-
- Data$ "Dark Mode"
- Data.l $FFFFFF ; ToolsPanel_BackColor
- Data.l $2A2822 ; ToolsPanel_FrontColor
- Data.l $787DFF ; #COLOR_ASMKeyword
- Data.l $2A2822 ; #COLOR_GlobalBackground
- Data.l $63C793 ; #COLOR_BasicKeyword
- Data.l $7B7466 ; #COLOR_Comment
- Data.l $BD82A0 ; #COLOR_Constant
- Data.l $8AA399 ; #COLOR_Label
- Data.l $F3F2F1 ; #COLOR_NormalText
- Data.l $22CDFF ; #COLOR_Number
- Data.l $F3F2F1 ; #COLOR_Operator
- Data.l $8AA399 ; #COLOR_Pointer
- Data.l $B18C67 ; #COLOR_PureKeyword
- Data.l $F3F2F1 ; #COLOR_Separator
- Data.l $0076EC ; #COLOR_String
- Data.l $8AA399 ; #COLOR_Structure
- Data.l $494E3F ; #COLOR_LineNumber
- Data.l $343129 ; #COLOR_LineNumberBack
- Data.l $AAAA00 ; #COLOR_Marker
- Data.l $2A2822 ; #COLOR_CurrentLine
- Data.l $64614F ; #COLOR_Selection
- Data.l $FFFFFF ; #COLOR_SelectionFront
- Data.l $FFFFFF ; #COLOR_Cursor
- Data.l $FFE8E8 ; #COLOR_DebuggerLine
- Data.l $FFE8E8 ; #COLOR_DebuggerLineSymbol
- Data.l $0000FF ; #COLOR_DebuggerError
- Data.l $0000FF ; #COLOR_DebuggerErrorSymbol
- Data.l $463A96 ; #COLOR_DebuggerBreakPoint
- Data.l $463A96 ; #COLOR_DebuggerBreakpoinSymbol
- Data.l $494E3F ; #COLOR_DisabledBack
- Data.l $666600 ; #COLOR_GoodBrace
- Data.l $0000FF ; #COLOR_BadBrace
- Data.l $2A2822 ; #COLOR_ProcedureBack
- Data.l $63C793 ; #COLOR_CustomKeyword
- Data.l $0076EC ; #COLOR_DebuggerWarning
- Data.l $0076EC ; #COLOR_DebuggerWarningSymbol
- Data.l $AAAA00 ; #COLOR_Whitespace
- Data.l $C08000 ; #COLOR_Module
- Data.l $594646 ; #COLOR_SelectionRepeat
- Data.l $000000 ; #COLOR_PlainBackground
-
-
Data$ "Accessibility"
AccessibilityColorScheme:
Data.l 0 ; ToolsPanelFrontColor
diff --git a/PureBasicIDE/data/DefaultColorSchemes/Black Style.prefs b/PureBasicIDE/data/DefaultColorSchemes/Black Style.prefs
new file mode 100644
index 00000000..f2f549ae
--- /dev/null
+++ b/PureBasicIDE/data/DefaultColorSchemes/Black Style.prefs
@@ -0,0 +1,86 @@
+; Black Style
+; Color scheme for PureBasic IDE
+
+[Sections]
+IncludeColors = 1
+
+[Colors]
+ASMKeywordColor = RGB(255, 255, 255)
+ASMKeywordColor_Used = 1
+BackgroundColor = RGB(0, 0, 0)
+BackgroundColor_Used = 1
+BasicKeywordColor = RGB(204, 204, 0)
+BasicKeywordColor_Used = 1
+CommentColor = RGB(128, 128, 128)
+CommentColor_Used = 1
+ConstantColor = RGB(0, 128, 128)
+ConstantColor_Used = 1
+LabelColor = RGB(128, 255, 255)
+LabelColor_Used = 1
+NormalTextColor = RGB(0, 128, 192)
+NormalTextColor_Used = 1
+NumberColor = RGB(128, 128, 128)
+NumberColor_Used = 1
+OperatorColor = RGB(128, 128, 128)
+OperatorColor_Used = 1
+PointerColor = RGB(0, 230, 230)
+PointerColor_Used = 1
+PureKeywordColor = RGB(0, 128, 0)
+PureKeywordColor_Used = 1
+SeparatorColor = RGB(204, 204, 0)
+SeparatorColor_Used = 1
+StringColor = RGB(255, 255, 255)
+StringColor_Used = 1
+StructureColor = RGB(0, 128, 128)
+StructureColor_Used = 1
+LineNumberColor = RGB(128, 128, 255)
+LineNumberColor_Used = 1
+LineNumberBackColor = RGB(0, 0, 94)
+LineNumberBackColor_Used = 1
+MarkerColor = RGB(0, 170, 170)
+MarkerColor_Used = 1
+CurrentLineColor = RGB(41, 41, 41)
+CurrentLineColor_Used = 1
+SelectionColor = RGB(192, 192, 192)
+SelectionColor_Used = 1
+SelectionFrontColor = RGB(0, 0, 0)
+SelectionFrontColor_Used = 1
+CursorColor = RGB(255, 255, 255)
+CursorColor_Used = 1
+Debugger_LineColor = RGB(255, 255, 255)
+Debugger_LineColor_Used = 1
+Debugger_LineSymbolColor = RGB(255, 255, 255)
+Debugger_LineSymbolColor_Used = 1
+Debugger_ErrorColor = RGB(255, 0, 0)
+Debugger_ErrorColor_Used = 1
+Debugger_ErrorSymbolColor = RGB(255, 0, 0)
+Debugger_ErrorSymbolColor_Used = 1
+Debugger_BreakPointColor = RGB(77, 153, 153)
+Debugger_BreakPointColor_Used = 1
+Debugger_BreakpoinSymbolColor = RGB(77, 153, 153)
+Debugger_BreakpoinSymbolColor_Used = 1
+DisabledBackColor = RGB(0, 0, 60)
+DisabledBackColor_Used = 1
+GoodBraceColor = RGB(204, 204, 0)
+GoodBraceColor_Used = 1
+BadBraceColor = RGB(255, 0, 0)
+BadBraceColor_Used = 1
+ProcedureBackColor = RGB(0, 0, 0)
+ProcedureBackColor_Used = 1
+CustomKeywordColor = RGB(208, 208, 208)
+CustomKeywordColor_Used = 1
+Debugger_WarningColor = RGB(255, 128, 0)
+Debugger_WarningColor_Used = 1
+Debugger_WarningSymbolColor = RGB(255, 128, 0)
+Debugger_WarningSymbolColor_Used = 1
+IndentColor = RGB(128, 128, 128)
+IndentColor_Used = 1
+ModuleColor = RGB(0, 128, 192)
+ModuleColor_Used = 1
+SelectionRepeatColor = RGB(70, 70, 70)
+SelectionRepeatColor_Used = 1
+PlainBackground = RGB(0, 0, 0)
+PlainBackground_Used = 1
+
+ToolsPanel_FrontColor = RGB(0, 128, 0)
+ToolsPanel_BackColor = RGB(0, 0, 0)
diff --git a/PureBasicIDE/data/DefaultColorSchemes/Blue Style.prefs b/PureBasicIDE/data/DefaultColorSchemes/Blue Style.prefs
new file mode 100644
index 00000000..a11a1aaf
--- /dev/null
+++ b/PureBasicIDE/data/DefaultColorSchemes/Blue Style.prefs
@@ -0,0 +1,86 @@
+; Blue Style
+; Color scheme for PureBasic IDE
+
+[Sections]
+IncludeColors = 1
+
+[Colors]
+ASMKeywordColor = RGB(146, 75, 114)
+ASMKeywordColor_Used = 1
+BackgroundColor = RGB(217, 234, 255)
+BackgroundColor_Used = 1
+BasicKeywordColor = RGB(0, 0, 128)
+BasicKeywordColor_Used = 1
+CommentColor = RGB(0, 100, 0)
+CommentColor_Used = 1
+ConstantColor = RGB(128, 0, 0)
+ConstantColor_Used = 1
+LabelColor = RGB(0, 0, 0)
+LabelColor_Used = 1
+NormalTextColor = RGB(0, 0, 0)
+NormalTextColor_Used = 1
+NumberColor = RGB(255, 0, 0)
+NumberColor_Used = 1
+OperatorColor = RGB(255, 0, 0)
+OperatorColor_Used = 1
+PointerColor = RGB(0, 0, 0)
+PointerColor_Used = 1
+PureKeywordColor = RGB(0, 0, 255)
+PureKeywordColor_Used = 1
+SeparatorColor = RGB(0, 0, 0)
+SeparatorColor_Used = 1
+StringColor = RGB(100, 100, 100)
+StringColor_Used = 1
+StructureColor = RGB(0, 0, 0)
+StructureColor_Used = 1
+LineNumberColor = RGB(255, 255, 128)
+LineNumberColor_Used = 1
+LineNumberBackColor = RGB(0, 64, 128)
+LineNumberBackColor_Used = 1
+MarkerColor = RGB(0, 170, 170)
+MarkerColor_Used = 1
+CurrentLineColor = RGB(230, 241, 255)
+CurrentLineColor_Used = 1
+SelectionColor = RGB(192, 192, 192)
+SelectionColor_Used = 1
+SelectionFrontColor = RGB(0, 0, 0)
+SelectionFrontColor_Used = 1
+CursorColor = RGB(0, 0, 0)
+CursorColor_Used = 1
+Debugger_LineColor = RGB(232, 232, 255)
+Debugger_LineColor_Used = 1
+Debugger_LineSymbolColor = RGB(232, 232, 255)
+Debugger_LineSymbolColor_Used = 1
+Debugger_ErrorColor = RGB(255, 0, 0)
+Debugger_ErrorColor_Used = 1
+Debugger_ErrorSymbolColor = RGB(255, 0, 0)
+Debugger_ErrorSymbolColor_Used = 1
+Debugger_BreakPointColor = RGB(0, 170, 170)
+Debugger_BreakPointColor_Used = 1
+Debugger_BreakpoinSymbolColor = RGB(0, 170, 170)
+Debugger_BreakpoinSymbolColor_Used = 1
+DisabledBackColor = RGB(217, 234, 255)
+DisabledBackColor_Used = 1
+GoodBraceColor = RGB(0, 0, 128)
+GoodBraceColor_Used = 1
+BadBraceColor = RGB(255, 0, 0)
+BadBraceColor_Used = 1
+ProcedureBackColor = RGB(217, 234, 255)
+ProcedureBackColor_Used = 1
+CustomKeywordColor = RGB(0, 0, 0)
+CustomKeywordColor_Used = 1
+Debugger_WarningColor = RGB(255, 128, 0)
+Debugger_WarningColor_Used = 1
+Debugger_WarningSymbolColor = RGB(255, 128, 0)
+Debugger_WarningSymbolColor_Used = 1
+IndentColor = RGB(0, 100, 0)
+IndentColor_Used = 1
+ModuleColor = RGB(0, 0, 0)
+ModuleColor_Used = 1
+SelectionRepeatColor = RGB(183, 216, 255)
+SelectionRepeatColor_Used = 1
+PlainBackground = RGB(217, 234, 255)
+PlainBackground_Used = 1
+
+ToolsPanel_FrontColor = RGB(255, 255, 128)
+ToolsPanel_BackColor = RGB(0, 64, 128)
diff --git a/PureBasicIDE/data/DefaultColorSchemes/Dark Mode.prefs b/PureBasicIDE/data/DefaultColorSchemes/Dark Mode.prefs
new file mode 100644
index 00000000..b9e49a26
--- /dev/null
+++ b/PureBasicIDE/data/DefaultColorSchemes/Dark Mode.prefs
@@ -0,0 +1,86 @@
+; Dark Mode
+; Color scheme for PureBasic IDE
+
+[Sections]
+IncludeColors = 1
+
+[Colors]
+ASMKeywordColor = RGB(255, 125, 120)
+ASMKeywordColor_Used = 1
+BackgroundColor = RGB(34, 40, 42)
+BackgroundColor_Used = 1
+BasicKeywordColor = RGB(147, 199, 99)
+BasicKeywordColor_Used = 1
+CommentColor = RGB(102, 116, 123)
+CommentColor_Used = 1
+ConstantColor = RGB(160, 130, 189)
+ConstantColor_Used = 1
+LabelColor = RGB(153, 163, 138)
+LabelColor_Used = 1
+NormalTextColor = RGB(241, 242, 243)
+NormalTextColor_Used = 1
+NumberColor = RGB(255, 205, 34)
+NumberColor_Used = 1
+OperatorColor = RGB(241, 242, 243)
+OperatorColor_Used = 1
+PointerColor = RGB(153, 163, 138)
+PointerColor_Used = 1
+PureKeywordColor = RGB(103, 140, 177)
+PureKeywordColor_Used = 1
+SeparatorColor = RGB(241, 242, 243)
+SeparatorColor_Used = 1
+StringColor = RGB(236, 118, 0)
+StringColor_Used = 1
+StructureColor = RGB(153, 163, 138)
+StructureColor_Used = 1
+LineNumberColor = RGB(63, 78, 73)
+LineNumberColor_Used = 1
+LineNumberBackColor = RGB(41, 49, 52)
+LineNumberBackColor_Used = 1
+MarkerColor = RGB(0, 170, 170)
+MarkerColor_Used = 1
+CurrentLineColor = RGB(34, 40, 42)
+CurrentLineColor_Used = 1
+SelectionColor = RGB(79, 97, 100)
+SelectionColor_Used = 1
+SelectionFrontColor = RGB(255, 255, 255)
+SelectionFrontColor_Used = 1
+CursorColor = RGB(255, 255, 255)
+CursorColor_Used = 1
+Debugger_LineColor = RGB(232, 232, 255)
+Debugger_LineColor_Used = 1
+Debugger_LineSymbolColor = RGB(232, 232, 255)
+Debugger_LineSymbolColor_Used = 1
+Debugger_ErrorColor = RGB(255, 0, 0)
+Debugger_ErrorColor_Used = 1
+Debugger_ErrorSymbolColor = RGB(255, 0, 0)
+Debugger_ErrorSymbolColor_Used = 1
+Debugger_BreakPointColor = RGB(150, 58, 70)
+Debugger_BreakPointColor_Used = 1
+Debugger_BreakpoinSymbolColor = RGB(150, 58, 70)
+Debugger_BreakpoinSymbolColor_Used = 1
+DisabledBackColor = RGB(63, 78, 73)
+DisabledBackColor_Used = 1
+GoodBraceColor = RGB(0, 102, 102)
+GoodBraceColor_Used = 1
+BadBraceColor = RGB(255, 0, 0)
+BadBraceColor_Used = 1
+ProcedureBackColor = RGB(34, 40, 42)
+ProcedureBackColor_Used = 1
+CustomKeywordColor = RGB(147, 199, 99)
+CustomKeywordColor_Used = 1
+Debugger_WarningColor = RGB(236, 118, 0)
+Debugger_WarningColor_Used = 1
+Debugger_WarningSymbolColor = RGB(236, 118, 0)
+Debugger_WarningSymbolColor_Used = 1
+IndentColor = RGB(0, 170, 170)
+IndentColor_Used = 1
+ModuleColor = RGB(0, 128, 192)
+ModuleColor_Used = 1
+SelectionRepeatColor = RGB(70, 70, 89)
+SelectionRepeatColor_Used = 1
+PlainBackground = RGB(0, 0, 0)
+PlainBackground_Used = 1
+
+ToolsPanel_FrontColor = RGB(255, 255, 255)
+ToolsPanel_BackColor = RGB(34, 40, 42)
diff --git a/PureBasicIDE/data/DefaultColorSchemes/Grey Style.prefs b/PureBasicIDE/data/DefaultColorSchemes/Grey Style.prefs
new file mode 100644
index 00000000..e5d20dda
--- /dev/null
+++ b/PureBasicIDE/data/DefaultColorSchemes/Grey Style.prefs
@@ -0,0 +1,86 @@
+; Grey Style
+; Color scheme for PureBasic IDE
+
+[Sections]
+IncludeColors = 1
+
+[Colors]
+ASMKeywordColor = RGB(0, 0, 255)
+ASMKeywordColor_Used = 1
+BackgroundColor = RGB(175, 175, 175)
+BackgroundColor_Used = 1
+BasicKeywordColor = RGB(0, 0, 0)
+BasicKeywordColor_Used = 1
+CommentColor = RGB(255, 255, 255)
+CommentColor_Used = 1
+ConstantColor = RGB(127, 0, 127)
+ConstantColor_Used = 1
+LabelColor = RGB(0, 0, 255)
+LabelColor_Used = 1
+NormalTextColor = RGB(0, 0, 0)
+NormalTextColor_Used = 1
+NumberColor = RGB(175, 0, 0)
+NumberColor_Used = 1
+OperatorColor = RGB(0, 0, 0)
+OperatorColor_Used = 1
+PointerColor = RGB(175, 95, 0)
+PointerColor_Used = 1
+PureKeywordColor = RGB(0, 0, 255)
+PureKeywordColor_Used = 1
+SeparatorColor = RGB(0, 0, 0)
+SeparatorColor_Used = 1
+StringColor = RGB(0, 127, 0)
+StringColor_Used = 1
+StructureColor = RGB(175, 95, 0)
+StructureColor_Used = 1
+LineNumberColor = RGB(0, 63, 111)
+LineNumberColor_Used = 1
+LineNumberBackColor = RGB(143, 143, 143)
+LineNumberBackColor_Used = 1
+MarkerColor = RGB(0, 159, 159)
+MarkerColor_Used = 1
+CurrentLineColor = RGB(175, 175, 175)
+CurrentLineColor_Used = 1
+SelectionColor = RGB(0, 111, 175)
+SelectionColor_Used = 1
+SelectionFrontColor = RGB(255, 255, 255)
+SelectionFrontColor_Used = 1
+CursorColor = RGB(0, 0, 0)
+CursorColor_Used = 1
+Debugger_LineColor = RGB(223, 223, 255)
+Debugger_LineColor_Used = 1
+Debugger_LineSymbolColor = RGB(223, 223, 255)
+Debugger_LineSymbolColor_Used = 1
+Debugger_ErrorColor = RGB(255, 0, 0)
+Debugger_ErrorColor_Used = 1
+Debugger_ErrorSymbolColor = RGB(255, 0, 0)
+Debugger_ErrorSymbolColor_Used = 1
+Debugger_BreakPointColor = RGB(0, 159, 159)
+Debugger_BreakPointColor_Used = 1
+Debugger_BreakpoinSymbolColor = RGB(0, 159, 159)
+Debugger_BreakpoinSymbolColor_Used = 1
+DisabledBackColor = RGB(175, 175, 175)
+DisabledBackColor_Used = 1
+GoodBraceColor = RGB(0, 0, 0)
+GoodBraceColor_Used = 1
+BadBraceColor = RGB(255, 0, 0)
+BadBraceColor_Used = 1
+ProcedureBackColor = RGB(175, 175, 175)
+ProcedureBackColor_Used = 1
+CustomKeywordColor = RGB(0, 0, 0)
+CustomKeywordColor_Used = 1
+Debugger_WarningColor = RGB(255, 128, 0)
+Debugger_WarningColor_Used = 1
+Debugger_WarningSymbolColor = RGB(255, 128, 0)
+Debugger_WarningSymbolColor_Used = 1
+IndentColor = RGB(255, 255, 255)
+IndentColor_Used = 1
+ModuleColor = RGB(0, 0, 0)
+ModuleColor_Used = 1
+SelectionRepeatColor = RGB(21, 169, 255)
+SelectionRepeatColor_Used = 1
+PlainBackground = RGB(255, 255, 255)
+PlainBackground_Used = 1
+
+ToolsPanel_FrontColor = RGB(0, 63, 111)
+ToolsPanel_BackColor = RGB(143, 143, 143)
diff --git a/PureBasicIDE/data/DefaultColorSchemes/Monokai.prefs b/PureBasicIDE/data/DefaultColorSchemes/Monokai.prefs
new file mode 100644
index 00000000..2e1b27f0
--- /dev/null
+++ b/PureBasicIDE/data/DefaultColorSchemes/Monokai.prefs
@@ -0,0 +1,87 @@
+; Monokai
+; Color scheme for PureBasic IDE
+; Based on the Monokai color scheme, copyright by Wimer Hazenberg (https://monokai.nl)
+
+[Sections]
+IncludeColors = 1
+
+[Colors]
+ASMKeywordColor = RGB(102, 217, 239)
+ASMKeywordColor_Used = 1
+BackgroundColor = RGB(39, 40, 34)
+BackgroundColor_Used = 1
+BasicKeywordColor = RGB(249, 38, 114)
+BasicKeywordColor_Used = 1
+CommentColor = RGB(117, 113, 94)
+CommentColor_Used = 1
+ConstantColor = RGB(174, 129, 255)
+ConstantColor_Used = 1
+LabelColor = RGB(230, 159, 102)
+LabelColor_Used = 1
+NormalTextColor = RGB(248, 248, 242)
+NormalTextColor_Used = 1
+NumberColor = RGB(174, 129, 255)
+NumberColor_Used = 1
+OperatorColor = RGB(249, 38, 114)
+OperatorColor_Used = 1
+PointerColor = RGB(174, 129, 255)
+PointerColor_Used = 1
+PureKeywordColor = RGB(166, 226, 46)
+PureKeywordColor_Used = 1
+SeparatorColor = RGB(248, 248, 240)
+SeparatorColor_Used = 1
+StringColor = RGB(230, 219, 116)
+StringColor_Used = 1
+StructureColor = RGB(166, 226, 46)
+StructureColor_Used = 1
+LineNumberColor = RGB(128, 128, 128)
+LineNumberColor_Used = 1
+LineNumberBackColor = RGB(39, 40, 34)
+LineNumberBackColor_Used = 1
+MarkerColor = RGB(0, 170, 170)
+MarkerColor_Used = 1
+CurrentLineColor = RGB(41, 41, 41)
+CurrentLineColor_Used = 1
+SelectionColor = RGB(192, 192, 192)
+SelectionColor_Used = 1
+SelectionFrontColor = RGB(0, 0, 0)
+SelectionFrontColor_Used = 1
+CursorColor = RGB(248, 248, 240)
+CursorColor_Used = 1
+Debugger_LineColor = RGB(248, 248, 242)
+Debugger_LineColor_Used = 1
+Debugger_LineSymbolColor = RGB(248, 248, 242)
+Debugger_LineSymbolColor_Used = 1
+Debugger_ErrorColor = RGB(255, 0, 0)
+Debugger_ErrorColor_Used = 1
+Debugger_ErrorSymbolColor = RGB(255, 0, 0)
+Debugger_ErrorSymbolColor_Used = 1
+Debugger_BreakPointColor = RGB(77, 153, 153)
+Debugger_BreakPointColor_Used = 1
+Debugger_BreakpoinSymbolColor = RGB(77, 153, 153)
+Debugger_BreakpoinSymbolColor_Used = 1
+DisabledBackColor = RGB(30, 30, 30)
+DisabledBackColor_Used = 1
+GoodBraceColor = RGB(230, 159, 102)
+GoodBraceColor_Used = 1
+BadBraceColor = RGB(249, 38, 114)
+BadBraceColor_Used = 1
+ProcedureBackColor = RGB(39, 40, 34)
+ProcedureBackColor_Used = 1
+CustomKeywordColor = RGB(102, 217, 239)
+CustomKeywordColor_Used = 1
+Debugger_WarningColor = RGB(255, 128, 0)
+Debugger_WarningColor_Used = 1
+Debugger_WarningSymbolColor = RGB(255, 128, 0)
+Debugger_WarningSymbolColor_Used = 1
+IndentColor = RGB(128, 128, 128)
+IndentColor_Used = 1
+ModuleColor = RGB(166, 226, 46)
+ModuleColor_Used = 1
+SelectionRepeatColor = RGB(70, 70, 70)
+SelectionRepeatColor_Used = 1
+PlainBackground = RGB(39, 40, 34)
+PlainBackground_Used = 1
+
+ToolsPanel_FrontColor = RGB(207, 207, 194)
+ToolsPanel_BackColor = RGB(39, 40, 34)
diff --git a/PureBasicIDE/data/DefaultColorSchemes/PHP Extended.prefs b/PureBasicIDE/data/DefaultColorSchemes/PHP Extended.prefs
new file mode 100644
index 00000000..39fece73
--- /dev/null
+++ b/PureBasicIDE/data/DefaultColorSchemes/PHP Extended.prefs
@@ -0,0 +1,86 @@
+; PHP Extended
+; Color scheme for PureBasic IDE
+
+[Sections]
+IncludeColors = 1
+
+[Colors]
+ASMKeywordColor = RGB(146, 75, 114)
+ASMKeywordColor_Used = 1
+BackgroundColor = RGB(255, 255, 255)
+BackgroundColor_Used = 1
+BasicKeywordColor = RGB(0, 128, 0)
+BasicKeywordColor_Used = 1
+CommentColor = RGB(255, 128, 0)
+CommentColor_Used = 1
+ConstantColor = RGB(146, 75, 114)
+ConstantColor_Used = 1
+LabelColor = RGB(0, 0, 160)
+LabelColor_Used = 1
+NormalTextColor = RGB(0, 0, 160)
+NormalTextColor_Used = 1
+NumberColor = RGB(0, 0, 255)
+NumberColor_Used = 1
+OperatorColor = RGB(128, 128, 0)
+OperatorColor_Used = 1
+PointerColor = RGB(0, 0, 0)
+PointerColor_Used = 1
+PureKeywordColor = RGB(0, 128, 0)
+PureKeywordColor_Used = 1
+SeparatorColor = RGB(0, 0, 0)
+SeparatorColor_Used = 1
+StringColor = RGB(255, 0, 0)
+StringColor_Used = 1
+StructureColor = RGB(0, 0, 128)
+StructureColor_Used = 1
+LineNumberColor = RGB(0, 0, 0)
+LineNumberColor_Used = 1
+LineNumberBackColor = RGB(240, 240, 240)
+LineNumberBackColor_Used = 1
+MarkerColor = RGB(0, 170, 170)
+MarkerColor_Used = 1
+CurrentLineColor = RGB(245, 245, 245)
+CurrentLineColor_Used = 1
+SelectionColor = RGB(192, 192, 192)
+SelectionColor_Used = 1
+SelectionFrontColor = RGB(0, 0, 0)
+SelectionFrontColor_Used = 1
+CursorColor = RGB(0, 0, 0)
+CursorColor_Used = 1
+Debugger_LineColor = RGB(232, 232, 255)
+Debugger_LineColor_Used = 1
+Debugger_LineSymbolColor = RGB(232, 232, 255)
+Debugger_LineSymbolColor_Used = 1
+Debugger_ErrorColor = RGB(255, 128, 128)
+Debugger_ErrorColor_Used = 1
+Debugger_ErrorSymbolColor = RGB(255, 0, 0)
+Debugger_ErrorSymbolColor_Used = 1
+Debugger_BreakPointColor = RGB(255, 208, 0)
+Debugger_BreakPointColor_Used = 1
+Debugger_BreakpoinSymbolColor = RGB(255, 208, 0)
+Debugger_BreakpoinSymbolColor_Used = 1
+DisabledBackColor = RGB(245, 245, 245)
+DisabledBackColor_Used = 1
+GoodBraceColor = RGB(0, 128, 0)
+GoodBraceColor_Used = 1
+BadBraceColor = RGB(255, 0, 0)
+BadBraceColor_Used = 1
+ProcedureBackColor = RGB(255, 255, 255)
+ProcedureBackColor_Used = 1
+CustomKeywordColor = RGB(0, 0, 0)
+CustomKeywordColor_Used = 1
+Debugger_WarningColor = RGB(0, 255, 255)
+Debugger_WarningColor_Used = 1
+Debugger_WarningSymbolColor = RGB(0, 255, 255)
+Debugger_WarningSymbolColor_Used = 1
+IndentColor = RGB(255, 128, 0)
+IndentColor_Used = 1
+ModuleColor = RGB(0, 0, 160)
+ModuleColor_Used = 1
+SelectionRepeatColor = RGB(220, 220, 220)
+SelectionRepeatColor_Used = 1
+PlainBackground = RGB(255, 255, 255)
+PlainBackground_Used = 1
+
+ToolsPanel_FrontColor = RGB(0, 0, 0)
+ToolsPanel_BackColor = RGB(244, 244, 244)
diff --git a/PureBasicIDE/data/DefaultColorSchemes/Visual Studio.prefs b/PureBasicIDE/data/DefaultColorSchemes/Visual Studio.prefs
new file mode 100644
index 00000000..06e96e85
--- /dev/null
+++ b/PureBasicIDE/data/DefaultColorSchemes/Visual Studio.prefs
@@ -0,0 +1,86 @@
+; Visual Studio
+; Color scheme for PureBasic IDE
+
+[Sections]
+IncludeColors = 1
+
+[Colors]
+ASMKeywordColor = RGB(0, 0, 128)
+ASMKeywordColor_Used = 1
+BackgroundColor = RGB(255, 255, 255)
+BackgroundColor_Used = 1
+BasicKeywordColor = RGB(0, 0, 255)
+BasicKeywordColor_Used = 1
+CommentColor = RGB(0, 128, 0)
+CommentColor_Used = 1
+ConstantColor = RGB(0, 0, 0)
+ConstantColor_Used = 1
+LabelColor = RGB(0, 0, 0)
+LabelColor_Used = 1
+NormalTextColor = RGB(0, 0, 0)
+NormalTextColor_Used = 1
+NumberColor = RGB(0, 0, 0)
+NumberColor_Used = 1
+OperatorColor = RGB(0, 0, 0)
+OperatorColor_Used = 1
+PointerColor = RGB(0, 0, 0)
+PointerColor_Used = 1
+PureKeywordColor = RGB(0, 0, 0)
+PureKeywordColor_Used = 1
+SeparatorColor = RGB(0, 0, 0)
+SeparatorColor_Used = 1
+StringColor = RGB(0, 0, 0)
+StringColor_Used = 1
+StructureColor = RGB(0, 0, 0)
+StructureColor_Used = 1
+LineNumberColor = RGB(128, 128, 128)
+LineNumberColor_Used = 1
+LineNumberBackColor = RGB(240, 240, 240)
+LineNumberBackColor_Used = 1
+MarkerColor = RGB(0, 0, 0)
+MarkerColor_Used = 1
+CurrentLineColor = RGB(240, 240, 240)
+CurrentLineColor_Used = 1
+SelectionColor = RGB(10, 36, 106)
+SelectionColor_Used = 1
+SelectionFrontColor = RGB(255, 255, 255)
+SelectionFrontColor_Used = 1
+CursorColor = RGB(0, 0, 0)
+CursorColor_Used = 1
+Debugger_LineColor = RGB(255, 255, 0)
+Debugger_LineColor_Used = 1
+Debugger_LineSymbolColor = RGB(255, 255, 0)
+Debugger_LineSymbolColor_Used = 1
+Debugger_ErrorColor = RGB(255, 0, 0)
+Debugger_ErrorColor_Used = 1
+Debugger_ErrorSymbolColor = RGB(255, 0, 0)
+Debugger_ErrorSymbolColor_Used = 1
+Debugger_BreakPointColor = RGB(0, 255, 255)
+Debugger_BreakPointColor_Used = 1
+Debugger_BreakpoinSymbolColor = RGB(0, 255, 255)
+Debugger_BreakpoinSymbolColor_Used = 1
+DisabledBackColor = RGB(245, 245, 245)
+DisabledBackColor_Used = 1
+GoodBraceColor = RGB(0, 0, 255)
+GoodBraceColor_Used = 1
+BadBraceColor = RGB(255, 0, 0)
+BadBraceColor_Used = 1
+ProcedureBackColor = RGB(255, 255, 255)
+ProcedureBackColor_Used = 1
+CustomKeywordColor = RGB(0, 0, 0)
+CustomKeywordColor_Used = 1
+Debugger_WarningColor = RGB(255, 128, 0)
+Debugger_WarningColor_Used = 1
+Debugger_WarningSymbolColor = RGB(255, 128, 0)
+Debugger_WarningSymbolColor_Used = 1
+IndentColor = RGB(0, 128, 0)
+IndentColor_Used = 1
+ModuleColor = RGB(0, 0, 0)
+ModuleColor_Used = 1
+SelectionRepeatColor = RGB(202, 214, 249)
+SelectionRepeatColor_Used = 1
+PlainBackground = RGB(255, 255, 255)
+PlainBackground_Used = 1
+
+ToolsPanel_FrontColor = RGB(0, 0, 0)
+ToolsPanel_BackColor = RGB(255, 255, 255)
diff --git a/PureBasicIDE/data/DefaultColorSchemes/White Style.prefs b/PureBasicIDE/data/DefaultColorSchemes/White Style.prefs
new file mode 100644
index 00000000..5984f750
--- /dev/null
+++ b/PureBasicIDE/data/DefaultColorSchemes/White Style.prefs
@@ -0,0 +1,86 @@
+; White Style
+; Color scheme for PureBasic IDE
+
+[Sections]
+IncludeColors = 1
+
+[Colors]
+ASMKeywordColor = RGB(255, 0, 0)
+ASMKeywordColor_Used = 1
+BackgroundColor = RGB(255, 255, 255)
+BackgroundColor_Used = 1
+BasicKeywordColor = RGB(0, 0, 128)
+BasicKeywordColor_Used = 1
+CommentColor = RGB(0, 128, 0)
+CommentColor_Used = 1
+ConstantColor = RGB(128, 0, 0)
+ConstantColor_Used = 1
+LabelColor = RGB(128, 128, 128)
+LabelColor_Used = 1
+NormalTextColor = RGB(128, 128, 192)
+NormalTextColor_Used = 1
+NumberColor = RGB(0, 0, 128)
+NumberColor_Used = 1
+OperatorColor = RGB(0, 0, 128)
+OperatorColor_Used = 1
+PointerColor = RGB(128, 128, 192)
+PointerColor_Used = 1
+PureKeywordColor = RGB(0, 0, 255)
+PureKeywordColor_Used = 1
+SeparatorColor = RGB(0, 0, 128)
+SeparatorColor_Used = 1
+StringColor = RGB(255, 128, 0)
+StringColor_Used = 1
+StructureColor = RGB(128, 128, 192)
+StructureColor_Used = 1
+LineNumberColor = RGB(111, 111, 111)
+LineNumberColor_Used = 1
+LineNumberBackColor = RGB(232, 232, 232)
+LineNumberBackColor_Used = 1
+MarkerColor = RGB(0, 170, 170)
+MarkerColor_Used = 1
+CurrentLineColor = RGB(255, 255, 255)
+CurrentLineColor_Used = 1
+SelectionColor = RGB(214, 212, 222)
+SelectionColor_Used = 1
+SelectionFrontColor = RGB(0, 0, 0)
+SelectionFrontColor_Used = 1
+CursorColor = RGB(0, 0, 0)
+CursorColor_Used = 1
+Debugger_LineColor = RGB(232, 232, 255)
+Debugger_LineColor_Used = 1
+Debugger_LineSymbolColor = RGB(232, 232, 255)
+Debugger_LineSymbolColor_Used = 1
+Debugger_ErrorColor = RGB(255, 0, 0)
+Debugger_ErrorColor_Used = 1
+Debugger_ErrorSymbolColor = RGB(255, 0, 0)
+Debugger_ErrorSymbolColor_Used = 1
+Debugger_BreakPointColor = RGB(0, 170, 170)
+Debugger_BreakPointColor_Used = 1
+Debugger_BreakpoinSymbolColor = RGB(0, 170, 170)
+Debugger_BreakpoinSymbolColor_Used = 1
+DisabledBackColor = RGB(255, 255, 255)
+DisabledBackColor_Used = 1
+GoodBraceColor = RGB(0, 0, 128)
+GoodBraceColor_Used = 1
+BadBraceColor = RGB(255, 0, 0)
+BadBraceColor_Used = 1
+ProcedureBackColor = RGB(255, 255, 255)
+ProcedureBackColor_Used = 1
+CustomKeywordColor = RGB(0, 0, 0)
+CustomKeywordColor_Used = 1
+Debugger_WarningColor = RGB(255, 128, 0)
+Debugger_WarningColor_Used = 1
+Debugger_WarningSymbolColor = RGB(255, 128, 0)
+Debugger_WarningSymbolColor_Used = 1
+IndentColor = RGB(0, 128, 0)
+IndentColor_Used = 1
+ModuleColor = RGB(128, 128, 192)
+ModuleColor_Used = 1
+SelectionRepeatColor = RGB(232, 231, 237)
+SelectionRepeatColor_Used = 1
+PlainBackground = RGB(255, 255, 255)
+PlainBackground_Used = 1
+
+ToolsPanel_FrontColor = RGB(0, 0, 0)
+ToolsPanel_BackColor = RGB(255, 255, 255)
From c5e255fc5dae211426a936141b020739332b2c13 Mon Sep 17 00:00:00 2001
From: kenmo-pb <25482520+kenmo-pb@users.noreply.github.com>
Date: Tue, 7 Jan 2025 23:36:03 -0500
Subject: [PATCH 10/10] scan-for-color-schemes: Documentation note about adding
new color scheme files
---
Documentation/English/Reference/ide_preferences.txt | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/Documentation/English/Reference/ide_preferences.txt b/Documentation/English/Reference/ide_preferences.txt
index 719b2148..3519af52 100644
--- a/Documentation/English/Reference/ide_preferences.txt
+++ b/Documentation/English/Reference/ide_preferences.txt
@@ -460,6 +460,15 @@
@EndOs
+@LineBreak
+@LineBreak
+ More color schemes can be added by creating scheme definition files
+ with the name format "SchemeName.prefs". The files have to
+ be copied to the "ColorSchemes" folder in the PureBasic installation directory
+ to be recognized by the IDE. The default scheme files can be used as examples
+ to create a new scheme, or you can export your colors from the
+ Import/Export section of the Preferences window (select "Include Color settings").
+
;-------------------------------------------------------------------------------------------------------------------
; Editor - Coloring - Custom Keywords
;-------------------------------------------------------------------------------------------------------------------