"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "scintilla/src/Selection.h" between
geany-1.35.tar.bz2 and geany-1.36.tar.bz2

About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...).

Selection.h  (geany-1.35.tar.bz2):Selection.h  (geany-1.36.tar.bz2)
skipping to change at line 17 skipping to change at line 17
#ifndef SELECTION_H #ifndef SELECTION_H
#define SELECTION_H #define SELECTION_H
namespace Scintilla { namespace Scintilla {
class SelectionPosition { class SelectionPosition {
Sci::Position position; Sci::Position position;
Sci::Position virtualSpace; Sci::Position virtualSpace;
public: public:
explicit SelectionPosition(Sci::Position position_=INVALID_POSITION, Sci: :Position virtualSpace_=0) : position(position_), virtualSpace(virtualSpace_) { explicit SelectionPosition(Sci::Position position_=INVALID_POSITION, Sci: :Position virtualSpace_=0) noexcept : position(position_), virtualSpace(virtualS pace_) {
PLATFORM_ASSERT(virtualSpace < 800000); PLATFORM_ASSERT(virtualSpace < 800000);
if (virtualSpace < 0) if (virtualSpace < 0)
virtualSpace = 0; virtualSpace = 0;
} }
void Reset() { void Reset() {
position = 0; position = 0;
virtualSpace = 0; virtualSpace = 0;
} }
void MoveForInsertDelete(bool insertion, Sci::Position startChange, Sci:: Position length); void MoveForInsertDelete(bool insertion, Sci::Position startChange, Sci:: Position length);
bool operator ==(const SelectionPosition &other) const { bool operator ==(const SelectionPosition &other) const {
skipping to change at line 87 skipping to change at line 87
start = p; start = p;
if (end < p) if (end < p)
end = p; end = p;
} }
}; };
struct SelectionRange { struct SelectionRange {
SelectionPosition caret; SelectionPosition caret;
SelectionPosition anchor; SelectionPosition anchor;
SelectionRange() : caret(), anchor() { SelectionRange() noexcept : caret(), anchor() {
} }
explicit SelectionRange(SelectionPosition single) : caret(single), anchor (single) { explicit SelectionRange(SelectionPosition single) noexcept : caret(single ), anchor(single) {
} }
explicit SelectionRange(Sci::Position single) : caret(single), anchor(sin gle) { explicit SelectionRange(Sci::Position single) noexcept : caret(single), a nchor(single) {
} }
SelectionRange(SelectionPosition caret_, SelectionPosition anchor_) : car et(caret_), anchor(anchor_) { SelectionRange(SelectionPosition caret_, SelectionPosition anchor_) noexc ept : caret(caret_), anchor(anchor_) {
} }
SelectionRange(Sci::Position caret_, Sci::Position anchor_) : caret(caret _), anchor(anchor_) { SelectionRange(Sci::Position caret_, Sci::Position anchor_) noexcept : ca ret(caret_), anchor(anchor_) {
} }
bool Empty() const { bool Empty() const {
return anchor == caret; return anchor == caret;
} }
Sci::Position Length() const; Sci::Position Length() const;
// Sci::Position Width() const; // Like Length but takes virtual space in to account // Sci::Position Width() const; // Like Length but takes virtual space in to account
bool operator ==(const SelectionRange &other) const { bool operator ==(const SelectionRange &other) const {
return caret == other.caret && anchor == other.anchor; return caret == other.caret && anchor == other.anchor;
} }
bool operator <(const SelectionRange &other) const { bool operator <(const SelectionRange &other) const {
skipping to change at line 144 skipping to change at line 144
std::vector<SelectionRange> ranges; std::vector<SelectionRange> ranges;
std::vector<SelectionRange> rangesSaved; std::vector<SelectionRange> rangesSaved;
SelectionRange rangeRectangular; SelectionRange rangeRectangular;
size_t mainRange; size_t mainRange;
bool moveExtends; bool moveExtends;
bool tentativeMain; bool tentativeMain;
public: public:
enum selTypes { noSel, selStream, selRectangle, selLines, selThin }; enum selTypes { noSel, selStream, selRectangle, selLines, selThin };
selTypes selType; selTypes selType;
Selection(); Selection() noexcept;
~Selection(); ~Selection();
bool IsRectangular() const; bool IsRectangular() const;
Sci::Position MainCaret() const; Sci::Position MainCaret() const;
Sci::Position MainAnchor() const; Sci::Position MainAnchor() const;
SelectionRange &Rectangular(); SelectionRange &Rectangular();
SelectionSegment Limits() const; SelectionSegment Limits() const;
// This is for when you want to move the caret in response to a // This is for when you want to move the caret in response to a
// user direction command - for rectangular selections, use the range // user direction command - for rectangular selections, use the range
// that covers all selected text otherwise return the main selection. // that covers all selected text otherwise return the main selection.
SelectionSegment LimitsForRectangularElseMain() const; SelectionSegment LimitsForRectangularElseMain() const;
 End of changes. 7 change blocks. 
7 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)