X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fwidgets%2Fsp-color-selector.h;h=40446fe0ad9b4998c69ce4b63c3281bf7804fe5e;hb=396d5aa732c14fad8d67a143132eb232a45dd7f2;hp=5739f7f15d55de24b6ecf5ff7987dfacaa1e4e22;hpb=c87d0307348fcfdc65b6b4ab6999a3cb0de2431f;p=inkscape.git diff --git a/src/widgets/sp-color-selector.h b/src/widgets/sp-color-selector.h index 5739f7f15..40446fe0a 100644 --- a/src/widgets/sp-color-selector.h +++ b/src/widgets/sp-color-selector.h @@ -1,5 +1,5 @@ -#ifndef __SP_COLOR_SELECTOR_H__ -#define __SP_COLOR_SELECTOR_H__ +#ifndef SEEN_SP_COLOR_SELECTOR_H +#define SEEN_SP_COLOR_SELECTOR_H #include #include "../color.h" @@ -31,29 +31,26 @@ public: virtual void setSubmode( guint submode ); virtual guint getSubmode() const; - virtual SPColorSpaceType getColorspace() const; - virtual bool setColorspace( SPColorSpaceType colorspace ); - protected: void _grabbed(); void _released(); - void _updateInternals( const SPColor& color, gfloat alpha, bool held ); - bool _isHeld() const { return _held; } + void _updateInternals( const SPColor& color, gfloat alpha, gboolean held ); + gboolean _isHeld() const { return _held; } - virtual void _colorChanged( const SPColor& color, gfloat alpha ); + virtual void _colorChanged(); static double _epsilon; SPColorSelector* _csel; SPColor _color; - gfloat _alpha; /* guaranteed to be in [0, 1]. */ + gfloat _alpha; // guaranteed to be in [0, 1]. private: // By default, disallow copy constructor and assignment operator ColorSelector( const ColorSelector& obj ); ColorSelector& operator=( const ColorSelector& obj ); - bool _held; + gboolean _held; bool virgin; // if true, no color is set yet }; @@ -74,22 +71,32 @@ struct SPColorSelector { }; struct SPColorSelectorClass { - GtkVBoxClass parent_class; - - const gchar **name; - guint submode_count; + GtkVBoxClass parent_class; - void (* grabbed) (SPColorSelector *rgbsel); - void (* dragged) (SPColorSelector *rgbsel); - void (* released) (SPColorSelector *rgbsel); - void (* changed) (SPColorSelector *rgbsel); + const gchar **name; + guint submode_count; + void (* grabbed) (SPColorSelector *rgbsel); + void (* dragged) (SPColorSelector *rgbsel); + void (* released) (SPColorSelector *rgbsel); + void (* changed) (SPColorSelector *rgbsel); }; -GType sp_color_selector_get_type (void); +GType sp_color_selector_get_type(void); + +GtkWidget *sp_color_selector_new( GType selector_type ); -GtkWidget *sp_color_selector_new (GType selector_type, SPColorSpaceType colorspace); +#endif // SEEN_SP_COLOR_SELECTOR_H -#endif +/* + Local Variables: + mode:c++ + c-file-style:"stroustrup" + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) + indent-tabs-mode:nil + fill-column:99 + End: +*/ +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :