8 #include <utility> // pair
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, int size, int style);
16 /** Launch a file dialog and return the chosen file.
17 filename: a suggested filename.
18 title: the title of the dialog.
20 dir1 = (name, dir), dir2 = (name, dir): extra buttons on the dialog.
22 string const browseFile(string const & filename,
24 string const & pattern,
25 std::pair<string,string> const & dir1,
26 std::pair<string,string> const & dir2);
28 /// struct holding xform-specific colors
29 struct XformColor : public NamedColor {
31 XformColor() : NamedColor(), colorID(0) {}
32 static bool read(string const &);
33 static bool write(string const &);
37 /** Some functions that perform some quite detailed tests to ascertain whether
38 the directory or file is readable or writeable. If not, then an error
39 message is placed in error_message. */
43 static bool WriteableDir(string const & dir);
45 static bool ReadableDir(string const & dir);
47 static bool WriteableFile(string const & file);
49 static bool ReadableFile(string const & file);
51 static string const & ErrorMessage() { return error_message; }
54 static string error_message;