SO3Engine
|
#include <SO3BitmapWidget.h>
Public Member Functions | |
SBitmapWidget (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) | |
SBitmapWidget (SScene *targetScene, const std::string &bitmapWidgetName, const int &xPos, const int &yPos, const unsigned short &widgetWidth, const unsigned short &widgetHeight, SViewPort *targetViewport) | |
SBitmapWidget (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 () |
~SBitmapWidget () | |
virtual void | LoadURL (const std::string &url) |
virtual void | LoadFile (const std::string &file) |
void | UpdateRawData (PtrObjBitmap scolBitmap) |
void | UpdateRawData (unsigned char *buffer, int width, int height, int bitperpixel) |
void | UpdateRawData (PtrObjBitmap scolBitmap, PtrObjBitmap scolAlphaBitmap) |
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) |
virtual void | loadResource (Ogre::Resource *resource) |
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 () |
SScene * | GetParentScene () |
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 () |
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 |
SUserObjectBindings & | GetUserObjectBindings () |
const SUserObjectBindings & | GetUserObjectBindings () 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. | |
SScene * | scene |
SViewPort * | viewport |
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 |
Definition at line 43 of file SO3BitmapWidget.h.
SO3::SBitmapWidget::SBitmapWidget | ( | 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 43 of file SO3BitmapWidget.cpp.
SO3::SBitmapWidget::SBitmapWidget | ( | 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 48 of file SO3BitmapWidget.cpp.
SO3::SBitmapWidget::SBitmapWidget | ( | 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 53 of file SO3BitmapWidget.cpp.
SO3::SBitmapWidget::~SBitmapWidget | ( | ) |
Destructor.
Definition at line 66 of file SO3BitmapWidget.cpp.
|
protectedvirtual |
return false if no pixel is under coordonates.
Implements SO3::SWidget.
Definition at line 280 of file SO3BitmapWidget.cpp.
void SO3::SBitmapWidget::CommonConstructorSequence | ( | ) |
Common constructor sequence for every SBitmapWidget constructor signature.
Definition at line 58 of file SO3BitmapWidget.cpp.
|
virtual |
Implements SO3::SWidget.
Definition at line 241 of file SO3BitmapWidget.cpp.
|
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.
xPos | The absolute X-Value of the mouse, relative to this Widget's origin. |
yPos | The absolute Y-Value of the mouse, relative to this Widget's origin. |
Implements SO3::SWidget.
Definition at line 216 of file SO3BitmapWidget.cpp.
|
virtual |
Injects the mouse's current coordinates (in this Widget's own local coordinate space) into this Widget.
xPos | The X-coordinate of the mouse, relative to this Widget's origin. |
yPos | The Y-coordinate of the mouse, relative to this Widget's origin. |
Implements SO3::SWidget.
Definition at line 206 of file SO3BitmapWidget.cpp.
|
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.
xPos | The absolute X-Value of the mouse, relative to this Widget's origin. |
yPos | The absolute Y-Value of the mouse, relative to this Widget's origin. |
Implements SO3::SWidget.
Definition at line 221 of file SO3BitmapWidget.cpp.
|
virtual |
Injects mouse wheel events into this Widget.
scrollX | scroll distance on X axis |
scrollY | scroll distance on Y axis |
Implements SO3::SWidget.
Definition at line 211 of file SO3BitmapWidget.cpp.
|
virtual |
Implements SO3::SWidget.
Definition at line 246 of file SO3BitmapWidget.cpp.
|
virtual |
Injects the touch add with current coordinates (in this Widget's own local coordinate space) into this Widget.
xPos | The X-coordinate of the touch point, relative to this Widget's origin. |
yPos | The Y-coordinate of the touch point, relative to this Widget's origin. |
touchid | the touch id |
Implements SO3::SWidget.
Definition at line 226 of file SO3BitmapWidget.cpp.
|
virtual |
Injects touch remove down events into this Widget.
touchid | the touch id |
Implements SO3::SWidget.
Definition at line 231 of file SO3BitmapWidget.cpp.
|
virtual |
Injects the touch update with current coordinates (in this Widget's own local coordinate space) into this Widget.
xPos | The X-coordinate of the touch point, relative to this Widget's origin. |
yPos | The Y-coordinate of the touch point, relative to this Widget's origin. |
vx | The X last move distance of the touch point, relative to this Widget's origin. |
vy | The Y last move distance of the touch point, relative to this Widget's origin. |
touchid | the touch id |
Implements SO3::SWidget.
Definition at line 236 of file SO3BitmapWidget.cpp.
|
virtual |
Loads a local file.
Implements SO3::SWidget.
Definition at line 79 of file SO3BitmapWidget.cpp.
|
virtual |
Reimplemented from SO3::SWidget.
Definition at line 356 of file SO3BitmapWidget.cpp.
|
virtual |
Implements SO3::SWidget.
Definition at line 72 of file SO3BitmapWidget.cpp.
|
virtual |
Execute an action script function using the parameters passed in the list.
Implements SO3::SWidget.
Definition at line 260 of file SO3BitmapWidget.cpp.
|
protectedvirtual |
Focus or unfocus widget implementation.
Implements SO3::SWidget.
Definition at line 251 of file SO3BitmapWidget.cpp.
|
protectedvirtual |
Implements SO3::SWidget.
Definition at line 265 of file SO3BitmapWidget.cpp.
|
protectedvirtual |
Enable mouse input on widget.
Implements SO3::SWidget.
Definition at line 270 of file SO3BitmapWidget.cpp.
|
protectedvirtual |
Implements SO3::SWidget.
Definition at line 275 of file SO3BitmapWidget.cpp.
|
protectedvirtual |
Implements SO3::SWidget.
Definition at line 256 of file SO3BitmapWidget.cpp.
void SO3::SBitmapWidget::UpdateRawData | ( | PtrObjBitmap | scolBitmap | ) |
Blit a scol bitmap in the widget area
Definition at line 143 of file SO3BitmapWidget.cpp.
void SO3::SBitmapWidget::UpdateRawData | ( | PtrObjBitmap | scolBitmap, |
PtrObjBitmap | scolAlphaBitmap | ||
) |
Blit a scol alpha bitmap in the widget area
Definition at line 172 of file SO3BitmapWidget.cpp.
void SO3::SBitmapWidget::UpdateRawData | ( | unsigned char * | buffer, |
int | width, | ||
int | height, | ||
int | bitperpixel | ||
) |
Blit a pixel buffer in the widget area
Definition at line 86 of file SO3BitmapWidget.cpp.