// // IButtonBarButton.cs // // Author: // Marius Ungureanu // // Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. using System; using System.Collections.Generic; using MonoDevelop.Core; namespace MonoDevelop.Components.MainToolbar { public class ButtonBarGroup { // The title of the button group. Used for accessibility public string Title { get; private set; } // The buttons in this group public List Buttons { get; } public ButtonBarGroup (string title) { Title = title; Buttons = new List (); } } public interface IButtonBarButton { /// /// Gets the icon that should be used for the button. /// /// The icon id. IconId Image { get; } /// /// Gets whether the button should be enabled. /// /// true if enabled; otherwise, false. bool Enabled { get; } /// /// Gets whether the button should be visible. /// /// true if visible; otherwise, false. bool Visible { get; } /// /// Gets whether the button is a separator. /// /// true if this instance is separator; otherwise, false. bool IsSeparator { get; } /// /// Gets the button tooltip. /// /// The tooltip. string Tooltip { get; } /// /// Gets the button title /// /// The title. string Title { get; } /// /// Use this when the button is clicked. /// void NotifyPushed (); /// /// Occurs when Enabled is changed. /// event EventHandler EnabledChanged; /// /// Occurs when the image is changed. /// event EventHandler ImageChanged; /// /// Occurs when Visible is changed. /// event EventHandler VisibleChanged; /// /// Occurs when the tooltip changed. /// event EventHandler TooltipChanged; /// Occurs when the title is changed event EventHandler TitleChanged; } }