use crate::render::{imp, WindowCoord};
use femtovg::Paint;
use geo_macros::Prj;
use gtk::glib;
use gtk::subclass::prelude::*;
use std::cell::RefCell;

#[derive(Prj, Default)]
pub struct BackgroundConfig {
    pub show_lat_lines: bool,
    pub show_lon_lines: bool,
    pub lat_lines: Vec<f64>,
    pub lon_lines: Vec<f64>,
    pub painter: Paint,
}

impl BackgroundConfig {
    pub fn new() -> Self {
        Self::default()
    }
}

#[derive(Default)]
pub struct BackgroundWidget {
    pub(super) config: RefCell<BackgroundConfig>,
}

#[glib::object_subclass]
impl ObjectSubclass for BackgroundWidget {
    const NAME: &'static str = "BackgroundWidget";
    type Type = super::BackgroundWidget;
}

impl ObjectImpl for BackgroundWidget {}
