19#define PLAT_GTK_WIN32 0
20#define PLAT_GTK_MACOSX 0
42#elif defined(__HAIKU__)
46#elif defined(SCINTILLA_QT)
58#if defined(__WIN32__) || defined(_MSC_VER)
60#define PLAT_GTK_WIN32 1
65#define PLAT_GTK_MACOSX 1
68#elif defined(__APPLE__)
112 return (
x != other.x) || (
y != other.y);
116 return Point(
x + other.x,
y + other.y);
120 return Point(
x - other.x,
y - other.y);
150 return (rc.left ==
left) && (rc.right ==
right) &&
151 (rc.top ==
top) && (rc.bottom ==
bottom);
154 return (pt.x >=
left) && (pt.x <=
right) &&
159 return (pt.x >=
left) && ((pt.x+1) <=
right) &&
163 return (rc.left >=
left) && (rc.right <=
right) &&
164 (rc.top >=
top) && (rc.bottom <=
bottom);
167 return (
right > other.left) && (
left < other.right) &&
168 (
bottom > other.top) && (
top < other.bottom);
178 constexpr bool Empty() const noexcept {
193 constexpr ColourDesired(
unsigned int red,
unsigned int green,
unsigned int blue) noexcept :
194 co(red | (green << 8) | (blue << 16)) {
198 return co == other.co;
206 constexpr unsigned char GetRed() const noexcept {
209 constexpr unsigned char GetGreen() const noexcept {
210 return (
co >> 8) & 0xff;
212 constexpr unsigned char GetBlue() const noexcept {
213 return (
co >> 16) & 0xff;
236 constexpr ColourAlpha(
unsigned int red,
unsigned int green,
unsigned int blue) noexcept :
240 constexpr ColourAlpha(
unsigned int red,
unsigned int green,
unsigned int blue,
unsigned int alpha) noexcept :
241 ColourDesired(red | (green << 8) | (blue << 16) | (alpha << 24)) {
252 constexpr unsigned char GetAlpha() const noexcept {
261 const unsigned int red = (
GetRed() + other.GetRed()) / 2;
262 const unsigned int green = (
GetGreen() + other.GetGreen()) / 2;
263 const unsigned int blue = (
GetBlue() + other.GetBlue()) / 2;
264 const unsigned int alpha = (
GetAlpha() + other.GetAlpha()) / 2;
295 const char *faceName_,
299 int extraFontFlag_=0,
301 int characterSet_=0) noexcept :
419 void Show(
bool show=
true);
454 virtual void Create(
Window &parent,
int ctrlID,
Point location,
int lineHeight_,
bool unicodeMode_,
int technology_)=0;
461 virtual void Append(
char *s,
int type = -1)=0;
465 virtual int Find(
const char *prefix)=0;
466 virtual void GetValue(
int n,
char *value,
int len)=0;
468 virtual void RegisterRGBAImage(
int type,
int width,
int height,
const unsigned char *pixelsImage) = 0;
471 virtual void SetList(
const char*
list,
char separator,
char typesep)=0;
504#if defined(__clang__)
505# if __has_feature(attribute_analyzer_noreturn)
506# define CLANG_ANALYZER_NORETURN __attribute__((analyzer_noreturn))
508# define CLANG_ANALYZER_NORETURN
511# define CLANG_ANALYZER_NORETURN
533 return (a) | ((b) << 16);
542#define PLATFORM_ASSERT(c) ((void)0)
544#define PLATFORM_ASSERT(c) ((c) ? (void)(0) : Scintilla::Platform::Assert(#c, __FILE__, __LINE__))
constexpr ColourAlpha(unsigned int red, unsigned int green, unsigned int blue, unsigned int alpha) noexcept
constexpr unsigned char GetAlpha() const noexcept
constexpr ColourAlpha(ColourDesired cd, unsigned int alpha) noexcept
constexpr ColourAlpha(unsigned int red, unsigned int green, unsigned int blue) noexcept
ColourAlpha MixedWith(ColourAlpha other) const noexcept
constexpr float GetAlphaComponent() const noexcept
constexpr ColourDesired GetColour() const noexcept
constexpr ColourAlpha(int co_=0) noexcept
constexpr unsigned char GetRed() const noexcept
constexpr int AsInteger() const noexcept
constexpr unsigned char GetBlue() const noexcept
constexpr ColourDesired(unsigned int red, unsigned int green, unsigned int blue) noexcept
constexpr ColourDesired(int co_=0) noexcept
constexpr bool operator==(const ColourDesired &other) const noexcept
constexpr float GetRedComponent() const noexcept
constexpr float GetGreenComponent() const noexcept
constexpr unsigned char GetGreen() const noexcept
constexpr float GetBlueComponent() const noexcept
Holds an element of a gradient with an RGBA colour and a relative position.
ColourStop(float position_, ColourAlpha colour_) noexcept
Dynamic Library (DLL/SO/...) loading.
static DynamicLibrary * Load(const char *modulePath)
virtual ~DynamicLibrary()=default
virtual Function FindFunction(const char *name)=0
virtual void Create(const FontParameters &fp)
FontID GetID() const noexcept
void SetID(FontID fid_) noexcept
virtual void ListNotify(ListBoxEvent *plbe)=0
virtual PRectangle GetDesiredRect()=0
static ListBox * Allocate()
virtual int CaretFromEdge()=0
virtual void Select(int n)=0
virtual int GetVisibleRows() const =0
virtual void SetVisibleRows(int rows)=0
virtual void SetDelegate(IListBoxDelegate *lbDelegate)=0
virtual void SetAverageCharWidth(int width)=0
virtual void RegisterRGBAImage(int type, int width, int height, const unsigned char *pixelsImage)=0
virtual void GetValue(int n, char *value, int len)=0
virtual int GetSelection()=0
virtual void ClearRegisteredImages()=0
virtual void SetList(const char *list, char separator, char typesep)=0
void SetFont(Font &font) override=0
virtual int Find(const char *prefix)=0
virtual void Append(char *s, int type=-1)=0
virtual void Create(Window &parent, int ctrlID, Point location, int lineHeight_, bool unicodeMode_, int technology_)=0
virtual void RegisterImage(int type, const char *xpm_data)=0
A geometric rectangle class.
static constexpr PRectangle FromInts(int left_, int top_, int right_, int bottom_) noexcept
void Move(XYPOSITION xDelta, XYPOSITION yDelta) noexcept
constexpr bool ContainsWholePixel(Point pt) const noexcept
constexpr bool Intersects(PRectangle other) const noexcept
constexpr bool Empty() const noexcept
constexpr PRectangle(XYPOSITION left_=0, XYPOSITION top_=0, XYPOSITION right_=0, XYPOSITION bottom_=0) noexcept
constexpr bool Contains(PRectangle rc) const noexcept
constexpr bool operator==(const PRectangle &rc) const noexcept
constexpr XYPOSITION Height() const noexcept
constexpr XYPOSITION Width() const noexcept
constexpr bool Contains(Point pt) const noexcept
constexpr bool operator!=(Point other) const noexcept
static constexpr Point FromInts(int x_, int y_) noexcept
constexpr Point(XYPOSITION x_=0, XYPOSITION y_=0) noexcept
constexpr Point operator+(Point other) const noexcept
constexpr Point operator-(Point other) const noexcept
A surface abstracts a place to draw.
virtual void InitPixMap(int width, int height, Surface *surface_, WindowID wid)=0
virtual void Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back)=0
virtual XYPOSITION Descent(Font &font_)=0
virtual int DeviceHeightFont(int points)=0
virtual void SetClip(PRectangle rc)=0
virtual XYPOSITION Height(Font &font_)=0
virtual void RectangleDraw(PRectangle rc, ColourDesired fore, ColourDesired back)=0
virtual void Init(SurfaceID sid, WindowID wid)=0
static Surface * Allocate(int technology)
virtual void DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage)=0
virtual void PenColour(ColourDesired fore)=0
virtual void DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore)=0
virtual void RoundedRectangle(PRectangle rc, ColourDesired fore, ColourDesired back)=0
virtual XYPOSITION AverageCharWidth(Font &font_)=0
Surface() noexcept=default
virtual void FillRectangle(PRectangle rc, Surface &surfacePattern)=0
virtual void Init(WindowID wid)=0
virtual void Polygon(Point *pts, size_t npts, ColourDesired fore, ColourDesired back)=0
virtual bool Initialised()=0
virtual void DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore, ColourDesired back)=0
virtual void MoveTo(int x_, int y_)=0
virtual int LogPixelsY()=0
virtual XYPOSITION Ascent(Font &font_)=0
virtual void SetDBCSMode(int codePage)=0
virtual void MeasureWidths(Font &font_, const char *s, int len, XYPOSITION *positions)=0
virtual void LineTo(int x_, int y_)=0
virtual void DrawTextClipped(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore, ColourDesired back)=0
virtual void FillRectangle(PRectangle rc, ColourDesired back)=0
virtual void FlushCachedState()=0
virtual void AlphaRectangle(PRectangle rc, int cornerSize, ColourDesired fill, int alphaFill, ColourDesired outline, int alphaOutline, int flags)=0
virtual void GradientRectangle(PRectangle rc, const std::vector< ColourStop > &stops, GradientOptions options)=0
virtual XYPOSITION WidthText(Font &font_, const char *s, int len)=0
virtual void Copy(PRectangle rc, Point from, Surface &surfaceSource)=0
virtual void SetUnicodeMode(bool unicodeMode_)=0
virtual XYPOSITION InternalLeading(Font &font_)=0
Class to hide the details of window manipulation.
PRectangle GetMonitorRect(Point pt)
Window(const Window &source)=delete
bool Created() const noexcept
virtual void SetFont(Font &font)
Window & operator=(WindowID wid_) noexcept
Window & operator=(Window &&)=delete
PRectangle GetClientPosition() const
Window & operator=(const Window &)=delete
PRectangle GetPosition() const
void SetPositionRelative(PRectangle rc, const Window *relativeTo)
void InvalidateRectangle(PRectangle rc)
void SetPosition(PRectangle rc)
WindowID GetID() const noexcept
void SetCursor(Cursor curs)
void Show(bool show=true)
#define fill(Order, Group, Idx, Charset, Name)
Styling buffer using one element for each run rather than using a filled buffer.
constexpr const float componentMaximum
Holds an RGB colour with 8 bits for each component.
FontParameters(const char *faceName_, float size_=10, int weight_=400, bool italic_=false, int extraFontFlag_=0, int technology_=0, int characterSet_=0) noexcept
ListBoxEvent(EventType event_) noexcept
enum Scintilla::ListBoxEvent::EventType event