SLProject  4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
SLUiInterface Class Reference

Interface for ui integration in SLSceneView. More...

#include <SLUiInterface.h>

Inheritance diagram for SLUiInterface:
[legend]

Public Member Functions

virtual ~SLUiInterface ()
 
virtual void init (const string &configPath)
 initialization (called by SLSceneView init) More...
 
virtual void onResize (const SLRecti &viewportRect)
 inform the ui about scene view size change More...
 
virtual void onClose ()
 shutdown ui More...
 
virtual void onInitNewFrame (SLScene *s, SLSceneView *sv)
 prepare the ui for a new rendering, e.g. update visual ui representation (called by SLSceneView onPaint) More...
 
virtual void onPaint (const SLRecti &viewport)
 ui render call (called by SLSceneView draw2DGL) More...
 
virtual void renderExtraFrame (SLScene *s, SLSceneView *sv, SLint mouseX, SLint mouseY)
 
virtual void onMouseDown (SLMouseButton button, SLint x, SLint y)
 forward user input to ui More...
 
virtual void onMouseUp (SLMouseButton button, SLint x, SLint y)
 forward user input to ui More...
 
virtual void onMouseMove (SLint xPos, SLint yPos)
 forward user input to ui More...
 
virtual void onMouseWheel (SLfloat yoffset)
 forward user input to ui More...
 
virtual void onKeyPress (SLKey key, SLKey mod)
 forward user input to ui More...
 
virtual void onKeyRelease (SLKey key, SLKey mod)
 forward user input to ui More...
 
virtual void onCharInput (SLuint c)
 forward user input to ui More...
 
virtual bool doNotDispatchKeyboard ()
 inform if user keyboard input was consumed by the ui More...
 
virtual bool doNotDispatchMouse ()
 inform if user mouse input was consumed by the ui More...
 
virtual void drawMouseCursor (bool doDraw)
 Turns on or off the mouse cursor drawing. More...
 

Detailed Description

Interface for ui integration in SLSceneView.

(all functions are called by SLSceneView so basically it is a SLSceneViewUiInterface)

Definition at line 23 of file SLUiInterface.h.

Constructor & Destructor Documentation

◆ ~SLUiInterface()

virtual SLUiInterface::~SLUiInterface ( )
inlinevirtual

Definition at line 26 of file SLUiInterface.h.

26 {}

Member Function Documentation

◆ doNotDispatchKeyboard()

virtual bool SLUiInterface::doNotDispatchKeyboard ( )
inlinevirtual

inform if user keyboard input was consumed by the ui

Reimplemented in SLImGui, SLGLImGui, and ImGuiWrapper.

Definition at line 58 of file SLUiInterface.h.

58 { return false; }

◆ doNotDispatchMouse()

virtual bool SLUiInterface::doNotDispatchMouse ( )
inlinevirtual

inform if user mouse input was consumed by the ui

(e.g. the ui was hit by a mouse click. In this case the user input would not be forwarded to 3D scene graph)

Reimplemented in SLImGui, SLGLImGui, and ImGuiWrapper.

Definition at line 64 of file SLUiInterface.h.

64 { return false; }

◆ drawMouseCursor()

virtual void SLUiInterface::drawMouseCursor ( bool  doDraw)
inlinevirtual

Turns on or off the mouse cursor drawing.

Reimplemented in SLImGui, and SLGLImGui.

Definition at line 67 of file SLUiInterface.h.

67 {}

◆ init()

virtual void SLUiInterface::init ( const string &  configPath)
inlinevirtual

initialization (called by SLSceneView init)

Reimplemented in SLImGui, and SLGLImGui.

Definition at line 29 of file SLUiInterface.h.

29 {}

◆ onCharInput()

virtual void SLUiInterface::onCharInput ( SLuint  c)
inlinevirtual

forward user input to ui

Reimplemented in SLImGui, SLGLImGui, and ImGuiWrapper.

Definition at line 55 of file SLUiInterface.h.

55 {}

◆ onClose()

virtual void SLUiInterface::onClose ( )
inlinevirtual

shutdown ui

Reimplemented in SLImGui, SLGLImGui, and ImGuiWrapper.

Definition at line 33 of file SLUiInterface.h.

33 {}

◆ onInitNewFrame()

virtual void SLUiInterface::onInitNewFrame ( SLScene s,
SLSceneView sv 
)
inlinevirtual

prepare the ui for a new rendering, e.g. update visual ui representation (called by SLSceneView onPaint)

Reimplemented in SLImGui, SLGLImGui, and ImGuiWrapper.

Definition at line 36 of file SLUiInterface.h.

36 {}

◆ onKeyPress()

virtual void SLUiInterface::onKeyPress ( SLKey  key,
SLKey  mod 
)
inlinevirtual

forward user input to ui

Reimplemented in SLImGui, SLGLImGui, and ImGuiWrapper.

Definition at line 51 of file SLUiInterface.h.

51 {}

◆ onKeyRelease()

virtual void SLUiInterface::onKeyRelease ( SLKey  key,
SLKey  mod 
)
inlinevirtual

forward user input to ui

Reimplemented in SLImGui, SLGLImGui, and ImGuiWrapper.

Definition at line 53 of file SLUiInterface.h.

53 {}

◆ onMouseDown()

virtual void SLUiInterface::onMouseDown ( SLMouseButton  button,
SLint  x,
SLint  y 
)
inlinevirtual

forward user input to ui

Reimplemented in SLImGui, SLGLImGui, and ImGuiWrapper.

Definition at line 43 of file SLUiInterface.h.

43 {}

◆ onMouseMove()

virtual void SLUiInterface::onMouseMove ( SLint  xPos,
SLint  yPos 
)
inlinevirtual

forward user input to ui

Reimplemented in SLImGui, SLGLImGui, and ImGuiWrapper.

Definition at line 47 of file SLUiInterface.h.

47 {}

◆ onMouseUp()

virtual void SLUiInterface::onMouseUp ( SLMouseButton  button,
SLint  x,
SLint  y 
)
inlinevirtual

forward user input to ui

Reimplemented in SLImGui, SLGLImGui, and ImGuiWrapper.

Definition at line 45 of file SLUiInterface.h.

45 {}

◆ onMouseWheel()

virtual void SLUiInterface::onMouseWheel ( SLfloat  yoffset)
inlinevirtual

forward user input to ui

Reimplemented in SLImGui, SLGLImGui, and ImGuiWrapper.

Definition at line 49 of file SLUiInterface.h.

49 {}

◆ onPaint()

virtual void SLUiInterface::onPaint ( const SLRecti viewport)
inlinevirtual

ui render call (called by SLSceneView draw2DGL)

Reimplemented in SLImGui, SLGLImGui, and ImGuiWrapper.

Definition at line 39 of file SLUiInterface.h.

39 {}

◆ onResize()

virtual void SLUiInterface::onResize ( const SLRecti viewportRect)
inlinevirtual

inform the ui about scene view size change

Reimplemented in SLGLImGui, and SLImGui.

Definition at line 31 of file SLUiInterface.h.

31 {}

◆ renderExtraFrame()

virtual void SLUiInterface::renderExtraFrame ( SLScene s,
SLSceneView sv,
SLint  mouseX,
SLint  mouseY 
)
inlinevirtual

Reimplemented in SLImGui, SLGLImGui, and ImGuiWrapper.

Definition at line 40 of file SLUiInterface.h.

40 {}

The documentation for this class was generated from the following file: