Jeremy Boulton
Last Updated: 2/20/98
The Locator Class
class Locator : GraphicsObject {
private:
chromBand_Dbase *band_db; // to get info about bands
int posx1, posx2, posy1; // where on screen do we draw?
int slider_x1, slider_x2; // where the slider is on the
// locator bar
public:
Locator( chromBand_Dbase *cbd, int x1, int x2, int y1 );
~Locator();
SetZoom( acedb_x1, scale ); // unused but may be virtual
ActionEvent ProcessMouseEvent( MouseEvent );
ActionEvent ProcessKeyboardEvent( KeyboardEvent );
void paint( void );
};
This is a pretty generic object. It is not zoomable, so even though
we may have to have a SetZoom() (if GraphicsObject::SetZoom() exists
and is pure virtual), it will not do anything. Since this object
sets what part of the chromosome will be on screen, it has to
communicate that to the Window object. It does this though the
ActionEvent return value of Process*Event().
Locator::Locator( chromBand_Dbase *cbd, int x1, int x2, int y1 )
{
band_db = cbd;
posx1 = x1;
posx2 = x2;
posy1 = y1;
slider_x1 = MIN_ACEDB_COORD; // -40000 or something?
slider_x2 = MAX_ACEDB_COORD; // 60000 or something?
}