root/trunk/FRII/gui/_Canvas.hh

Revision 10, 1.9 kB (checked in by t, 3 years ago)

Tailorization
Import of the upstream sources from

Repository: :pserver:anonymous@cvs.sf.net:/cvsroot/familyjewels

Kind: cvs

Module: FRII

Revision: 2005-12-09 09:00:54 by titus

Original author: tailor@vallista.idyll.org
Date: 2005-12-09 09:00:54

Line 
1 /*
2  * This file is part of the FamilyRelations II source distribution.
3  *
4  * FamilyRelations II is part of the FamilyJewels package for comparative
5  * sequence analysis: http://family.caltech.edu/.
6  *
7  * Contact author: C. Titus Brown, titus@caltech.edu.
8  *
9  * This program and all associated source code files are Copyright (C) 2003,
10  * 2004 the California Institute of Technology, Pasadena, CA, 91125 USA.  It
11  * is under the Lesser GNU Public License; please see the included
12  * LICENSE.txt file for more information, or contact Titus directly.
13  *
14  */
15
16 // Base class for an internal interface that is used by MappingViews to
17 // coordinate feature drawing with MappingContainers.
18 //
19 // c.f. MappingView.hh and MappingContainer.hh for more information, and
20 // _PairMapCanvas.* and _DotPlotCanvas.* for specific subclasses.
21 //
22 // This class shouldn't be used externally!
23
24 #ifndef _CANVAS_HH
25 #define _CANVAS_HH
26
27 namespace gui {
28
29   //
30   // Define an interface through which other classes can draw on this
31   // canvas.
32   //
33
34   class _Canvas {
35   public:
36     // Set top/bot sequence coordinates.
37     virtual void set_top_sequence_coords(int start, int end) = 0;
38     virtual void set_bot_sequence_coords(int start, int end) = 0;
39
40     // Get sequence coords.
41     virtual const int get_top_start() const = 0;
42     virtual const int get_bot_start() const = 0;
43     virtual const int get_top_end() const = 0;
44     virtual const int get_bot_end() const = 0;
45
46     // draw a feature between positions on top and bottom, with or without
47     // a width.
48     virtual void draw_feature(int top_pos, int bot_pos, unsigned int width,
49                               int orientation) = 0;
50     virtual void draw_feature(int top_pos, int bot_pos) = 0;
51
52     // call push_clip with some clip region.  note that pop_clip *must*
53     // be called after this fn.
54     virtual void push_clip() { };
55
56     virtual ~_Canvas() { };
57   };
58 }
59
60 #endif // _CANVAS_HH
61
Note: See TracBrowser for help on using the browser.