Project

General

Profile

SO3Engine
SO3::SObjWindowWidget Class Reference

#include <SO3ObjWindowWidget.h>

Inheritance diagram for SO3::SObjWindowWidget:
SO3::SWidget SO3::SData

Public Member Functions

 SObjWindowWidget (SScene *targetScene, const std::string &bitmapWidgetName, const int &xPos, const int &yPos, const unsigned short &widgetWidth, const unsigned short &widgetHeight, SViewPort *targetViewport, const unsigned int &widgetZOrder)
 
 SObjWindowWidget (SScene *targetScene, const std::string &bitmapWidgetName, const int &xPos, const int &yPos, const unsigned short &widgetWidth, const unsigned short &widgetHeight, SViewPort *targetViewport)
 
 SObjWindowWidget (SScene *targetScene, const std::string &bitmapWidgetName, const unsigned short &widgetWidth, const unsigned short &widgetHeight, SMaterial *targetMaterial, const unsigned short &targetTechnique, const unsigned short &targetPass, const unsigned short &targetTextureUnit)
 
void CommonConstructorSequence ()
 
 ~SObjWindowWidget ()
 
virtual void LoadURL (const std::string &url)
 
virtual void LoadFile (const std::string &file)
 
virtual void InjectMouseMove (const int &xPos, const int &yPos, const MouseButtonId &button)
 
virtual void InjectMouseWheel (const int &scrollX, const int &scrollY, const int &relativeScroll)
 
virtual void InjectMouseDown (const int &xPos, const int &yPos, const MouseButtonId &button)
 
virtual void InjectMouseUp (const int &xPos, const int &yPos, const MouseButtonId &button)
 
virtual void InjectTouchAdd (const int &xPos, const int &yPos, const int &touchid)
 
virtual void InjectTouchRemove (const int &touchid)
 
virtual void InjectTouchUpdate (const int &xPos, const int &yPos, const int &vx, const int &vy, const int &touchid)
 
virtual void InjectKeyEvent (const UINT &msg, const ScolWindowHandle &hwnd, const WPARAM &wParam, const LPARAM &lParam)
 
virtual void InjectTextEvent (const std::string &utf8)
 
virtual void RunScriptFunction (const std::string &functionName, const std::vector< std::string > &argumentList)
 

 
void SetTargetWindow (const ScolWindowHandle &targetWindowHandlePtr)
 
void Update ()
 
bool GetBorderVisible ()
 
void SetBorderVisible (const bool &drawBordersEnable)
 
- Public Member Functions inherited from SO3::SWidget
 SWidget (SScene *targetScene, const std::string &widgetName, const int &xPos, const int &yPos, const unsigned short &widgetWidth, const unsigned short &widgetHeight, SViewPort *targetViewport, const unsigned int &widgetZOrder, const std::string &widgetType)
 
 SWidget (SScene *targetScene, const std::string &widgetName, const int &xPos, const int &yPos, const unsigned short &widgetWidth, const unsigned short &widgetHeight, SViewPort *targetViewport, const std::string &widgetType)
 
 SWidget (SScene *targetScene, const std::string &widgetName, const unsigned short &widgetWidth, const unsigned short &widgetHeight, SMaterial *targetMaterial, const unsigned short &targetTechnique, const unsigned short &targetPass, const unsigned short &targetTextureUnit, const std::string &widgetType)
 
virtual ~SWidget ()
 
SSceneGetParentScene ()
 
std::string GetType ()
 
unsigned short GetWidth ()
 
unsigned short GetHeight ()
 
SPoint< unsigned short > GetSize ()
 
void SetSize (const unsigned short &newWidth, const unsigned short &newHeight)
 
void SetSize (const SPoint< unsigned short > &newSize)
 
float GetTextureRatio ()
 
void SetTextureRatio (const float &newRatio)
 
bool GetIsStereo ()
 
void SetStereo (StereoMode state)
 
void SetStereoEye (bool isleft=true)
 
SPoint< int > GetPosition ()
 
void SetPosition (const int &xPos, const int &yPos)
 
void SetPosition (const SPoint< int > &newPosition)
 
void Move (const SPoint< int > &relativeMove)
 
void SetCurrentViewport (Ogre::Viewport *vp)
 
void SetScale (const float width, const float height)
 
SPoint< float > GetScale ()
 
void SetLeftOffset (const float left)
 
void SetTopOffset (const float top)
 
SPoint< int > GetRealPixelPosition ()
 
SPoint< unsigned short > GetRealPixelSize ()
 
void Show (const bool &fade=false, const unsigned short &fadeDurationMS=300)
 
void Hide (const bool &fade=false, const unsigned short &fadeDurationMS=300)
 
bool GetVisible ()
 
void SetTransparency (const bool &enableTransparency)
 
bool GetTransparency ()
 
void SetOpacity (const float &widgetOpacity)
 
float GetOpacity ()
 
void SetIgnoreTransparentPixels (const bool &widgetIgnoreTransparentPixels, const float &tresholdColor=0.0f)
 
bool GetIgnoreTransparentPixels ()
 
float GetIgnoreTransparentPixelsTreshold ()
 
void SetZOrder (const unsigned short &newWidgetOrder)
 
unsigned short GetZOrder ()
 
void TakeFocus ()
 
void ReleaseFocus ()
 
bool HasFocus ()
 
void SetKeyboardEnable (const bool &enableKeyboardOnWidget)
 
bool GetKeyboardEnable ()
 
void SetMouseEnable (const bool &enableMouseOnWidget)
 
bool GetMouseEnable ()
 
bool GetMouseOver ()
 
bool GetInputOver (int id)
 
void SetInputOver (int id, bool state)
 
void SetForeground (const bool &enableWidgetForeground)
 
bool GetForeground ()
 
void SetTopOnFocus (const bool &enableWidgetTopOnFocus)
 
bool GetTopOnFocus ()
 
virtual void loadResource (Ogre::Resource *resource)
 
bool GetUpdateOnFocusOnly ()
 
void SetUpdateOnFocusOnly (const bool &activate)
 
bool GetIsOverlayed ()
 
bool GetIs2DRect ()
 
virtual HCURSOR GetCurrentMouseCursor ()
 
- Public Member Functions inherited from SO3::SData
 SData (const std::string &dataName)
 
virtual ~SData ()
 
std::string GetName () const
 
SUserObjectBindingsGetUserObjectBindings ()
 
const SUserObjectBindingsGetUserObjectBindings () const
 

Protected Member Functions

virtual void SetFocusImpl (const bool &focusOnWidget)
 
virtual void SetTransparencyImpl (const bool &enableTransparency)
 
virtual void SetKeyboardEnableImpl (const bool &enableKeyboardOnWidget)
 
virtual void SetMouseEnableImpl (const bool &enableMouseOnWidget)
 
virtual void SetSizeImpl (const unsigned short &newWidth, const unsigned short &newHeight)
 
virtual bool CheckPixelAlpha (const int &posX, const int &posY)
 
- Protected Member Functions inherited from SO3::SWidget
bool IsCompensateNPOT () const
 
void CreateTexture (bool alpha=true)
 
std::string CheckUrl (const std::string &url)
 

Additional Inherited Members

- Public Types inherited from SO3::SWidget
enum  StereoMode { MONO = 0 , SBS = 1 , TB = 2 , BT = 3 }
 
- Public Attributes inherited from SO3::SWidget
friend SWidgetManager
 
- Protected Attributes inherited from SO3::SWidget
std::string baseResourceName
 
int leftPos
 
int topPos
 
float leftOffset
 
float topOffset
 
unsigned short width
 
unsigned short height
 
unsigned short mTextureWidth
 The actual texture width allocated in ogre.
 
unsigned short mTextureHeight
 The actual texture height allocated in ogre.
 
float textureRatio
 Texture ratio compared to widget size, usually 1.0.
 
SScenescene
 
SViewPortviewport
 
Ogre::Viewport * currentViewport
 
Ogre::TexturePtr renderingTexture
 
bool forceRenderingUpdate
 
float transparentTresholdColor
 
bool compensateNPOT
 Use to indicate if the texture size has be rounded to an exact pow2.
 
Ogre::Vector2 xCoef
 
Ogre::Vector2 yCoef
 
- Protected Attributes inherited from SO3::SData
std::string name
 

Detailed Description

Definition at line 44 of file SO3ObjWindowWidget.h.

Constructor & Destructor Documentation

◆ SObjWindowWidget() [1/3]

SO3::SObjWindowWidget::SObjWindowWidget ( SScene targetScene,
const std::string &  bitmapWidgetName,
const int &  xPos,
const int &  yPos,
const unsigned short &  widgetWidth,
const unsigned short &  widgetHeight,
SViewPort targetViewport,
const unsigned int &  widgetZOrder 
)

Definition at line 44 of file SO3ObjWindowWidget.cpp.

◆ SObjWindowWidget() [2/3]

