Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11991 Posts in 1587 Topics- by 3508 Members - Latest Member: PienueDut

26. May 2012, 08:41:51 am
Xith3D CommunityGeneral CategorySupport (Moderator: Marvin Fröhlich)[Eclipse] How can i use inputhandlers in different views
Pages: [1]
Print
Author Topic: [Eclipse] How can i use inputhandlers in different views  (Read 991 times)
Earl
Just dropped in

Offline Offline

Posts: 9


View Profile
« on: 09. October 2008, 03:30:11 pm »

hey guys,
another day another question.
i have made a 3d-editor as a plugin in eclipse. for rotating the scene i use the objectrotationinputhandler. but if i open another instance of the editor while the first one is already running, i can't rotate that new scene. the only way to rotate is to go back to the first editorinstance and rotate this one (the second goes by).

how can i do this indepently?  Huh

greetz
earl
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #1 on: 09. October 2008, 04:29:15 pm »

Is your editor open source? Could I get a look at its code? Otherwise these eclipse plugin things are hard to track for me.

Marvin
Logged
Earl
Just dropped in

Offline Offline

Posts: 9


View Profile
« Reply #2 on: 09. October 2008, 05:11:40 pm »

it would be a bit hard to post the code because there are too much dependencies at other parts of the hole programm.
and the programm is not yet ready for release.

the only thing i have to know is how i can switch the inputhandler from one view to another. after registering mouse and keyboard by objectrotationhandler i can only use it in the instance where it've been registered (but the other instances are influenced by this handler).

hope this describes the problem a bit more.

earl
Logged
qbproger
developers
Becoming dependent
***
Offline Offline

Posts: 217


View Profile
« Reply #3 on: 09. October 2008, 05:44:17 pm »

A bit off-topic, but:

Do you mind sharing your xith3d eclipse plugins (since you said you wouldn't share the application)? I'm not an eclipse platform expert by any means, and I wanted to setup a sample project for people making rcp platform applications.

It'd be helpful to have for some bugs I've seen, that I believe are Eclipse/SWT specific.

qb


Logged

Earl
Just dropped in

Offline Offline

Posts: 9


View Profile
« Reply #4 on: 09. October 2008, 06:02:25 pm »

it's planned that the 3d-editor will be released as a standalone-application after this project (the application is a project of the softwaredevelopment-chair i'm working at). sharing the code wouldn't be the problem i think (but i have to talk to my tutor if would really be ok).
but we can talk about setting up a sampleproject together (because i don't have the time to do it all alone while my semester starts next week).
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #5 on: 09. October 2008, 07:57:25 pm »

the only thing i have to know is how i can switch the inputhandler from one view to another. after registering mouse and keyboard by objectrotationhandler i can only use it in the instance where it've been registered (but the other instances are influenced by this handler).

hope this describes the problem a bit more.

I guess, this problem is because of the two missing method implementations in CanvasPeerImplSWT. Could you please try to add implementations for the receivesInputEvents() and refreshCursor() methods? The receivesInputEvents() method just needs to query, if the Composite has the focus. Please see the other CanvasPeerImpl classes for an example on how to implement the refreshCursor() method. I don't have sufficient SWT skills to know, how to implement these methods. For you this should be fairly simple.

Marvin
Logged
Earl
Just dropped in

Offline Offline

Posts: 9


View Profile
« Reply #6 on: 09. October 2008, 08:04:08 pm »

thanks marvin,

i'll try tomorrow. send you a pm if i got it working so you can update the xith-source  Smiley

good night everybody
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #7 on: 09. October 2008, 08:48:56 pm »

i'll try tomorrow. send you a pm if i got it working so you can update the xith-source  Smiley

Thanks. Good luck.

Marvin
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #8 on: 09. October 2008, 09:58:58 pm »

Please update before you start to implement these methods. I have simplified the conditions a bit. I have tried to implement the receivesInputEvents() method, but I'm not sure, if it is correct this way. Please check it.

And I have added a new method to InputHandler called attachToSourceWindow(). You can pass a canvas.getPeer() value to it. Then the InputHandler will only receive input events, if the given peer's receivesInputEvents() method returns true.

Marvin
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic