casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DTVisible.h
Go to the documentation of this file.
1 //# DTVisible.h: class providing draw style settings for visible DisplayTools
2 //# Copyright (C) 1999,2000
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //# $Id$
27 
28 #ifndef TRIALDISPLAY_DTVISIBLE_H
29 #define TRIALDISPLAY_DTVISIBLE_H
30 
31 #include <casa/aips.h>
32 
33 namespace casa { //# NAMESPACE CASA - BEGIN
34 
35 // <summary>
36 // Class providing draw style settings for visible DisplayTools.
37 // </summary>
38 
39 // <use visibility=local>
40 
41 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
42 // </reviewed>
43 
44 // <etymology>
45 // "DTVisible" is a contraction and concatenation of "DisplayTool" and
46 // "Visible", and provides additional interface features describing
47 // drawing options for visible DisplayTools.
48 // </etymology>
49 
50 // <synopsis>
51 // The purpose of this class is to store and provide information
52 // describing drawing settings for <linkto
53 // class=DisplayTool>DisplayTools</linkto> which will need to draw on
54 // a PixelCanvas or WorldCanvas. Presently it only stores the drawing
55 // color and line width, and double click interval, but it will
56 // probably grow into something
57 // more sophisticated. The settings are taken from the users
58 // <src>.aipsrc</src> file as follows:
59 //
60 // <dd> <src>display.controls.color</src>
61 // <dt> Either a named color (eg. <src>red</src>) can be given, or
62 // the individual red, green and blue components specified in
63 // hexadecimal (eg. <src>#f0f033</src>). The default color is
64 // orange.
65 //
66 // <dd> <src>display.controls.linewidth</src>
67 // <dt> An integer should be given specifying the line width
68 // to use when drawing DisplayTools. The default value is one.
69 //
70 // <dd> <src>display.controls.doubleclickinterval</src>
71 // <dt> A real number specifying the time interval in seconds,
72 // in which a double click will be deemed to have occurred. The
73 // default value is 0.5 seconds.
74 // </synopsis>
75 
76 // <example>
77 // </example>
78 
79 // <motivation>
80 // Since many PixelCanvas- and WorldCanvas-based tools (derived from
81 // <linkto class=PCTool>PCTool</linkto> and <linkto
82 // class=WCTool>WCTool</linkto> respectively) will
83 // need to draw on the canvas, it makes sense to unify their selection
84 // of drawing color and style in one place: this class.
85 // </motivation>
86 
87 // <thrown>
88 // None.
89 // </thrown>
90 
91 // <todo asof="1999/10/18">
92 // None.
93 // </todo>
94 
95  class DTVisible {
96 
97  public:
98 
99  // Default constructor.
100  DTVisible();
101 
102  // Destructor.
103  virtual ~DTVisible();
104 
105  // Return the color to use.
106  virtual casacore::String drawColor() const {
107  return itsDrawColor;
108  }
109 
110  // Return the line width to use.
111  virtual casacore::Int lineWidth() const {
112  return itsLineWidth;
113  }
114 
115  // Return the double click interval (in seconds).
117  return itsDoubleClickInterval;
118  }
119 
120  protected:
121 
122  // (Required) copy constructor.
123  DTVisible(const DTVisible &other);
124 
125  // (Required) copy assignment.
126  DTVisible &operator=(const DTVisible &other);
127 
128  private:
129 
130  // Store the color to use here.
132 
133  // Store the line width here.
135 
136  // Store the double click interval (in seconds) here.
138 
139  };
140 
141 
142 } //# NAMESPACE CASA - END
143 
144 #endif
int Int
Definition: aipstype.h:50
casacore::Int itsLineWidth
Store the line width here.
Definition: DTVisible.h:134
DTVisible & operator=(const DTVisible &other)
(Required) copy assignment.
casacore::String itsDrawColor
Store the color to use here.
Definition: DTVisible.h:131
virtual casacore::Double doubleClickInterval() const
Return the double click interval (in seconds).
Definition: DTVisible.h:116
virtual casacore::Int lineWidth() const
Return the line width to use.
Definition: DTVisible.h:111
DTVisible()
Default constructor.
double Double
Definition: aipstype.h:55
virtual ~DTVisible()
Destructor.
Class providing draw style settings for visible DisplayTools.
Definition: DTVisible.h:95
virtual casacore::String drawColor() const
Return the color to use.
Definition: DTVisible.h:106
casacore::Double itsDoubleClickInterval
Store the double click interval (in seconds) here.
Definition: DTVisible.h:137
String: the storage and methods of handling collections of characters.
Definition: String.h:223