summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 29753e6)
raw | patch | inline | side by side (parent: 29753e6)
author | joncruz <joncruz@users.sourceforge.net> | |
Sun, 3 Aug 2008 05:56:45 +0000 (05:56 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Sun, 3 Aug 2008 05:56:45 +0000 (05:56 +0000) |
src/ui/widget/selected-style.cpp | patch | blob | history | |
src/ui/widget/selected-style.h | patch | blob | history |
index c0aaaaa66f14152d679290bffc416d28a6548a10..3da613416a477c8143e9e67f9507cd2ce9bd8ced 100644 (file)
_stroke_label (_("Stroke:")),
_opacity_label (_("O:")),
- _fill_place (SS_FILL),
- _stroke_place (SS_STROKE),
+ _fill_place(this, SS_FILL),
+ _stroke_place(this, SS_STROKE),
_fill_flag_place (),
_stroke_flag_place (),
_opacity_sb (0.02, 0),
_stroke (),
- _stroke_width_place(),
+ _stroke_width_place(this),
_stroke_width (""),
_opacity_blocked (false),
"drag_data_received",
G_CALLBACK(dragDataReceived),
_drop[SS_FILL]);
-
- _fill_place.parent = this;
- _stroke_place.parent = this;
- _stroke_width_place.parent = this;
}
SelectedStyle::~SelectedStyle()
/* ============================================= RotateableSwatch */
-RotateableSwatch::RotateableSwatch(guint mode) {
- fillstroke = mode;
- startcolor_set = false;
- undokey = "ssrot1";
- cr = NULL;
- cr_set = false;
+RotateableSwatch::RotateableSwatch(SelectedStyle *parent, guint mode) :
+ fillstroke(mode),
+ parent(parent),
+ startcolor(0),
+ startcolor_set(false),
+ undokey("ssrot1"),
+ cr(0),
+ cr_set(false)
+
+{
}
RotateableSwatch::~RotateableSwatch() {
/* ============================================= RotateableStrokeWidth */
-RotateableStrokeWidth::RotateableStrokeWidth() {
- undokey = "swrot1";
- startvalue_set = false;
- cr = NULL;
- cr_set = false;
+RotateableStrokeWidth::RotateableStrokeWidth(SelectedStyle *parent) :
+ parent(parent),
+ startvalue(0),
+ startvalue_set(false),
+ undokey("swrot1"),
+ cr(0),
+ cr_set(false)
+{
}
RotateableStrokeWidth::~RotateableStrokeWidth() {
index 4826281669cad5dda6f5a6b7f4bb388b523b13f1..0229364c724a981343b3a022ba63de7537e7248c 100644 (file)
class RotateableSwatch: public Rotateable
{
public:
- RotateableSwatch(guint mode);
+ RotateableSwatch(SelectedStyle *parent, guint mode);
~RotateableSwatch();
+ double color_adjust (float *hsl, double by, guint32 cc, guint state);
+ virtual void do_motion (double by, guint state);
+ virtual void do_release (double by, guint state);
+
+private:
guint fillstroke;
SelectedStyle *parent;
guint32 startcolor;
bool startcolor_set;
- gchar *undokey;
+ gchar const *undokey;
GdkCursor *cr;
bool cr_set;
-
- double color_adjust (float *hsl, double by, guint32 cc, guint state);
- virtual void do_motion (double by, guint state);
- virtual void do_release (double by, guint state);
};
class RotateableStrokeWidth: public Rotateable
{
public:
- RotateableStrokeWidth();
+ RotateableStrokeWidth(SelectedStyle *parent);
~RotateableStrokeWidth();
+ double value_adjust(double current, double by, guint modifier, bool final);
+ virtual void do_motion (double by, guint state);
+ virtual void do_release (double by, guint state);
+
+private:
SelectedStyle *parent;
double startvalue;
bool startvalue_set;
- gchar *undokey;
+ gchar const *undokey;
GdkCursor *cr;
bool cr_set;
-
- double value_adjust(double current, double by, guint modifier, bool final);
- virtual void do_motion (double by, guint state);
- virtual void do_release (double by, guint state);
};
class SelectedStyle : public Gtk::HBox