|
|
|
@ -2,12 +2,14 @@ mod description;
@@ -2,12 +2,14 @@ mod description;
|
|
|
|
|
mod title; |
|
|
|
|
|
|
|
|
|
use description::Description; |
|
|
|
|
use gtk::prelude::BoxExt; |
|
|
|
|
use gtk::{Align, Box, Orientation}; |
|
|
|
|
use title::Title; |
|
|
|
|
|
|
|
|
|
use gtk::{glib::GString, prelude::BoxExt, Align, Box, Orientation}; |
|
|
|
|
|
|
|
|
|
pub struct Subject { |
|
|
|
|
widget: Box, |
|
|
|
|
title: Title, |
|
|
|
|
description: Description, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
impl Subject { |
|
|
|
@ -24,7 +26,17 @@ impl Subject {
@@ -24,7 +26,17 @@ impl Subject {
|
|
|
|
|
widget.append(title.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
|
|
|
|
|