]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/xforms_helpers.h
* Baruch's GuiBC template.
[lyx.git] / src / frontends / xforms / xforms_helpers.h
1 #ifndef XFORMSHELPERS_H
2 #define XFORMSHELPERS_H
3
4 #ifdef __GNUG_
5 #pragma interface
6 #endif
7
8 #include "Color.h"
9
10 // Set an FL_OBJECT to activated or deactivated
11 void setEnabled(FL_OBJECT *, bool enable);
12
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);
16
17 /// struct holding xform-specific colors
18 struct XformsColor : public NamedColor {
19         int colorID;
20         XformsColor() : NamedColor(), colorID(0) {}
21         static bool read(string const &);
22         static bool write(string const &);
23 };
24
25
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. */
29 class RWInfo {
30 public:
31         ///
32         static bool WriteableDir(string const & dir);
33         ///
34         static bool ReadableDir(string const & dir);
35         ///
36         static bool WriteableFile(string const & file);
37         ///
38         static bool ReadableFile(string const & file);
39         ///
40         static string const & ErrorMessage() { return error_message; }
41 private:
42         ///
43         static string error_message;
44 };
45 #endif // XFORMSHELPERS_H