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
![]() ![]() |
MarginView draws the margins. More...
#include <MarginView.h>
Public Member Functions | |
MarginView () noexcept | |
void | DropGraphics (bool freeObjects) |
void | AllocateGraphics (const ViewStyle &vsDraw) |
void | RefreshPixMaps (Surface *surfaceWindow, WindowID wid, const ViewStyle &vsDraw) |
void | PaintMargin (Surface *surface, Sci::Line topLine, PRectangle rc, PRectangle rcMargin, const EditModel &model, const ViewStyle &vs) |
Public Attributes | |
std::unique_ptr< Surface > | pixmapSelMargin |
std::unique_ptr< Surface > | pixmapSelPattern |
std::unique_ptr< Surface > | pixmapSelPatternOffset1 |
HighlightDelimiter | highlightDelimiter |
int | wrapMarkerPaddingRight |
DrawWrapMarkerFn | customDrawWrapMarker |
Some platforms, notably PLAT_CURSES, do not support Scintilla's native DrawWrapMarker function for drawing wrap markers. More... | |
MarginView draws the margins.
Definition at line 20 of file MarginView.h.
|
noexcept |
Definition at line 103 of file MarginView.cxx.
References customDrawWrapMarker, and wrapMarkerPaddingRight.
void Scintilla::MarginView::AllocateGraphics | ( | const ViewStyle & | vsDraw | ) |
Definition at line 123 of file MarginView.cxx.
References Scintilla::Surface::Allocate(), pixmapSelMargin, pixmapSelPattern, pixmapSelPatternOffset1, and Scintilla::ViewStyle::technology.
Referenced by Scintilla::Editor::AllocateGraphics().
void Scintilla::MarginView::DropGraphics | ( | bool | freeObjects | ) |
Definition at line 108 of file MarginView.cxx.
References pixmapSelMargin, pixmapSelPattern, and pixmapSelPatternOffset1.
Referenced by Scintilla::Editor::DropGraphics().
void Scintilla::MarginView::PaintMargin | ( | Surface * | surface, |
Sci::Line | topLine, | ||
PRectangle | rc, | ||
PRectangle | rcMargin, | ||
const EditModel & | model, | ||
const ViewStyle & | vs | ||
) |
Definition at line 180 of file MarginView.cxx.
References Scintilla::Document::AnnotationLines(), Scintilla::LineMarker::body, Scintilla::PRectangle::bottom, customDrawWrapMarker, Scintilla::drawAll, Scintilla::DrawStyledText(), Scintilla::DrawTextNoClipPhase(), Scintilla::DrawWrapMarker(), Scintilla::Surface::FillRectangle(), Scintilla::EditModel::foldFlags, Scintilla::Document::GetHighlightDelimiters(), Scintilla::Document::GetLevel(), Scintilla::Document::GetLineState(), Scintilla::Document::GetMark(), Scintilla::EditModel::GetVisibleOriginInMain(), Scintilla::LineMarker::head, Scintilla::LineMarker::headWithTail, highlightDelimiter, Scintilla::HighlightDelimiter::IsBodyOfFoldBlock(), Scintilla::HighlightDelimiter::isEnabled, Scintilla::HighlightDelimiter::IsFoldBlockHighlighted(), Scintilla::HighlightDelimiter::IsHeadOfFoldBlock(), Scintilla::HighlightDelimiter::IsTailOfFoldBlock(), Scintilla::PRectangle::left, Scintilla::StyledText::length, Scintilla::LevelNumber(), Scintilla::ViewStyle::lineHeight, Scintilla::EditModel::LinesOnScreen(), Scintilla::Selection::MainCaret(), Scintilla::ViewStyle::marginNumberPadding, Scintilla::Document::MarginStyledText(), Scintilla::ViewStyle::marginStyleOffset, Scintilla::ViewStyle::markers, Scintilla::ViewStyle::maxAscent, Scintilla::ViewStyle::ms, Scintilla::EditModel::pcs, Scintilla::EditModel::pdoc, pixmapSelPattern, pixmapSelPatternOffset1, PLATFORM_ASSERT, Scintilla::PRectangle::right, SC_FOLDFLAG_LEVELNUMBERS, SC_FOLDFLAG_LINESTATE, SC_FOLDLEVELBASE, SC_FOLDLEVELHEADERFLAG, SC_FOLDLEVELWHITEFLAG, SC_MARGIN_BACK, SC_MARGIN_COLOUR, SC_MARGIN_FORE, SC_MARGIN_NUMBER, SC_MARGIN_RTEXT, SC_MARGIN_TEXT, SC_MARKNUM_FOLDER, SC_MARKNUM_FOLDEREND, SC_MARKNUM_FOLDERMIDTAIL, SC_MARKNUM_FOLDEROPEN, SC_MARKNUM_FOLDEROPENMID, SC_MARKNUM_FOLDERSUB, SC_MARKNUM_FOLDERTAIL, SC_MASK_FOLDERS, SC_WRAPVISUALFLAG_MARGIN, Scintilla::Document::SciLineFromPosition(), Scintilla::EditModel::sel, STYLE_DEFAULT, STYLE_LINENUMBER, Scintilla::StyledText::StyleAt(), Scintilla::ViewStyle::styles, Scintilla::SubstituteMarkerIfEmpty(), Scintilla::LineMarker::tail, Scintilla::StyledText::text, Scintilla::PRectangle::top, Scintilla::EditModel::TopLineOfMain(), Scintilla::LineMarker::undefined, Scintilla::ValidStyledText(), Scintilla::WidestLineWidth(), Scintilla::Surface::WidthText(), wrapMarkerPaddingRight, Scintilla::ViewStyle::wrapVisualFlags, and Scintilla::Point::y.
Referenced by Scintilla::Editor::PaintSelMargin().
void Scintilla::MarginView::RefreshPixMaps | ( | Surface * | surfaceWindow, |
WindowID | wid, | ||
const ViewStyle & | vsDraw | ||
) |
Definition at line 132 of file MarginView.cxx.
References Scintilla::ViewStyle::foldmarginColour, Scintilla::ViewStyle::foldmarginHighlightColour, Scintilla::PRectangle::FromInts(), Scintilla::ColourOptional::isSet, pixmapSelPattern, pixmapSelPatternOffset1, Scintilla::ViewStyle::selbar, and Scintilla::ViewStyle::selbarlight.
Referenced by Scintilla::Editor::RefreshPixMaps().
DrawWrapMarkerFn Scintilla::MarginView::customDrawWrapMarker |
Some platforms, notably PLAT_CURSES, do not support Scintilla's native DrawWrapMarker function for drawing wrap markers.
Allow those platforms to override it instead of creating a new method in the Surface class that existing platforms must implement as empty.
Definition at line 33 of file MarginView.h.
Referenced by MarginView(), and PaintMargin().
HighlightDelimiter Scintilla::MarginView::highlightDelimiter |
Definition at line 26 of file MarginView.h.
Referenced by Scintilla::Editor::MovedCaret(), Scintilla::Editor::NotifyModified(), PaintMargin(), Scintilla::Editor::SetEmptySelection(), Scintilla::Editor::SetSelection(), and Scintilla::Editor::WndProc().
std::unique_ptr<Surface> Scintilla::MarginView::pixmapSelMargin |
Definition at line 22 of file MarginView.h.
Referenced by AllocateGraphics(), DropGraphics(), Scintilla::Editor::PaintSelMargin(), and Scintilla::Editor::RefreshPixMaps().
std::unique_ptr<Surface> Scintilla::MarginView::pixmapSelPattern |
Definition at line 23 of file MarginView.h.
Referenced by AllocateGraphics(), DropGraphics(), Scintilla::Editor::Paint(), PaintMargin(), and RefreshPixMaps().
std::unique_ptr<Surface> Scintilla::MarginView::pixmapSelPatternOffset1 |
Definition at line 24 of file MarginView.h.
Referenced by AllocateGraphics(), DropGraphics(), PaintMargin(), and RefreshPixMaps().
int Scintilla::MarginView::wrapMarkerPaddingRight |
Definition at line 28 of file MarginView.h.
Referenced by MarginView(), and PaintMargin().