[−][src]Trait fltk::prelude::DisplayExt
Defines the methods implemented by TextDisplay and TextEditor
Required methods
fn buffer<'a>(&'a self) -> &'a mut TextBuffer
Get the associated TextBuffer
fn set_buffer<'a>(&'a mut self, buffer: &'a mut TextBuffer)
Sets the associated TextBuffer
fn text_font(&self) -> Font
Return the text font
fn set_text_font(&mut self, font: Font)
Sets the text font
fn text_color(&self) -> Color
Return the text color
fn set_text_color(&mut self, color: Color)
Sets the text color
fn text_size(&self) -> u32
Return the text size
fn set_text_size(&mut self, sz: u32)
Sets the text size
fn scroll(&mut self, top_line_num: u32, horiz_offset: u32)
Scroll down the Display widget
fn insert(&self, text: &str)
Insert into Display widget
fn set_insert_position(&mut self, new_pos: u32)
Set the insert position
fn insert_position(&self) -> u32
Return the insert position
fn position_to_xy(&self, pos: u32) -> (u32, u32)
Gets the x and y positions of the cursor
fn count_lines(&self, start: u32, end: u32, is_line_start: bool) -> u32
Counts the lines from start to end
fn move_right(&mut self) -> Result<(), FltkError>
Moves the cursor right
fn move_left(&mut self) -> Result<(), FltkError>
Moves the cursor left
fn move_up(&mut self) -> Result<(), FltkError>
Moves the cursor up
fn move_down(&mut self) -> Result<(), FltkError>
Moves the cursor down
fn show_cursor(&mut self, val: bool)
Shows/hides the cursor
fn set_styly_table_entry(
&mut self,
style_buffer: &mut TextBuffer,
entries: &Vec<StyleTableEntry>
)
&mut self,
style_buffer: &mut TextBuffer,
entries: &Vec<StyleTableEntry>
)
Sets the style of the text widget
fn set_cursor_style(&mut self, style: CursorStyle)
Sets the cursor style
fn set_cursor_color(&mut self, color: Color)
Sets the cursor color
fn set_scrollbar_width(&mut self, width: i32)
Sets the scrollbar width
fn set_scrollbar_size(&mut self, size: u32)
Sets the scrollbar size in pixels
fn set_scrollbar_align(&mut self, align: Align)
Sets the scrollbar alignment
fn cursor_style(&self) -> CursorStyle
Returns the cursor style
fn cursor_color(&self) -> Color
Returns the cursor color
fn scrollbar_width(&self) -> u32
Returns the scrollback width
fn scrollbar_size(&self) -> u32
Returns the scrollbar size in pixels
fn scrollbar_align(&self) -> Align
Returns the scrollbar alignment
fn line_start(&self, pos: u32) -> u32
Returns the beginning of the line from the current position
fn line_end(&self, start_pos: u32, is_line_start: bool) -> u32
Returns the ending of the line from the current position
fn skip_lines(&mut self, start_pos: u32, lines: u32, is_line_start: bool) -> u32
Skips lines from start_pos
fn rewind_lines(&mut self, start_pos: u32, lines: u32) -> u32
Rewinds the lines
fn next_word(&mut self)
Goes to the next word
fn previous_word(&mut self)
Goes to the previous word
fn word_start(&self, pos: u32) -> u32
Returns the position of the start of the word, relative to the current position
fn word_end(&self, pos: u32) -> u32
Returns the position of the end of the word, relative to the current position
fn x_to_col(&self, x: f64) -> f64
Convert an x pixel position into a column number.
fn col_to_x(&self, col: f64) -> f64
Convert a column number into an x pixel position
fn set_linenumber_width(&mut self, w: i32)
Sets the linenumber width
fn linenumber_width(&self) -> i32
Gets the linenumber width
fn set_linenumber_font(&mut self, font: Font)
Sets the linenumber font
fn linenumber_font(&self) -> Font
Gets the linenumber font
fn set_linenumber_size(&mut self, size: u32)
Sets the linenumber size
fn linenumber_size(&self) -> u32
Gets the linenumber size
fn set_linenumber_fgcolor(&mut self, color: Color)
Sets the linenumber foreground color
fn linenumber_fgcolor(&self) -> Color
Gets the linenumber foreground color
fn set_linenumber_bgcolor(&mut self, color: Color)
Sets the linenumber background color
fn linenumber_bgcolor(&self) -> Color
Gets the linenumber background color
fn set_linenumber_align(&mut self, align: Align)
Sets the linenumber alignment
fn linenumber_align(&self) -> Align
Gets the linenumber alignment
fn in_selection(&self, x: i32, y: i32) -> bool
Checks whether a pixel is within a text selection
Implementors
impl DisplayExt for SimpleTerminal
[src]
fn buffer<'a>(&'a self) -> &'a mut TextBuffer
[src]
fn set_buffer<'a>(&'a mut self, buffer: &'a mut TextBuffer)
[src]
fn text_font(&self) -> Font
[src]
fn set_text_font(&mut self, font: Font)
[src]
fn text_color(&self) -> Color
[src]
fn set_text_color(&mut self, color: Color)
[src]
fn text_size(&self) -> u32
[src]
fn set_text_size(&mut self, sz: u32)
[src]
fn scroll(&mut self, topLineNum: u32, horizOffset: u32)
[src]
fn insert(&self, text: &str)
[src]
fn set_insert_position(&mut self, newPos: u32)
[src]
fn insert_position(&self) -> u32
[src]
fn position_to_xy(&self, pos: u32) -> (u32, u32)
[src]
fn count_lines(&self, start: u32, end: u32, is_line_start: bool) -> u32
[src]
fn move_right(&mut self) -> Result<(), FltkError>
[src]
fn move_left(&mut self) -> Result<(), FltkError>
[src]
fn move_up(&mut self) -> Result<(), FltkError>
[src]
fn move_down(&mut self) -> Result<(), FltkError>
[src]
fn show_cursor(&mut self, val: bool)
[src]
fn set_styly_table_entry(
&mut self,
style_buffer: &mut TextBuffer,
entries: &Vec<StyleTableEntry>
)
[src]
&mut self,
style_buffer: &mut TextBuffer,
entries: &Vec<StyleTableEntry>
)
fn set_cursor_style(&mut self, style: CursorStyle)
[src]
fn set_cursor_color(&mut self, color: Color)
[src]
fn set_scrollbar_width(&mut self, width: i32)
[src]
fn set_scrollbar_size(&mut self, size: u32)
[src]
fn set_scrollbar_align(&mut self, align: Align)
[src]
fn cursor_style(&self) -> CursorStyle
[src]
fn cursor_color(&self) -> Color
[src]
fn scrollbar_width(&self) -> u32
[src]
fn scrollbar_size(&self) -> u32
[src]
fn scrollbar_align(&self) -> Align
[src]
fn line_start(&self, pos: u32) -> u32
[src]
fn line_end(&self, start_pos: u32, is_line_start: bool) -> u32
[src]
fn skip_lines(&mut self, start_pos: u32, lines: u32, is_line_start: bool) -> u32
[src]
fn rewind_lines(&mut self, start_pos: u32, lines: u32) -> u32
[src]
fn next_word(&mut self)
[src]
fn previous_word(&mut self)
[src]
fn word_start(&self, pos: u32) -> u32
[src]
fn word_end(&self, pos: u32) -> u32
[src]
fn x_to_col(&self, x: f64) -> f64
[src]
fn col_to_x(&self, col: f64) -> f64
[src]
fn set_linenumber_width(&mut self, w: i32)
[src]
fn linenumber_width(&self) -> i32
[src]
fn set_linenumber_font(&mut self, font: Font)
[src]
fn linenumber_font(&self) -> Font
[src]
fn set_linenumber_size(&mut self, size: u32)
[src]
fn linenumber_size(&self) -> u32
[src]
fn set_linenumber_fgcolor(&mut self, color: Color)
[src]
fn linenumber_fgcolor(&self) -> Color
[src]
fn set_linenumber_bgcolor(&mut self, color: Color)
[src]
fn linenumber_bgcolor(&self) -> Color
[src]
fn set_linenumber_align(&mut self, align: Align)
[src]
fn linenumber_align(&self) -> Align
[src]
fn in_selection(&self, x: i32, y: i32) -> bool
[src]
impl DisplayExt for TextDisplay
[src]
fn buffer<'a>(&'a self) -> &'a mut TextBuffer
[src]
fn set_buffer<'a>(&'a mut self, buffer: &'a mut TextBuffer)
[src]
fn text_font(&self) -> Font
[src]
fn set_text_font(&mut self, font: Font)
[src]
fn text_color(&self) -> Color
[src]
fn set_text_color(&mut self, color: Color)
[src]
fn text_size(&self) -> u32
[src]
fn set_text_size(&mut self, sz: u32)
[src]
fn scroll(&mut self, topLineNum: u32, horizOffset: u32)
[src]
fn insert(&self, text: &str)
[src]
fn set_insert_position(&mut self, newPos: u32)
[src]
fn insert_position(&self) -> u32
[src]
fn position_to_xy(&self, pos: u32) -> (u32, u32)
[src]
fn count_lines(&self, start: u32, end: u32, is_line_start: bool) -> u32
[src]
fn move_right(&mut self) -> Result<(), FltkError>
[src]
fn move_left(&mut self) -> Result<(), FltkError>
[src]
fn move_up(&mut self) -> Result<(), FltkError>
[src]
fn move_down(&mut self) -> Result<(), FltkError>
[src]
fn show_cursor(&mut self, val: bool)
[src]
fn set_styly_table_entry(
&mut self,
style_buffer: &mut TextBuffer,
entries: &Vec<StyleTableEntry>
)
[src]
&mut self,
style_buffer: &mut TextBuffer,
entries: &Vec<StyleTableEntry>
)
fn set_cursor_style(&mut self, style: CursorStyle)
[src]
fn set_cursor_color(&mut self, color: Color)
[src]
fn set_scrollbar_width(&mut self, width: i32)
[src]
fn set_scrollbar_size(&mut self, size: u32)
[src]
fn set_scrollbar_align(&mut self, align: Align)
[src]
fn cursor_style(&self) -> CursorStyle
[src]
fn cursor_color(&self) -> Color
[src]
fn scrollbar_width(&self) -> u32
[src]
fn scrollbar_size(&self) -> u32
[src]
fn scrollbar_align(&self) -> Align
[src]
fn line_start(&self, pos: u32) -> u32
[src]
fn line_end(&self, start_pos: u32, is_line_start: bool) -> u32
[src]
fn skip_lines(&mut self, start_pos: u32, lines: u32, is_line_start: bool) -> u32
[src]
fn rewind_lines(&mut self, start_pos: u32, lines: u32) -> u32
[src]
fn next_word(&mut self)
[src]
fn previous_word(&mut self)
[src]
fn word_start(&self, pos: u32) -> u32
[src]
fn word_end(&self, pos: u32) -> u32
[src]
fn x_to_col(&self, x: f64) -> f64
[src]
fn col_to_x(&self, col: f64) -> f64
[src]
fn set_linenumber_width(&mut self, w: i32)
[src]
fn linenumber_width(&self) -> i32
[src]
fn set_linenumber_font(&mut self, font: Font)
[src]
fn linenumber_font(&self) -> Font
[src]
fn set_linenumber_size(&mut self, size: u32)
[src]
fn linenumber_size(&self) -> u32
[src]
fn set_linenumber_fgcolor(&mut self, color: Color)
[src]
fn linenumber_fgcolor(&self) -> Color
[src]
fn set_linenumber_bgcolor(&mut self, color: Color)
[src]
fn linenumber_bgcolor(&self) -> Color
[src]
fn set_linenumber_align(&mut self, align: Align)
[src]
fn linenumber_align(&self) -> Align
[src]
fn in_selection(&self, x: i32, y: i32) -> bool
[src]
impl DisplayExt for TextEditor
[src]
fn buffer<'a>(&'a self) -> &'a mut TextBuffer
[src]
fn set_buffer<'a>(&'a mut self, buffer: &'a mut TextBuffer)
[src]
fn text_font(&self) -> Font
[src]
fn set_text_font(&mut self, font: Font)
[src]
fn text_color(&self) -> Color
[src]
fn set_text_color(&mut self, color: Color)
[src]
fn text_size(&self) -> u32
[src]
fn set_text_size(&mut self, sz: u32)
[src]
fn scroll(&mut self, topLineNum: u32, horizOffset: u32)
[src]
fn insert(&self, text: &str)
[src]
fn set_insert_position(&mut self, newPos: u32)
[src]
fn insert_position(&self) -> u32
[src]
fn position_to_xy(&self, pos: u32) -> (u32, u32)
[src]
fn count_lines(&self, start: u32, end: u32, is_line_start: bool) -> u32
[src]
fn move_right(&mut self) -> Result<(), FltkError>
[src]
fn move_left(&mut self) -> Result<(), FltkError>
[src]
fn move_up(&mut self) -> Result<(), FltkError>
[src]
fn move_down(&mut self) -> Result<(), FltkError>
[src]
fn show_cursor(&mut self, val: bool)
[src]
fn set_styly_table_entry(
&mut self,
style_buffer: &mut TextBuffer,
entries: &Vec<StyleTableEntry>
)
[src]
&mut self,
style_buffer: &mut TextBuffer,
entries: &Vec<StyleTableEntry>
)