15#ifndef TRGCDCDisplayDrawingAreaHough_FLAG_
16#define TRGCDCDisplayDrawingAreaHough_FLAG_
18#include "trg/cdc/DisplayDrawingArea.h"
20#ifdef TRGCDC_SHORT_NAMES
21#define TCDDAreaHough TRGCDCDisplayDrawingAreaHough
31 class TRGCDCHoughPlane;
34 class TRGCDCDisplayDrawingAreaHough :
public TRGCDCDisplayDrawingArea {
39 TRGCDCDisplayDrawingAreaHough(TRGCDCDisplay&,
int size);
42 virtual ~TRGCDCDisplayDrawingAreaHough();
45 double scale(
void)
const;
46 void resetPosition(
void)
override;
47 bool wireName(
void)
const;
49 bool oldCDC(
void)
const;
52 void clear(
void)
override;
54 virtual bool on_expose_event(GdkEventExpose*)
override;
55 virtual bool on_button_press_event(GdkEventButton*)
override;
57 void append(
const TRGCDCHoughPlane*
const);
60 virtual void on_realize()
override;
64 int xT(
double x)
const;
65 int yT(
double y)
const;
66 int xR(
double x)
const;
67 int yR(
double y)
const;
73 int drawCell(
unsigned xCell,
unsigned yCell);
76 int drawRegion(
const std::vector<unsigned>& region);
85 const TRGCDCHoughPlane* _hp;
87 Glib::RefPtr<Gdk::Window> _window;
88 int _winx, _winy, _winw, _winh, _wind;
90 Glib::RefPtr<Gdk::GC> _gc;
91 Gdk::Color _blue, _red, _green, _black, _white, _gray, _yellow;
92 Gdk::Color _gray0, _gray1, _gray2, _gray3;
99 TRGCDCDisplayDrawingAreaHough::scale(
double a)
106 TRGCDCDisplayDrawingAreaHough::scale(
void)
const
113 TRGCDCDisplayDrawingAreaHough::wireName(
void)
const
120 TRGCDCDisplayDrawingAreaHough::wireName(
bool a)
122 return _wireName = a;
127 TRGCDCDisplayDrawingAreaHough::toY(
int a)
const
134 TRGCDCDisplayDrawingAreaHough::clear(
void)
141 TRGCDCDisplayDrawingAreaHough::append(
const TRGCDCHoughPlane*
const hp)
144 on_expose_event((GdkEventExpose*) NULL);
Abstract base class for different kinds of events.