geany  1.38
About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...). F: office T: editor programming GTK+ IDE
  Fossies Dox: geany-1.38.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

Indicator.h
Go to the documentation of this file.
1// Scintilla source code edit control
2/** @file Indicator.h
3 ** Defines the style of indicators which are text decorations such as underlining.
4 **/
5// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
6// The License.txt file describes the conditions under which this software may be distributed.
7
8#ifndef INDICATOR_H
9#define INDICATOR_H
10
11namespace Scintilla {
12
14 int style;
16 StyleAndColour() noexcept : style(INDIC_PLAIN), fore(0, 0, 0) {
17 }
18 StyleAndColour(int style_, ColourDesired fore_ = ColourDesired(0, 0, 0)) noexcept : style(style_), fore(fore_) {
19 }
20 bool operator==(const StyleAndColour &other) const noexcept {
21 return (style == other.style) && (fore == other.fore);
22 }
23};
24
25/**
26 */
27class Indicator {
28public:
29 enum class State { normal, hover };
32 bool under;
36 Indicator() noexcept : under(false), fillAlpha(30), outlineAlpha(50), attributes(0) {
37 }
38 Indicator(int style_, ColourDesired fore_=ColourDesired(0,0,0), bool under_=false, int fillAlpha_=30, int outlineAlpha_=50) noexcept :
39 sacNormal(style_, fore_), sacHover(style_, fore_), under(under_), fillAlpha(fillAlpha_), outlineAlpha(outlineAlpha_), attributes(0) {
40 }
41 void Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine, const PRectangle &rcCharacter, State drawState, int value) const;
42 bool IsDynamic() const noexcept {
43 return !(sacNormal == sacHover);
44 }
45 bool OverridesTextFore() const noexcept {
47 }
48 int Flags() const noexcept {
49 return attributes;
50 }
51 void SetFlags(int attributes_) noexcept;
52};
53
54}
55
56#endif
#define INDIC_PLAIN
Definition: Scintilla.h:287
#define INDIC_TEXTFORE
Definition: Scintilla.h:304
void SetFlags(int attributes_) noexcept
Definition: Indicator.cxx:271
Indicator(int style_, ColourDesired fore_=ColourDesired(0, 0, 0), bool under_=false, int fillAlpha_=30, int outlineAlpha_=50) noexcept
Definition: Indicator.h:38
StyleAndColour sacNormal
Definition: Indicator.h:30
bool IsDynamic() const noexcept
Definition: Indicator.h:42
Indicator() noexcept
Definition: Indicator.h:36
void Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine, const PRectangle &rcCharacter, State drawState, int value) const
Definition: Indicator.cxx:31
bool OverridesTextFore() const noexcept
Definition: Indicator.h:45
int Flags() const noexcept
Definition: Indicator.h:48
StyleAndColour sacHover
Definition: Indicator.h:31
A geometric rectangle class.
Definition: Platform.h:131
A surface abstracts a place to draw.
Definition: Platform.h:340
Styling buffer using one element for each run rather than using a filled buffer.
Definition: Converter.h:9
State
Definition: splitwindow.c:51
StyleAndColour(int style_, ColourDesired fore_=ColourDesired(0, 0, 0)) noexcept
Definition: Indicator.h:18
bool operator==(const StyleAndColour &other) const noexcept
Definition: Indicator.h:20
ColourDesired fore
Definition: Indicator.h:15
StyleAndColour() noexcept
Definition: Indicator.h:16