using System; using System.Drawing; namespace DataGridViewRadioButtonElements { /// /// Internal class that represents the layout of a DataGridViewRadioButtonCell cell. /// It tracks the first displayed item index, the number of displayed items, /// scrolling information and various location/size information. /// internal class DataGridViewRadioButtonCellLayout { private int firstDisplayedItemIndex; private int displayedItemsCount; private int totallyDisplayedItemsCount; private bool scrollingNeeded; private Point upButtonLocation; private Point downButtonLocation; private Size scrollButtonsSize; private Point firstDisplayedItemLocation; private Size radioButtonsSize; private Rectangle contentBounds; public DataGridViewRadioButtonCellLayout() { } /// /// Boundaries of the cell content defined as the radio buttons of the displayed items. /// public Rectangle ContentBounds { get { return this.contentBounds; } set { this.contentBounds = value; } } /// /// Index of the first displayed item. /// public int FirstDisplayedItemIndex { get { return this.firstDisplayedItemIndex; } set { this.firstDisplayedItemIndex = value; } } /// /// Number of displayed items (includes potential partially displayed one). /// public int DisplayedItemsCount { get { return this.displayedItemsCount; } set { this.displayedItemsCount = value; } } /// /// Number of totally displayed items. /// public int TotallyDisplayedItemsCount { get { return this.totallyDisplayedItemsCount; } set { this.totallyDisplayedItemsCount = value; } } /// /// Indicates whether the scroll buttons need to be shown or not. /// public bool ScrollingNeeded { get { return this.scrollingNeeded; } set { this.scrollingNeeded = value; } } /// /// Location of the Down scroll button. /// public Point DownButtonLocation { get { return this.downButtonLocation; } set { this.downButtonLocation = value; } } /// /// Location of the Up scroll button. /// public Point UpButtonLocation { get { return this.upButtonLocation; } set { this.upButtonLocation = value; } } /// /// Location of the top most displayed item. /// public Point FirstDisplayedItemLocation { get { return this.firstDisplayedItemLocation; } set { this.firstDisplayedItemLocation = value; } } /// /// Size of the scroll buttons. /// public Size ScrollButtonsSize { get { return this.scrollButtonsSize; } set { this.scrollButtonsSize = value; } } /// /// Size of the radio button glyphs. /// public Size RadioButtonsSize { get { return this.radioButtonsSize; } set { this.radioButtonsSize = value; } } } }