3 * \file FormColorpicker.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
9 * Full author contact details are available in file CREDITS.
12 #ifndef FORMCOLORPICKER_H
13 #define FORMCOLORPICKER_H
16 #include "forms_fwd.h"
18 #include "support/std_string.h"
19 #include <boost/scoped_ptr.hpp>
20 #include <X11/Xlib.h> // for Pixmap
25 class FD_colorpicker_rgb;
26 class FD_colorpicker_hsv;
35 /** Launch the color picker. All other dialogs are frozen till
36 a color is chosen (or the dialog is closed).
37 \param color the color used to initialise the dialog.
39 RGBColor const & requestColor(RGBColor const & color);
41 /** Input callback function.
42 * Invoked only by the xforms callback interface
44 void input(FL_OBJECT *, long);
51 /// Create the dialog if necessary, update it and display it.
53 /// Update dialog before/whilst showing it.
56 Tooltips & tooltips() const;
57 /// Pointer to the actual instantiation of xform's form
58 FL_FORM * form() const;
60 /** Called on the first show() request, initialising various bits and
63 void prepare_to_show();
68 /// The dialog's minimum allowable dimensions.
72 /// The title displayed by the Window Manager.
75 RGBColor input_color_;
79 /// Passed to the window manager to give a pretty little symbol ;-)
83 boost::scoped_ptr<Tooltips> tooltips_;
84 boost::scoped_ptr<FD_colorpicker> dialog_;
85 boost::scoped_ptr<FD_colorpicker_rgb> rgb_;
86 boost::scoped_ptr<FD_colorpicker_hsv> hsv_;
89 #endif // FORMCOLORPICKER_H