|
|
@ -2,12 +2,14 @@ mod description; |
|
|
|
mod title; |
|
|
|
mod title; |
|
|
|
|
|
|
|
|
|
|
|
use description::Description; |
|
|
|
use description::Description; |
|
|
|
use gtk::prelude::BoxExt; |
|
|
|
|
|
|
|
use gtk::{Align, Box, Orientation}; |
|
|
|
|
|
|
|
use title::Title; |
|
|
|
use title::Title; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use gtk::{glib::GString, prelude::BoxExt, Align, Box, Orientation}; |
|
|
|
|
|
|
|
|
|
|
|
pub struct Subject { |
|
|
|
pub struct Subject { |
|
|
|
widget: Box, |
|
|
|
widget: Box, |
|
|
|
|
|
|
|
title: Title, |
|
|
|
|
|
|
|
description: Description, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
impl Subject { |
|
|
|
impl Subject { |
|
|
@ -24,7 +26,17 @@ impl Subject { |
|
|
|
widget.append(title.widget()); |
|
|
|
widget.append(title.widget()); |
|
|
|
widget.append(description.widget()); |
|
|
|
widget.append(description.widget()); |
|
|
|
|
|
|
|
|
|
|
|
Self { widget } |
|
|
|
Self { |
|
|
|
|
|
|
|
widget, |
|
|
|
|
|
|
|
title, |
|
|
|
|
|
|
|
description, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Actions
|
|
|
|
|
|
|
|
pub fn update(&self, title: GString, description: GString) { |
|
|
|
|
|
|
|
self.title.update(&title); |
|
|
|
|
|
|
|
self.description.update(&description); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Getters
|
|
|
|
// Getters
|
|
|
|