|
PEBL 2.2
Psychology Experiment Building Language - Cross-platform psychological experiment development system
|
This class is the basic generic text box. More...
#include <PTextBox.h>
Public Member Functions | |
| PTextBox () | |
| PTextBox (std::string text, int width, int height) | |
| PTextBox (PTextBox &textbox) | |
| virtual | ~PTextBox () |
| virtual bool | SetProperty (std::string, Variant v) |
| virtual Variant | GetProperty (std::string) const |
| virtual ObjectValidationError | ValidateProperty (std::string, Variant v) const |
| virtual ObjectValidationError | ValidateProperty (std::string) const |
| virtual void | SetHeight (int h) |
| virtual void | SetWidth (int w) |
| virtual void | InsertText (const std::string character) |
| virtual void | DeleteText (int length) |
| virtual void | SetEditable (bool val) |
| virtual bool | GetEditable () |
| virtual void | SetCursorPosition (unsigned long int pos) |
| virtual unsigned long int | GetCursorPosition () |
| virtual long unsigned int | IncrementCursor () |
| virtual long unsigned int | DecrementCursor () |
| virtual void | SetLineWrap (bool state) |
| virtual void | SetJustify (Variant j) |
| virtual void | HandleKeyPress (int keycode, int modkeys, Uint16 unicode) |
| virtual void | HandleTextInput (std::string text) |
| virtual bool | AtPrintableCharacter (unsigned long int x) |
| virtual std::string | ObjectName () const |
Public Member Functions inherited from PTextObject | |
| PTextObject () | |
| PTextObject (const std::string &text) | |
| PTextObject (PTextObject &object) | |
| virtual | ~PTextObject () |
| virtual void | SetText (const std::string &text) |
| virtual void | SetDirection (int i) |
| virtual std::string | GetText () const |
| virtual unsigned long int | GetNumCharacters () |
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 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) |
| virtual void | SetParent (PWidget *widget) |
| This unconditionally sets the parent widget. | |
| virtual PWidget * | GetParent () |
| virtual bool | IsParent (PWidget *parent) |
| virtual bool | Draw () |
| virtual void | SetPosition (pInt x, pInt y) |
| This sets the widget's position on its parent widget. | |
| 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. | |
| 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 | RemoveSubWidgets () |
| 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 () |
Protected Member Functions | |
| virtual std::ostream & | SendToStream (std::ostream &out) const |
| An inheritable printing class used by PEBLObjectBase::operator<<. | |
Protected Attributes | |
| bool | mEditable |
| unsigned long int | mCursorPos |
| bool | mCursorChanged |
| bool | mLineWrap |
| Variant | mJustify |
Protected Attributes inherited from PTextObject | |
| bool | mChanged |
| std::string | mText |
| int | mDirection |
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 |
This class is the basic generic text box.
Definition at line 39 of file PTextBox.h.
| PTextBox::PTextBox | ( | ) |
Definition at line 43 of file PTextBox.cpp.
References PEBLObjectBase::InitializeProperty().
| PTextBox::PTextBox | ( | std::string | text, |
| int | width, | ||
| int | height | ||
| ) |
Definition at line 70 of file PTextBox.cpp.
References PEBLObjectBase::InitializeProperty().
| PTextBox::PTextBox | ( | PTextBox & | textbox | ) |
Definition at line 96 of file PTextBox.cpp.
References PEBLObjectBase::InitializeProperty(), and PTextObject::mChanged.
|
virtual |
Definition at line 117 of file PTextBox.cpp.
|
virtual |
Definition at line 424 of file PTextBox.cpp.
References PTextObject::mText.
Referenced by PlatformTextBox::FindCursorPosition().
|
virtual |
Definition at line 334 of file PTextBox.cpp.
References mCursorChanged, mCursorPos, and PTextObject::mText.
Referenced by PlatformTextBox::HandleKeyPress().
|
virtual |
Definition at line 210 of file PTextBox.cpp.
References count, PTextObject::mChanged, mCursorPos, PTextObject::mText, and SetProperty().
Referenced by PlatformTextBox::HandleKeyPress().
|
inlinevirtual |
|
inlinevirtual |
|
virtual |
Reimplemented from PTextObject.
Reimplemented in PlatformTextBox.
Definition at line 154 of file PTextBox.cpp.
References PTextObject::GetProperty().
Referenced by PlatformTextBox::GetProperty().
|
virtual |
Reimplemented in PlatformTextBox.
Definition at line 394 of file PTextBox.cpp.
References InsertText(), mCursorChanged, and PEBLUtility::TranslateKeycode().
|
virtual |
Reimplemented in PlatformTextBox.
Definition at line 414 of file PTextBox.cpp.
References InsertText(), and mCursorChanged.
Referenced by PlatformTextBox::HandleTextInput().
|
virtual |
AtPrintableCharacter(mCursorPos))
Definition at line 295 of file PTextBox.cpp.
References mCursorChanged, mCursorPos, and PTextObject::mText.
Referenced by PlatformTextBox::HandleKeyPress().
|
virtual |
Definition at line 189 of file PTextBox.cpp.
References PTextObject::mChanged, mCursorChanged, mCursorPos, PTextObject::mText, and SetProperty().
Referenced by HandleKeyPress(), PlatformTextBox::HandleKeyPress(), and HandleTextInput().
|
virtual |
Reimplemented from PTextObject.
Reimplemented in PlatformTextBox, and PlatformTextBox.
Definition at line 441 of file PTextBox.cpp.
|
inlineprotectedvirtual |
An inheritable printing class used by PEBLObjectBase::operator<<.
Reimplemented from PTextObject.
Reimplemented in PlatformTextBox, and PlatformTextBox.
Definition at line 87 of file PTextBox.h.
|
inlinevirtual |
Definition at line 64 of file PTextBox.h.
References mCursorChanged, and mCursorPos.
Referenced by SetProperty().
|
inlinevirtual |
Reimplemented in PlatformTextBox.
Definition at line 61 of file PTextBox.h.
References mCursorChanged, and mEditable.
Referenced by PlatformTextBox::SetEditable(), and SetProperty().
|
virtual |
Reimplemented in PlatformTextBox.
Definition at line 367 of file PTextBox.cpp.
References PTextObject::mChanged, and PWidget::mHeight.
Referenced by PlatformTextBox::SetHeight(), and SetProperty().
|
virtual |
Definition at line 386 of file PTextBox.cpp.
References PTextObject::mChanged, and mJustify.
Referenced by SetProperty().
|
virtual |
|
virtual |
Reimplemented from PTextObject.
Reimplemented in PlatformTextBox, and PlatformTextBox.
Definition at line 124 of file PTextBox.cpp.
References Variant::GetString(), PTextObject::mChanged, mCursorChanged, SetCursorPosition(), SetEditable(), SetHeight(), SetJustify(), SetLineWrap(), PEBLObjectBase::SetProperty(), PTextObject::SetProperty(), PTextObject::SetText(), and SetWidth().
Referenced by DeleteText(), InsertText(), PlatformTextBox::SetProperty(), and PlatformTextBox::SetProperty().
|
virtual |
Reimplemented in PlatformTextBox.
Definition at line 373 of file PTextBox.cpp.
References PTextObject::mChanged, and PWidget::mWidth.
Referenced by SetProperty(), and PlatformTextBox::SetWidth().
|
virtual |
Reimplemented from PTextObject.
Reimplemented in PlatformTextBox.
Definition at line 176 of file PTextBox.cpp.
References OVE_VALID, and PTextObject::ValidateProperty().
|
virtual |
Reimplemented from PTextObject.
Reimplemented in PlatformTextBox.
Definition at line 160 of file PTextBox.cpp.
References OVE_INVALID_PROPERTY_VALUE, OVE_VALID, and ValidateProperty().
Referenced by PlatformTextBox::ValidateProperty(), PlatformTextBox::ValidateProperty(), and ValidateProperty().
|
protected |
Definition at line 92 of file PTextBox.h.
Referenced by DecrementCursor(), PlatformTextBox::Draw(), HandleKeyPress(), PlatformTextBox::HandleKeyPress(), HandleTextInput(), IncrementCursor(), InsertText(), SetCursorPosition(), SetEditable(), PlatformTextBox::SetEditable(), SetProperty(), and PlatformTextBox::SetText().
|
protected |
Definition at line 91 of file PTextBox.h.
Referenced by DecrementCursor(), DeleteText(), GetCursorPosition(), PlatformTextBox::HandleKeyPress(), IncrementCursor(), InsertText(), SetCursorPosition(), and PlatformTextBox::SetEditable().
|
protected |
Definition at line 90 of file PTextBox.h.
Referenced by PlatformTextBox::Draw(), GetEditable(), PlatformTextBox::RenderText(), and SetEditable().
|
protected |
Definition at line 94 of file PTextBox.h.
Referenced by PlatformTextBox::FindCursorPosition(), PlatformTextBox::HandleKeyPress(), PlatformTextBox::RenderText(), and SetJustify().
|
protected |
Definition at line 93 of file PTextBox.h.
Referenced by SetLineWrap().