Loop end about "How to get coordinate ...."

Wei Xie (xiewei@clever.weizmann.ac.il)
Tue, 4 Aug 1998 22:03:02 +0300 (IDT)


This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.

---559023410-1804928587-902257382=:2196
Content-Type: TEXT/PLAIN; charset=US-ASCII

Dear Valery, Pasha,

I finally manage to get it. There're mainly 2 corrections on
my original code.
(1) Change father from TH1 to TObject
(2) Change "Draw" implementation to
** void test::Draw(Option_t option)
** {
** fpx->Draw();
** AppendPad(option)
** }

This is purly by chance but anyway, it works now.
The attached file is the total code

The running process is
* aa = new test()
* aa->Draw()

When move the mouse, it'll print all the value of x and y. When
Click the mouse, a new Canvas will Popup.

Thank you very much for all the help !

Xie

W__W W__W
/ \ PHONE : 972 8 9343372 (o) 9471872 (h) / \
( 0 _ 0) Fax : 972-8-946-6253 (0 _ 0 )
\_ V_/ E-mail: xiewei@ceres.weizmann.ac.il \_^ _/
/ \ / \
=OOOo=======oOOO====================================OOOo=======oOOO======

---559023410-1804928587-902257382=:2196
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="test.h"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.GSO.3.96-heb-2.07.980804220302.2196E@clever.weizmann.ac.il>
Content-Description:

I2lmbmRlZiBfdGVzdF8NCiNkZWZpbmUgX3Rlc3RfDQoNCiNpbmNsdWRlIDxz
dGRsaWIuaD4NCg0KI2luY2x1ZGUgPFRST09ULmg+DQojaW5jbHVkZSA8VEFw
cGxpY2F0aW9uLmg+DQojaW5jbHVkZSA8VE9iamVjdC5oPg0KI2luY2x1ZGUg
PFRDYW52YXMuaD4NCiNpbmNsdWRlIDxUSDEuaD4NCiNpbmNsdWRlIDxUUmFu
ZG9tLmg+DQoNCmNsYXNzIHRlc3Q6cHVibGljIFRPYmplY3Qgew0KDQpwcml2
YXRlOg0KICAgVEgxRiAqZkhweDsNCnB1YmxpYzoNCiAgIHRlc3QoKTsNCiAg
IEludF90IERpc3RhbmNldG9QcmltaXRpdmUoSW50X3QgcHgsIEludF90IHB5
KTsNCiAgIHZvaWQgRXhlY3V0ZUV2ZW50KEludF90IGV2ZW50LCBJbnRfdCBw
eCwgSW50X3QgcHkpOw0KICAgdm9pZCBEcmF3KE9wdGlvbl90ICpvcHRpb24p
Ow0KDQoNCiAgIENsYXNzRGVmKHRlc3QsMCkNCn07DQoNCiNlbmRpZg0KDQo=
---559023410-1804928587-902257382=:2196
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="test.c"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.GSO.3.96-heb-2.07.980804220302.2196F@clever.weizmann.ac.il>
Content-Description:

I2luY2x1ZGUgInRlc3QuaCINCg0KQ2xhc3NJbXAodGVzdCkNCg0KdGVzdDo6
dGVzdCgpOiBUT2JqZWN0KCkNCnsNCiAgIC8vIEZpbGwgaGlzdG9ncmFtcyB0
aWxsIHVzZXIgY2xpY2tzICJTdG9wIEZpbGxpbmciIGJ1dHRvbi4NCg0KICAg
c3RhdGljIGludCBjbnQ7DQoNCiAgIGlmICghZkhweCkgew0KICAgICAgZkhw
eCAgID0gbmV3IFRIMUYoImhweCIsIiIsMTAwLC00LDQpOw0KICAgICAgZkhw
eC0+U2V0RmlsbENvbG9yKGtSZWQpOw0KICAgICAgY250ID0gMDsNCiAgIH0N
Cg0KICAgaW50IGtVUERBVEUgPSAxMDAwOw0KICAgZmxvYXQgcHgsIHB5Ow0K
DQogICBJbnRfdCBudW09MDsNCiAgIHdoaWxlIChudW08MTAwMCkNCiAgIHsN
CiAgICAgIG51bSsrOw0KICAgICAgZ1JhbmRvbS0+UmFubm9yKHB4LHB5KTsg
Ly9weCBhbmQgcHkgd2lsbCBiZSB0d28gZ2F1c3NpYW4gcmFuZG9tIG51bWJl
cnMNCiAgICAgIGZIcHgtPkZpbGwocHgpOw0KICAgfQ0KfQ0KDQpJbnRfdCB0
ZXN0OjpEaXN0YW5jZXRvUHJpbWl0aXZlK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