Add Scroll::new
This commit is contained in:
parent
d0b4b4635e
commit
04d53ac5f4
1 changed files with 8 additions and 1 deletions
|
|
@ -91,7 +91,7 @@ pub struct LayoutCursor {
|
|||
|
||||
impl LayoutCursor {
|
||||
/// Create a new [`LayoutCursor`]
|
||||
pub fn new(line: usize, layout: usize, glyph: usize) -> Self {
|
||||
pub const fn new(line: usize, layout: usize, glyph: usize) -> Self {
|
||||
Self {
|
||||
line,
|
||||
layout,
|
||||
|
|
@ -159,3 +159,10 @@ pub struct Scroll {
|
|||
/// if it is negative or exceeds the number of layout lines
|
||||
pub layout: i32,
|
||||
}
|
||||
|
||||
impl Scroll {
|
||||
/// Create a new cursor
|
||||
pub const fn new(line: usize, layout: i32) -> Self {
|
||||
Self { line, layout }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue