|
PEBL 2.2
Psychology Experiment Building Language - Cross-platform psychological experiment development system
|
Validator platform image box - no image loading, used only for compilation. More...
#include <PlatformImageBox.h>
Public Member Functions | |
| PlatformImageBox () | |
| Standard Constructor. | |
| virtual | ~PlatformImageBox () |
| Standard Destructor. | |
| virtual bool | LoadImage (const std::string &imagefilename) |
| virtual bool | Draw () |
| virtual std::string | ObjectName () const |
| virtual void | SetZoomX (pDouble x) |
| This sets the widget's position on its parent widget. | |
| virtual void | SetZoomY (pDouble x) |
| This sets the widget's position on its parent widget. | |
| PlatformImageBox () | |
| PlatformImageBox (const std::string &filename) | |
| virtual | ~PlatformImageBox () |
| virtual bool | LoadImage (const std::string &imagefilename) |
| virtual bool | Draw () |
| virtual std::string | ObjectName () const |
| virtual bool | SetProperty (std::string name, Variant v) |
| virtual ObjectValidationError | ValidateProperty (std::string name, Variant v) const |
| virtual ObjectValidationError | ValidateProperty (std::string name) const |
Public Member Functions inherited from PImageBox | |
| PImageBox () | |
| virtual | ~PImageBox () |
| virtual Variant | GetProperty (std::string) const |
| virtual void | SetPosition (pInt x, pInt y) |
| virtual void | SetSize (int width, int height) |
Public Member Functions inherited from PWidget | |
| PWidget () | |
| PWidget (const PWidget &pw) | |
| PWidget (pInt x, pInt y, pInt width, pInt height, bool visible) | |
| virtual | ~PWidget () |
| virtual void | SetParent (PWidget *widget) |
| This unconditionally sets the parent widget. | |
| virtual PWidget * | GetParent () |
| virtual bool | IsParent (PWidget *parent) |
| virtual void | SetRotation (pDouble x) |
| This sets the widget's position on its parent widget. | |
| virtual void | SetWidth (pInt w) |
| virtual void | SetHeight (pInt h) |
| virtual pInt | GetX () const |
| virtual pInt | GetY () const |
| virtual pInt | GetWidth () const |
| virtual pInt | GetHeight () const |
| virtual void | SetBackgroundColor (const PColor &color) |
| virtual PColor | GetBackgroundColor () |
| virtual bool | AddSubWidget (PWidget *widget) |
| virtual bool | RemoveSubWidget (PWidget *widget) |
| virtual bool | RemoveLastSubWidget () |
| This is probably pretty useless. | |
| virtual void | Show () |
| virtual void | Hide () |
| virtual bool | IsVisible () const |
Public Member Functions inherited from PEBLObjectBase | |
| PEBLObjectBase () | |
| Standard Constructor. | |
| PEBLObjectBase (ComplexDataType cdt) | |
| Standard Constructor. | |
| PEBLObjectBase (const PEBLObjectBase &pob) | |
| virtual | ~PEBLObjectBase () |
| Standard Destructor. | |
| virtual bool | InitializeProperty (std::string name, Variant v) |
| Variant | GetProperty (std::string) const |
| ComplexDataType | GetType () |
| virtual std::ostream & | PrintProperties (std::ostream &out) |
| virtual Variant | GetPropertyList () |
Public Member Functions inherited from PlatformWidget | |
| PlatformWidget () | |
| virtual | ~PlatformWidget () |
| virtual SDL_Texture * | GetSDL_Texture () |
| Used to extract an SDL surface from the widget. Used by children drawing themselves on their parent. | |
| void | SetParent (PlatformWidget *parent) |
| SDL_Surface * | GetSurface () |
| virtual bool | SetRenderer (SDL_Renderer *renderer) |
| SDL_Renderer * | GetRenderer () |
| virtual bool | AddToParentWidget (PlatformWidget *parent) |
| virtual bool | AddSubWidget (PlatformWidget *widget) |
| virtual bool | RemoveSubWidget (PlatformWidget *widget) |
| virtual bool | RemoveSubWidgets () |
| virtual bool | RotoZoom (double angle, double zoomx, double zoomy, int smooth) |
| This uses the SDL_gfx package to 'rotozoom'. | |
| bool | SetPoint (int x, int y, PColor col) |
| PColor | GetPixel (int x, int y) |
| PlatformWidget () | |
| PlatformWidget (pInt x, pInt y, pInt width, pInt height, bool visible) | |
| virtual | ~PlatformWidget () |
| virtual bool | RotoZoom (pDouble angle, pDouble zoomx, pDouble zoomy, pInt smooth) |
| virtual bool | SetPoint (pInt x, pInt y, PColor col) |
| virtual PColor | GetPixel (pInt x, pInt y) |
Protected Member Functions | |
| virtual std::ostream & | SendToStream (std::ostream &out) const |
| An inheritable printing class used by PEBLObjectBase::operator<<. | |
| virtual std::ostream & | SendToStream (std::ostream &out) const |
| An inheritable printing class used by PEBLObjectBase::operator<<. | |
Protected Member Functions inherited from PlatformWidget | |
| virtual void | PrintSubWidgets (std::ostream &out) const |
| virtual bool | LockSurface () |
| This needs to be used on some platforms/video cards. | |
| virtual bool | UnlockSurface () |
| This needs to be used on some platforms/video cards. | |
Protected Attributes | |
| bool | mTextureCreated |
Protected Attributes inherited from PWidget | |
| pInt | mX |
| pInt | mY |
| pInt | mDrawX |
| pInt | mDrawY |
| pInt | mWidth |
| pInt | mHeight |
| pDouble | mZoomX |
| pDouble | mZoomY |
| pDouble | mRotation |
| PColor | mBackgroundColor |
| The background color of the widget. if alpha = 0, will not be painted. | |
| std::list< PWidget * > | mSubWidgets |
| bool | mIsVisible |
| PWidget * | mParent |
Protected Attributes inherited from PEBLObjectBase | |
| ComplexDataType | mCDT |
| std::map< std::string, Variant > | mProperties |
Protected Attributes inherited from PlatformWidget | |
| pInt | mTextureWidth |
| pInt | mTextureHeight |
| bool | mNeedsTexture |
| SDL_Texture * | mTexture |
| SDL_Surface * | mSurface |
| SDL_Renderer * | mRenderer |
Validator platform image box - no image loading, used only for compilation.
Definition at line 50 of file sdl/PlatformImageBox.h.
| PlatformImageBox::PlatformImageBox | ( | ) |
Standard Constructor.
Definition at line 61 of file sdl/PlatformImageBox.cpp.
References CDT_IMAGEBOX, PEBLObjectBase::mCDT, PlatformWidget::mNeedsTexture, PlatformWidget::mRenderer, PlatformWidget::mSurface, PlatformWidget::mTexture, mTextureCreated, and NULL.
|
virtual |
| PlatformImageBox::PlatformImageBox | ( | ) |
| PlatformImageBox::PlatformImageBox | ( | const std::string & | filename | ) |
Definition at line 33 of file validator/PlatformImageBox.cpp.
References LoadImage().
|
virtual |
|
virtual |
This draws the subwidgets. It doesn't need a 'parent' argument, because 'this' is it.
Reimplemented from PWidget.
Definition at line 161 of file sdl/PlatformImageBox.cpp.
References PlatformWidget::Draw(), PlatformWidget::mRenderer, PlatformWidget::mSurface, PlatformWidget::mTexture, and mTextureCreated.
|
virtual |
This draws the subwidgets. It doesn't need a 'parent' argument, because 'this' is it.
Reimplemented from PWidget.
|
virtual |
This will load a file into the class data, given a file name. height and width are set automatically.
Implements PImageBox.
Definition at line 97 of file sdl/PlatformImageBox.cpp.
References PEBLPath::FindFile(), Evaluator::gPath, PWidget::mHeight, PlatformWidget::mSurface, PlatformWidget::mTextureHeight, PlatformWidget::mTextureWidth, PWidget::mWidth, PImageBox::SetProperty(), PWidget::SetProperty(), and PError::SignalFatalError().
Referenced by main(), PEBLObjects::MakeImage(), and PlatformImageBox().
|
virtual |
This will load a file into the class data, given a file name. height and width are set automatically.
Implements PImageBox.
|
inlinevirtual |
Reimplemented from PImageBox.
Definition at line 61 of file sdl/PlatformImageBox.h.
|
inlinevirtual |
Reimplemented from PImageBox.
Definition at line 40 of file validator/PlatformImageBox.h.
|
protectedvirtual |
An inheritable printing class used by PEBLObjectBase::operator<<.
Reimplemented from PImageBox.
Definition at line 53 of file validator/PlatformImageBox.cpp.
|
protectedvirtual |
An inheritable printing class used by PEBLObjectBase::operator<<.
Reimplemented from PImageBox.
|
inlinevirtual |
Reimplemented from PImageBox.
Definition at line 43 of file validator/PlatformImageBox.h.
References PImageBox::SetProperty().
Referenced by SetZoomX(), and SetZoomY().
|
virtual |
This sets the widget's position on its parent widget.
Reimplemented from PWidget.
Definition at line 188 of file sdl/PlatformImageBox.cpp.
References PlatformWidget::mTextureWidth, PWidget::mX, PWidget::mZoomX, PEBLObjectBase::SetProperty(), and SetProperty().
|
virtual |
This sets the widget's position on its parent widget.
Reimplemented from PWidget.
Definition at line 198 of file sdl/PlatformImageBox.cpp.
References PlatformWidget::mTextureHeight, PWidget::mY, PWidget::mZoomY, PEBLObjectBase::SetProperty(), and SetProperty().
|
inlinevirtual |
Reimplemented from PImageBox.
Definition at line 49 of file validator/PlatformImageBox.h.
References PImageBox::ValidateProperty().
|
inlinevirtual |
Reimplemented from PImageBox.
Definition at line 46 of file validator/PlatformImageBox.h.
References PImageBox::ValidateProperty().
|
protected |
Definition at line 66 of file sdl/PlatformImageBox.h.
Referenced by Draw(), and PlatformImageBox().