-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for new interactive math inline objects, com.apple.note…
…s.inlinetextattachment.calculateresult and com.apple.notes.inlinetextattachment.calculategraphexpression.
- Loading branch information
1 parent
deb42f6
commit bac6eed
Showing
4 changed files
with
66 additions
and
0 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 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,25 @@ | ||
require_relative 'AppleNotesEmbeddedInlineAttachment' | ||
|
||
## | ||
# This class represents an inline interactive math graph embedded in an AppleNote. | ||
# These were added in iOS 18. | ||
class AppleNotesEmbeddedInlineCalculateGraphExpression < AppleNotesEmbeddedInlineAttachment | ||
|
||
## | ||
# Creates a new AppleNotesEmbeddedInlineCalculateGraphExpression. | ||
# Expects an Integer +primary_key+ from ZICCLOUDSYNCINGOBJECT.Z_PK, String +uuid+ from ZICCLOUDSYNCINGOBJECT.ZIDENTIFIER, | ||
# String +uti+ from ZICCLOUDSYNCINGOBJECT.ZTYPEUTI1, AppleNote +note+ object representing the parent AppleNote, | ||
# a String +alt_text+ from ZICCLOUDSYNCINGOBJECT.ZALTTEXT, and a String +token_identifier+ from | ||
# ZICCLOUDSYNCINGOBJECT.ZTOKENCONTENTIDENTIFIER representing what the result stands for. | ||
def initialize(primary_key, uuid, uti, note, alt_text, token_identifier) | ||
super(primary_key, uuid, uti, note, alt_text, token_identifier) | ||
end | ||
|
||
## | ||
# This method just returns the graph equation's variable, which is found in alt_text. | ||
def to_s | ||
return "" if !@alt_text | ||
@alt_text | ||
end | ||
|
||
end |
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,25 @@ | ||
require_relative 'AppleNotesEmbeddedInlineAttachment' | ||
|
||
## | ||
# This class represents an inline interactive math result embedded in an AppleNote. | ||
# These were added in iOS 18. | ||
class AppleNotesEmbeddedInlineCalculateResult < AppleNotesEmbeddedInlineAttachment | ||
|
||
## | ||
# Creates a new AppleNotesEmbeddedInlineCalculateResult. | ||
# Expects an Integer +primary_key+ from ZICCLOUDSYNCINGOBJECT.Z_PK, String +uuid+ from ZICCLOUDSYNCINGOBJECT.ZIDENTIFIER, | ||
# String +uti+ from ZICCLOUDSYNCINGOBJECT.ZTYPEUTI1, AppleNote +note+ object representing the parent AppleNote, | ||
# a String +alt_text+ from ZICCLOUDSYNCINGOBJECT.ZALTTEXT, and a String +token_identifier+ from | ||
# ZICCLOUDSYNCINGOBJECT.ZTOKENCONTENTIDENTIFIER representing what the result stands for. | ||
def initialize(primary_key, uuid, uti, note, alt_text, token_identifier) | ||
super(primary_key, uuid, uti, note, alt_text, token_identifier) | ||
end | ||
|
||
## | ||
# This method just returns the calculation result's text, which is found in alt_text. | ||
def to_s | ||
return "" if !@alt_text | ||
@alt_text | ||
end | ||
|
||
end |
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