mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 17:15:28 +00:00
rename request component to input
This commit is contained in:
parent
80aea6a653
commit
55afe17271
9 changed files with 11 additions and 11 deletions
37
src/app/browser/window/tab/item/page/input.rs
Normal file
37
src/app/browser/window/tab/item/page/input.rs
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
mod content;
|
||||
mod widget;
|
||||
|
||||
use content::Content;
|
||||
use widget::Widget;
|
||||
|
||||
use adw::ToolbarView;
|
||||
use std::sync::Arc;
|
||||
|
||||
pub struct Input {
|
||||
content: Arc<Content>,
|
||||
widget: Arc<Widget>,
|
||||
}
|
||||
|
||||
impl Input {
|
||||
// Construct
|
||||
pub fn new_arc() -> Arc<Self> {
|
||||
// Init components
|
||||
let content = Content::new_arc();
|
||||
|
||||
// Init widget
|
||||
let widget = Widget::new_arc(content.gobject());
|
||||
|
||||
// Result
|
||||
Arc::new(Self { content, widget })
|
||||
}
|
||||
|
||||
// Actions
|
||||
pub fn show(&self, placeholder: &str, sensitive: bool) {
|
||||
self.content.set(placeholder, sensitive);
|
||||
}
|
||||
|
||||
// Getters
|
||||
pub fn gobject(&self) -> &ToolbarView {
|
||||
&self.widget.gobject()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue