public sealed class GH_RibbonPanel : GH_RibbonContentBase, IGH_RibbonInteractiveObject, IComparable<GH_RibbonPanel>
Constructors
Fields
Region
public Rectangle Region
Represents the entire region taken up by this object.
Properties
ClientRegion
public Rectangle ClientRegion { get; set; }
Gets the Client region of the layout. The client region as defined as the entire region minus the margin and the padding.
ContentRegion
public Rectangle ContentRegion { get; set; }
Gets or sets the Content region of the layout. The content region as defined as the entire region minus the margin.
Name
#Gets or sets the name of the panel.
Remarks: Panels with names should render those as panel-bars.
Owner
#Gets or sets the owner control for this panel.
Remarks: If you supply a NULL value, you cannot call any interface methods
Value: The GH_RibbonPanel owner
Visible
Gets or sets visibility of this control. Typically visibility affects drawing and mouse interaction
Methods
AddItem
#Adds a new item to the content.
Remarks: If you don't call this method to add icons you must make sure the owner flag on the item is properly set.
Parameters:
| item (GH_RibbonItem) | The item to add |
Returns: True on success, false if the item is already referenced
CollapseLeastSignificantColumn
#Removes the rightmost column that features only Obscure items.
Returns: True if a column was collapsed, false if no snigle column with only Obscure items could be found.
Contains
#Checks to see whether a specific id/exposure combination is already present in this panel.
Parameters:
| id (Guid) | |
| exposure (GH_Exposure) |
Contains
Tests to see if the given point is considered to be 'on' the control. By default, the content region of the control is tested, but derived classes can override this behaviour.
Parameters:
| pt (Point) | Point to test for |
DesiredHeight
#Calculates the desired height of the panel based on a given height.
Remarks: The desired height is the nearest height that is comfortable for this panel. "Comfortable" being defined as minimum wasted space in the layout.
Parameters:
| initialHeight (int) | The supplied height. |
Returns: The nearest desired height.
DisplayDropdown
#public void DisplayDropdown()
IndexAt
#Returns the index of the item that contains the location
Parameters:
| pt (Point) | The location to include |
ItemAt
#Returns the item at the specified index in the item list.
Parameters:
| index (int) | Index of item to retrieve. |
ItemAt
#Returns the first item at the specified pixel in the item list.
Parameters:
| pt (Point) | Point to test for inclusion. |
MouseDoubleClick
#Parameters:
| sender (GH_Ribbon) | |
| e (GH_RibbonMouseEventArgs) |
Implements: MouseDoubleClick
MoveTo
#Move the panel and all content to a new location.
PerformLayout
#public override void PerformLayout()
Performs a tight-fit stacking of all content items. All items will be layed out and the panel Region will be adjusted to match.
Overrides: GH_RibbonContentBase.PerformLayout
RemoveItem
#Removes an item from the content
Remarks: This will set the owner flag on the item to Null
Parameters:
| item (GH_RibbonItem) | The item to remove |
Returns: True on success, false if the item iis not part of this panel