C# Class Smrf.NodeXL.ApplicationUtil.LayoutManagerForMenu

Helper class for managing graph layouts.
This class is meant for use in applications that allow the user to select a graph layout via a parent "Layout" menu that has one child menu item per available layout. It provides methods for populating the menu and for creating a layout of the selected type.

Call AddMenuItems during application initialization. When the user selects one of the menu items added by this method, the event fires. In the event handler, call LayoutManager.CreateLayout to create a layout of the selected type.

Inheritance: LayoutManager
Show file Open project: 2014-sed-team3/term-project Class Usage Examples

Protected Properties

Property Type Description
m_aoMenuItems System.Windows.Forms.ToolStripMenuItem[]

Public Methods

Method Description
AddMenuItems ( ToolStripDropDownItem parentDropDownItem ) : void
AssertValid ( ) : void
LayoutManagerForMenu ( ) : System

Initializes a new instance of the LayoutManagerForMenu class.

Protected Methods

Method Description
AddMenuItem ( ToolStripDropDownItem oParentDropDownItem, LayoutType eLayoutType, String sMenuText, String sToolTipText ) : ToolStripMenuItem
AddMenuItemSeparator ( ToolStripDropDownItem oParentDropDownItem ) : void
MenuItem_Click ( object sender, EventArgs e ) : void

Method Details

AddMenuItem() protected method

protected AddMenuItem ( ToolStripDropDownItem oParentDropDownItem, LayoutType eLayoutType, String sMenuText, String sToolTipText ) : ToolStripMenuItem
oParentDropDownItem System.Windows.Forms.ToolStripDropDownItem
eLayoutType LayoutType
sMenuText String
sToolTipText String
return System.Windows.Forms.ToolStripMenuItem

AddMenuItemSeparator() protected method

protected AddMenuItemSeparator ( ToolStripDropDownItem oParentDropDownItem ) : void
oParentDropDownItem System.Windows.Forms.ToolStripDropDownItem
return void

AddMenuItems() public method

public AddMenuItems ( ToolStripDropDownItem parentDropDownItem ) : void
parentDropDownItem System.Windows.Forms.ToolStripDropDownItem
return void

AssertValid() public method

public AssertValid ( ) : void
return void

LayoutManagerForMenu() public method

Initializes a new instance of the LayoutManagerForMenu class.
public LayoutManagerForMenu ( ) : System
return System

MenuItem_Click() protected method

protected MenuItem_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void

Property Details

m_aoMenuItems protected property

protected ToolStripMenuItem[],System.Windows.Forms m_aoMenuItems
return System.Windows.Forms.ToolStripMenuItem[]