[−][src]Trait penrose::draw::widget::Widget
A status bar widget that can be rendered using a DrawContext
Required methods
pub fn draw(
&mut self,
ctx: &mut dyn DrawContext,
screen: usize,
screen_has_focus: bool,
w: f64,
h: f64
) -> Result<()>
[src]
&mut self,
ctx: &mut dyn DrawContext,
screen: usize,
screen_has_focus: bool,
w: f64,
h: f64
) -> Result<()>
Render the current state of the widget to the status bar window.
pub fn current_extent(
&mut self,
ctx: &mut dyn DrawContext,
h: f64
) -> Result<(f64, f64)>
[src]
&mut self,
ctx: &mut dyn DrawContext,
h: f64
) -> Result<(f64, f64)>
Current required width and height for this widget due to its content
pub fn require_draw(&self) -> bool
[src]
Does this widget currently require re-rendering? (should be updated when 'draw' is called)
pub fn is_greedy(&self) -> bool
[src]
If true, this widget will expand to fill remaining available space after layout has been computed. If multiple greedy widgets are present in a given StatusBar then the available space will be split evenly between all widgets.
Implementors
impl Widget for ActiveWindowName
[src]
pub fn draw(
&mut self,
ctx: &mut dyn DrawContext,
screen: usize,
screen_has_focus: bool,
w: f64,
h: f64
) -> Result<()>
[src]
&mut self,
ctx: &mut dyn DrawContext,
screen: usize,
screen_has_focus: bool,
w: f64,
h: f64
) -> Result<()>
pub fn current_extent(
&mut self,
ctx: &mut dyn DrawContext,
h: f64
) -> Result<(f64, f64)>
[src]
&mut self,
ctx: &mut dyn DrawContext,
h: f64
) -> Result<(f64, f64)>
pub fn require_draw(&self) -> bool
[src]
pub fn is_greedy(&self) -> bool
[src]
impl Widget for CurrentLayout
[src]
pub fn draw(
&mut self,
ctx: &mut dyn DrawContext,
s: usize,
f: bool,
w: f64,
h: f64
) -> Result<()>
[src]
&mut self,
ctx: &mut dyn DrawContext,
s: usize,
f: bool,
w: f64,
h: f64
) -> Result<()>
pub fn current_extent(
&mut self,
ctx: &mut dyn DrawContext,
h: f64
) -> Result<(f64, f64)>
[src]
&mut self,
ctx: &mut dyn DrawContext,
h: f64
) -> Result<(f64, f64)>
pub fn require_draw(&self) -> bool
[src]
pub fn is_greedy(&self) -> bool
[src]
impl Widget for InputBox
[src]
pub fn draw(
&mut self,
ctx: &mut dyn DrawContext,
s: usize,
f: bool,
w: f64,
h: f64
) -> Result<()>
[src]
&mut self,
ctx: &mut dyn DrawContext,
s: usize,
f: bool,
w: f64,
h: f64
) -> Result<()>
pub fn current_extent(
&mut self,
ctx: &mut dyn DrawContext,
h: f64
) -> Result<(f64, f64)>
[src]
&mut self,
ctx: &mut dyn DrawContext,
h: f64
) -> Result<(f64, f64)>
pub fn require_draw(&self) -> bool
[src]
pub fn is_greedy(&self) -> bool
[src]
impl Widget for LinesWithSelection
[src]
pub fn draw(
&mut self,
ctx: &mut dyn DrawContext,
_screen: usize,
_screen_has_focus: bool,
w: f64,
h: f64
) -> Result<()>
[src]
&mut self,
ctx: &mut dyn DrawContext,
_screen: usize,
_screen_has_focus: bool,
w: f64,
h: f64
) -> Result<()>
pub fn current_extent(
&mut self,
ctx: &mut dyn DrawContext,
_h: f64
) -> Result<(f64, f64)>
[src]
&mut self,
ctx: &mut dyn DrawContext,
_h: f64
) -> Result<(f64, f64)>
pub fn require_draw(&self) -> bool
[src]
pub fn is_greedy(&self) -> bool
[src]
impl Widget for RootWindowName
[src]
pub fn draw(
&mut self,
ctx: &mut dyn DrawContext,
s: usize,
f: bool,
w: f64,
h: f64
) -> Result<()>
[src]
&mut self,
ctx: &mut dyn DrawContext,
s: usize,
f: bool,
w: f64,
h: f64
) -> Result<()>
pub fn current_extent(
&mut self,
ctx: &mut dyn DrawContext,
h: f64
) -> Result<(f64, f64)>
[src]
&mut self,
ctx: &mut dyn DrawContext,
h: f64
) -> Result<(f64, f64)>
pub fn require_draw(&self) -> bool
[src]
pub fn is_greedy(&self) -> bool
[src]
impl Widget for Text
[src]
pub fn draw(
&mut self,
ctx: &mut dyn DrawContext,
_: usize,
_: bool,
w: f64,
h: f64
) -> Result<()>
[src]
&mut self,
ctx: &mut dyn DrawContext,
_: usize,
_: bool,
w: f64,
h: f64
) -> Result<()>
pub fn current_extent(
&mut self,
ctx: &mut dyn DrawContext,
_h: f64
) -> Result<(f64, f64)>
[src]
&mut self,
ctx: &mut dyn DrawContext,
_h: f64
) -> Result<(f64, f64)>