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