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