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