pub struct OutlineItem<'a> { /* private fields */ }
Expand description
Writer for an outline item dictionary.
This struct is created by Chunk::outline_item
.
Implementations§
source§impl<'a> OutlineItem<'a>
impl<'a> OutlineItem<'a>
sourcepub fn parent(&mut self, outline: Ref) -> &mut Self
pub fn parent(&mut self, outline: Ref) -> &mut Self
Write the /Parent
attribute which points to the item’s parent or the
top-level outline dictionary.
sourcepub fn prev(&mut self, outline: Ref) -> &mut Self
pub fn prev(&mut self, outline: Ref) -> &mut Self
Write the /Prev
attribute which points to the previous item on the
item’s level.
sourcepub fn next(&mut self, outline: Ref) -> &mut Self
pub fn next(&mut self, outline: Ref) -> &mut Self
Write the /Next
attribute which points to the next item on the item’s
level.
sourcepub fn first(&mut self, outline: Ref) -> &mut Self
pub fn first(&mut self, outline: Ref) -> &mut Self
Write the /First
attribute which points to the item’s first child.
sourcepub fn last(&mut self, outline: Ref) -> &mut Self
pub fn last(&mut self, outline: Ref) -> &mut Self
Write the /Last
attribute which points to the item’s last child.
sourcepub fn count(&mut self, items: i32) -> &mut Self
pub fn count(&mut self, items: i32) -> &mut Self
Write the /Count
attribute. This tells the viewer how many outline
element children are currently visible. If the item is collapsed, this
number shall be negative indicating how many elements you would be able
to see if it was open.
sourcepub fn dest(&mut self) -> Destination<'_>
pub fn dest(&mut self) -> Destination<'_>
Start writing the /Dest
attribute to set the destination of this
outline item.
sourcepub fn dest_name(&mut self, name: Name<'_>) -> &mut Self
pub fn dest_name(&mut self, name: Name<'_>) -> &mut Self
Write the /Dest
attribute to set the destination of this
outline item to a named destination.
sourcepub fn color_rgb(&mut self, r: f32, g: f32, b: f32) -> &mut Self
pub fn color_rgb(&mut self, r: f32, g: f32, b: f32) -> &mut Self
Write the /C
attribute using an RGB color. This sets the color in
which the outline item’s title should be rendered. PDF 1.4+.
sourcepub fn flags(&mut self, flags: OutlineItemFlags) -> &mut Self
pub fn flags(&mut self, flags: OutlineItemFlags) -> &mut Self
Write the /F
attribute. PDF 1.4+.
Methods from Deref<Target = Dict<'a>>§
sourcepub fn insert(&mut self, key: Name<'_>) -> Obj<'_>
pub fn insert(&mut self, key: Name<'_>) -> Obj<'_>
Start writing a pair with an arbitrary value.
sourcepub fn pair<T: Primitive>(&mut self, key: Name<'_>, value: T) -> &mut Self
pub fn pair<T: Primitive>(&mut self, key: Name<'_>, value: T) -> &mut Self
Write a pair with a primitive value.
This is a shorthand for dict.insert(key).primitive(value)
.
sourcepub fn pairs<'n, T: Primitive>(
&mut self,
pairs: impl IntoIterator<Item = (Name<'n>, T)>,
) -> &mut Self
pub fn pairs<'n, T: Primitive>( &mut self, pairs: impl IntoIterator<Item = (Name<'n>, T)>, ) -> &mut Self
Write a sequence of pairs with primitive values.