[−][src]Struct penrose::draw::widget::LinesWithSelection
A set of lines that highlights the currently selected line.
Implementations
impl LinesWithSelection
[src]
pub fn new(
font: String,
point_size: i32,
padding: f64,
bg: Color,
fg: Color,
bg_sel: Color,
fg_sel: Color,
n_lines: usize,
greedy: bool
) -> Self
[src]
font: String,
point_size: i32,
padding: f64,
bg: Color,
fg: Color,
bg_sel: Color,
fg_sel: Color,
n_lines: usize,
greedy: bool
) -> Self
Construct a new LinesWithSelection
pub fn set_input(&mut self, lines: Vec<String>) -> Result<()>
[src]
Set the displayed lines and selected index.
pub fn set_selected(&mut self, selected: usize) -> Result<()>
[src]
pub fn set_n_lines(&mut self, n_lines: usize)
[src]
Set the maximum number of lines from the input that will be displayed.
Defaults to 10
pub fn selected(&self) -> Option<&str>
[src]
The currently selected line (if there is one)
pub fn selected_index(&self) -> usize
[src]
The currently selected index
Trait Implementations
impl Clone for LinesWithSelection
[src]
pub fn clone(&self) -> LinesWithSelection
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for LinesWithSelection
[src]
impl<X> Hook<X> for LinesWithSelection where
X: XConn,
[src]
X: XConn,
pub fn startup(&mut self, wm: &mut WindowManager<X>) -> Result<()>
[src]
pub fn new_client(
&mut self,
wm: &mut WindowManager<X>,
client: &mut Client
) -> Result<()>
[src]
&mut self,
wm: &mut WindowManager<X>,
client: &mut Client
) -> Result<()>
pub fn remove_client(
&mut self,
wm: &mut WindowManager<X>,
id: WinId
) -> Result<()>
[src]
&mut self,
wm: &mut WindowManager<X>,
id: WinId
) -> Result<()>
pub fn client_added_to_workspace(
&mut self,
wm: &mut WindowManager<X>,
id: WinId,
wix: usize
) -> Result<()>
[src]
&mut self,
wm: &mut WindowManager<X>,
id: WinId,
wix: usize
) -> Result<()>
pub fn client_name_updated(
&mut self,
wm: &mut WindowManager<X>,
id: WinId,
name: &str,
is_root: bool
) -> Result<()>
[src]
&mut self,
wm: &mut WindowManager<X>,
id: WinId,
name: &str,
is_root: bool
) -> Result<()>
pub fn layout_applied(
&mut self,
wm: &mut WindowManager<X>,
workspace_index: usize,
screen_index: usize
) -> Result<()>
[src]
&mut self,
wm: &mut WindowManager<X>,
workspace_index: usize,
screen_index: usize
) -> Result<()>
pub fn layout_change(
&mut self,
wm: &mut WindowManager<X>,
workspace_index: usize,
screen_index: usize
) -> Result<()>
[src]
&mut self,
wm: &mut WindowManager<X>,
workspace_index: usize,
screen_index: usize
) -> Result<()>
pub fn workspace_change(
&mut self,
wm: &mut WindowManager<X>,
previous_workspace: usize,
new_workspace: usize
) -> Result<()>
[src]
&mut self,
wm: &mut WindowManager<X>,
previous_workspace: usize,
new_workspace: usize
) -> Result<()>
pub fn workspaces_updated(
&mut self,
wm: &mut WindowManager<X>,
names: &[&str],
active: usize
) -> Result<()>
[src]
&mut self,
wm: &mut WindowManager<X>,
names: &[&str],
active: usize
) -> Result<()>
pub fn screen_change(
&mut self,
wm: &mut WindowManager<X>,
screen_index: usize
) -> Result<()>
[src]
&mut self,
wm: &mut WindowManager<X>,
screen_index: usize
) -> Result<()>
pub fn screens_updated(
&mut self,
wm: &mut WindowManager<X>,
dimensions: &[Region]
) -> Result<()>
[src]
&mut self,
wm: &mut WindowManager<X>,
dimensions: &[Region]
) -> Result<()>
pub fn randr_notify(&mut self, wm: &mut WindowManager<X>) -> Result<()>
[src]
pub fn focus_change(
&mut self,
wm: &mut WindowManager<X>,
id: WinId
) -> Result<()>
[src]
&mut self,
wm: &mut WindowManager<X>,
id: WinId
) -> Result<()>
pub fn event_handled(&mut self, wm: &mut WindowManager<X>) -> Result<()>
[src]
impl KeyboardControlled for LinesWithSelection
[src]
impl PartialEq<LinesWithSelection> for LinesWithSelection
[src]
pub fn eq(&self, other: &LinesWithSelection) -> bool
[src]
pub fn ne(&self, other: &LinesWithSelection) -> bool
[src]
impl StructuralPartialEq for LinesWithSelection
[src]
impl Widget for LinesWithSelection
[src]
Auto Trait Implementations
impl RefUnwindSafe for LinesWithSelection
[src]
impl Send for LinesWithSelection
[src]
impl Sync for LinesWithSelection
[src]
impl Unpin for LinesWithSelection
[src]
impl UnwindSafe for LinesWithSelection
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<X, T> HookableWidget<X> for T where
T: Hook<X> + Widget,
X: XConn,
[src]
T: Hook<X> + Widget,
X: XConn,
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,