Constructors

GH_RibbonPanel

#
public GH_RibbonPanel()

GH_RibbonPanel

#
public GH_RibbonPanel(
iName
)

Fields

Region

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

Properties

AllItems

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

ClientRegion

Gets the Client region of the layout. The client region as defined as the entire region minus the margin and the padding.
public Rectangle ClientRegion { get; set; }
inherited fromGH_RibbonContentBase

ContentRegion

Gets or sets the Content region of the layout. The content region as defined as the entire region minus the margin.
public Rectangle ContentRegion { get; set; }
inherited fromGH_RibbonContentBase

Margin

public Padding Margin { get; set; }
inherited fromGH_RibbonContentBase

Name

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

Owner

#
Gets or sets the owner control for this panel.
public GH_RibbonTab Owner { get; set; }
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

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

VisibleItems

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

Methods

AddItem

#
Adds a new item to the content.
public bool AddItem(
item
The item to add
)
Remarks: If you don't call this method to add icons you must make sure the owner flag on the item is properly set.
True on success, false if the item is already referenced

CollapseLastColumn

#
Removes the rightmost column
public bool CollapseLastColumn()

CollapseLeastSignificantColumn

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

CompareTo

#
public int CompareTo()

Contains

#
Checks to see whether a specific id/exposure combination is already present in this panel.
public bool Contains(
id,
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.
public virtual bool Contains(
Point
pt
Point to test for
)
inherited fromGH_RibbonContentBase

DesiredHeight

#
Calculates the desired height of the panel based on a given height.
public int DesiredHeight(
initialHeight
The supplied 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.
The nearest desired height.

DisplayDropdown

#
public GH_RibbonDropdown DisplayDropdown(
autoCloseDropdown
)

DisplayDropdown

#
public void DisplayDropdown()

DisplayTooltip

#
public void DisplayTooltip()
DisplayTooltip

IndexAt

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

ItemAt

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

ItemAt

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

MinimumWidth

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

MouseClick

#
MouseClick

MouseDoubleClick

#
public GH_RibbonMouseEvent MouseDoubleClick()
MouseDoubleClick

MouseDown

#
MouseDown

MouseMove

#
MouseMove

MouseUp

#
MouseUp

MoveTo

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

PanelBarRegion

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

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.
public override void PerformLayout()

RemoveItem

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

RenderPanel

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

RibbonFont

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

Sort

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