Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

SeqPos Class Reference

SeqPos manages the positions of all items for a single "type" (for example, DNA). More...

#include <SequenceCanvas.h>

List of all members.

Public Member Functions

 SeqPos ()
virtual ~SeqPos ()
 Constructor (empty).
virtual void cleanup ()
 Empty the class.
virtual void add (int np, int x, int y, int w, int h, bool memsave=false)
 Add a "char".
virtual void addline (int from, int to, int vfrom, int vto)
 Add a "virtual" line (for faster seeking where the mouse cursor is over).
virtual int getLine (int y)
 Gets a line for the y position.
virtual int getItem (wxPoint pt, int line)
 Gets the item in the line for the position.
virtual void reserve (int n, int n2=-1, bool memsave=false)
 Reserves memory (faster for huge sequences).
virtual void mark (int where, int value)
 Mark part of the sequence.
virtual int getmark (int where)
 The "type" of marikg at the position.

Public Attributes

wxArrayInt p
 The data.
wxString m
 The marking data.
vector< wxRect > r
 Bounding rectangles for the data.
vector< wxRect > l
 Bounding rectangles for the lines.

Private Attributes

wxArrayInt mark_from
wxArrayInt mark_to
int mark_value


Detailed Description

SeqPos manages the positions of all items for a single "type" (for example, DNA).

The vectors p, r and m are always the same size, and contain information about the same item at the same index:

p contains the seqeunce position matching the item

r contains the visual position of the item

m contains the marking of the item:

0 = not marked

1 = marked

2 = cursor in edit mode

Vector l contains additional positioning information, namely the visual position of a horizontal line of items, for faster access when trying to determine the target of a mouse click


Constructor & Destructor Documentation

SeqPos::SeqPos  )  [inline]
 

virtual SeqPos::~SeqPos  )  [inline, virtual]
 

Constructor (empty).


Member Function Documentation

void SeqPos::add int  np,
int  x,
int  y,
int  w,
int  h,
bool  memsave = false
[virtual]
 

Add a "char".

void SeqPos::addline int  from,
int  to,
int  vfrom,
int  vto
[virtual]
 

Add a "virtual" line (for faster seeking where the mouse cursor is over).

void SeqPos::cleanup  )  [virtual]
 

Empty the class.

int SeqPos::getItem wxPoint  pt,
int  line
[virtual]
 

Gets the item in the line for the position.

int SeqPos::getLine int  y  )  [virtual]
 

Gets a line for the y position.

int SeqPos::getmark int  where  )  [virtual]
 

The "type" of marikg at the position.

void SeqPos::mark int  where,
int  value
[virtual]
 

Mark part of the sequence.

void SeqPos::reserve int  n,
int  n2 = -1,
bool  memsave = false
[virtual]
 

Reserves memory (faster for huge sequences).


Member Data Documentation

vector<wxRect> SeqPos::l
 

Bounding rectangles for the lines.

wxString SeqPos::m
 

The marking data.

wxArrayInt SeqPos::mark_from [private]
 

wxArrayInt SeqPos::mark_to [private]
 

int SeqPos::mark_value [private]
 

wxArrayInt SeqPos::p
 

The data.

vector<wxRect> SeqPos::r
 

Bounding rectangles for the data.


The documentation for this class was generated from the following files:
Generated on Fri Aug 11 16:19:45 2006 for GENtle by  doxygen 1.4.1