-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial changes to make Atoms structs (#115)
- Loading branch information
Showing
25 changed files
with
101 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,13 @@ | ||
namespace WpfMath | ||
{ | ||
// Atom representing single character that can be marked as text symbol. | ||
internal abstract class CharSymbol : Atom | ||
/// <summary>Atom representing single character that can be marked as text symbol.</summary> | ||
internal interface ICharSymbol : IAtom | ||
{ | ||
public CharSymbol() | ||
{ | ||
this.IsTextSymbol = false; | ||
} | ||
|
||
public bool IsTextSymbol | ||
{ | ||
get; | ||
set; | ||
} | ||
|
||
protected override Atom CopyTo(Atom atom) | ||
{ | ||
((CharSymbol)atom).IsTextSymbol = IsTextSymbol; | ||
return base.CopyTo(atom); | ||
} | ||
bool IsTextSymbol { get; } | ||
|
||
/// <summary>Returns the preferred font to render this character.</summary> | ||
public virtual ITeXFont GetStyledFont(TexEnvironment environment) => environment.MathFont; | ||
ITeXFont GetStyledFont(TexEnvironment environment) => environment.MathFont; | ||
|
||
public abstract CharFont GetCharFont(ITeXFont texFont); | ||
CharFont GetCharFont(ITeXFont texFont); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
namespace WpfMath | ||
{ | ||
/// <summary>Atom (smallest unit) of TexFormula.</summary> | ||
internal interface IAtom | ||
{ | ||
TexAtomType Type { get; } | ||
|
||
/// <summary>Gets type of leftmost child item.</summary> | ||
TexAtomType GetLeftType(); | ||
|
||
/// <summary>Gets type of leftmost child item.</summary> | ||
TexAtomType GetRightType(); | ||
|
||
/// <summary>Source of this atom. May be <c>null</c>.</summary> | ||
SourceSpan Source { get; } | ||
|
||
Box CreateBox(TexEnvironment environment); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.