[FlagsAttribute]
public enum Flags
{
- None = 0,
+ None = 0x00,
/// A text inserted before a character that has this property
/// inherits this property. If the text already has properties
/// of the same key, they are deleted. See the documentation of
/// Sensitive for exception.
- FrontSticky = 1,
+ FrontSticky = 0x01,
/// A text inserted after a character that has this property
/// inherits this property. If the text already has properties
/// of the same key, they are deleted. See the documentation of
/// Sensitive for exception.
- RearSticky = 2,
+ RearSticky = 0x02,
/// This property is deleted from a span of text if the span is
/// modified (i.e. a character is changed, a text is inserted,
/// some part is deleted). This propery is also deleted if a
/// property of the same key is added, which means that this
- /// property is not stackable. If this property is also
- /// FrontSticky (or RearSticky), text insertion just before (or
- /// after) the span also deletes this property from the span of
- /// text.
- Sensitive = 4,
+ /// property is not stackable.
+ Sensitive = 0x04,
+ /// This property is deleted from a span of text if a text just
+ /// before the span is modified, inserted, or deleted.
+ FrontSensitive = 0x08,
+ /// This property is deleted from a span of text if a text just
+ /// after the span is modified, inserted, or deleted.
+ RearSensitive = 0x10
};
internal MSymbol key;
public bool isFrontSensitive
{
get { return MProperty.HasFlags (Key,
- (MProperty.Flags.Sensitive
- | MProperty.Flags.FrontSticky)); }
+ MProperty.Flags.FrontSensitive) ; }
}
public bool isRearSensitive
{
get { return MProperty.HasFlags (Key,
- (MProperty.Flags.Sensitive
- | MProperty.Flags.RearSticky)); }
+ MProperty.Flags.RearSensitive) ; }
}
private void update_from_to ()
}
}
- private void check_from_to (string str)
- {
- int save_from = From;
- int save_to = To;
- update_from_to ();
- if (save_from != From || save_to != To)
- throw new Exception (str + ":incorrect from or to");
- }
-
public void MergeAfterChange (int start, int end)
{
update_from_to ();