]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/xform_helpers.h
compiling not tested. two patches from angus with some small fixes
[lyx.git] / src / frontends / xforms / xform_helpers.h
1 #ifndef XFORMHELPERS_H
2 #define XFORMHELPERS_H
3
4 #ifdef __GNUG_
5 #pragma interface
6 #endif
7
8 #include <utility> // pair
9 #include <config.h>
10 #include "LString.h"
11 #include "Color.h"
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, int size, int style );
15
16 /** Launch a file dialog and return the chosen file.
17     filename: a suggested filename.
18     title: the title of the dialog.
19     pattern: *.ps etc.
20     dir1 = (name, dir), dir2 = (name, dir): extra buttons on the dialog.
21 */
22 string const browseFile( string const & filename,
23                          string const & title,
24                          string const & pattern, 
25                          std::pair<string,string> const & dir1,
26                          std::pair<string,string> const & dir2 );
27
28 /// struct holding xform-specific colors
29 struct XformColor : public NamedColor {
30         int colorID;
31         XformColor() : NamedColor(), colorID(0) {}
32         static bool read(string const &);
33         static bool write(string const &);
34 };
35
36 #endif