C# Class Fluqi.Widget.jMenuItem.MenuItem

A set of properties to apply to a set of jQuery UI Tab.
Afficher le fichier Open project: toepoke/Fluqi Class Usage Examples

Méthodes publiques

Méthode Description
Finish ( ) : MenuItems

Ends configuration of the menu item just added and brings the fluent API back a level to allow further menu items to be added.

MenuItem ( MenuItem parent ) : System

Constructor

MenuItem ( jMenu owner, string id ) : System

Constructor

SetAsDivider ( ) : MenuItem

Sets this menu-item as a divider.

SetDisabled ( ) : MenuItem

Sets this menu item as disabled

SetIcon ( Core value ) : MenuItem

Sets the icon which appears to the left of the menu item. This is one of the built in icons provdided by the jQuery UI framework.

SetIcon ( string cssClass ) : MenuItem

Sets the icon which appears to the left of the menu title.

Use this for adding your own icon. The "ui-icon" jQuery UI class will still be added first (so you can use this for sizing), but the "ui-icon" prefix won't be added in front of your CSS class.

SetTag ( string value ) : MenuItem

Sets the LI tag to use

SetTargetURL ( string value ) : MenuItem

Sets the URL to navigate to from the menu (this replaces the default "#" href).

SetTitle ( string value ) : MenuItem

Changes the title that appears in the menu item.

Dunno why you'd want to do this after it's already been defined when adding the menu item but I'm leaving it here if only for the sake of consistency with the API.

WithAttribute ( string attrName, string attrValue ) : MenuItem

Registers an HTML attribute to be added to the control when it is rendered.

WithCss ( string cssClasses ) : MenuItem

Registers a set of CSS class names to be added to the control when it is rendered. This is in addition to jQuery UI styles that may appear (see RenderCss property).

WithID ( string idValue ) : MenuItem

Registers an ID attribute to be added to the control when it is rendered.

WithStyle ( string styleName, string styleValue ) : MenuItem

Registers an embedded style setting to be added to the control when it is rendered. These are written out as part of the "style" attribute, so we might add 'WithStyle("border", "solid 1px blue")' for example.

Méthodes protégées

Méthode Description
BuildTagHtml ( Fluqi.Extension.Helpers.jStringBuilder sb ) : void

Builds up the Html for a menu-item

HasChildren ( ) : bool

Convenience function for eastablishing if there are any child/sub-menu items off this menu item.

RenderChildren ( Fluqi.Extension.Helpers.jStringBuilder sb ) : void

Renders the list of MenuItems to the string builder.

Reset ( ) : void

Resets the object back to a known state.

Private Methods

Méthode Description
RenderCloseItem ( Fluqi.Extension.Helpers.jStringBuilder sb ) : void
RenderOpenItem ( Fluqi.Extension.Helpers.jStringBuilder sb ) : void
RenderRootCloseItem ( Fluqi.Extension.Helpers.jStringBuilder sb ) : void
RenderRootOpenItem ( Fluqi.Extension.Helpers.jStringBuilder sb ) : void

Method Details

BuildTagHtml() protected méthode

Builds up the Html for a menu-item
protected BuildTagHtml ( Fluqi.Extension.Helpers.jStringBuilder sb ) : void
sb Fluqi.Extension.Helpers.jStringBuilder
Résultat void

Finish() public méthode

Ends configuration of the menu item just added and brings the fluent API back a level to allow further menu items to be added.
public Finish ( ) : MenuItems
Résultat MenuItems

HasChildren() protected méthode

Convenience function for eastablishing if there are any child/sub-menu items off this menu item.
protected HasChildren ( ) : bool
Résultat bool

MenuItem() public méthode

Constructor
public MenuItem ( MenuItem parent ) : System
parent MenuItem MenuItem object _this_ item belongs to
Résultat System

MenuItem() public méthode

Constructor
public MenuItem ( jMenu owner, string id ) : System
owner jMenu Menu object _this_ item belongs to
id string ID to assign to the MenuItem object
Résultat System

RenderChildren() protected méthode

Renders the list of MenuItems to the string builder.
protected RenderChildren ( Fluqi.Extension.Helpers.jStringBuilder sb ) : void
sb Fluqi.Extension.Helpers.jStringBuilder StringBuilder
Résultat void

Reset() protected méthode

Resets the object back to a known state.
protected Reset ( ) : void
Résultat void

SetAsDivider() public méthode

Sets this menu-item as a divider.
public SetAsDivider ( ) : MenuItem
Résultat MenuItem

SetDisabled() public méthode

Sets this menu item as disabled
public SetDisabled ( ) : MenuItem
Résultat MenuItem

SetIcon() public méthode

Sets the icon which appears to the left of the menu item. This is one of the built in icons provdided by the jQuery UI framework.
public SetIcon ( Core value ) : MenuItem
value Core
Résultat MenuItem

SetIcon() public méthode

Sets the icon which appears to the left of the menu title.
Use this for adding your own icon. The "ui-icon" jQuery UI class will still be added first (so you can use this for sizing), but the "ui-icon" prefix won't be added in front of your CSS class.
public SetIcon ( string cssClass ) : MenuItem
cssClass string
Résultat MenuItem

SetTag() public méthode

Sets the LI tag to use
public SetTag ( string value ) : MenuItem
value string
Résultat MenuItem

SetTargetURL() public méthode

Sets the URL to navigate to from the menu (this replaces the default "#" href).
public SetTargetURL ( string value ) : MenuItem
value string
Résultat MenuItem

SetTitle() public méthode

Changes the title that appears in the menu item.
Dunno why you'd want to do this after it's already been defined when adding the menu item but I'm leaving it here if only for the sake of consistency with the API.
public SetTitle ( string value ) : MenuItem
value string
Résultat MenuItem

WithAttribute() public méthode

Registers an HTML attribute to be added to the control when it is rendered.
public WithAttribute ( string attrName, string attrValue ) : MenuItem
attrName string Name of the HTML attribute, e.g. "Tab" or "id" for example
attrValue string Value to be applied when the attribute is rendered
Résultat MenuItem

WithCss() public méthode

Registers a set of CSS class names to be added to the control when it is rendered. This is in addition to jQuery UI styles that may appear (see RenderCss property).
public WithCss ( string cssClasses ) : MenuItem
cssClasses string Set of space separated CSS class names to add
Résultat MenuItem

WithID() public méthode

Registers an ID attribute to be added to the control when it is rendered.
public WithID ( string idValue ) : MenuItem
idValue string Value for the ID
Résultat MenuItem

WithStyle() public méthode

Registers an embedded style setting to be added to the control when it is rendered. These are written out as part of the "style" attribute, so we might add 'WithStyle("border", "solid 1px blue")' for example.
public WithStyle ( string styleName, string styleValue ) : MenuItem
styleName string Name of the style attribute to be added
styleValue string Value of the style to be added
Résultat MenuItem