83 lines
No EOL
33 KiB
HTML
83 lines
No EOL
33 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A trait to allow easy replacements of `Editor`, like `SyntaxEditor`"><title>Edit in cosmic::iced::daemon::program::graphics::text::cosmic_text - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../" data-static-root-path="../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Edit</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.action" title="action">action</a></li><li><a href="#tymethod.apply_change" title="apply_change">apply_change</a></li><li><a href="#tymethod.auto_indent" title="auto_indent">auto_indent</a></li><li><a href="#tymethod.buffer_ref" title="buffer_ref">buffer_ref</a></li><li><a href="#tymethod.buffer_ref_mut" title="buffer_ref_mut">buffer_ref_mut</a></li><li><a href="#tymethod.copy_selection" title="copy_selection">copy_selection</a></li><li><a href="#tymethod.cursor" title="cursor">cursor</a></li><li><a href="#tymethod.cursor_position" title="cursor_position">cursor_position</a></li><li><a href="#tymethod.delete_range" title="delete_range">delete_range</a></li><li><a href="#tymethod.delete_selection" title="delete_selection">delete_selection</a></li><li><a href="#tymethod.finish_change" title="finish_change">finish_change</a></li><li><a href="#tymethod.insert_at" title="insert_at">insert_at</a></li><li><a href="#tymethod.selection" title="selection">selection</a></li><li><a href="#tymethod.set_auto_indent" title="set_auto_indent">set_auto_indent</a></li><li><a href="#tymethod.set_cursor" title="set_cursor">set_cursor</a></li><li><a href="#tymethod.set_selection" title="set_selection">set_selection</a></li><li><a href="#tymethod.set_tab_width" title="set_tab_width">set_tab_width</a></li><li><a href="#tymethod.shape_as_needed" title="shape_as_needed">shape_as_needed</a></li><li><a href="#tymethod.start_change" title="start_change">start_change</a></li><li><a href="#tymethod.tab_width" title="tab_width">tab_width</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.borrow_with" title="borrow_with">borrow_with</a></li><li><a href="#method.insert_string" title="insert_string">insert_string</a></li><li><a href="#method.redraw" title="redraw">redraw</a></li><li><a href="#method.selection_bounds" title="selection_bounds">selection_bounds</a></li><li><a href="#method.set_redraw" title="set_redraw">set_redraw</a></li><li><a href="#method.with_buffer" title="with_buffer">with_buffer</a></li><li><a href="#method.with_buffer_mut" title="with_buffer_mut">with_buffer_mut</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>text::<wbr>cosmic_<wbr>text</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../index.html">iced</a>::<wbr><a href="../../../../index.html">daemon</a>::<wbr><a href="../../../index.html">program</a>::<wbr><a href="../../index.html">graphics</a>::<wbr><a href="../index.html">text</a>::<wbr><a href="index.html">cosmic_text</a></div><h1>Trait <span class="trait">Edit</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub trait Edit<'buffer> {
|
||
<details class="toggle type-contents-toggle"><summary class="hideme"><span>Show 27 methods</span></summary> // Required methods
|
||
fn <a href="#tymethod.buffer_ref" class="fn">buffer_ref</a>(&self) -> &<a class="enum" href="enum.BufferRef.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::BufferRef">BufferRef</a><'buffer>;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.buffer_ref_mut" class="fn">buffer_ref_mut</a>(&mut self) -> &mut <a class="enum" href="enum.BufferRef.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::BufferRef">BufferRef</a><'buffer>;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.cursor" class="fn">cursor</a>(&self) -> <a class="struct" href="struct.Cursor.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Cursor">Cursor</a>;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.set_cursor" class="fn">set_cursor</a>(&mut self, cursor: <a class="struct" href="struct.Cursor.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Cursor">Cursor</a>);
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.selection" class="fn">selection</a>(&self) -> <a class="enum" href="enum.Selection.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::Selection">Selection</a>;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.set_selection" class="fn">set_selection</a>(&mut self, selection: <a class="enum" href="enum.Selection.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::Selection">Selection</a>);
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.auto_indent" class="fn">auto_indent</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.set_auto_indent" class="fn">set_auto_indent</a>(&mut self, auto_indent: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>);
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.tab_width" class="fn">tab_width</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.set_tab_width" class="fn">set_tab_width</a>(&mut self, tab_width: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>);
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.shape_as_needed" class="fn">shape_as_needed</a>(&mut self, font_system: &mut <a class="struct" href="struct.FontSystem.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::FontSystem">FontSystem</a>, prune: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>);
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.delete_range" class="fn">delete_range</a>(&mut self, start: <a class="struct" href="struct.Cursor.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Cursor">Cursor</a>, end: <a class="struct" href="struct.Cursor.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Cursor">Cursor</a>);
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.insert_at" class="fn">insert_at</a>(
|
||
&mut self,
|
||
cursor: <a class="struct" href="struct.Cursor.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Cursor">Cursor</a>,
|
||
data: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
|
||
attrs_list: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.AttrsList.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::AttrsList">AttrsList</a>>,
|
||
) -> <a class="struct" href="struct.Cursor.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Cursor">Cursor</a>;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.copy_selection" class="fn">copy_selection</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../../../../cctk/sctk/reexports/client/backend/smallvec/alloc/string/struct.String.html" title="struct cosmic::cctk::sctk::reexports::client::backend::smallvec::alloc::string::String">String</a>>;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.delete_selection" class="fn">delete_selection</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.apply_change" class="fn">apply_change</a>(&mut self, change: &<a class="struct" href="struct.Change.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Change">Change</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.start_change" class="fn">start_change</a>(&mut self);
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.finish_change" class="fn">finish_change</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.Change.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Change">Change</a>>;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.action" class="fn">action</a>(&mut self, font_system: &mut <a class="struct" href="struct.FontSystem.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::FontSystem">FontSystem</a>, action: <a class="enum" href="enum.Action.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::Action">Action</a>);
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.cursor_position" class="fn">cursor_position</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)>;
|
||
|
||
// Provided methods
|
||
fn <a href="#method.borrow_with" class="fn">borrow_with</a><'font_system>(
|
||
&'font_system mut self,
|
||
font_system: &'font_system mut <a class="struct" href="struct.FontSystem.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::FontSystem">FontSystem</a>,
|
||
) -> <a class="struct" href="struct.BorrowedWithFontSystem.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::BorrowedWithFontSystem">BorrowedWithFontSystem</a><'font_system, Self>
|
||
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.with_buffer" class="fn">with_buffer</a><F, T>(&self, f: F) -> T
|
||
<span class="where">where F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&<a class="struct" href="struct.Buffer.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Buffer">Buffer</a>) -> T</span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.with_buffer_mut" class="fn">with_buffer_mut</a><F, T>(&mut self, f: F) -> T
|
||
<span class="where">where F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&mut <a class="struct" href="struct.Buffer.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Buffer">Buffer</a>) -> T</span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.redraw" class="fn">redraw</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.set_redraw" class="fn">set_redraw</a>(&mut self, redraw: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.selection_bounds" class="fn">selection_bounds</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<a class="struct" href="struct.Cursor.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Cursor">Cursor</a>, <a class="struct" href="struct.Cursor.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Cursor">Cursor</a>)> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.insert_string" class="fn">insert_string</a>(&mut self, data: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, attrs_list: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.AttrsList.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::AttrsList">AttrsList</a>>) { ... }
|
||
</details>}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A trait to allow easy replacements of <a href="struct.Editor.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Editor"><code>Editor</code></a>, like <code>SyntaxEditor</code></p>
|
||
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.buffer_ref" class="method"><h4 class="code-header">fn <a href="#tymethod.buffer_ref" class="fn">buffer_ref</a>(&self) -> &<a class="enum" href="enum.BufferRef.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::BufferRef">BufferRef</a><'buffer></h4></section></summary><div class="docblock"><p>Get the internal <a href="enum.BufferRef.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::BufferRef"><code>BufferRef</code></a></p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.buffer_ref_mut" class="method"><h4 class="code-header">fn <a href="#tymethod.buffer_ref_mut" class="fn">buffer_ref_mut</a>(&mut self) -> &mut <a class="enum" href="enum.BufferRef.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::BufferRef">BufferRef</a><'buffer></h4></section></summary><div class="docblock"><p>Get the internal <a href="enum.BufferRef.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::BufferRef"><code>BufferRef</code></a></p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.cursor" class="method"><h4 class="code-header">fn <a href="#tymethod.cursor" class="fn">cursor</a>(&self) -> <a class="struct" href="struct.Cursor.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Cursor">Cursor</a></h4></section></summary><div class="docblock"><p>Get the current cursor</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.set_cursor" class="method"><h4 class="code-header">fn <a href="#tymethod.set_cursor" class="fn">set_cursor</a>(&mut self, cursor: <a class="struct" href="struct.Cursor.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Cursor">Cursor</a>)</h4></section></summary><div class="docblock"><p>Set the current cursor</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.selection" class="method"><h4 class="code-header">fn <a href="#tymethod.selection" class="fn">selection</a>(&self) -> <a class="enum" href="enum.Selection.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::Selection">Selection</a></h4></section></summary><div class="docblock"><p>Get the current selection position</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.set_selection" class="method"><h4 class="code-header">fn <a href="#tymethod.set_selection" class="fn">set_selection</a>(&mut self, selection: <a class="enum" href="enum.Selection.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::Selection">Selection</a>)</h4></section></summary><div class="docblock"><p>Set the current selection position</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.auto_indent" class="method"><h4 class="code-header">fn <a href="#tymethod.auto_indent" class="fn">auto_indent</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Get the current automatic indentation setting</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.set_auto_indent" class="method"><h4 class="code-header">fn <a href="#tymethod.set_auto_indent" class="fn">set_auto_indent</a>(&mut self, auto_indent: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>)</h4></section></summary><div class="docblock"><p>Enable or disable automatic indentation</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.tab_width" class="method"><h4 class="code-header">fn <a href="#tymethod.tab_width" class="fn">tab_width</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></h4></section></summary><div class="docblock"><p>Get the current tab width</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.set_tab_width" class="method"><h4 class="code-header">fn <a href="#tymethod.set_tab_width" class="fn">set_tab_width</a>(&mut self, tab_width: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>)</h4></section></summary><div class="docblock"><p>Set the current tab width. A <code>tab_width</code> of 0 is not allowed, and will be ignored</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.shape_as_needed" class="method"><h4 class="code-header">fn <a href="#tymethod.shape_as_needed" class="fn">shape_as_needed</a>(&mut self, font_system: &mut <a class="struct" href="struct.FontSystem.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::FontSystem">FontSystem</a>, prune: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>)</h4></section></summary><div class="docblock"><p>Shape lines until scroll, after adjusting scroll if the cursor moved</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.delete_range" class="method"><h4 class="code-header">fn <a href="#tymethod.delete_range" class="fn">delete_range</a>(&mut self, start: <a class="struct" href="struct.Cursor.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Cursor">Cursor</a>, end: <a class="struct" href="struct.Cursor.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Cursor">Cursor</a>)</h4></section></summary><div class="docblock"><p>Delete text starting at start Cursor and ending at end Cursor</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.insert_at" class="method"><h4 class="code-header">fn <a href="#tymethod.insert_at" class="fn">insert_at</a>(
|
||
&mut self,
|
||
cursor: <a class="struct" href="struct.Cursor.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Cursor">Cursor</a>,
|
||
data: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
|
||
attrs_list: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.AttrsList.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::AttrsList">AttrsList</a>>,
|
||
) -> <a class="struct" href="struct.Cursor.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Cursor">Cursor</a></h4></section></summary><div class="docblock"><p>Insert text at specified cursor with specified <code>attrs_list</code></p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.copy_selection" class="method"><h4 class="code-header">fn <a href="#tymethod.copy_selection" class="fn">copy_selection</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../../../../cctk/sctk/reexports/client/backend/smallvec/alloc/string/struct.String.html" title="struct cosmic::cctk::sctk::reexports::client::backend::smallvec::alloc::string::String">String</a>></h4></section></summary><div class="docblock"><p>Copy selection</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.delete_selection" class="method"><h4 class="code-header">fn <a href="#tymethod.delete_selection" class="fn">delete_selection</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Delete selection, adjusting cursor and returning true if there was a selection</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.apply_change" class="method"><h4 class="code-header">fn <a href="#tymethod.apply_change" class="fn">apply_change</a>(&mut self, change: &<a class="struct" href="struct.Change.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Change">Change</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Apply a change</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.start_change" class="method"><h4 class="code-header">fn <a href="#tymethod.start_change" class="fn">start_change</a>(&mut self)</h4></section></summary><div class="docblock"><p>Start collecting change</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.finish_change" class="method"><h4 class="code-header">fn <a href="#tymethod.finish_change" class="fn">finish_change</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.Change.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Change">Change</a>></h4></section></summary><div class="docblock"><p>Get completed change</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.action" class="method"><h4 class="code-header">fn <a href="#tymethod.action" class="fn">action</a>(&mut self, font_system: &mut <a class="struct" href="struct.FontSystem.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::FontSystem">FontSystem</a>, action: <a class="enum" href="enum.Action.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::Action">Action</a>)</h4></section></summary><div class="docblock"><p>Perform an <a href="enum.Action.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::Action">Action</a> on the editor</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.cursor_position" class="method"><h4 class="code-header">fn <a href="#tymethod.cursor_position" class="fn">cursor_position</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)></h4></section></summary><div class="docblock"><p>Get X and Y position of the top left corner of the cursor</p>
|
||
</div></details></div><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.borrow_with" class="method"><h4 class="code-header">fn <a href="#method.borrow_with" class="fn">borrow_with</a><'font_system>(
|
||
&'font_system mut self,
|
||
font_system: &'font_system mut <a class="struct" href="struct.FontSystem.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::FontSystem">FontSystem</a>,
|
||
) -> <a class="struct" href="struct.BorrowedWithFontSystem.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::BorrowedWithFontSystem">BorrowedWithFontSystem</a><'font_system, Self><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Mutably borrows <code>self</code> together with an <a href="struct.FontSystem.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::FontSystem"><code>FontSystem</code></a> for more convenient methods</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.with_buffer" class="method"><h4 class="code-header">fn <a href="#method.with_buffer" class="fn">with_buffer</a><F, T>(&self, f: F) -> T<div class="where">where
|
||
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&<a class="struct" href="struct.Buffer.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Buffer">Buffer</a>) -> T,</div></h4></section></summary><div class="docblock"><p>Get the internal <a href="struct.Buffer.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Buffer"><code>Buffer</code></a></p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.with_buffer_mut" class="method"><h4 class="code-header">fn <a href="#method.with_buffer_mut" class="fn">with_buffer_mut</a><F, T>(&mut self, f: F) -> T<div class="where">where
|
||
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&mut <a class="struct" href="struct.Buffer.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Buffer">Buffer</a>) -> T,</div></h4></section></summary><div class="docblock"><p>Get the internal <a href="struct.Buffer.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Buffer"><code>Buffer</code></a>, mutably</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.redraw" class="method"><h4 class="code-header">fn <a href="#method.redraw" class="fn">redraw</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Get the <a href="struct.Buffer.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Buffer"><code>Buffer</code></a> redraw flag</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_redraw" class="method"><h4 class="code-header">fn <a href="#method.set_redraw" class="fn">set_redraw</a>(&mut self, redraw: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>)</h4></section></summary><div class="docblock"><p>Set the <a href="struct.Buffer.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Buffer"><code>Buffer</code></a> redraw flag</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.selection_bounds" class="method"><h4 class="code-header">fn <a href="#method.selection_bounds" class="fn">selection_bounds</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<a class="struct" href="struct.Cursor.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Cursor">Cursor</a>, <a class="struct" href="struct.Cursor.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Cursor">Cursor</a>)></h4></section></summary><div class="docblock"><p>Get the bounds of the current selection</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.insert_string" class="method"><h4 class="code-header">fn <a href="#method.insert_string" class="fn">insert_string</a>(&mut self, data: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, attrs_list: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.AttrsList.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::AttrsList">AttrsList</a>>)</h4></section></summary><div class="docblock"><p>Insert a string at the current cursor or replacing the current selection with the given
|
||
attributes, or with the previous character’s attributes if None is given.</p>
|
||
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/nightly/reference/items/traits.html#dyn-compatibility">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-Edit%3C'buffer%3E-for-Editor%3C'buffer%3E" class="impl"><a href="#impl-Edit%3C'buffer%3E-for-Editor%3C'buffer%3E" class="anchor">§</a><h3 class="code-header">impl<'buffer> <a class="trait" href="trait.Edit.html" title="trait cosmic::iced::daemon::program::graphics::text::cosmic_text::Edit">Edit</a><'buffer> for <a class="struct" href="struct.Editor.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Editor">Editor</a><'buffer></h3></section></div><script src="../../../../../../../trait.impl/cosmic_text/edit/trait.Edit.js" data-ignore-extern-crates="cosmic_text" async></script></section></div></main></body></html> |