1 #ifndef COLOURLINESPEC_H_
2 #define COLOURLINESPEC_H_
29 static const char *shortColours[];
30 static const char *X11Colours[];
42 setColourAndLinesOrPoints(
"b1");
51 if (strlen(clsChar)==0)
52 setColourAndLinesOrPoints(
"b1");
54 setColourAndLinesOrPoints(clsChar);
66 return !sizeNotSpecified;
78 return !colourNotSpecified;
85 sizeNotSpecified=
false;
100 colourNotSpecified=
false;
108 colourNotSpecified=
false;
109 gdk_color_parse(c,&colour);
123 return gdk_color_to_string(&colour);
134 sizeNotSpecified=
true;
135 colourNotSpecified=
true;
138 string clsStr(clsChar);
139 gdk_color_parse(
"blue",&colour);
141 for (
int i=0; i<colourCnt; i++)
142 if (clsStr.find(shortColours[i])!=string::npos) {
143 gdk_color_parse(X11Colours[i],&colour);
144 colourNotSpecified=
false;
149 if (clsStr.find(
':')!=string::npos) {
155 unsigned int minC=clsStr.find_first_of(
"0123456789");
157 if ((minC!=string::npos) & (minC<=clsStr.size())) {
158 int maxC=clsStr.find_last_of(
"0123456789");
159 size=atoi(clsStr.substr(minC,maxC-minC+1).c_str());
160 sizeNotSpecified=
false;
167 setColourAndLinesOrPoints(
"b1");
169 setColourAndLinesOrPoints(c.c_str());
175 setColourAndLinesOrPoints(
"b1");
177 setColourAndLinesOrPoints(c);
187 #endif // COLOURLINESPEC_H_