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
![]() ![]() |
#include <Selection.h>
Public Types | |
enum | selTypes { noSel , selStream , selRectangle , selLines , selThin } |
Public Member Functions | |
Selection () | |
~Selection () | |
bool | IsRectangular () const noexcept |
Sci::Position | MainCaret () const noexcept |
Sci::Position | MainAnchor () const noexcept |
SelectionRange & | Rectangular () noexcept |
SelectionSegment | Limits () const noexcept |
SelectionSegment | LimitsForRectangularElseMain () const |
size_t | Count () const noexcept |
size_t | Main () const noexcept |
void | SetMain (size_t r) noexcept |
SelectionRange & | Range (size_t r) noexcept |
const SelectionRange & | Range (size_t r) const noexcept |
SelectionRange & | RangeMain () noexcept |
const SelectionRange & | RangeMain () const noexcept |
SelectionPosition | Start () const noexcept |
bool | MoveExtends () const noexcept |
void | SetMoveExtends (bool moveExtends_) noexcept |
bool | Empty () const noexcept |
SelectionPosition | Last () const noexcept |
Sci::Position | Length () const noexcept |
void | MovePositions (bool insertion, Sci::Position startChange, Sci::Position length) noexcept |
void | TrimSelection (SelectionRange range) noexcept |
void | TrimOtherSelections (size_t r, SelectionRange range) noexcept |
void | SetSelection (SelectionRange range) |
void | AddSelection (SelectionRange range) |
void | AddSelectionWithoutTrim (SelectionRange range) |
void | DropSelection (size_t r) |
void | DropAdditionalRanges () |
void | TentativeSelection (SelectionRange range) |
void | CommitTentative () noexcept |
int | CharacterInSelection (Sci::Position posCharacter) const noexcept |
int | InSelectionForEOL (Sci::Position pos) const noexcept |
Sci::Position | VirtualSpaceFor (Sci::Position pos) const noexcept |
void | Clear () |
void | RemoveDuplicates () |
void | RotateMain () noexcept |
bool | Tentative () const noexcept |
std::vector< SelectionRange > | RangesCopy () const |
Public Attributes | |
selTypes | selType |
Private Attributes | |
std::vector< SelectionRange > | ranges |
std::vector< SelectionRange > | rangesSaved |
SelectionRange | rangeRectangular |
size_t | mainRange |
bool | moveExtends |
bool | tentativeMain |
Definition at line 136 of file Selection.h.
Enumerator | |
---|---|
noSel | |
selStream | |
selRectangle | |
selLines | |
selThin |
Definition at line 144 of file Selection.h.
Selection::Selection | ( | ) |
Definition at line 193 of file Selection.cxx.
References AddSelection().
Selection::~Selection | ( | ) |
Definition at line 197 of file Selection.cxx.
void Selection::AddSelection | ( | SelectionRange | range | ) |
Definition at line 348 of file Selection.cxx.
References mainRange, ranges, and TrimSelection().
Referenced by Scintilla::Editor::MultipleSelectAdd(), Selection(), TentativeSelection(), and Scintilla::Editor::WndProc().
void Selection::AddSelectionWithoutTrim | ( | SelectionRange | range | ) |
Definition at line 354 of file Selection.cxx.
References mainRange, and ranges.
Referenced by Scintilla::Editor::SetRectangularRange().
|
noexcept |
Definition at line 393 of file Selection.cxx.
Referenced by Scintilla::EditView::DrawBackground(), and Scintilla::EditView::DrawForeground().
void Selection::Clear | ( | ) |
Definition at line 420 of file Selection.cxx.
References mainRange, moveExtends, rangeRectangular, ranges, Scintilla::SelectionRange::Reset(), selStream, and selType.
Referenced by Scintilla::Editor::ButtonDownWithModifiers(), Scintilla::Editor::ClearAll(), Scintilla::Editor::MovePositionTo(), Scintilla::Editor::PasteRectangular(), Scintilla::ScintillaGTK::PressThis(), Scintilla::Editor::SelectAll(), Scintilla::Editor::SetDocPointer(), Scintilla::Editor::SetEmptySelection(), and Scintilla::Editor::WndProc().
|
noexcept |
Definition at line 388 of file Selection.cxx.
References rangesSaved, and tentativeMain.
Referenced by Scintilla::Editor::ButtonUpWithModifiers().
|
noexcept |
Definition at line 237 of file Selection.cxx.
References ranges.
Referenced by Scintilla::ScintillaGTKAccessible::AddSelection(), Scintilla::ScintillaBase::AutoCompleteInsert(), Scintilla::BreakFinder::BreakFinder(), Scintilla::Editor::ButtonDownWithModifiers(), Scintilla::Editor::ButtonMoveWithModifiers(), Scintilla::Editor::ButtonUpWithModifiers(), Scintilla::Editor::ChangeCaseOfSelection(), Scintilla::Editor::Clear(), Scintilla::Editor::ClearBeforeTentativeStart(), Scintilla::Editor::ClearSelection(), Scintilla::Editor::CursorUpOrDown(), Scintilla::Editor::DelCharBack(), Scintilla::Editor::DelWordOrLine(), Scintilla::ScintillaGTK::DragDataGet(), Scintilla::EditView::DrawCarets(), Scintilla::EditView::DrawEOL(), Scintilla::ScintillaGTK::DrawImeIndicator(), DrawTranslucentSelection(), Scintilla::Editor::DropAt(), Scintilla::Editor::Duplicate(), Scintilla::Editor::FilterSelections(), Scintilla::ScintillaGTKAccessible::GetNSelections(), Scintilla::ScintillaGTKAccessible::GetSelection(), Scintilla::Editor::HorizontalMove(), Scintilla::Editor::Indent(), Scintilla::Editor::InsertCharacter(), Scintilla::Editor::InsertPaste(), Scintilla::Editor::InvalidateCaret(), Scintilla::Editor::InvalidateSelection(), Scintilla::Editor::KeyCommand(), Scintilla::ScintillaGTK::MoveImeCarets(), Scintilla::Editor::MovePositionTo(), Scintilla::Editor::NewLine(), Scintilla::Editor::PointInSelection(), Scintilla::Editor::PositionInSelection(), Scintilla::ScintillaGTKAccessible::RemoveSelection(), Scintilla::Editor::SelectionContainsProtected(), Scintilla::Editor::SetEmptySelection(), Scintilla::ScintillaGTKAccessible::SetSelection(), Scintilla::Editor::SetSelection(), Scintilla::Editor::SetSelectionNMessage(), Scintilla::Editor::ThinRectangularRange(), Scintilla::ScintillaGTKAccessible::UpdateCursor(), and Scintilla::Editor::WndProc().
void Selection::DropAdditionalRanges | ( | ) |
Definition at line 374 of file Selection.cxx.
References RangeMain(), and SetSelection().
Referenced by Scintilla::Editor::CursorUpOrDown(), Scintilla::Editor::DelWordOrLine(), Scintilla::Editor::FilterSelections(), Scintilla::Editor::HorizontalMove(), Scintilla::Editor::KeyCommand(), Scintilla::Editor::MovePositionTo(), and Scintilla::Editor::NewLine().
void Selection::DropSelection | ( | size_t | r | ) |
Definition at line 359 of file Selection.cxx.
References mainRange, and ranges.
Referenced by Scintilla::Editor::WndProc().
|
noexcept |
Definition at line 282 of file Selection.cxx.
References ranges.
Referenced by Scintilla::ScintillaGTKAccessible::AddSelection(), Scintilla::Editor::ButtonDownWithModifiers(), Scintilla::ScintillaGTK::ClaimSelection(), Scintilla::Editor::Clear(), Scintilla::Editor::ClearBeforeTentativeStart(), Scintilla::ScintillaBase::ContextMenu(), Scintilla::ScintillaGTK::Copy(), Scintilla::Editor::CopySelectionRange(), Scintilla::Editor::DelCharBack(), Scintilla::ScintillaGTK::DragDataGet(), Scintilla::Editor::Duplicate(), Scintilla::ScintillaGTKAccessible::GetNSelections(), Scintilla::Editor::InsertCharacter(), Scintilla::Editor::MovePositionTo(), Scintilla::Editor::NewLine(), RemoveDuplicates(), Scintilla::ScintillaGTKAccessible::RemoveSelection(), Scintilla::Editor::SelectionEmpty(), and Scintilla::Editor::WndProc().
|
noexcept |
Definition at line 401 of file Selection.cxx.
References pos.
Referenced by Scintilla::EditView::DrawEOL(), Scintilla::EditView::DrawFoldDisplayText(), and Scintilla::EditView::FillLineRemainder().
|
noexcept |
Definition at line 200 of file Selection.cxx.
References selRectangle, selThin, and selType.
Referenced by Scintilla::Editor::ButtonDownWithModifiers(), Scintilla::Editor::ButtonMoveWithModifiers(), Scintilla::Editor::ButtonUpWithModifiers(), Scintilla::Editor::ClearSelection(), Scintilla::ScintillaGTK::Copy(), Scintilla::Editor::CopySelectionRange(), Scintilla::Editor::CursorUpOrDown(), Scintilla::Editor::DelCharBack(), Scintilla::Editor::Duplicate(), Scintilla::Editor::HorizontalMove(), Scintilla::Editor::InvalidateSelection(), Scintilla::Editor::KeyCommand(), LimitsForRectangularElseMain(), Scintilla::Editor::MovePositionTo(), Scintilla::Editor::MoveSelectedLines(), Scintilla::Editor::NewLine(), Scintilla::Editor::SetRectangularRange(), Scintilla::Editor::SetSelection(), Start(), Scintilla::Editor::ThinRectangularRange(), Scintilla::Editor::VerticalCentreCaret(), and Scintilla::Editor::WndProc().
|
noexcept |
Definition at line 290 of file Selection.cxx.
References ranges.
Referenced by Scintilla::Editor::Duplicate(), and Scintilla::Editor::MovePositionTo().
|
noexcept |
Definition at line 301 of file Selection.cxx.
References ranges.
|
noexcept |
Definition at line 216 of file Selection.cxx.
References Scintilla::SelectionSegment::Extend(), and ranges.
Referenced by Scintilla::Editor::CursorUpOrDown(), Scintilla::Editor::HorizontalMove(), and LimitsForRectangularElseMain().
SelectionSegment Selection::LimitsForRectangularElseMain | ( | ) | const |
Definition at line 229 of file Selection.cxx.
References IsRectangular(), Limits(), mainRange, and ranges.
Referenced by Scintilla::Editor::WndProc().
|
noexcept |
Definition at line 241 of file Selection.cxx.
References mainRange.
Referenced by Scintilla::Editor::CursorUpOrDown(), Scintilla::EditView::DrawCarets(), Scintilla::EditView::DrawEOL(), DrawTranslucentSelection(), Scintilla::Editor::PointMainCaret(), and Scintilla::Editor::WndProc().
|
noexcept |
Definition at line 208 of file Selection.cxx.
References mainRange, and ranges.
Referenced by Scintilla::Editor::ButtonDownWithModifiers(), and Scintilla::Editor::WndProc().
|
noexcept |
Definition at line 204 of file Selection.cxx.
References mainRange, and ranges.
Referenced by Scintilla::Editor::AddStyledText(), Scintilla::ScintillaBase::AutoCompleteCharacterDeleted(), Scintilla::ScintillaBase::AutoCompleteCompleted(), Scintilla::ScintillaBase::AutoCompleteMoveToCurrentWord(), Scintilla::ScintillaBase::AutoCompleteStart(), Scintilla::Editor::ButtonDownWithModifiers(), Scintilla::Editor::ButtonMoveWithModifiers(), Scintilla::Editor::ButtonUpWithModifiers(), Scintilla::ScintillaBase::CallTipShow(), Scintilla::Editor::Clear(), Scintilla::Editor::ClearSelection(), Scintilla::Editor::CopySelectionRange(), Scintilla::Editor::CurrentPosition(), Scintilla::Editor::DropAt(), Scintilla::Editor::FoldLine(), Scintilla::Editor::HorizontalMove(), Scintilla::Editor::InsertPasteShape(), Scintilla::Editor::KeyCommand(), Scintilla::ScintillaBase::KeyCommand(), Scintilla::Editor::LineTranspose(), Scintilla::Editor::MovedCaret(), Scintilla::Editor::MovePositionTo(), Scintilla::Editor::MultipleSelectAdd(), Scintilla::Editor::PageMove(), Scintilla::MarginView::PaintMargin(), Scintilla::Editor::ParaUpOrDown(), Scintilla::Editor::PasteRectangular(), Scintilla::Editor::PositionInSelection(), Scintilla::EditView::RetrieveLineLayout(), Scintilla::Editor::SetEmptySelection(), Scintilla::Editor::SetSelection(), Scintilla::Editor::VerticalCentreCaret(), and Scintilla::Editor::WndProc().
|
noexcept |
Definition at line 274 of file Selection.cxx.
References moveExtends.
Referenced by Scintilla::Editor::CursorUpOrDown(), Scintilla::Editor::HorizontalMove(), Scintilla::Editor::MovePositionTo(), and Scintilla::Editor::WndProc().
|
noexcept |
Definition at line 309 of file Selection.cxx.
Referenced by Scintilla::Editor::NotifyModified().
|
noexcept |
Definition at line 254 of file Selection.cxx.
|
noexcept |
Definition at line 250 of file Selection.cxx.
Referenced by Scintilla::ScintillaBase::AutoCompleteInsert(), Scintilla::BreakFinder::BreakFinder(), Scintilla::Editor::ButtonUpWithModifiers(), Scintilla::Editor::ChangeCaseOfSelection(), Scintilla::Editor::Clear(), Scintilla::Editor::ClearBeforeTentativeStart(), Scintilla::Editor::ClearSelection(), Scintilla::Editor::CursorUpOrDown(), Scintilla::Editor::DelCharBack(), Scintilla::Editor::DelWordOrLine(), Scintilla::ScintillaGTK::DragDataGet(), Scintilla::EditView::DrawCarets(), Scintilla::EditView::DrawEOL(), Scintilla::ScintillaGTK::DrawImeIndicator(), DrawTranslucentSelection(), Scintilla::Editor::DropAt(), Scintilla::Editor::Duplicate(), Scintilla::ScintillaGTKAccessible::GetSelection(), Scintilla::Editor::HorizontalMove(), Scintilla::Editor::Indent(), Scintilla::Editor::InsertCharacter(), Scintilla::Editor::InsertPaste(), Scintilla::Editor::InvalidateCaret(), Scintilla::Editor::InvalidateSelection(), Scintilla::ScintillaGTK::MoveImeCarets(), Scintilla::Editor::NewLine(), Scintilla::Editor::PointInSelection(), Scintilla::Editor::PointMainCaret(), Scintilla::Editor::PositionInSelection(), Scintilla::Editor::SelectionContainsProtected(), Scintilla::Editor::SetSelectionNMessage(), Scintilla::Editor::ThinRectangularRange(), Scintilla::ScintillaGTKAccessible::UpdateCursor(), and Scintilla::Editor::WndProc().
|
noexcept |
Definition at line 262 of file Selection.cxx.
|
noexcept |
Definition at line 258 of file Selection.cxx.
References mainRange, and ranges.
Referenced by Scintilla::Editor::ButtonDownWithModifiers(), Scintilla::Editor::ButtonMoveWithModifiers(), Scintilla::Editor::ButtonUpWithModifiers(), Scintilla::Editor::Clear(), Scintilla::Editor::CursorUpOrDown(), Scintilla::Editor::DelWordOrLine(), DropAdditionalRanges(), Scintilla::Editor::EnsureCaretVisible(), Scintilla::Editor::HorizontalMove(), Scintilla::Editor::InvalidateSelection(), Scintilla::Editor::InvalidateWholeSelection(), Scintilla::Editor::LineReverse(), Scintilla::Editor::MovePositionTo(), Scintilla::Editor::MultipleSelectAdd(), Scintilla::EditView::PaintText(), Scintilla::Editor::PasteRectangular(), Scintilla::Editor::SelectionEnd(), Scintilla::Editor::SelectionStart(), Scintilla::Editor::SetEmptySelection(), Scintilla::Editor::SetSelection(), and Scintilla::Editor::WndProc().
|
inline |
Definition at line 188 of file Selection.h.
Referenced by Scintilla::Editor::CopySelectionRange().
|
noexcept |
Definition at line 212 of file Selection.cxx.
References rangeRectangular.
Referenced by Scintilla::Editor::ButtonDownWithModifiers(), Scintilla::Editor::ButtonMoveWithModifiers(), Scintilla::Editor::CursorUpOrDown(), Scintilla::Editor::Duplicate(), Scintilla::Editor::HorizontalMove(), Scintilla::Editor::MovePositionTo(), Scintilla::Editor::SetRectangularRange(), Scintilla::Editor::SetSelection(), Scintilla::Editor::ThinRectangularRange(), Scintilla::Editor::VerticalCentreCaret(), and Scintilla::Editor::WndProc().
void Selection::RemoveDuplicates | ( | ) |
Definition at line 430 of file Selection.cxx.
References Empty(), mainRange, and ranges.
Referenced by Scintilla::Editor::Clear(), Scintilla::Editor::ClearSelection(), Scintilla::Editor::CursorUpOrDown(), Scintilla::Editor::DelCharBack(), Scintilla::Editor::DelWordOrLine(), and Scintilla::Editor::HorizontalMove().
|
noexcept |
Definition at line 447 of file Selection.cxx.
References mainRange, and ranges.
Referenced by Scintilla::Editor::WndProc().
|
noexcept |
Definition at line 245 of file Selection.cxx.
References PLATFORM_ASSERT.
Referenced by Scintilla::Editor::WndProc().
|
noexcept |
Definition at line 278 of file Selection.cxx.
Referenced by Scintilla::Editor::ButtonDownWithModifiers(), Scintilla::Editor::CancelModes(), and Scintilla::Editor::WndProc().
void Selection::SetSelection | ( | SelectionRange | range | ) |
Definition at line 342 of file Selection.cxx.
References mainRange, and ranges.
Referenced by DropAdditionalRanges(), Scintilla::Editor::HorizontalMove(), Scintilla::Editor::SetRectangularRange(), and Scintilla::Editor::WndProc().
|
noexcept |
Definition at line 266 of file Selection.cxx.
References IsRectangular(), mainRange, rangeRectangular, ranges, and Scintilla::SelectionRange::Start().
Referenced by Scintilla::Editor::InsertPaste(), and Scintilla::Editor::InsertPasteShape().
|
inlinenoexcept |
Definition at line 187 of file Selection.h.
void Selection::TentativeSelection | ( | SelectionRange | range | ) |
Definition at line 378 of file Selection.cxx.
References AddSelection(), mainRange, ranges, rangesSaved, tentativeMain, and TrimSelection().
Referenced by Scintilla::Editor::ButtonDownWithModifiers(), and Scintilla::Editor::ButtonMoveWithModifiers().
|
noexcept |
Definition at line 334 of file Selection.cxx.
Referenced by Scintilla::Editor::HorizontalMove().
|
noexcept |
Definition at line 318 of file Selection.cxx.
Referenced by AddSelection(), TentativeSelection(), and Scintilla::Editor::TrimAndSetSelection().
|
noexcept |
Definition at line 409 of file Selection.cxx.
References pos.
Referenced by Scintilla::EditView::DrawEOL(), Scintilla::EditView::DrawEOLAnnotationText(), Scintilla::EditView::DrawFoldDisplayText(), and DrawTranslucentSelection().
|
private |
Definition at line 140 of file Selection.h.
Referenced by AddSelection(), AddSelectionWithoutTrim(), Clear(), DropSelection(), LimitsForRectangularElseMain(), Main(), MainAnchor(), MainCaret(), RangeMain(), RemoveDuplicates(), RotateMain(), SetSelection(), Start(), and TentativeSelection().
|
private |
Definition at line 141 of file Selection.h.
Referenced by Clear(), and MoveExtends().
|
private |
Definition at line 139 of file Selection.h.
Referenced by Clear(), Rectangular(), and Start().
|
private |
Definition at line 137 of file Selection.h.
Referenced by AddSelection(), AddSelectionWithoutTrim(), Clear(), Count(), DropSelection(), Empty(), Last(), Length(), Limits(), LimitsForRectangularElseMain(), MainAnchor(), MainCaret(), RangeMain(), RemoveDuplicates(), RotateMain(), SetSelection(), Start(), and TentativeSelection().
|
private |
Definition at line 138 of file Selection.h.
Referenced by CommitTentative(), and TentativeSelection().
selTypes Scintilla::Selection::selType |
Definition at line 145 of file Selection.h.
Referenced by Scintilla::Editor::ButtonDownWithModifiers(), Scintilla::Editor::ButtonMoveWithModifiers(), Scintilla::Editor::ButtonUpWithModifiers(), Clear(), Scintilla::Editor::CopySelectionRange(), Scintilla::Editor::CursorUpOrDown(), Scintilla::Editor::DropAt(), Scintilla::Editor::HorizontalMove(), IsRectangular(), Scintilla::Editor::MovePositionTo(), Scintilla::Editor::SetRectangularRange(), Scintilla::Editor::SetSelection(), Scintilla::Editor::ThinRectangularRange(), and Scintilla::Editor::WndProc().
|
private |
Definition at line 142 of file Selection.h.
Referenced by CommitTentative(), and TentativeSelection().