From 640bc7546d4d8ad5228e09ed2d280ea12b0690e9 Mon Sep 17 00:00:00 2001
From: nyamatongwe Last edited 18/June/2011 NH Last edited 24/June/2011 NH There is an overview of the internal design of
Scintilla. SCI_MARKERSETFORE(int markerNumber, int colour)
SCI_REGISTERIMAGE(int type, const char *xpmData)Scintilla Documentation
-
@@ -3306,6 +3306,10 @@ struct Sci_TextToFind {
markerSymbols)
+
+
+
@@ -3882,7 +3897,8 @@ struct Sci_TextToFind {
-
+
+
@@ -3995,6 +4011,7 @@ struct Sci_TextToFind {
+ SCI_REGISTERRGBAIMAGE(int type, const char *pixels)
SCI_CLEARREGISTEREDIMAGES
SCI_AUTOCSETTYPESEPARATOR(char separatorCharacter)
SCI_AUTOCGETTYPESEPARATOR
@@ -4002,7 +4019,11 @@ struct Sci_TextToFind {
Autocompletion list items may display an image as well as text. Each image is first registered with an integer
type. Then this integer is included in the text of the list separated by a '?' from the text. For example,
"fclose?2 fopen" displays image 2 before the string "fclose" and no image before "fopen".
- The images are in XPM format.
+ The images are in either the XPM format (SCI_REGISTERIMAGE) or
+ RGBA format (SCI_REGISTERRGBAIMAGE).
+ For SCI_REGISTERRGBAIMAGE the width and height must previously been set with
+ the and
+ messages.
The set of registered images can be cleared with SCI_CLEARREGISTEREDIMAGES and the '?' separator changed
with SCI_AUTOCSETTYPESEPARATOR.
The XPM format is supported for images. - This format is described here. + +
Two formats are supported for images used in margin markers and autocompletion lists, RGBA and XPM.
+ +The RGBA format allows translucency with an alpha
+ value for each pixel. It is simpler than
+ XPM and more capable.
The data is a sequence of 4 byte pixel values starting with the pixels for the top line, with the + leftmost pixel first, then continuing with the pixels for subsequent lines. There is no gap between + lines for alignment reasons.
+ +Each pixel consists of, in order, a red byte, a green byte, a blue byte and an alpha byte. + The colour bytes are not premultiplied by the alpha value. That is, a fully red pixel that is + 25% opaque will be [FF, 00, 00, 3F]
+ +Since the RGBA pixel data does not include any size information the + width and height must previously been set with the + and + messages.
+ +GUI platforms often include functions for reading image file formats like PNG into memory + in the RGBA form or a similar form. + If there is no suitable platform support, the LodePNG and picoPNG libraries are small libraries + for loading and decoding PNG files available under a BSD-style license.
+ +RGBA format is supported on Windows, GTK+ and OS X Cocoa. + It is not supported on OS X Carbon.
+ +The XPM format is + described here. Scintilla is only able to handle XPM pixmaps that use one character per pixel with no named colours. There may be a completely transparent colour named "None".
There are two forms of data structure used for XPM images, the first "lines form" format is well suited @@ -6609,6 +6662,8 @@ for line = lineStart to lineEnd do SCI_ENSUREVISIBLE(line) next to determine which format: if the bytes start with "/* XPM */" then it is treated as text form, otherwise it is treated as lines form.
+XPM format is supported on on all platforms.
+On GTK+, the following functions create a Scintilla widget, communicate with it and allow resources to be released after all Scintilla widgets have been destroyed.
-- cgit v1.2.3