From e77dc4242312ae3f0832020e2c8ce13e3fe9ca8e Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Mon, 6 Jul 2009 01:15:56 +0000 Subject: Allow drag and drop in virtual space. --- src/Selection.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Selection.h') diff --git a/src/Selection.h b/src/Selection.h index fe6a1c464..94d6fc65e 100644 --- a/src/Selection.h +++ b/src/Selection.h @@ -51,6 +51,9 @@ public: void Add(int increment) { position = position + increment; } + bool IsValid() const { + return position >= 0; + } }; struct SelectionRange { @@ -69,6 +72,7 @@ struct SelectionRange { return anchor == caret; } int Length() const; + // int Width() const; // Like Length but takes virtual space into account bool operator ==(const SelectionRange &other) const { return caret == other.caret && anchor == other.anchor; } -- cgit v1.2.3