Trait fltk::prelude::DisplayExt[][src]

pub unsafe trait DisplayExt: WidgetExt {
Show methods fn buffer(&self) -> Option<TextBuffer>;
fn set_buffer<B: Into<Option<TextBuffer>>>(&mut self, buffer: B);
fn style_buffer(&self) -> Option<TextBuffer>;
fn text_font(&self) -> Font;
fn set_text_font(&mut self, font: Font);
fn text_color(&self) -> Color;
fn set_text_color(&mut self, color: Color);
fn text_size(&self) -> i32;
fn set_text_size(&mut self, sz: i32);
fn scroll(&mut self, top_line_num: i32, horiz_offset: i32);
fn insert(&self, text: &str);
fn set_insert_position(&mut self, new_pos: i32);
fn insert_position(&self) -> i32;
fn position_to_xy(&self, pos: i32) -> (i32, i32);
fn count_lines(&self, start: i32, end: i32, is_line_start: bool) -> i32;
fn move_right(&mut self) -> Result<(), FltkError>;
fn move_left(&mut self) -> Result<(), FltkError>;
fn move_up(&mut self) -> Result<(), FltkError>;
fn move_down(&mut self) -> Result<(), FltkError>;
fn show_cursor(&mut self, val: bool);
fn set_highlight_data<B: Into<Option<TextBuffer>>>(
        &mut self,
        style_buffer: B,
        entries: Vec<StyleTableEntry>
    );
fn set_cursor_style(&mut self, style: Cursor);
fn set_cursor_color(&mut self, color: Color);
fn set_scrollbar_size(&mut self, size: i32);
fn set_scrollbar_align(&mut self, align: Align);
fn cursor_style(&self) -> Cursor;
fn cursor_color(&self) -> Color;
fn scrollbar_size(&self) -> i32;
fn scrollbar_align(&self) -> Align;
fn line_start(&self, pos: i32) -> i32;
fn line_end(&self, start_pos: i32, is_line_start: bool) -> i32;
fn skip_lines(
        &mut self,
        start_pos: i32,
        lines: i32,
        is_line_start: bool
    ) -> i32;
fn rewind_lines(&mut self, start_pos: i32, lines: i32) -> i32;
fn next_word(&mut self);
fn previous_word(&mut self);
fn word_start(&self, pos: i32) -> i32;
fn word_end(&self, pos: i32) -> i32;
fn x_to_col(&self, x: f64) -> f64;
fn col_to_x(&self, col: f64) -> f64;
fn set_linenumber_width(&mut self, w: i32);
fn linenumber_width(&self) -> i32;
fn set_linenumber_font(&mut self, font: Font);
fn linenumber_font(&self) -> Font;
fn set_linenumber_size(&mut self, size: i32);
fn linenumber_size(&self) -> i32;
fn set_linenumber_fgcolor(&mut self, color: Color);
fn linenumber_fgcolor(&self) -> Color;
fn set_linenumber_bgcolor(&mut self, color: Color);
fn linenumber_bgcolor(&self) -> Color;
fn set_linenumber_align(&mut self, align: Align);
fn linenumber_align(&self) -> Align;
fn in_selection(&self, x: i32, y: i32) -> bool;
fn wrap_mode(&mut self, wrap: WrapMode, wrap_margin: i32);
fn wrapped_column(&self, row: i32, column: i32) -> i32;
fn wrapped_row(&self, row: i32) -> i32;
}
Expand description

Defines the methods implemented by TextDisplay and TextEditor

Required methods

fn buffer(&self) -> Option<TextBuffer>[src]

Expand description

Get the associated TextBuffer

fn set_buffer<B: Into<Option<TextBuffer>>>(&mut self, buffer: B)[src]

Expand description

Sets the associated TextBuffer

fn style_buffer(&self) -> Option<TextBuffer>[src]

Expand description

Get the associated style TextBuffer

fn text_font(&self) -> Font[src]

Expand description

Return the text font

fn set_text_font(&mut self, font: Font)[src]

Expand description

Sets the text font

fn text_color(&self) -> Color[src]

