Skip to content

Commit b494e84

Browse files
author
Deren Vural
committed
Added documentation text for the structs holding the custom gobject data
Signed-off-by: Deren Vural <[email protected]>
1 parent 47c850f commit b494e84

File tree

7 files changed

+16
-15
lines changed

7 files changed

+16
-15
lines changed

src/custom_button/imp.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
// Imports
2222
use gtk::{glib, subclass::prelude::*};
2323

24-
// Object holding the state
24+
/// Object holding the State and any Template Children
2525
#[derive(Default)]
2626
pub struct CustomButton;
2727

28-
// The central trait for subclassing a GObject
28+
/// The central trait for subclassing a GObject
2929
#[glib::object_subclass]
3030
impl ObjectSubclass for CustomButton {
3131
//Crate+Obj to avoid collisions

src/formatter/imp.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ use gtk::{glib, subclass::prelude::*};
2525
// Modules
2626
//
2727

28-
// Object holding the state
28+
/// Object holding the State and any Template Children
2929
#[derive(Default)]
3030
pub struct Formatter;
3131

32-
// The central trait for subclassing a GObject
32+
/// The central trait for subclassing a GObject
3333
#[glib::object_subclass]
3434
impl ObjectSubclass for Formatter {
3535
//Crate+Obj to avoid collisions

src/mainwindow/imp.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ use std::{cell::Cell, cell::RefCell, rc::Rc};
2828
// Modules
2929
use crate::{custom_button::CustomButton, settingswindow::SettingsWindow, formatter::Formatter, processor::Processor, property::Property, provider::Provider};
3030

31-
// Structure for storing SettingsWindow and info
31+
/// Structure for storing a SettingsWindow object and any related information
3232
#[derive(Default)]
3333
pub struct SettingsWindowContainer {
3434
pub window: Option<SettingsWindow>,
3535
pub open: bool,
3636
}
3737

38-
// Object holding the State
38+
/// Object holding the State and any Template Children
3939
#[derive(CompositeTemplate, Default)]
4040
#[template(resource = "/main-window.ui")]
4141
pub struct MainWindow {
@@ -52,7 +52,7 @@ pub struct MainWindow {
5252
pub refresh_button: TemplateChild<CustomButton>,
5353
}
5454

55-
// The central trait for subclassing a GObject
55+
/// The central trait for subclassing a GObject
5656
#[glib::object_subclass]
5757
impl ObjectSubclass for MainWindow {
5858
// `NAME` needs to match `class` attribute of template
@@ -599,6 +599,7 @@ impl MainWindow {
599599
}
600600
}
601601
}
602+
602603
/**
603604
* Trait Name:
604605
* ObjectImpl

src/processor/imp.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ use gtk::prelude::*;
2727
use gtk::subclass::prelude::*;
2828
use std::cell::Cell;
2929

30-
// Object holding the State
30+
/// Object holding the State and any Template Children
3131
#[derive(Default)]
3232
pub struct Processor {
3333
base_call: Cell<String>,
3434
call: Cell<String>,
3535
tail_call: Cell<String>,
3636
}
3737

38-
// The central trait for subclassing a GObject
38+
/// The central trait for subclassing a GObject
3939
#[glib::object_subclass]
4040
impl ObjectSubclass for Processor {
4141
//Crate+Obj to avoid collisions

src/property/imp.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use std::cell::Cell;
2727
use crate::formatter::Formatter;
2828
use crate::processor::Processor;
2929

30-
// Object holding the state
30+
/// Object holding the State and any Template Children
3131
#[derive(Default)]
3232
pub struct Property {
3333
processor: Cell<Processor>,
@@ -37,7 +37,7 @@ pub struct Property {
3737
gpu_count: Cell<i32>,
3838
}
3939

40-
// The central trait for subclassing a GObject
40+
/// The central trait for subclassing a GObject
4141
#[glib::object_subclass]
4242
impl ObjectSubclass for Property {
4343
//Crate+Obj to avoid collisions

src/provider/imp.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use std::cell::Cell;
2626
// Modules
2727
use crate::property::Property;
2828

29-
// Object holding the State
29+
/// Object holding the State and any Template Children
3030
#[derive(Default)]
3131
pub struct Provider {
3232
utilization: Cell<Property>,
@@ -37,7 +37,7 @@ pub struct Provider {
3737
provider_type: Cell<i32>,
3838
}
3939

40-
// The central trait for subclassing a GObject
40+
/// The central trait for subclassing a GObject
4141
#[glib::object_subclass]
4242
impl ObjectSubclass for Provider {
4343
//Crate+Obj to avoid collisions

src/settingswindow/imp.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use gtk::{subclass::prelude::*, CheckButton, CompositeTemplate, SpinButton, Temp
2727
// Modules
2828
//use crate::utils::data_path;
2929

30-
// Object holding the State
30+
/// Object holding the State and any Template Children
3131
#[derive(CompositeTemplate, Default)]
3232
#[template(resource = "/settings-window.ui")]
3333
pub struct SettingsWindow {
@@ -42,7 +42,7 @@ pub struct SettingsWindow {
4242
pub provider_input: TemplateChild<ComboRow>,
4343
}
4444

45-
// The central trait for subclassing a GObject
45+
/// The central trait for subclassing a GObject
4646
#[glib::object_subclass]
4747
impl ObjectSubclass for SettingsWindow {
4848
// `NAME` needs to match `class` attribute of template

0 commit comments

Comments
 (0)