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

pub unsafe trait DisplayExt: WidgetExt {
Show 56 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 unset_highlight_data(&mut self, style_buffer: TextBuffer);
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

Get the associated TextBuffer

Sets the associated TextBuffer

Get the associated style TextBuffer

Return the text font

Sets the text font

Return the text color

Sets the text color

Return the text size

Sets the text size

Scroll down the Display widget

Insert into Display widget

Set the insert position

Return the insert position

Gets the x and y positions of the cursor

Counts the lines from start to end

Moves the cursor right

Errors

Errors on failure to move the cursor

Moves the cursor left

Errors

Errors on failure to move the cursor

Moves the cursor up

Errors

Errors on failure to move the cursor

Moves the cursor down

Errors

Errors on failure to move the cursor

Shows/hides the cursor

Sets the style of the text widget

Unset the style of the text widget

Sets the cursor style

Sets the cursor color

Sets the scrollbar size in pixels

Sets the scrollbar alignment

Returns the cursor style

Returns the cursor color

Returns the scrollbar size in pixels

Returns the scrollbar alignment

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

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

Skips lines from start_pos

Rewinds the lines

Goes to the next word

Goes to the previous word

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

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

Convert an x pixel position into a column number.

Convert a column number into an x pixel position

Sets the linenumber width

Gets the linenumber width

Sets the linenumber font

Gets the linenumber font

Sets the linenumber size

Gets the linenumber size

Sets the linenumber foreground color

Gets the linenumber foreground color

Sets the linenumber background color

Gets the linenumber background color

Sets the linenumber alignment

Gets the linenumber alignment

Checks whether a pixel is within a text selection

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

Correct a column number based on an unconstrained position

Correct a row number from an unconstrained position

Implementors