Constructors

GH_RibbonPanel

#
public GH_RibbonPanel()

GH_RibbonPanel

#
public GH_RibbonPanel(string iName)
iName (string)

Fields

Region

public Rectangle Region
Represents the entire region taken up by this object.
inherited fromGH_RibbonContentBase

Properties

AllItems

#
public List<GH_RibbonItem> AllItems { get; }
Gets the internal collection of items.

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.
inherited fromGH_RibbonContentBase

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.
inherited fromGH_RibbonContentBase

Margin

public Padding Margin { get; set; }
inherited fromGH_RibbonContentBase

Name

#
public string Name { get; set; }
Gets or sets the name of the panel.
Remarks: Panels with names should render those as panel-bars.

Owner

#
public GH_RibbonTab Owner { get; set; }
Gets or sets the owner control for this panel.
Remarks: If you supply a NULL value, you cannot call any interface methods
The GH_RibbonPanel owner

Padding

public Padding Padding { get; set; }
inherited fromGH_RibbonContentBase

Visible

public bool Visible { get; set; }
Gets or sets visibility of this control. Typically visibility affects drawing and mouse interaction
inherited fromGH_RibbonContentBase

VisibleItems

#
public List<GH_RibbonItem> VisibleItems { get; }
Gets all items currently visible on the panel.

Methods

AddItem

#
public bool AddItem(GH_RibbonItem item)
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.
item (GH_RibbonItem)The item to add
True on success, false if the item is already referenced

CollapseLastColumn

#
public bool CollapseLastColumn()
Removes the rightmost column

CollapseLeastSignificantColumn

#
public bool CollapseLeastSignificantColumn()
Removes the rightmost column that features only Obscure items.
True if a column was collapsed, false if no snigle column with only Obscure items could be found.

CompareTo

#
public int CompareTo(GH_RibbonPanel other)
other (GH_RibbonPanel)

Contains

#
public bool Contains(Guid id, GH_Exposure exposure)
Checks to see whether a specific id/exposure combination is already present in this panel.
id (Guid)
exposure (GH_Exposure)

Contains

public virtual bool Contains(Point pt)
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.
inherited fromGH_RibbonContentBase
pt (Point)Point to test for

DesiredHeight

#
public int DesiredHeight(int initialHeight)
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.
initialHeight (int)The supplied height.
The nearest desired height.

DisplayDropdown

#
public GH_RibbonDropdown DisplayDropdown(bool autoCloseDropdown)
autoCloseDropdown (bool)

DisplayDropdown

#
public void DisplayDropdown()

DisplayTooltip

#
public void DisplayTooltip(GH_TooltipDisplayEventArgs e)
DisplayTooltip

IndexAt

#
public int IndexAt(Point pt)
Returns the index of the item that contains the location
pt (Point)The location to include

ItemAt

#
public GH_RibbonItem ItemAt(int index)
Returns the item at the specified index in the item list.
index (int)Index of item to retrieve.

ItemAt

#
public GH_RibbonItem ItemAt(Point pt)
Returns the first item at the specified pixel in the item list.
pt (Point)Point to test for inclusion.

MinimumWidth

#
public int MinimumWidth()
Gets the minimum width of a panel (a single column of items)

MouseClick

#
sender (GH_Ribbon)
e (GH_RibbonMouseEventArgs)
MouseClick

MouseDoubleClick

#
public GH_RibbonMouseEvent MouseDoubleClick(GH_Ribbon sender, GH_RibbonMouseEventArgs e)
sender (GH_Ribbon)
e (GH_RibbonMouseEventArgs)
MouseDoubleClick

MouseDown

#
sender (GH_Ribbon)
e (GH_RibbonMouseEventArgs)
MouseDown

MouseMove

#
sender (GH_Ribbon)
e (GH_RibbonMouseEventArgs)
MouseMove

MouseUp

#
sender (GH_Ribbon)
e (GH_RibbonMouseEventArgs)
MouseUp

MoveTo

#
public void MoveTo(int x, int y)
Move the panel and all content to a new location.
x (int)
y (int)

PanelBarRegion

#
public Rectangle PanelBarRegion()
Computes the panel bar region.

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.

RemoveItem

#
public bool RemoveItem(GH_RibbonItem item)
Removes an item from the content
Remarks: This will set the owner flag on the item to Null
item (GH_RibbonItem)The item to remove
True on success, false if the item iis not part of this panel

RenderPanel

#
public void RenderPanel(Graphics g)
Renders the panel and all the items to the graphics context
g (Graphics)

RibbonFont

#
public Font RibbonFont()
Returns the font which is used to draw the panel bar tag

Sort

#
public void Sort()
Sorts items on the panel.