Class: Notesgrip::NotesRichTextItem
Overview
NotesRichTextItem Class ================
Constant Summary
collapse
- EMBED_ATTACHMENT =
1454
- EMBED_OBJECT =
1453
- EMBED_OBJECTLINK =
1452
Constants inherited
from NotesItem
Notesgrip::NotesItem::ACTIONCD, Notesgrip::NotesItem::ASSISTANTINFO, Notesgrip::NotesItem::ATTACHMENT, Notesgrip::NotesItem::ATTACHMENT_TYP, Notesgrip::NotesItem::AUTHORS, Notesgrip::NotesItem::COLLATION, Notesgrip::NotesItem::DATETIMES, Notesgrip::NotesItem::DATE_TYP, Notesgrip::NotesItem::EMBEDDEDOBJECT, Notesgrip::NotesItem::ERRORITEM, Notesgrip::NotesItem::FORMULA, Notesgrip::NotesItem::HTML, Notesgrip::NotesItem::ICON, Notesgrip::NotesItem::ItemTypeDic, Notesgrip::NotesItem::LSOBJECT, Notesgrip::NotesItem::MIME_PART, Notesgrip::NotesItem::NAMES, Notesgrip::NotesItem::NAME_TYP, Notesgrip::NotesItem::NOTELINKS, Notesgrip::NotesItem::NOTEREFS, Notesgrip::NotesItem::NUMBERS, Notesgrip::NotesItem::OTHEROBJECT, Notesgrip::NotesItem::QUERYCD, Notesgrip::NotesItem::READERS, Notesgrip::NotesItem::RFC822Text, Notesgrip::NotesItem::RICHTEXT, Notesgrip::NotesItem::RICH_TYP, Notesgrip::NotesItem::SIGNATURE, Notesgrip::NotesItem::TEXT, Notesgrip::NotesItem::TEXT_TYP, Notesgrip::NotesItem::UNAVAILABLE, Notesgrip::NotesItem::UNKNOWN, Notesgrip::NotesItem::USERDATA, Notesgrip::NotesItem::USERID, Notesgrip::NotesItem::VIEWMAPDATA, Notesgrip::NotesItem::VIEWMAPLAYOUT
Instance Method Summary
collapse
-
#[](embobj_name) ⇒ Object
—— Additional Methods —–.
-
#AddFile(filename) ⇒ Object
(also: #add_file)
-
#AddNewLine(n = 1, forceParagraph = true) ⇒ Object
-
#AppendDocLink(linkTo, comment = nil, hotSpotText = nil) ⇒ Object
-
#AppendParagraphStyle(paragStyle) ⇒ Object
-
#AppendRTItem(otherRichItem) ⇒ Object
-
#AppendStyle(richTextStyle) ⇒ Object
-
#AppendTable(rows, columns, labels = nil, leftMargin = 1440, rtpsStyleArray = nil) ⇒ Object
-
#AppendText(text) ⇒ Object
-
#BeginInsert(element, after = false) ⇒ Object
-
#BeginSection(title, titleStyle = nil, barColor = nil, expand = false) ⇒ Object
-
#CreateNavigator ⇒ Object
-
#CreateRange ⇒ Object
-
#each_embedded ⇒ Object
-
#each_embeddedFile ⇒ Object
-
#each_embeddedLink ⇒ Object
-
#each_embeddedOLE ⇒ Object
-
#EmbeddedObjects ⇒ Object
-
#EmbedObject(type, appClass, source) ⇒ Object
-
#GetEmbeddedObject(name) ⇒ Object
-
#GetFormattedText(tabstrip, lineLength = 0) ⇒ Object
-
#inspect ⇒ Object
Methods inherited from NotesItem
#AppendToTextList, #CopyItem, #CopyItemToDocument, #DateTimeValue, #GetMIMEEntity, #GetValueDateTimeArray, #Parent, #Remove, #Text, #Type, #ValueLength, #Values, #Values=, #contains?, #each_value, #to_s
Methods inherited from GripWrapper
#initialize, #raw
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Notesgrip::GripWrapper
Instance Method Details
#[](embobj_name) ⇒ Object
102
103
104
105
106
107
108
109
|
# File 'lib/notesgrip/NotesRichTextItem.rb', line 102
def [](embobj_name)
raw_embobj = @raw_object.GetEmbeddedObject(embobj_name)
if raw_embobj
NotesEmbeddedObject.new(raw_embobj)
else
nil
end
end
|
#AddFile(filename) ⇒ Object
Also known as:
add_file
111
112
113
114
|
# File 'lib/notesgrip/NotesRichTextItem.rb', line 111
def AddFile(filename)
fullname = FileSystemObject.instance.fullpath(filename)
self.EmbedObject(EMBED_ATTACHMENT, "", fullname)
end
|
#AddNewLine(n = 1, forceParagraph = true) ⇒ Object
18
19
20
|
# File 'lib/notesgrip/NotesRichTextItem.rb', line 18
def AddNewLine( n=1, forceParagraph=true )
@raw_object.AddNewLine( n, forceParagraph)
end
|
#AppendDocLink(linkTo, comment = nil, hotSpotText = nil) ⇒ Object
22
23
24
25
|
# File 'lib/notesgrip/NotesRichTextItem.rb', line 22
def AppendDocLink( linkTo, =nil, hotSpotText=nil )
raw_linkTo = toRaw(linkTo)
@raw_object.AppendDocLink( raw_linkTo, , hotSpotText )
end
|
#AppendParagraphStyle(paragStyle) ⇒ Object
27
28
29
30
|
# File 'lib/notesgrip/NotesRichTextItem.rb', line 27
def AppendParagraphStyle( paragStyle )
raw_paragStyle = toRaw(paragStyle)
@raw_object.AppendParagraphStyle( raw_paragStyle )
end
|
#AppendRTItem(otherRichItem) ⇒ Object
32
33
34
35
|
# File 'lib/notesgrip/NotesRichTextItem.rb', line 32
def AppendRTItem( otherRichItem )
raw_otherRichItem = toRaw(otherRichItem)
@raw_object.AppendRTItem( raw_otherRichItem )
end
|
#AppendStyle(richTextStyle) ⇒ Object
37
38
39
40
|
# File 'lib/notesgrip/NotesRichTextItem.rb', line 37
def AppendStyle( richTextStyle )
raw_richTextStyle = toRaw(richTextStyle)
@raw_object.AppendStyle( raw_richTextStyle )
end
|
#AppendTable(rows, columns, labels = nil, leftMargin = 1440, rtpsStyleArray = nil) ⇒ Object
42
43
44
45
46
47
48
49
50
|
# File 'lib/notesgrip/NotesRichTextItem.rb', line 42
def AppendTable( rows, columns, labels=nil, leftMargin=1440, rtpsStyleArray=nil )
raw_styleArray = []
if rtpsStyleArray
rtpsStyleArray.each {|rtpsStyle|
raw_styleArray.push toRaw(rtpsStyle)
}
end
@raw_object.AppendTable( rows, columns, labels, leftMargin, raw_styleArray )
end
|
#AppendText(text) ⇒ Object
52
53
54
|
# File 'lib/notesgrip/NotesRichTextItem.rb', line 52
def AppendText( text )
@raw_object.AppendText( text )
end
|
#BeginInsert(element, after = false) ⇒ Object
56
57
58
59
|
# File 'lib/notesgrip/NotesRichTextItem.rb', line 56
def BeginInsert( element, after=false )
raw_element = toRaw(element)
@raw_object.BeginInsert(raw_element)
end
|
#BeginSection(title, titleStyle = nil, barColor = nil, expand = false) ⇒ Object
61
62
63
64
65
|
# File 'lib/notesgrip/NotesRichTextItem.rb', line 61
def BeginSection( title, titleStyle=nil, barColor=nil, expand=false )
raw_titleStyle = toRaw(titleStyle)
raw_barColor = toRaw(barColor)
@raw_object.BeginSection( title, raw_titleStyle, raw_barColor, expand)
end
|
#CreateNavigator ⇒ Object
67
68
69
70
|
# File 'lib/notesgrip/NotesRichTextItem.rb', line 67
def CreateNavigator()
raw_RichTextNavigator = @raw_object.CreateNavigator()
NotesRichTextNavigator.new(raw_RichTextNavigator)
end
|
#CreateRange ⇒ Object
72
73
74
75
|
# File 'lib/notesgrip/NotesRichTextItem.rb', line 72
def CreateRange()
= @raw_object.CreateRange()
NotesRichTextRange.new()
end
|
#each_embedded ⇒ Object
117
118
119
120
121
|
# File 'lib/notesgrip/NotesRichTextItem.rb', line 117
def each_embedded
@raw_object.EmbeddedObjects.each {|rawEmbObj|
yield NotesEmbeddedObject.new(rawEmbObj)
}
end
|
#each_embeddedFile ⇒ Object
123
124
125
126
127
128
129
|
# File 'lib/notesgrip/NotesRichTextItem.rb', line 123
def each_embeddedFile
@raw_object.EmbeddedObjects.each {|rawEmbObj|
if rawEmbObj.Type == EMBED_ATTACHMENT
yield NotesEmbeddedObject.new(rawEmbObj)
end
}
end
|
#each_embeddedLink ⇒ Object
131
132
133
134
135
136
137
|
# File 'lib/notesgrip/NotesRichTextItem.rb', line 131
def each_embeddedLink
@raw_object.EmbeddedObjects.each {|rawEmbObj|
if rawEmbObj.Type == EMBED_OBJECTLINK
yield NotesEmbeddedObject.new(rawEmbObj)
end
}
end
|
#each_embeddedOLE ⇒ Object
139
140
141
142
143
144
145
|
# File 'lib/notesgrip/NotesRichTextItem.rb', line 139
def each_embeddedOLE
@raw_object.EmbeddedObjects.each {|rawEmbObj|
if rawEmbObj.Type == EMBED_OBJECT
yield NotesEmbeddedObject.new(rawEmbObj)
end
}
end
|
#EmbeddedObjects ⇒ Object
9
10
11
12
13
14
15
16
|
# File 'lib/notesgrip/NotesRichTextItem.rb', line 9
def EmbeddedObjects
obj_list = []
return obj_list unless @raw_object.EmbeddedObjects
@raw_object.EmbeddedObjects.each {|rawEmbObj|
obj_list.push NotesEmbeddedObject.new(rawEmbObj)
}
obj_list
end
|
#EmbedObject(type, appClass, source) ⇒ Object
#GetEmbeddedObject(name) ⇒ Object
92
93
94
95
|
# File 'lib/notesgrip/NotesRichTextItem.rb', line 92
def GetEmbeddedObject( name )
raw_EmbeddedObject = @raw_object.GetEmbeddedObject( name )
raw_EmbeddedObject ? NotesEmbeddedObject.new(raw_EmbeddedObject) : nil
end
|
#GetFormattedText(tabstrip, lineLength = 0) ⇒ Object
97
98
99
|
# File 'lib/notesgrip/NotesRichTextItem.rb', line 97
def GetFormattedText( tabstrip, lineLength=0 )
@raw_object.GetFormattedText( tabstrip, lineLength )
end
|
#inspect ⇒ Object
147
148
149
150
|
# File 'lib/notesgrip/NotesRichTextItem.rb', line 147
def inspect
val = self.Text
"<#{self.class}, Type:#{ItemTypeDic[self.Type]}, #{self.name.inspect}=>#{val.inspect}>"
end
|