2014-03-30 17:54:05 -07:00
|
|
|
|
/*
|
2017-09-13 21:38:34 -07:00
|
|
|
|
Copyright (c) 2017, Kevin Pope, John Lewin
|
2014-03-30 17:54:05 -07:00
|
|
|
|
All rights reserved.
|
|
|
|
|
|
|
|
|
|
|
|
Redistribution and use in source and binary forms, with or without
|
2015-04-08 15:20:10 -07:00
|
|
|
|
modification, are permitted provided that the following conditions are met:
|
2014-03-30 17:54:05 -07:00
|
|
|
|
|
|
|
|
|
|
1. Redistributions of source code must retain the above copyright notice, this
|
2015-04-08 15:20:10 -07:00
|
|
|
|
list of conditions and the following disclaimer.
|
2014-03-30 17:54:05 -07:00
|
|
|
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
|
|
|
|
this list of conditions and the following disclaimer in the documentation
|
2015-04-08 15:20:10 -07:00
|
|
|
|
and/or other materials provided with the distribution.
|
2014-03-30 17:54:05 -07:00
|
|
|
|
|
|
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
|
|
|
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
|
|
|
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
|
|
|
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
|
|
|
|
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
|
|
|
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
|
|
|
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
|
|
|
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
|
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
|
|
|
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
|
|
|
|
|
|
|
The views and conclusions contained in the software and documentation are those
|
2015-04-08 15:20:10 -07:00
|
|
|
|
of the authors and should not be interpreted as representing official policies,
|
2014-03-30 17:54:05 -07:00
|
|
|
|
either expressed or implied, of the FreeBSD Project.
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
2014-01-29 19:09:30 -08:00
|
|
|
|
using MatterHackers.Agg.UI;
|
2014-02-04 13:30:42 -08:00
|
|
|
|
using MatterHackers.Localizations;
|
2014-01-29 19:09:30 -08:00
|
|
|
|
|
2014-02-15 18:06:03 -08:00
|
|
|
|
namespace MatterHackers.MatterControl.SlicerConfiguration
|
2014-01-29 19:09:30 -08:00
|
|
|
|
{
|
2017-09-13 21:38:34 -07:00
|
|
|
|
public class PresetsToolbar : FlowLayoutWidget
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
2018-04-12 08:42:10 -07:00
|
|
|
|
public PresetsToolbar(PrinterConfig printer, ThemeConfig theme)
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
2017-08-07 15:47:27 -07:00
|
|
|
|
this.HAnchor = HAnchor.Stretch;
|
2015-04-08 15:20:10 -07:00
|
|
|
|
|
2019-05-01 14:57:31 -07:00
|
|
|
|
int numberOfHeatedExtruders = printer.Settings.Helpers.HotendCount();
|
2015-04-08 15:20:10 -07:00
|
|
|
|
|
2019-02-05 11:22:22 -08:00
|
|
|
|
this.AddChild(new PresetSelectorWidget(printer, "Quality".Localize(), theme.PresetColors.QualityPreset, NamedSettingsLayers.Quality, 0, theme)
|
2018-04-17 07:43:18 -07:00
|
|
|
|
{
|
|
|
|
|
|
BackgroundColor = theme.MinimalShade
|
|
|
|
|
|
});
|
2015-04-08 15:20:10 -07:00
|
|
|
|
this.AddChild(new GuiWidget(8, 0));
|
2019-02-05 11:22:22 -08:00
|
|
|
|
this.AddChild(new PresetSelectorWidget(printer, "Material".Localize(), theme.PresetColors.MaterialPreset, NamedSettingsLayers.Material, 0, theme)
|
2018-04-17 07:43:18 -07:00
|
|
|
|
{
|
|
|
|
|
|
BackgroundColor = theme.MinimalShade
|
|
|
|
|
|
});
|
2015-04-08 15:20:10 -07:00
|
|
|
|
|
2016-05-06 17:56:27 -07:00
|
|
|
|
this.Height = 60 * GuiWidget.DeviceScale;
|
2015-04-08 15:20:10 -07:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2016-03-30 18:33:29 -07:00
|
|
|
|
}
|