1 #ifndef XFORMSHELPERS_H
2 #define XFORMSHELPERS_H
10 // Set an FL_OBJECT to activated or deactivated
11 void setEnabled(FL_OBJECT *, bool enable);
13 // Take a string and add breaks so that it fits into a desired label width, w
14 string formatted(string const &label, int w,
15 int=FL_NORMAL_SIZE, int=FL_NORMAL_STYLE);
17 /// struct holding xform-specific colors
18 struct XformsColor : public NamedColor {
20 XformsColor() : NamedColor(), colorID(0) {}
21 static bool read(string const &);
22 static bool write(string const &);
26 /** Some functions that perform some quite detailed tests to ascertain whether
27 the directory or file is readable or writeable. If not, then an error
28 message is placed in error_message. */
32 static bool WriteableDir(string const & dir);
34 static bool ReadableDir(string const & dir);
36 static bool WriteableFile(string const & file);
38 static bool ReadableFile(string const & file);
40 static string const & ErrorMessage() { return error_message; }
43 static string error_message;
45 #endif // XFORMSHELPERS_H