Make labelMode, textAlignment, and currentStyle public variables.

This commit is contained in:
Michael Griebling
2023-01-16 17:03:29 -05:00
parent 9bcf6e8c70
commit 4c5bdf99a2
2 changed files with 3 additions and 18 deletions

View File

@@ -129,7 +129,6 @@ public class MTMathAtom: NSObject {
}
}
public var nucleus: String = ""
// public var childAtoms = [MTMathAtom]() // atoms that fused to create this one
public var indexRange = NSRange(location: 0, length: 0) // indexRange in list that this atom tracks:
var fontStyle: MTFontStyle = .defaultStyle
@@ -143,7 +142,6 @@ public class MTMathAtom: NSObject {
self.superScript = MTMathList(atom.superScript)
self.indexRange = atom.indexRange
self.fontStyle = atom.fontStyle
// self.childAtoms = [MTMathAtom](atom.childAtoms)
self.fusedAtoms = atom.fusedAtoms
}

View File

@@ -140,7 +140,7 @@ public class MTMathUILabel : MTView {
}
/** The Label mode for the label. The default mode is Display */
var labelMode = MTMathUILabelMode.display {
public var labelMode = MTMathUILabelMode.display {
didSet {
self.invalidateIntrinsicContentSize()
self.setNeedsLayout()
@@ -148,7 +148,7 @@ public class MTMathUILabel : MTView {
}
/** Horizontal alignment for the text. The default is align left. */
var textAlignment = MTTextAlignment.left {
public var textAlignment = MTTextAlignment.left {
didSet {
self.invalidateIntrinsicContentSize()
self.setNeedsLayout()
@@ -158,7 +158,7 @@ public class MTMathUILabel : MTView {
/** The internal display of the MTMathUILabel. This is for advanced use only. */
var displayList: MTMathListDisplay? = nil
var currentStyle:MTLineStyle {
public var currentStyle:MTLineStyle {
switch labelMode {
case .display: return .display
case .text: return .text
@@ -273,17 +273,4 @@ public class MTMathUILabel : MTView {
}
#endif
// #if os(macOS)
// override public var isFlipped: Bool { false }
// func setNeedsDisplay() { self.needsDisplay = true }
// func setNeedsLayout() { self.needsLayout = true }
// override public func layout() {
// self._layoutSubviews()
// super.layout()
// }
// #else
// override public func layoutSubviews() { self._layoutSubviews() }
// override public func sizeThatFits(_ size: CGSize) -> CGSize { self._sizeThatFits(size) }
// #endif
}