SO3::SObjWindowWidget::SObjWindowWidget ( SScene targetScene,
const std::string &  bitmapWidgetName,
const int &  xPos,
const int &  yPos,
const unsigned short &  widgetWidth,
const unsigned short &  widgetHeight,
SViewPort targetViewport 
)

Definition at line 49 of file SO3ObjWindowWidget.cpp.

◆ SObjWindowWidget() [3/3]

SO3::SObjWindowWidget::SObjWindowWidget ( SScene targetScene,
const std::string &  bitmapWidgetName,
const unsigned short &  widgetWidth,
const unsigned short &  widgetHeight,
SMaterial targetMaterial,
const unsigned short &  targetTechnique,
const unsigned short &  targetPass,
const unsigned short &  targetTextureUnit 
)

Definition at line 54 of file SO3ObjWindowWidget.cpp.

◆ ~SObjWindowWidget()

SO3::SObjWindowWidget::~SObjWindowWidget ( )

Destructor.

Definition at line 71 of file SO3ObjWindowWidget.cpp.

Member Function Documentation

◆ CheckPixelAlpha()

bool SO3::SObjWindowWidget::CheckPixelAlpha ( const int &  posX,
const int &  posY 
)
protectedvirtual

return false if no pixel is under coordonates.

Implements SO3::SWidget.

Definition at line 223 of file SO3ObjWindowWidget.cpp.

◆ CommonConstructorSequence()

void SO3::SObjWindowWidget::CommonConstructorSequence ( )

Common constructor sequence for every SObjWindowWidget constructor signature.

Definition at line 59 of file SO3ObjWindowWidget.cpp.

◆ GetBorderVisible()

bool SO3::SObjWindowWidget::GetBorderVisible ( )

Retrieve if the rendering of the window borders is activated or deactivated (default is deactivated)

Definition at line 228 of file SO3ObjWindowWidget.cpp.

◆ InjectKeyEvent()

void SO3::SObjWindowWidget::InjectKeyEvent ( const UINT msg,
const ScolWindowHandle &  hwnd,
const WPARAM &  wParam,
const LPARAM &  lParam 
)
virtual

Implements SO3::SWidget.

Definition at line 173 of file SO3ObjWindowWidget.cpp.

◆ InjectMouseDown()

void SO3::SObjWindowWidget::InjectMouseDown ( const int &  xPos,
const int &  yPos,
const MouseButtonId button 
)
virtual

Injects mouse down events into this Widget. You must supply the current coordinates of the mouse in this Widget's own local coordinate space.

Parameters
xPosThe absolute X-Value of the mouse, relative to this Widget's origin.
yPosThe absolute Y-Value of the mouse, relative to this Widget's origin.

Implements SO3::SWidget.

Definition at line 118 of file SO3ObjWindowWidget.cpp.

◆ InjectMouseMove()

void SO3::SObjWindowWidget::InjectMouseMove ( const int &  xPos,
const int &  yPos,
const MouseButtonId button 
)
virtual

  Injects the mouse's current coordinates (in this Widget's own local coordinate space) into this Widget.
Parameters
xPosThe X-coordinate of the mouse, relative to this Widget's origin.
yPosThe Y-coordinate of the mouse, relative to this Widget's origin.

Implements SO3::SWidget.

Definition at line 99 of file SO3ObjWindowWidget.cpp.

◆ InjectMouseUp()

void SO3::SObjWindowWidget::InjectMouseUp ( const int &  xPos,
const int &  yPos,
const MouseButtonId button 
)
virtual

Injects mouse up events into this Widget. You must supply the current coordinates of the mouse in this Widget's own local coordinate space.

Parameters
xPosThe absolute X-Value of the mouse, relative to this Widget's origin.
yPosThe absolute Y-Value of the mouse, relative to this Widget's origin.

Implements SO3::SWidget.

Definition at line 138 of file SO3ObjWindowWidget.cpp.

◆ InjectMouseWheel()

void SO3::SObjWindowWidget::InjectMouseWheel ( const int &  scrollX,
const int &  scrollY,
const int &  relativeScroll 
)
virtual

Injects mouse wheel events into this Widget.

Parameters
scrollXscroll distance on X axis
scrollYscroll distance on Y axis

Implements SO3::SWidget.

Definition at line 109 of file SO3ObjWindowWidget.cpp.

◆ InjectTextEvent()

void SO3::SObjWindowWidget::InjectTextEvent ( const std::string &  utf8)
virtual

Implements SO3::SWidget.

Definition at line 182 of file SO3ObjWindowWidget.cpp.

◆ InjectTouchAdd()

