blob: 3cd483bfc722fd281c387e36711f8466d3062639 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
// Copyright (C) 1999-2017
// Smithsonian Astrophysical Observatory, Cambridge, MA, USA
// For conditions of distribution and use, see copyright notice in "copyright"
#ifndef __attribute_h__
#define __attribute_h__
#include <tk.h>
#include "vector.h"
class Widget;
class Attribute {
public:
enum Style {SOLID,DASH};
enum Colour {BLACK,WHITE,RED,GREEN,BLUE,CYAN,MAGENTA,YELLOW};
private:
Widget* parent;
Style style_;
float width_;
int font_;
int size_;
Tk_Font tkfont_;
Tk_Font psfont_;
unsigned long colour_;
char* colorName_;
unsigned long color_;
private:
void initFonts();
public:
Attribute(Widget*);
~Attribute();
void setStyle(double);
void setWidth(double);
void setSize(double);
void setFont(double);
void setColour(double);
Style style() {return style_;}
float width() {return width_;}
int size() {return size_;}
int font() {return font_;}
Tk_Font tkfont() {return tkfont_;}
Tk_Font psfont() {return psfont_;}
unsigned long colour() {return colour_;}
char* colorName() {return colorName_;}
unsigned long color() {return color_;}
};
#endif
|