Maraiah/tycho/source/gui/mapview.rs

42 lines
612 B
Rust
Raw Normal View History

//! Map view.
use super::qobj::*;
use crate::cc;
impl IMapViewTrait for IMapView
{
2019-07-05 20:21:11 -07:00
/// Returns a new `IMapView` instance.
fn new(emit: IMapViewEmitter) -> Self
{
if cfg!(debug_assertions) {
eprintln!("new IMapView");
}
2019-07-05 20:21:11 -07:00
Self{emit}
}
2019-07-05 20:21:11 -07:00
/// Returns the emitter of `self`.
fn emit(&mut self) -> &mut IMapViewEmitter {&mut self.emit}
fn draw_view(&self, paint: *mut cc::QPainter)
{
cc::paint_point(paint, 20, 20);
}
}
impl Drop for IMapView
{
2019-07-05 20:21:11 -07:00
fn drop(&mut self)
{
if cfg!(debug_assertions) {
eprintln!("drop IMapView");
}
}
}
pub struct IMapView {
2019-07-05 20:21:11 -07:00
emit: IMapViewEmitter,
}
// EOF