public PrintLibraryWidget()
		{
			currentPrintLibraryWidget = this;
			SetDisplayAttributes();

			textImageButtonFactory.borderWidth = 0;

			editButtonFactory.normalTextColor = ActiveTheme.Instance.PrimaryTextColor;
			editButtonFactory.hoverTextColor = ActiveTheme.Instance.PrimaryTextColor;
			editButtonFactory.disabledTextColor = ActiveTheme.Instance.TabLabelUnselected;
			editButtonFactory.disabledFillColor = new RGBA_Bytes();
			editButtonFactory.pressedTextColor = ActiveTheme.Instance.PrimaryTextColor;
			editButtonFactory.borderWidth = 0;
			editButtonFactory.Margin = new BorderDouble(10, 0);

			FlowLayoutWidget allControls = new FlowLayoutWidget(FlowDirection.TopToBottom);
			{
				enterEditModeButton = editButtonFactory.Generate("Edit".Localize(), centerText: true);
				enterEditModeButton.Click += enterEditModeButtonClick;

				leaveEditModeButton = editButtonFactory.Generate("Done".Localize(), centerText: true);
				leaveEditModeButton.Click += leaveEditModeButtonClick;

				// make sure the buttons are the same size even when localized
				if (leaveEditModeButton.Width < enterEditModeButton.Width)
				{
					editButtonFactory.FixedWidth = enterEditModeButton.Width;
					leaveEditModeButton = editButtonFactory.Generate("Done".Localize(), centerText: true);
					leaveEditModeButton.Click += leaveEditModeButtonClick;
				}
				else
				{
					editButtonFactory.FixedWidth = leaveEditModeButton.Width;
					enterEditModeButton = editButtonFactory.Generate("Edit".Localize(), centerText: true);
					enterEditModeButton.Click += enterEditModeButtonClick;
				}

				leaveEditModeButton.Visible = false;

				FlowLayoutWidget searchPanel = new FlowLayoutWidget();
				searchPanel.BackgroundColor = ActiveTheme.Instance.TransparentDarkOverlay;
				searchPanel.HAnchor = HAnchor.ParentLeftRight;
				searchPanel.Padding = new BorderDouble(0);
				{
					searchInput = new MHTextEditWidget(messageWhenEmptyAndNotSelected: "Search Library".Localize());
					searchInput.Margin = new BorderDouble(0, 3, 0, 0);
					searchInput.HAnchor = HAnchor.ParentLeftRight;
					searchInput.VAnchor = VAnchor.ParentCenter;
					searchInput.ActualTextEditWidget.EnterPressed += new KeyEventHandler(searchInputEnterPressed);

					double oldWidth = editButtonFactory.FixedWidth;
					editButtonFactory.FixedWidth = 0;
					Button searchButton = editButtonFactory.Generate(LocalizedString.Get("Search"), centerText: true);
					searchButton.Click += searchButtonClick;
					editButtonFactory.FixedWidth = oldWidth;

					searchPanel.AddChild(enterEditModeButton);
					searchPanel.AddChild(leaveEditModeButton);

					searchPanel.AddChild(searchInput);
					searchPanel.AddChild(searchButton);
				}

				FlowLayoutWidget navigationPanel = new FlowLayoutWidget();
				navigationPanel.HAnchor = HAnchor.ParentLeftRight;
				navigationPanel.Padding = new BorderDouble(0);
				navigationPanel.BackgroundColor = ActiveTheme.Instance.TransparentLightOverlay;

				navigationLabel = new TextWidget("My Library".Localize(), pointSize: 14);
				navigationLabel.VAnchor = Agg.UI.VAnchor.ParentCenter;
				navigationLabel.TextColor = ActiveTheme.Instance.PrimaryTextColor;

				navigationPanel.AddChild(new GuiWidget(50, 0)); //Add this as temporary balance to edit buttons
				navigationPanel.AddChild(new HorizontalSpacer());
				navigationPanel.AddChild(navigationLabel);
				navigationPanel.AddChild(new HorizontalSpacer());

				buttonPanel = new FlowLayoutWidget();
				buttonPanel.HAnchor = HAnchor.ParentLeftRight;
				buttonPanel.Padding = new BorderDouble(0, 3);
				buttonPanel.MinimumSize = new Vector2(0, 46);

                AddLibraryButtonElements();
				CreateEditBarButtons();

				//allControls.AddChild(navigationPanel);
				allControls.AddChild(searchPanel);
				allControls.AddChild(itemOperationButtons);

				libraryDataView = new LibraryDataView();
				breadCrumbWidget = new FolderBreadCrumbWidget(libraryDataView.SetCurrentLibraryProvider, libraryDataView.CurrentLibraryProvider);
				libraryDataView.ChangedCurrentLibraryProvider += breadCrumbWidget.SetBreadCrumbs;

				libraryDataView.ChangedCurrentLibraryProvider += ClearSearchWidget;

				allControls.AddChild(breadCrumbWidget);

				allControls.AddChild(libraryDataView);
				allControls.AddChild(buttonPanel);
			}
			allControls.AnchorAll();

			this.AddChild(allControls);

			AddHandlers();
		}
		private void LoadContent()
		{
			this.Padding = new BorderDouble(3);
			this.BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor;
			this.AnchorAll();

			textImageButtonFactory.borderWidth = 0;

			editButtonFactory.normalTextColor = ActiveTheme.Instance.PrimaryTextColor;
			editButtonFactory.hoverTextColor = ActiveTheme.Instance.PrimaryTextColor;
			editButtonFactory.disabledTextColor = ActiveTheme.Instance.TabLabelUnselected;
			editButtonFactory.disabledFillColor = new RGBA_Bytes();
			editButtonFactory.pressedTextColor = ActiveTheme.Instance.PrimaryTextColor;
			editButtonFactory.borderWidth = 0;
			editButtonFactory.Margin = new BorderDouble(10, 0);

			FlowLayoutWidget allControls = new FlowLayoutWidget(FlowDirection.TopToBottom);
			{
				enterEditModeButton = editButtonFactory.Generate("Edit".Localize(), centerText: true);
				enterEditModeButton.Click += enterEditModeButtonClick;

				leaveEditModeButton = editButtonFactory.Generate("Done".Localize(), centerText: true);
				leaveEditModeButton.Click += leaveEditModeButtonClick;

				// make sure the buttons are the same size even when localized
				if (leaveEditModeButton.Width < enterEditModeButton.Width)
				{
					editButtonFactory.FixedWidth = enterEditModeButton.Width;
					leaveEditModeButton = editButtonFactory.Generate("Done".Localize(), centerText: true);
					leaveEditModeButton.Click += leaveEditModeButtonClick;
				}
				else
				{
					editButtonFactory.FixedWidth = leaveEditModeButton.Width;
					enterEditModeButton = editButtonFactory.Generate("Edit".Localize(), centerText: true);
					enterEditModeButton.Click += enterEditModeButtonClick;
				}

				enterEditModeButton.Name = "Library Edit Button";

				leaveEditModeButton.Visible = false;

				FlowLayoutWidget navigationPanel = new FlowLayoutWidget();
				navigationPanel.HAnchor = HAnchor.ParentLeftRight;
				navigationPanel.Padding = new BorderDouble(0);
				navigationPanel.BackgroundColor = ActiveTheme.Instance.TransparentLightOverlay;

				navigationLabel = new TextWidget("My Library".Localize(), pointSize: 14);
				navigationLabel.VAnchor = Agg.UI.VAnchor.ParentCenter;
				navigationLabel.TextColor = ActiveTheme.Instance.PrimaryTextColor;

				navigationPanel.AddChild(new GuiWidget(50, 0)); //Add this as temporary balance to edit buttons
				navigationPanel.AddChild(new HorizontalSpacer());
				navigationPanel.AddChild(navigationLabel);
				navigationPanel.AddChild(new HorizontalSpacer());

				buttonPanel = new FlowLayoutWidget();
				buttonPanel.HAnchor = HAnchor.ParentLeftRight;
				buttonPanel.Padding = new BorderDouble(0, 3);
				buttonPanel.MinimumSize = new Vector2(0, 46);

				AddLibraryButtonElements();

				//allControls.AddChild(navigationPanel);
				allControls.AddChild(CreateSearchPannel());

				libraryDataView = new LibraryDataView();
				breadCrumbWidget = new FolderBreadCrumbWidget(libraryDataView.SetCurrentLibraryProvider, libraryDataView.CurrentLibraryProvider);
				FlowLayoutWidget breadCrumbSpaceHolder = new FlowLayoutWidget()
				{
					HAnchor = HAnchor.ParentLeftRight,
				};
				breadCrumbSpaceHolder.AddChild(breadCrumbWidget);
				libraryDataView.ChangedCurrentLibraryProvider += breadCrumbWidget.SetBreadCrumbs;

				libraryDataView.ChangedCurrentLibraryProvider += LibraryProviderChanged;
				breadCrumbAndActionBar = new FlowLayoutWidget()
				{
					HAnchor = HAnchor.ParentLeftRight,
				};

				breadCrumbAndActionBar.AddChild(breadCrumbSpaceHolder);
				breadCrumbAndActionBar.AddChild(CreateActionsMenu());

				allControls.AddChild(breadCrumbAndActionBar);

				allControls.AddChild(libraryDataView);
				allControls.AddChild(buttonPanel);
			}

			allControls.AnchorAll();

			this.AddChild(allControls);
		}
		public SaveAsWindow(Action<SaveAsReturnInfo> functionToCallOnSaveAs, List<ProviderLocatorNode> providerLocator)
			: base(480, 450)
		{
			Title = "MatterControl - " + "Save As".Localize();
			AlwaysOnTopOfMain = true;

			this.functionToCallOnSaveAs = functionToCallOnSaveAs;

			FlowLayoutWidget topToBottom = new FlowLayoutWidget(FlowDirection.TopToBottom);
			topToBottom.AnchorAll();
			topToBottom.Padding = new BorderDouble(3, 0, 3, 5);

			// Creates Header
			FlowLayoutWidget headerRow = new FlowLayoutWidget(FlowDirection.LeftToRight);
			headerRow.HAnchor = HAnchor.ParentLeftRight;
			headerRow.Margin = new BorderDouble(0, 3, 0, 0);
			headerRow.Padding = new BorderDouble(0, 3, 0, 3);
			BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor;

			//Creates Text and adds into header
			{
				string saveAsLabel = "Save New Design".Localize() + ":";
				TextWidget elementHeader = new TextWidget(saveAsLabel, pointSize: 14);
				elementHeader.TextColor = ActiveTheme.Instance.PrimaryTextColor;
				elementHeader.HAnchor = HAnchor.ParentLeftRight;
				elementHeader.VAnchor = Agg.UI.VAnchor.ParentBottom;

				headerRow.AddChild(elementHeader);
				topToBottom.AddChild(headerRow);
				this.AddChild(topToBottom);
			}

			//Creates container in the middle of window
			FlowLayoutWidget middleRowContainer = new FlowLayoutWidget(FlowDirection.TopToBottom);
			{
				middleRowContainer.HAnchor = HAnchor.ParentLeftRight;
				middleRowContainer.VAnchor = VAnchor.ParentBottomTop;
				middleRowContainer.Padding = new BorderDouble(5);
				middleRowContainer.BackgroundColor = ActiveTheme.Instance.SecondaryBackgroundColor;
			}

			librarySelectorWidget = new LibrarySelectorWidget();

			// put in the bread crumb widget
			FolderBreadCrumbWidget breadCrumbWidget = new FolderBreadCrumbWidget(librarySelectorWidget.SetCurrentLibraryProvider, librarySelectorWidget.CurrentLibraryProvider);
			middleRowContainer.AddChild(breadCrumbWidget);

			librarySelectorWidget.ChangedCurrentLibraryProvider += breadCrumbWidget.SetBreadCrumbs;

			// put in the area to pick the provider to save to
			{
				//Adds text box and check box to the above container
				GuiWidget chooseWindow = new GuiWidget(10, 30);
				chooseWindow.HAnchor = HAnchor.ParentLeftRight;
				chooseWindow.VAnchor = VAnchor.ParentBottomTop;
				chooseWindow.Margin = new BorderDouble(5);
				chooseWindow.BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor;
				chooseWindow.Padding = new BorderDouble(3);
				chooseWindow.AddChild(librarySelectorWidget);

				middleRowContainer.AddChild(chooseWindow);
			}

			// put in the area to type in the new name
			{
				string fileNameLabel = "Design Name".Localize();
				TextWidget textBoxHeader = new TextWidget(fileNameLabel, pointSize: 12);
				textBoxHeader.TextColor = ActiveTheme.Instance.PrimaryTextColor;
				textBoxHeader.Margin = new BorderDouble(5);
				textBoxHeader.HAnchor = HAnchor.ParentLeft;

				//Adds text box and check box to the above container
				textToAddWidget = new MHTextEditWidget("", pixelWidth: 300, messageWhenEmptyAndNotSelected: "Enter a Design Name Here".Localize());
				textToAddWidget.HAnchor = HAnchor.ParentLeftRight;
				textToAddWidget.Margin = new BorderDouble(5);
				textToAddWidget.ActualTextEditWidget.EnterPressed += new KeyEventHandler(ActualTextEditWidget_EnterPressed);

				middleRowContainer.AddChild(textBoxHeader);
				middleRowContainer.AddChild(textToAddWidget);
			}

			middleRowContainer.AddChild(new HorizontalSpacer());
			topToBottom.AddChild(middleRowContainer);

			//Creates button container on the bottom of window
			FlowLayoutWidget buttonRow = new FlowLayoutWidget(FlowDirection.LeftToRight);
			{
				BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor;
				buttonRow.HAnchor = HAnchor.ParentLeftRight;
				buttonRow.Padding = new BorderDouble(0, 3);
			}

			Button saveAsButton = textImageButtonFactory.Generate("Save".Localize(), centerText: true);
			saveAsButton.Visible = true;
			saveAsButton.Cursor = Cursors.Hand;
			buttonRow.AddChild(saveAsButton);

			saveAsButton.Click += new EventHandler(saveAsButton_Click);

			//Adds SaveAs and Close Button to button container
			buttonRow.AddChild(new HorizontalSpacer());

			Button cancelButton = textImageButtonFactory.Generate("Cancel".Localize(), centerText: true);
			cancelButton.Visible = true;
			cancelButton.Cursor = Cursors.Hand;
			buttonRow.AddChild(cancelButton);
			cancelButton.Click += (sender, e) =>
			{
				CloseOnIdle();
			};

			topToBottom.AddChild(buttonRow);

			ShowAsSystemWindow();
		}