[][src]Trait fltk::prelude::DisplayTrait

pub trait DisplayTrait {
    fn set_text(&mut self, txt: &str);
fn text(&self) -> String;
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) -> usize;
fn set_text_size(&mut self, sz: usize);
fn append(&mut self, text: &str);
fn buffer_length(&self) -> usize;
fn scroll(&mut self, top_line_num: usize, horiz_offset: usize);
fn insert(&self, text: &str);
fn set_insert_position(&mut self, new_pos: usize);
fn insert_position(&self) -> usize;
fn count_lines(
        &self,
        start: usize,
        end: usize,
        is_line_start: bool
    ) -> usize; }

Defines the methods implemented by TextDisplay and TextEditor

Required methods

fn set_text(&mut self, txt: &str)

Set the text inside the widget

fn text(&self) -> String

Returns the text inside the widget

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) -> usize

Return the text size

fn set_text_size(&mut self, sz: usize)

Sets the text size

fn append(&mut self, text: &str)

Append text to Display widget

fn buffer_length(&self) -> usize

Return buffer length of Display widget

fn scroll(&mut self, top_line_num: usize, horiz_offset: usize)

Scroll down the Display widget

fn insert(&self, text: &str)

Insert into Display widget

fn set_insert_position(&mut self, new_pos: usize)

Set the insert position

fn insert_position(&self) -> usize

Return the insert position

fn count_lines(&self, start: usize, end: usize, is_line_start: bool) -> usize

Counts the lines from start to end

Loading content...

Implementors

impl DisplayTrait for TextDisplay[src]

impl DisplayTrait for TextEditor[src]

Loading content...