Expand description

Return the text color

fn set_text_color(&mut self, color: Color)[src]

Expand description

Sets the text color

fn text_size(&self) -> i32[src]

Expand description

Return the text size

fn set_text_size(&mut self, sz: i32)[src]

Expand description

Sets the text size

fn scroll(&mut self, top_line_num: i32, horiz_offset: i32)[src]

Expand description

Scroll down the Display widget

fn insert(&self, text: &str)[src]

Expand description

Insert into Display widget

fn set_insert_position(&mut self, new_pos: i32)[src]

Expand description

Set the insert position

fn insert_position(&self) -> i32[src]

Expand description

Return the insert position

fn position_to_xy(&self, pos: i32) -> (i32, i32)[src]

Expand description

Gets the x and y positions of the cursor

fn count_lines(&self, start: i32, end: i32, is_line_start: bool) -> i32[src]

Expand description

Counts the lines from start to end

fn move_right(&mut self) -> Result<(), FltkError>[src]

Expand description

Moves the cursor right

Errors

Errors on failure to move the cursor

fn move_left(&mut self) -> Result<(), FltkError>[src]

Expand description

Moves the cursor left

Errors

Errors on failure to move the cursor

fn move_up(&mut self) -> Result<(), FltkError>[src]

Expand description

Moves the cursor up

Errors

Errors on failure to move the cursor

fn move_down(&mut self) -> Result<(), FltkError>[src]

Expand description

Moves the cursor down

Errors

Errors on failure to move the cursor

fn show_cursor(&mut self, val: bool)[src]

Expand description

Shows/hides the cursor

fn set_highlight_data<B: Into<Option<TextBuffer>>>(
    &mut self,
    style_buffer: B,
    entries: Vec<StyleTableEntry>
)
[src]

Expand description

Sets the style of the text widget

fn set_cursor_style(&mut self, style: Cursor)[src]

Expand description

Sets the cursor style

fn set_cursor_color(&mut self, color: Color)[src]

Expand description

Sets the cursor color

fn set_scrollbar_size(&mut self, size: i32)[src]

Expand description

Sets the scrollbar size in pixels

fn set_scrollbar_align(&mut self, align: Align)[src]

Expand description

Sets the scrollbar alignment

fn cursor_style(&self) -> Cursor[src]

Expand description

Returns the cursor style

fn cursor_color(&self) -> Color[src]

Expand description

Returns the cursor color

fn scrollbar_size(&self) -> i32[src]

Expand description

Returns the scrollbar size in pixels

fn scrollbar_align(&self) -> Align[src]

Expand description

Returns the scrollbar alignment

fn line_start(&self, pos: i32) -> i32[src]

Expand description

Returns the beginning of the line from the current position. Returns new position as index

fn line_end(&self, start_pos: i32, is_line_start: bool) -> i32[src]

Expand description

Returns the ending of the line from the current position. Returns new position as index

fn skip_lines(&mut self, start_pos: i32, lines: i32, is_line_start: bool) -> i32[src]

Expand description

Skips lines from start_pos

fn rewind_lines(&mut self, start_pos: i32, lines: i32) -> i32[src]

Expand description

Rewinds the lines

fn next_word(&mut self)[src]

Expand description

Goes to the next word

fn previous_word(&mut self)[src]

Expand description

Goes to the previous word

fn word_start(&self, pos: i32) -> i32[src]

Expand description

Returns the position of the start of the word, relative to the current position

fn word_end(&self, pos: i32) -> i32[src]

Expand description

Returns the position of the end of the word, relative to the current position

fn x_to_col(&self, x: f64) -> f64[src]

Expand description

Convert an x pixel position into a column number.

fn col_to_x(&self, col: f64) -> f64[src]

Expand description

Convert a column number into an x pixel position

fn set_linenumber_width(&mut self, w: i32)[src]

Expand description

Sets the linenumber width

fn linenumber_width(&self) -> i32[src]

Expand description

Gets the linenumber width

fn set_linenumber_font(&mut self, font: Font)[src]

Expand description