void SO3::SObjWindowWidget::InjectTouchAdd ( const int &  xPos,
const int &  yPos,
const int &  touchid 
)
virtual

Injects the touch add with current coordinates (in this Widget's own local coordinate space) into this Widget.

Parameters
xPosThe X-coordinate of the touch point, relative to this Widget's origin.
yPosThe Y-coordinate of the touch point, relative to this Widget's origin.
touchidthe touch id

Implements SO3::SWidget.

Definition at line 158 of file SO3ObjWindowWidget.cpp.

◆ InjectTouchRemove()

void SO3::SObjWindowWidget::InjectTouchRemove ( const int &  touchid)
virtual

Injects touch remove down events into this Widget.

Parameters
touchidthe touch id

Implements SO3::SWidget.

Definition at line 163 of file SO3ObjWindowWidget.cpp.

◆ InjectTouchUpdate()

void SO3::SObjWindowWidget::InjectTouchUpdate ( const int &  xPos,
const int &  yPos,
const int &  vx,
const int &  vy,
const int &  touchid 
)
virtual

Injects the touch update with current coordinates (in this Widget's own local coordinate space) into this Widget.

Parameters
xPosThe X-coordinate of the touch point, relative to this Widget's origin.
yPosThe Y-coordinate of the touch point, relative to this Widget's origin.
vxThe X last move distance of the touch point, relative to this Widget's origin.
vyThe Y last move distance of the touch point, relative to this Widget's origin.
touchidthe touch id

Implements SO3::SWidget.

Definition at line 168 of file SO3ObjWindowWidget.cpp.

◆ LoadFile()

void SO3::SObjWindowWidget::LoadFile ( const std::string &  file)
virtual

Loads a local file.

Note
The file should reside in a scol partition.

Implements SO3::SWidget.

Definition at line 92 of file SO3ObjWindowWidget.cpp.

◆ LoadURL()

void SO3::SObjWindowWidget::LoadURL ( const std::string &  url)
virtual

Implements SO3::SWidget.

Definition at line 85 of file SO3ObjWindowWidget.cpp.

◆ RunScriptFunction()

void SO3::SObjWindowWidget::RunScriptFunction ( const std::string &  functionName,
const std::vector< std::string > &  argumentList 
)
virtual


Execute an action script function using the parameters passed in the list.

Implements SO3::SWidget.

Definition at line 203 of file SO3ObjWindowWidget.cpp.

◆ SetBorderVisible()

void SO3::SObjWindowWidget::SetBorderVisible ( const bool &  drawBordersEnable)

Activate or deactivate the rendering of the window borders (default is deactivated)

Definition at line 233 of file SO3ObjWindowWidget.cpp.

◆ SetFocusImpl()

void SO3::SObjWindowWidget::SetFocusImpl ( const bool &  focusOnWidget)
protectedvirtual

Focus or unfocus widget implementation.

Implements SO3::SWidget.

Definition at line 187 of file SO3ObjWindowWidget.cpp.

◆ SetKeyboardEnableImpl()

void SO3::SObjWindowWidget::SetKeyboardEnableImpl ( const bool &  enableKeyboardOnWidget)
protectedvirtual

Implements SO3::SWidget.

Definition at line 208 of file SO3ObjWindowWidget.cpp.

◆ SetMouseEnableImpl()

void SO3::SObjWindowWidget::SetMouseEnableImpl ( const bool &  enableMouseOnWidget)
protectedvirtual

Enable mouse input on widget.

Implements SO3::SWidget.

Definition at line 213 of file SO3ObjWindowWidget.cpp.

◆ SetSizeImpl()

void SO3::SObjWindowWidget::SetSizeImpl ( const unsigned short &  newWidth,
const unsigned short &  newHeight 
)
protectedvirtual

Implements SO3::SWidget.

Definition at line 218 of file SO3ObjWindowWidget.cpp.

◆ SetTargetWindow()

void SO3::SObjWindowWidget::SetTargetWindow ( const ScolWindowHandle &  targetWindowHandlePtr)
Remarks
: Do not call more than one time!

Definition at line 78 of file SO3ObjWindowWidget.cpp.

◆ SetTransparencyImpl()

void SO3::SObjWindowWidget::SetTransparencyImpl ( const bool &  enableTransparency)
protectedvirtual

Implements SO3::SWidget.

Definition at line 198 of file SO3ObjWindowWidget.cpp.

◆ Update()

void SO3::SObjWindowWidget::Update ( )

Definition at line 302 of file SO3ObjWindowWidget.cpp.


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