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