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 <boost/scoped_ptr.hpp>
19 #include <X11/Xlib.h> // for Pixmap
24 class FD_colorpicker_rgb;
25 class FD_colorpicker_hsv;
34 /** Launch the color picker. All other dialogs are frozen till
35 a color is chosen (or the dialog is closed).
36 \param color the color used to initialise the dialog.
38 RGBColor const & requestColor(RGBColor const & color);
40 /** Input callback function.
41 * Invoked only by the xforms callback interface
43 void input(FL_OBJECT *, long);
50 /// Create the dialog if necessary, update it and display it.
52 /// Update dialog before/whilst showing it.
55 Tooltips & tooltips() const;
56 /// Pointer to the actual instantiation of xform's form
57 FL_FORM * form() const;
59 /** Called on the first show() request, initialising various bits and
62 void prepare_to_show();
67 /// The dialog's minimum allowable dimensions.
71 /// The title displayed by the Window Manager.
74 RGBColor input_color_;
78 /// Passed to the window manager to give a pretty little symbol ;-)
82 boost::scoped_ptr<Tooltips> tooltips_;
83 boost::scoped_ptr<FD_colorpicker> dialog_;
84 boost::scoped_ptr<FD_colorpicker_rgb> rgb_;
85 boost::scoped_ptr<FD_colorpicker_hsv> hsv_;
88 #endif // FORMCOLORPICKER_H