Sets the linenumber font

fn linenumber_font(&self) -> Font[src]

Expand description

Gets the linenumber font

fn set_linenumber_size(&mut self, size: i32)[src]

Expand description

Sets the linenumber size

fn linenumber_size(&self) -> i32[src]

Expand description

Gets the linenumber size

fn set_linenumber_fgcolor(&mut self, color: Color)[src]

Expand description

Sets the linenumber foreground color

fn linenumber_fgcolor(&self) -> Color[src]

Expand description

Gets the linenumber foreground color

fn set_linenumber_bgcolor(&mut self, color: Color)[src]

Expand description

Sets the linenumber background color

fn linenumber_bgcolor(&self) -> Color[src]

Expand description

Gets the linenumber background color

fn set_linenumber_align(&mut self, align: Align)[src]

Expand description

Sets the linenumber alignment

fn linenumber_align(&self) -> Align[src]

Expand description

Gets the linenumber alignment

fn in_selection(&self, x: i32, y: i32) -> bool[src]

Expand description

Checks whether a pixel is within a text selection

fn wrap_mode(&mut self, wrap: WrapMode, wrap_margin: i32)[src]

Expand description

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

fn wrapped_column(&self, row: i32, column: i32) -> i32[src]

Expand description

Correct a column number based on an unconstrained position

fn wrapped_row(&self, row: i32) -> i32[src]

Expand description

Correct a row number from an unconstrained position

Loading content...

Implementors

impl DisplayExt for SimpleTerminal[src]

fn buffer(&self) -> Option<TextBuffer>[src]

fn set_buffer<B: Into<Option<TextBuffer>>>(&mut self, buffer: B)[src]

fn style_buffer(&self) -> Option<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) -> i32[src]

fn set_text_size(&mut self, sz: i32)[src]

fn scroll(&mut self, topLineNum: i32, horizOffset: i32)[src]

fn insert(&self, text: &str)[src]

fn set_insert_position(&mut self, newPos: i32)[src]

fn insert_position(&self) -> i32[src]

fn position_to_xy(&self, pos: i32) -> (i32, i32)[src]

fn count_lines(&self, start: i32, end: i32, is_line_start: bool) -> i32[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_highlight_data<B: Into<Option<TextBuffer>>>(
    &mut self,
    style_buffer: B,
    entries: Vec<StyleTableEntry>
)
[src]

fn set_cursor_style(&mut self, style: Cursor)[src]

fn set_cursor_color(&mut self, color: Color)[src]

fn set_scrollbar_size(&mut self, size: i32)[src]

fn set_scrollbar_align(&mut self, align: Align)[src]

fn cursor_style(&self) -> Cursor[src]

fn cursor_color(&self) -> Color[src]

fn scrollbar_size(&self) -> i32[src]

fn scrollbar_align(&self) -> Align[src]

fn line_start(&self, pos: i32) -> i32[src]

fn line_end(&self, start_pos: i32, is_line_start: bool) -> i32[src]

fn skip_lines(&mut self, start_pos: i32, lines: i32, is_line_start: bool) -> i32[src]

fn rewind_lines(&mut self, start_pos: i32, lines: i32) -> i32[src]

fn next_word(&mut self)[src]

fn previous_word(&mut self)[src]

fn word_start(&self, pos: i32) -> i32[src]

fn word_end(&self, pos: i32) -> i32[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: i32)[src]

fn linenumber_size(&self) -> i32[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]

fn wrap_mode(&mut self, wrap: WrapMode, wrap_margin: i32)[src]

fn wrapped_column(&self, row: i32, column: i32) -> i32[src]

fn wrapped_row(&self, row: i32) -> i32[src]

impl DisplayExt for TextDisplay[src]

fn buffer(&self) -> Option<TextBuffer>[src]

fn set_buffer<B: Into<Option<TextBuffer>>>(&mut self, buffer: B)[src]

fn style_buffer(&self) -> Option<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) -> i32[src]

fn set_text_size(&mut self, sz: i32)[src]

fn scroll(&mut self, topLineNum: i32, horizOffset: i32)[src]

