-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge the bold_buffer & underline_buffer into a style buffer
- Loading branch information
Showing
9 changed files
with
261 additions
and
43 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
--- | ||
recent_folders: | ||
- /Users/Dorian/Desktop/COurs ENSAM 1A/langues | ||
- /Users/Dorian/Desktop | ||
- /Users/Dorian/Desktop/COurs ENSAM 1A/langues | ||
- /Users/Dorian/Desktop/COurs ENSAM 1A | ||
- /Users/Dorian/Desktop/Code/text-editor | ||
- /Users/Dorian/Dropbox | ||
recent_files: | ||
- /Users/Dorian/Desktop/test.drn | ||
- /Users/Dorian/Desktop/COurs ENSAM 1A/langues/anglais-questions.txt | ||
- /Users/Dorian/Desktop/nathan.drn | ||
- /Users/Dorian/Desktop/test.drn |
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
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
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,38 @@ | ||
use std::cell::RefCell; | ||
use std::rc::Rc; | ||
use speedy2d::dimen::Vector2; | ||
use speedy2d::Graphics2D; | ||
use crate::camera::Camera; | ||
use crate::font::Font; | ||
use crate::line::Line; | ||
use crate::range::Range; | ||
|
||
pub trait RangeTrait { | ||
fn new(start: Vector2<u32>, end: Vector2<u32>) -> Self; | ||
|
||
fn get_range(&self) -> &Range; | ||
|
||
fn start(&mut self, position: Vector2<u32>); | ||
|
||
fn end(&mut self, position: Vector2<u32>); | ||
|
||
fn reset(&mut self); | ||
|
||
fn add(&mut self, other: Self); | ||
|
||
fn include(&self, other: &Self) -> bool; | ||
|
||
fn is_valid(&self) -> bool; | ||
|
||
fn get_id(&self) -> String; | ||
|
||
fn get_real_start(&self) -> Option<Vector2<u32>>; | ||
|
||
fn get_real_end(&self) -> Option<Vector2<u32>>; | ||
|
||
fn get_ranges_from_drn_line(pattern: &str, lines: &Vec<&str>) -> Vec<Range>; | ||
|
||
fn get_lines_index(&mut self, lines: &[Line]) -> Vec<(u32, u32)>; | ||
|
||
fn _render(&mut self, font: Rc<RefCell<Font>>, lines: &[Line], camera: &Camera, graphics: &mut Graphics2D); | ||
} |
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
Oops, something went wrong.