diff options
author | Neil <nyamatongwe@gmail.com> | 2024-08-15 19:02:46 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2024-08-15 19:02:46 +1000 |
commit | dcbc339899911e1a3a743de1c0c25d0c253dd39a (patch) | |
tree | 3d4fcd3405e7b4620476c36b0102031114bf65ad /include | |
parent | 6f51f5975920272f5f691d690107d15291a335f2 (diff) | |
download | scintilla-mirror-dcbc339899911e1a3a743de1c0c25d0c253dd39a.tar.gz |
Add SCI_STYLESETSTRETCH to support condensed and expanded text styles.
Diffstat (limited to 'include')
-rw-r--r-- | include/Scintilla.h | 11 | ||||
-rw-r--r-- | include/Scintilla.iface | 17 | ||||
-rw-r--r-- | include/ScintillaCall.h | 2 | ||||
-rw-r--r-- | include/ScintillaMessages.h | 2 | ||||
-rw-r--r-- | include/ScintillaTypes.h | 12 |
5 files changed, 44 insertions, 0 deletions
diff --git a/include/Scintilla.h b/include/Scintilla.h index 6fec9be58..d7c08fa25 100644 --- a/include/Scintilla.h +++ b/include/Scintilla.h @@ -282,6 +282,17 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define SCI_STYLESETHOTSPOT 2409 #define SCI_STYLESETCHECKMONOSPACED 2254 #define SCI_STYLEGETCHECKMONOSPACED 2255 +#define SC_STRETCH_ULTRA_CONDENSED 1 +#define SC_STRETCH_EXTRA_CONDENSED 2 +#define SC_STRETCH_CONDENSED 3 +#define SC_STRETCH_SEMI_CONDENSED 4 +#define SC_STRETCH_NORMAL 5 +#define SC_STRETCH_SEMI_EXPANDED 6 +#define SC_STRETCH_EXPANDED 7 +#define SC_STRETCH_EXTRA_EXPANDED 8 +#define SC_STRETCH_ULTRA_EXPANDED 9 +#define SCI_STYLESETSTRETCH 2258 +#define SCI_STYLEGETSTRETCH 2259 #define SCI_STYLESETINVISIBLEREPRESENTATION 2256 #define SCI_STYLEGETINVISIBLEREPRESENTATION 2257 #define SC_ELEMENT_LIST 0 diff --git a/include/Scintilla.iface b/include/Scintilla.iface index 25201cf47..4a3d15b63 100644 --- a/include/Scintilla.iface +++ b/include/Scintilla.iface @@ -700,6 +700,23 @@ set void StyleSetCheckMonospaced=2254(int style, bool checkMonospaced) # Get whether a style may be monospaced. get bool StyleGetCheckMonospaced=2255(int style,) +enu FontStretch=SC_STRETCH_ +val SC_STRETCH_ULTRA_CONDENSED=1 +val SC_STRETCH_EXTRA_CONDENSED=2 +val SC_STRETCH_CONDENSED=3 +val SC_STRETCH_SEMI_CONDENSED=4 +val SC_STRETCH_NORMAL=5 +val SC_STRETCH_SEMI_EXPANDED=6 +val SC_STRETCH_EXPANDED=7 +val SC_STRETCH_EXTRA_EXPANDED=8 +val SC_STRETCH_ULTRA_EXPANDED=9 + +# Set the stretch of characters of a style. +set void StyleSetStretch=2258(int style, FontStretch stretch) + +# Get the stretch of characters of a style. +get FontStretch StyleGetStretch=2259(int style,) + # Set the invisible representation for a style. set void StyleSetInvisibleRepresentation=2256(int style, string representation) diff --git a/include/ScintillaCall.h b/include/ScintillaCall.h index 065a60ac5..c1f35571f 100644 --- a/include/ScintillaCall.h +++ b/include/ScintillaCall.h @@ -209,6 +209,8 @@ public: void StyleSetHotSpot(int style, bool hotspot); void StyleSetCheckMonospaced(int style, bool checkMonospaced); bool StyleGetCheckMonospaced(int style); + void StyleSetStretch(int style, Scintilla::FontStretch stretch); + Scintilla::FontStretch StyleGetStretch(int style); void StyleSetInvisibleRepresentation(int style, const char *representation); int StyleGetInvisibleRepresentation(int style, char *representation); std::string StyleGetInvisibleRepresentation(int style); diff --git a/include/ScintillaMessages.h b/include/ScintillaMessages.h index 847ec0881..df7f2e743 100644 --- a/include/ScintillaMessages.h +++ b/include/ScintillaMessages.h @@ -137,6 +137,8 @@ enum class Message { StyleSetHotSpot = 2409, StyleSetCheckMonospaced = 2254, StyleGetCheckMonospaced = 2255, + StyleSetStretch = 2258, + StyleGetStretch = 2259, StyleSetInvisibleRepresentation = 2256, StyleGetInvisibleRepresentation = 2257, SetElementColour = 2753, diff --git a/include/ScintillaTypes.h b/include/ScintillaTypes.h index 4b7773a26..6d3e2a705 100644 --- a/include/ScintillaTypes.h +++ b/include/ScintillaTypes.h @@ -165,6 +165,18 @@ enum class FontWeight { Bold = 700, }; +enum class FontStretch { + UltraCondensed = 1, + ExtraCondensed = 2, + Condensed = 3, + SemiCondensed = 4, + Normal = 5, + SemiExpanded = 6, + Expanded = 7, + ExtraExpanded = 8, + UltraExpanded = 9, +}; + enum class Element { List = 0, ListBack = 1, |