public ButtonStateTemplate(ButtonState[] states, Template template, EnabledCondition enabledCondition, FocusCondition focusCondition) : base(states, enabledCondition, focusCondition) { // Setup initial conditions. if (Script.IsUndefined(template)) template = null; // Store values. this.template = template; }
protected ButtonStateContent(ButtonState[] states, EnabledCondition enabledCondition, FocusCondition focusCondition) { if (Script.IsNullOrUndefined(enabledCondition)) enabledCondition = EnabledCondition.Either; if (Script.IsNullOrUndefined(focusCondition)) focusCondition = FocusCondition.Either; States = states; EnabledCondition = enabledCondition; FocusCondition = focusCondition; }
/// <summary>Creates a Template with the specified selector and adds it as content for the given state.</summary> /// <param name="layer">The layer the state is rendered on (0 lowest, higher values fall in front of lower values)</param> /// <param name="states">The states the template applies to.</param> /// <param name="templateSelector">The CSS selector where the template can be found.</param> /// <param name="enabledCondition">The enabled-related conditions for which button content applies.</param> /// <param name="focusCondition">The focus-related conditions for which button content applies.</param> public void TemplateForStates(int layer, ButtonState[] states, string templateSelector, EnabledCondition enabledCondition, FocusCondition focusCondition) { contentController.AddTemplate(layer, new ButtonStateTemplate(states, new Template(templateSelector), enabledCondition, focusCondition)); }
/// <summary>Creates a Template with the specified selector and adds it as content for the given state.</summary> /// <param name="layer">The layer the state is rendered on (0 lowest, higher values fall in front of lower values)</param> /// <param name="state">The state the template applies to.</param> /// <param name="templateSelector">The CSS selector where the template can be found.</param> /// <param name="enabledCondition">The enabled-related conditions for which button content applies.</param> /// <param name="focusCondition">The focus-related conditions for which button content applies.</param> public void TemplateForState(int layer, ButtonState state, string templateSelector, EnabledCondition enabledCondition, FocusCondition focusCondition) { TemplateForStates(layer, new ButtonState[] { state }, templateSelector, enabledCondition, focusCondition); }
/// <summary>Sets the CSS class(es) to use for a given layer.</summary> /// <param name="layer">The layer the state is rendered on (0 lowest, higher values fall in front of lower values)</param> /// <param name="states">The state(s) the CSS classes apply to.</param> /// <param name="cssClasses">A string containing one or more CSS class names.</param> /// <param name="enabledCondition">The enabled-related conditions for which button content applies.</param> /// <param name="focusCondition">The focus-related conditions for which button content applies.</param> public void CssForStates(int layer, ButtonState[] states, string cssClasses, EnabledCondition enabledCondition, FocusCondition focusCondition) { contentController.AddCss(layer, new ButtonStateCss(states, cssClasses, enabledCondition, focusCondition)); }
/// <summary>Sets the CSS class(es) to use for a given layer.</summary> /// <param name="layer">The layer the state is rendered on (0 lowest, higher values fall in front of lower values)</param> /// <param name="state">The state the CSS classes apply to.</param> /// <param name="cssClasses">A string containing one or more CSS class names.</param> /// <param name="enabledCondition">The enabled-related conditions for which button content applies.</param> /// <param name="focusCondition">The focus-related conditions for which button content applies.</param> public void CssForState(int layer, ButtonState state, string cssClasses, EnabledCondition enabledCondition, FocusCondition focusCondition) { CssForStates(layer, new ButtonState[] { state }, cssClasses, enabledCondition, focusCondition); }
public ButtonStateCss(ButtonState[] states, string cssClasses, EnabledCondition enabledCondition, FocusCondition focusCondition) : base(states, enabledCondition, focusCondition) { this.cssClasses = cssClasses; }