Trait fltk::prelude::InputExt[][src]

pub unsafe trait InputExt: WidgetExt {
Show methods fn value(&self) -> String;
fn set_value(&self, val: &str);
fn maximum_size(&self) -> i32;
fn set_maximum_size(&mut self, val: i32);
fn position(&self) -> i32;
fn set_position(&mut self, val: i32) -> Result<(), FltkError>;
fn mark(&self) -> i32;
fn set_mark(&mut self, val: i32) -> Result<(), FltkError>;
fn replace(
        &mut self,
        beg: i32,
        end: i32,
        val: &str
    ) -> Result<(), FltkError>;
fn insert(&mut self, txt: &str) -> Result<(), FltkError>;
fn append(&mut self, txt: &str) -> Result<(), FltkError>;
fn copy(&mut self) -> Result<(), FltkError>;
fn undo(&mut self) -> Result<(), FltkError>;
fn cut(&mut self) -> Result<(), FltkError>;
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 readonly(&self) -> bool;
fn set_readonly(&mut self, val: bool);
fn wrap(&self) -> bool;
fn set_wrap(&mut self, val: bool);
}

Defines the methods implemented by all input and output widgets

Required methods

fn value(&self) -> String[src]

Returns the value inside the input/output widget

fn set_value(&self, val: &str)[src]

Sets the value inside an input/output widget

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

Returns the maximum size (in bytes) accepted by an input/output widget

fn set_maximum_size(&mut self, val: i32)[src]

Sets the maximum size (in bytes) accepted by an input/output widget

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

Returns the index position inside an input/output widget

fn set_position(&mut self, val: i32) -> Result<(), FltkError>[src]

Sets the index postion inside an input/output widget

Errors

Errors on failure to set the cursor position in the text

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

Returns the index mark inside an input/output widget

fn set_mark(&mut self, val: i32) -> Result<(), FltkError>[src]

Sets the index mark inside an input/output widget

Errors

Errors on failure to set the mark

fn replace(&mut self, beg: i32, end: i32, val: &str) -> Result<(), FltkError>[src]

Replace content with a &str

Errors

Errors on failure to replace text

fn insert(&mut self, txt: &str) -> Result<(), FltkError>[src]

Insert a &str

Errors

Errors on failure to insert text

fn append(&mut self, txt: &str) -> Result<(), FltkError>[src]

Append a &str

Errors

Errors on failure to append text

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

Copy the value within the widget

Errors

Errors on failure to copy selection

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

Undo changes

Errors

Errors on failure to undo

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

Cut the value within the widget

Errors

Errors on failure to cut selection

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

Return the text font

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

Sets the text font

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

Return the text color

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

Sets the text color

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

Return the text size

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

Sets the text size

fn readonly(&self) -> bool[src]

Returns whether the input/output widget is readonly

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

Set readonly status of the input/output widget

fn wrap(&self) -> bool[src]

Return whether text is wrapped inside an input/output widget

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

Set whether text is wrapped inside an input/output widget

Loading content...

Implementors

impl InputExt for FileInput[src]

impl InputExt for FloatInput[src]

impl InputExt for Input[src]

impl InputExt for IntInput[src]

impl InputExt for MultilineInput[src]

impl InputExt for SecretInput[src]

impl InputExt for MultilineOutput[src]

impl InputExt for Output[src]

Loading content...