goplayspace: github.com/iafan/goplayspace/client/ranges Index | Files

package ranges

import "github.com/iafan/goplayspace/client/ranges"

Index

Package Files

ranges.go

type LineRange Uses

type LineRange struct {
    Begin int
    End   int
}

LineRange represents the range of selected lines

func (*LineRange) String Uses

func (r *LineRange) String() string

type Range Uses

type Range struct {
    Sel []*LineRange
    // contains filtered or unexported fields
}

Range maintains the list of ranges

func New Uses

func New(s string) *Range

New returns a new range object from string representation of ranges

func (*Range) AddRange Uses

func (r *Range) AddRange(begin, end int)

AddRange adds a selection range potentially consolidating other ranges

func (*Range) AddSelPoint Uses

func (r *Range) AddSelPoint(end int)

AddSelPoint adds selection between previous selection point and the one provided (to be used with Shift+clicking to select ranges with the mouse)

func (*Range) ClearSelection Uses

func (r *Range) ClearSelection()

ClearSelection clears selection

func (*Range) HasSelection Uses

func (r *Range) HasSelection() bool

HasSelection returns true if there's some selection

func (*Range) IsLineSelected Uses

func (r *Range) IsLineSelected(n int) bool

IsLineSelected returns true if the line number is in any of the selection ranges

func (*Range) IsOnlyLineSelected Uses

func (r *Range) IsOnlyLineSelected(n int) bool

IsOnlyLineSelected returns true if the line number is the only line selected

func (*Range) Parse Uses

func (r *Range) Parse(s string) error

Parse parses string representation of ranges

func (*Range) RemoveRange Uses

func (r *Range) RemoveRange(begin, end int)

RemoveRange removes selection range potentially breaking apart or adjusting other ranges

func (*Range) SetRange Uses

func (r *Range) SetRange(begin, end int)

SetRange resets the selection with one given range

func (*Range) String Uses

func (r *Range) String() string

String generates the string representation of the Range object

func (*Range) ToggleLine Uses

func (r *Range) ToggleLine(n int)

ToggleLine either adds or removes the line from selection

Package ranges imports 3 packages (graph) and is imported by 2 packages. Updated 2017-08-27. Refresh now. Tools for package owners.