void OnOptionChange(EventBase evt) { var button = evt.target as Button; var choiceName = button.name; if (choiceName == s_BoldChoice) { m_InternalState ^= FontStyleFlag.Bold; } else if (choiceName == s_ItalicChocie) { m_InternalState ^= FontStyleFlag.Italic; } if (m_InternalState == FontStyleFlag.None) { value = "normal"; } else if (m_InternalState == FontStyleFlag.Bold) { value = "bold"; } else if (m_InternalState == FontStyleFlag.Italic) { value = "italic"; } else { value = "bold-and-italic"; } }
public bool containsStyleRemove(FontStyleFlag sty) { if ((_styleRemove & (UInt32)sty) > 0) { return(true); } return(false); }
public bool ContainsStyleRemove(FontStyleFlag sty) { if ((styleRemove & (uint)sty) > 0) { return(true); } return(false); }
void SetInternalStatesFromExternalChoice(string newValue) { m_InternalState = FontStyleFlag.None; if (newValue == "normal") { m_InternalState = FontStyleFlag.None; } else if (newValue == "bold") { m_InternalState = FontStyleFlag.Bold; } else if (newValue == "italic") { m_InternalState = FontStyleFlag.Italic; } else if (newValue == "bold-and-italic") { m_InternalState = FontStyleFlag.Both; } ToggleButtonStates(); }
/// <summary> /// Remove a font style from the set. Removing a font style /// that is already not in the set has no effect. /// </summary> /// <param name="sty">Font style to be removed.</param> public void removeStyle(FontStyleFlag sty) { _styleAdd &= ~((UInt32)sty); _styleRemove |= (UInt32)sty; }
/// <summary> /// Add a font style to the set. Adding a font style /// that is already in the set has no effect. /// </summary> /// <param name="sty">Font style to be added.</param> public void addStyle(FontStyleFlag sty) { _styleAdd |= (UInt32)sty; _styleRemove &= ~((UInt32)sty); }
/// <summary> /// Remove a font style from the set. Removing a font style /// that is already not in the set has no effect. /// </summary> /// <param name="sty">Font style to be removed.</param> public void RemoveStyle(FontStyleFlag sty) { styleAdd &= ~(uint)sty; styleRemove |= (uint)sty; }
/// <summary> /// Add a font style to the set. Adding a font style /// that is already in the set has no effect. /// </summary> /// <param name="sty">Font style to be added.</param> public void AddStyle(FontStyleFlag sty) { styleAdd |= (uint)sty; styleRemove &= ~(uint)sty; }
/// <summary> /// Remove a font style from the set. Removing a font style /// that is already not in the set has no effect. /// </summary> /// <param name="sty">Font style to be removed.</param> public void removeStyle(FontStyleFlag sty) { _styleAdd &= ~( (UInt32) sty ); _styleRemove |= (UInt32) sty; }
public bool containsStyleRemove(FontStyleFlag sty) { if ((_styleRemove & (UInt32) sty) > 0) { return true; } return false; }
/// <summary> /// Add a font style to the set. Adding a font style /// that is already in the set has no effect. /// </summary> /// <param name="sty">Font style to be added.</param> public void addStyle(FontStyleFlag sty) { _styleAdd |= (UInt32) sty; _styleRemove &= ~( (UInt32) sty ); }
/// <summary> /// Remove a font style from the set. Removing a font style /// that is already not in the set has no effect. /// </summary> /// <param name="sty">Font style to be removed.</param> public void removeStyle(FontStyleFlag sty) { _style &= ~((UInt32)sty); }
/// <summary> /// Add a font style to the set. Adding a font style /// that is already in the set has no effect. /// </summary> /// <param name="sty">Font style to be added.</param> public void addStyle(FontStyleFlag sty) { _style |= (UInt32)sty; }