fn insert(&self, text: &str)[src]

fn set_insert_position(&mut self, newPos: i32)[src]

fn insert_position(&self) -> i32[src]

fn position_to_xy(&self, pos: i32) -> (i32, i32)[src]

fn count_lines(&self, start: i32, end: i32, is_line_start: bool) -> i32[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_highlight_data<B: Into<Option<TextBuffer>>>(
    &mut self,
    style_buffer: B,
    entries: Vec<StyleTableEntry>
)
[src]

fn set_cursor_style(&mut self, style: Cursor)[src]

fn set_cursor_color(&mut self, color: Color)[src]

fn set_scrollbar_size(&mut self, size: i32)[src]

fn set_scrollbar_align(&mut self, align: Align)[src]

fn cursor_style(&self) -> Cursor[src]

fn cursor_color(&self) -> Color[src]

fn scrollbar_size(&self) -> i32[src]

fn scrollbar_align(&self) -> Align[src]

fn line_start(&self, pos: i32) -> i32[src]

fn line_end(&self, start_pos: i32, is_line_start: bool) -> i32[src]

fn skip_lines(&mut self, start_pos: i32, lines: i32, is_line_start: bool) -> i32[src]

fn rewind_lines(&mut self, start_pos: i32, lines: i32) -> i32[src]

fn next_word(&mut self)[src]

fn previous_word(&mut self)[src]

fn word_start(&self, pos: i32) -> i32[src]

fn word_end(&self, pos: i32) -> i32[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: i32)[src]

fn linenumber_size(&self) -> i32[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]

fn wrap_mode(&mut self, wrap: WrapMode, wrap_margin: i32)[src]

fn wrapped_column(&self, row: i32, column: i32) -> i32[src]

fn wrapped_row(&self, row: i32) -> i32[src]

impl DisplayExt for TextEditor[src]

fn buffer(&self) -> Option<TextBuffer>[src]

fn set_buffer<B: Into<Option<TextBuffer>>>(&mut self, buffer: B)[src]

fn style_buffer(&self) -> Option<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) -> i32[src]

fn set_text_size(&mut self, sz: i32)[src]

fn scroll(&mut self, topLineNum: i32, horizOffset: i32)[src]

fn insert(&self, text: &str)[src]

fn set_insert_position(&mut self, newPos: i32)[src]

fn insert_position(&self) -> i32[src]

fn position_to_xy(&self, pos: i32) -> (i32, i32)[src]

fn count_lines(&self, start: i32, end: i32, is_line_start: bool) -> i32[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_highlight_data<B: Into<Option<TextBuffer>>>(
    &mut self,
    style_buffer: B,
    entries: Vec<StyleTableEntry>
)
[src]

fn set_cursor_style(&mut self, style: Cursor)[src]

fn set_cursor_color(&mut self, color: Color)[src]

fn set_scrollbar_size(&mut self, size: i32)[src]

fn set_scrollbar_align(&mut self, align: Align)[src]

fn cursor_style(&self) -> Cursor[src]

fn cursor_color(&self) -> Color[src]

fn scrollbar_size(&self) -> i32[src]

fn scrollbar_align(&self) -> Align[src]

fn line_start(&self, pos: i32) -> i32[src]

fn line_end(&self, start_pos: i32, is_line_start: bool) -> i32[src]

fn skip_lines(&mut self, start_pos: i32, lines: i32, is_line_start: bool) -> i32[src]

fn rewind_lines(&mut self, start_pos: i32, lines: i32) -> i32[src]

fn next_word(&mut self)[src]

fn previous_word(&mut self)[src]

fn word_start(&self, pos: i32) -> i32[src]

fn word_end(&self, pos: i32) -> i32[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: i32)[src]

fn linenumber_size(&self) -> i32[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]

fn wrap_mode(&mut self, wrap: WrapMode, wrap_margin: i32)[src]

fn wrapped_column(&self, row: i32, column: i32) -> i32[src]

fn wrapped_row(&self, row: i32) -> i32[src]

Loading content...