Example #1
0
 //style number is used to prioritize shared styles, higher numbers are less important
 public StyleEntry(UIStyleGroup sourceGroup, UIStyleRunCommand styleRunCommand, StyleType type, StyleState state, int styleNumber, int attributeCount)
 {
     this.sourceGroup     = sourceGroup;
     this.styleRunCommand = styleRunCommand;
     this.type            = type;
     this.state           = state;
     this.priority        = (int)BitUtil.SetBytes(styleNumber, attributeCount, (int)type, (int)state);
 }
Example #2
0
        private void CreateStyleEntry(LightList <StylePropertyId> toUpdate, UIStyleGroup group, UIStyleRunCommand styleRunCommand, StyleType styleType, StyleState styleState, int ruleCount)
        {
            if (styleRunCommand.style == null)
            {
                return;
            }

            containedStates |= styleState;

            if ((currentState & styleState) != 0)
            {
                AddMissingProperties(toUpdate, styleRunCommand.style);
                RunCommands(styleRunCommand.runCommands);
            }

            availableStyles.Add(new StyleEntry(group, styleRunCommand, styleType, styleState, availableStyles.Count, ruleCount));
        }