// Do this in a separate method so SelectTool can override it as // a no-op, but still get the BaseShape.OnBuildToolBar logic. protected virtual void BuildToolBar(Gtk.Toolbar tb) { if (brush_width_label == null) brush_width_label = new ToolBarLabel (" Brush width: "); tb.AppendItem (brush_width_label); if (brush_width_minus == null) { brush_width_minus = new ToolBarButton ("Toolbar.MinusButton.png", "", "Decrease brush size"); brush_width_minus.Clicked += MinusButtonClickedEvent; } tb.AppendItem (brush_width_minus); if (brush_width == null) brush_width = new ToolBarComboBox (50, 1, true, "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "20", "25", "30", "35", "40", "45", "50", "55"); tb.AppendItem (brush_width); if (brush_width_plus == null) { brush_width_plus = new ToolBarButton ("Toolbar.PlusButton.png", "", "Increase brush size"); brush_width_plus.Clicked += PlusButtonClickedEvent; } tb.AppendItem (brush_width_plus); if (ShowStrokeComboBox) { if (spacer_label == null) spacer_label = new ToolBarLabel (" "); tb.AppendItem (spacer_label); if (fill_outline_image == null) fill_outline_image = new ToolBarImage ("ShapeTool.OutlineFill.png"); tb.AppendItem (fill_outline_image); if (fill_outline_label == null) fill_outline_label = new ToolBarLabel (" : "); tb.AppendItem (fill_outline_label); if (fill_outline == null) fill_outline = new ToolBarComboBox (150, 0, false, "Outline Shape", "Fill Shape", "Fill and Outline Shape"); tb.AppendItem (fill_outline); } }
protected override void OnBuildToolBar(Toolbar tb) { base.OnBuildToolBar(tb); if (spacer_label == null) spacer_label = new ToolBarLabel (" "); tb.AppendItem (spacer_label); if (fill_outline_image == null) fill_outline_image = new ToolBarImage ("ShapeTool.OutlineFill.png"); tb.AppendItem (fill_outline_image); if (fill_outline_label == null) fill_outline_label = new ToolBarLabel (" : "); tb.AppendItem (fill_outline_label); if (fill_outline == null) fill_outline = new ToolBarComboBox (150, 0, false, "Outline Shape", "Fill Shape", "Fill and Outline Shape"); tb.AppendItem (fill_outline); }