Hi Viktor,
TView::ExecuteEvent is called only if you have at least one 3-D object
in your pad.
Rene Brun
Viktor Krylov wrote:
>
> Hi everybody,
>
> Please, tell me what wrong.
> I'd like to see all events in MyView object
> from KeyBoard and Mouse, but nothing happened.
>
> Regards,
> Victor
>
> // source
> class MyView : public TView {
> // ...
> public:
> MyView() : TView() {}
> MyView( Int_t nSystem ) : TView( nSystem ) {}
> virtual ~MyView() {}
>
> void ExecuteEvent( Int_t nEvent, Int_t nX, Int_t nY ) {
> cout << "Event:" << nEvent << " X:" << nX << " Y:" << nY << '\n';
> // ...
> TView::ExecuteEvent( nEvent, nX, nY );
> }
> // ...
> };
> // macro
> // ...
> TCanvas c1("c1","c1",2);
> TPad p1("p1","p1",0.01,0.01,0.99,0.99,16,3,1);
> p1.Draw();
> p1.cd();
> MyView* pView = new MyView( 1 );
> p1.SetView( pView );
> // ...
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:32 MET