Trait fltk::prelude::WidgetBase [−][src]
Defines the extended methods implemented by all widgets
Required methods
fn new(x: i32, y: i32, width: i32, height: i32, title: &str) -> Self
[src]
Creates a new widget, takes an x, y coordinates, as well as a width and height, plus a title
Arguments
x
- The x coordinate in the screeny
- The y coordinate in the screenwidth
- The width of the widgetheigth
- The height of the widgettitle
- The title or label of the widget labels support special symbols preceded by an@
sign. and for the associated formatting.
fn delete(wid: Self) where
Self: Sized,
[src]
Self: Sized,
Deletes widgets and their children.
unsafe fn from_widget_ptr(ptr: *mut Fl_Widget) -> Self
[src]
unsafe fn from_widget<W: WidgetExt>(w: W) -> Self
[src]
fn handle<F: FnMut(Event) -> bool + 'static>(&mut self, cb: F)
[src]
Set a custom handler, where events are managed manually, akin to Fl_Widget::handle(int) Handled or ignored events shoult return true, unhandled events should return false
fn handle2<F: FnMut(&mut Self, Event) -> bool + 'static>(&mut self, cb: F)
[src]
Set a custom handler, where events are managed manually, akin to Fl_Widget::handle(int) Handled or ignored events shoult return true, unhandled events should return false takes the widget as a closure argument
fn draw<F: FnMut() + 'static>(&mut self, cb: F)
[src]
Set a custom draw method MacOS requires that WidgetBase::draw actually calls drawing functions
fn draw2<F: FnMut(&mut Self) + 'static>(&mut self, cb: F)
[src]
Set a custom draw method takes the widget as a closure argument MacOS requires that WidgetBase::draw actually calls drawing functions