00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #pragma once
00022
00023 #include <Inventor/sys/port.h>
00024 #include <RemoteViz/Rendering/LibHelper.h>
00025
00026 #include <string>
00027
00028 #include <Inventor/events/SoKeyboardEvent.h>
00029 #include <Inventor/events/SoMouseButtonEvent.h>
00030
00031 class SbRasterImage;
00032
00033 namespace RemoteViz
00034 {
00035 namespace Rendering
00036 {
00037
00038 class Connection;
00039
00040 class RenderArea;
00041
00042 class FrameEncoders;
00043
00054 class RENDERSERVICE_API RenderAreaListener
00055 {
00056 public:
00060 virtual ~RenderAreaListener();
00076 virtual void onOpenedConnection(RenderArea* renderArea, Connection *connection, FrameEncoders* frameEncoders);
00086 virtual void onInitializedConnection(RenderArea* renderArea, Connection *sender, FrameEncoders* frameEncoders);
00098 virtual void onClosedConnection(RenderArea* renderArea, const std::string& connectionId, bool aborted);
00110 virtual void onReceivedMessage(RenderArea* renderArea, Connection* sender, const std::string& message);
00130 virtual bool onPreRender(RenderArea* renderArea, bool &clearWindow, bool &clearZbuffer);
00141 virtual void onPostRender(RenderArea* renderArea);
00153 virtual void onResize(RenderArea* renderArea, unsigned int width, unsigned int height);
00170 virtual void onRequestedSize(RenderArea* renderArea, Connection *sender, unsigned int width, unsigned int height);
00185 virtual void onRefusedEncoder(RenderArea* renderArea, Connection *sender, FrameEncoders* encoders);
00187
00206 virtual bool onMouseUp(RenderArea* renderArea, Connection *sender, int x, int y, SoMouseButtonEvent::Button button);
00227 virtual bool onMouseDown(RenderArea* renderArea, Connection *sender, int x, int y, SoMouseButtonEvent::Button button);
00247 virtual bool onMouseDoubleClick(RenderArea* renderArea, Connection *sender, int x, int y, SoMouseButtonEvent::Button button);
00266 virtual bool onMouseMove(RenderArea* renderArea, Connection *sender, int x, int y);
00285 virtual bool onMouseEnter(RenderArea* renderArea, Connection *sender, int x, int y);
00304 virtual bool onMouseLeave(RenderArea* renderArea, Connection *sender, int x, int y);
00325 virtual bool onMouseWheel(RenderArea* renderArea, Connection *sender, int x, int y, int delta);
00346 virtual bool onKeyUp(RenderArea* renderArea, Connection *sender, int x, int y, const SoKeyboardEvent::Key& key);
00367 virtual bool onKeyDown(RenderArea* renderArea, Connection *sender, int x, int y, const SoKeyboardEvent::Key& key);
00388 virtual bool onTouchStart(RenderArea* renderArea, Connection *sender, unsigned int id, int x, int y);
00409 virtual bool onTouchMove(RenderArea* renderArea, Connection *sender, unsigned int id, int x, int y);
00430 virtual bool onTouchEnd(RenderArea* renderArea, Connection *sender, unsigned int id, int x, int y);
00432
00452 virtual void onRequestedFrame(RenderArea* renderArea, Connection* sender, SbRasterImage* rasterImage, bool& isInteractive);
00453
00465 virtual void onSendingFrame(RenderArea* renderArea, Connection* sender, std::string& message);
00466
00467 };
00468
00469
00470 }
00471 }
00472