66 : base(handle)
67 {
68 _builder = builder;
69 builder.Autoconnect(this);
70 this.color1 = color1;
72 rBar.Adjustment.Upper = ushort.MaxValue;
73 gBar.Adjustment.Upper = ushort.MaxValue;
74 bBar.Adjustment.Upper = ushort.MaxValue;
75 rBox.Adjustment.Upper = ushort.MaxValue;
76 rBox.Adjustment.StepIncrement = 1;
77 rBox.Adjustment.PageIncrement = 10;
78 gBox.Adjustment.Upper = ushort.MaxValue;
79 gBox.Adjustment.StepIncrement = 1;
80 gBox.Adjustment.PageIncrement = 10;
81 bBox.Adjustment.Upper = ushort.MaxValue;
82 bBox.Adjustment.StepIncrement = 1;
83 bBox.Adjustment.PageIncrement = 10;
84 widthBar.Adjustment.Upper = 100;
85 widthBar.Adjustment.Value = Tools.StrokeWidth;
86 widthBox.Adjustment.Upper = 100;
87 widthBox.Adjustment.Value = Tools.StrokeWidth;
88 if (!color1)
89 {
90 rBar.Adjustment.Value = Tools.drawColor.R;
91 gBar.Adjustment.Value = Tools.drawColor.G;
92 bBar.Adjustment.Value = Tools.drawColor.B;
93 }
94 else
95 {
96 rBar.Adjustment.Value = Tools.eraseColor.R;
97 gBar.Adjustment.Value = Tools.eraseColor.G;
98 bBar.Adjustment.Value = Tools.eraseColor.B;
99 }
100 image.QueueDraw();
101 App.ApplyStyles(this);
102 }