ScummVM API documentation
Bagel::CBagPDA Class Reference
Inheritance diagram for Bagel::CBagPDA:
Bagel::CBagStorageDevBmp Bagel::SBBasePda Bagel::CBagBmpObject Bagel::CBagStorageDev Bagel::CBagObject Bagel::CBagParseObject Bagel::CBagParseObject Bagel::CBofObject Bagel::CBofError

Public Member Functions

 CBagPDA (CBofWindow *pParent=nullptr, const CBofRect &xRect=CBofRect(), bool bActivated=false)
 
virtual ~CBagPDA ()
 
ErrorCode attach () override
 
void setPosInWindow (int cx, int cy, int nDist=13)
 
ErrorCode update (CBofBitmap *pBmp, CBofPoint pt, CBofRect *pSrcRect=nullptr, int nMaskColor=-1) override
 
bool paintFGObjects (CBofBitmap *pBmp) override
 
ErrorCode loadFile (const CBofString &sFile) override
 
CBagObjectonNewButtonObject (const CBofString &sInit) override
 
void onLButtonUp (uint32 nFlags, CBofPoint *xPoint, void *info=nullptr) override
 
void onLButtonDown (uint32 nFlags, CBofPoint *xPoint, void *info=nullptr) override
 
bool isInside (const CBofPoint &xPoint) override
 
CBagObjectonNewUserObject (const CBofString &sInit) override
 
bool showInventory () override
 
bool hideInventory () override
 
bool hideCurDisplay () override
 
bool restoreCurDisplay () override
 
ErrorCode attachActiveObjects () override
 
ErrorCode detachActiveObjects () override
 
void handleZoomButton (bool bButtonDown)
 
- Public Member Functions inherited from Bagel::CBagStorageDevBmp
 CBagStorageDevBmp (CBofWindow *pParent=nullptr, const CBofRect &xRect=CBofRect(), bool bTrans=true)
 
CBofBitmapgetWorkBmp () const
 
ErrorCode setWorkBmp ()
 
ErrorCode killWorkBmp ()
 
CBofRect getRect () override
 
void setRect (const CBofRect &xRect) override
 
CBofPoint getPosition () override
 
void setPosition (const CBofPoint &pos) override
 
bool getTransparent () const
 
void setTransparent (bool bTrans=true) override
 
ErrorCode setBackground (CBofBitmap *pBmp) override
 
CBofBitmapgetBackground () override
 
ErrorCode loadFileFromStream (CBagIfstream &fpInput, const CBofString &sWldName, bool bAttach=true) override
 
bool isAttached () override
 
ErrorCode attach () override
 
ErrorCode detach () override
 
ErrorCode update (CBofBitmap *pBmp, CBofPoint pt, CBofRect *pSrcRect=nullptr, int nMaskColor=-1) override
 
void onLButtonUp (uint32 nFlags, CBofPoint *xPoint, void *info) override
 
void onLButtonDown (uint32 nFlags, CPoint *xPoint, void *info=nullptr) override
 
const CBofPoint devPtToViewPort (const CBofPoint &xPoint) override
 
- Public Member Functions inherited from Bagel::CBagBmpObject
ErrorCode attach (CBofPalette *palette)
 
CBofBitmapgetBitmap () const
 
- Public Member Functions inherited from Bagel::CBagObject
bool isInteractive ()
 
void setInteractive (bool b)
 
virtual bool runCallBack ()
 
virtual BagFuncPtr getCallBack ()
 
virtual bool runObject ()
 
void setExpression (CBagExpression *pExpr)
 
CBagExpressiongetExpression () const
 
BagObjectType getType ()
 
void setType (BagObjectType nType)
 
bool isMovable ()
 
void setMovable (bool b=true)
 
bool isStretchable ()
 
void setStretchable (bool b=true)
 
bool isModal ()
 
void setModal (bool b=true)
 
virtual bool isModalDone ()
 
bool isVisible ()
 
void setVisible (bool b=true)
 
bool isHighlight ()
 
void setHighlight (bool b=true)
 
bool isActive ()
 
void setActive (bool b=true)
 
bool isTransparent ()
 
bool isHideOnClick ()
 
void setHideOnClick (bool b=true)
 
bool isImmediateRun ()
 
void setImmediateRun (bool b=true)
 
bool isLocal ()
 
void setLocal (bool b=true)
 
bool isNegative ()
 
void setNegative (bool b=true)
 
bool isConstantUpdate ()
 
void setConstantUpdate (bool b=true)
 
bool isTimeless ()
 
void setTimeless (bool b=true)
 
bool isFloating ()
 
void setFloating (bool b=true)
 
bool isPreload ()
 
void setPreload (bool b=true)
 
bool isForeGround ()
 
void setForeGround (bool b=true)
 
int getProperties ()
 
void setProperties (int nProperties)
 
virtual const CBofStringgetInitInfo () const
 
virtual void setInitInfo (const CBofString &)
 
virtual int getProperty (const CBofString &sProp)
 
virtual void setProperty (const CBofString &, int nVal)
 
bool isDirty ()
 
void setDirty (bool b=true)
 
bool isMsgWaiting ()
 
void setMsgWaiting (bool b=true)
 
bool isAlwaysUpdate ()
 
void setAlwaysUpdate (bool b=true)
 
bool isNoMenu ()
 
void setNoMenu (bool b=true)
 
virtual int getRefId ()
 
virtual int getOverCursor ()
 
virtual int getState ()
 
virtual const CBofStringgetFileName ()
 
CBagMenugetMenuPtr ()
 
virtual const CBofStringgetRefName ()
 
virtual void setRefName (const CBofString &s)
 
virtual void setFileName (const CBofString &s)
 
virtual void setSize (const CBofSize &)
 
virtual void setRefId (int id)
 
virtual void setOverCursor (int curs)
 
virtual void setState (int state)
 
virtual void setMenuPtr (CBagMenu *pm)
 
ParseCodes setInfo (CBagIfstream &istr) override
 
virtual bool onObjInteraction (CBagObject *, CBagStorageDev *)
 
virtual bool onMouseMove (uint32, CBofPoint, void *=nullptr)
 
virtual bool onMouseOver (uint32, CBofPoint, void *=nullptr)
 
- Public Member Functions inherited from Bagel::CBagParseObject
int getStringFromStream (CBagIfstream &istr, CBofString &sStr, const CBofString &sEndChars, bool bPutBack=false)
 
int getAlphaNumFromStream (CBagIfstream &istr, CBofString &sStr)
 
int getOperStrFromStream (CBagIfstream &istr, CBofString &sStr)
 
int getIntFromStream (CBagIfstream &istr, int &nNum)
 
int getRectFromStream (CBagIfstream &istr, CBofRect &rect)
 
int getKeywordFromStream (CBagIfstream &istr, KEYWORDS &keyword)
 
int putbackStringOnStream (CBagIfstream &istr, const CBofString &sStr)
 
int parseAlertBox (CBagIfstream &istr, const char *sTitle, const char *sFile, int nLine)
 
- Public Member Functions inherited from Bagel::CBofError
void reportError (ErrorCode errCode, const char *format,...)
 
bool errorOccurred () const
 
ErrorCode getErrorCode () const
 
void clearError ()
 
- Public Member Functions inherited from Bagel::CBagStorageDev
virtual ErrorCode preFilter (CBofBitmap *pBmp, CBofRect *pRect, CBofList< CBagObject *> *pList=nullptr)
 
void makeListDirty (CBofList< CBagObject *> *pList)
 
void setDiskID (uint16 nDiskID)
 
uint16 getDiskID () const
 
virtual ErrorCode setloadFilePos (const CBofPoint)
 
bool isCloseup () const
 
void setCloseup (bool b=true)
 
bool isCIC ()
 
void setCIC (bool b=true)
 
bool isCustom () const
 
void setCustom (bool b=true)
 
int getDeviceType () const
 
int getObjectCount ()
 
CBagObjectgetObjectByPos (int nIndex)
 
CBagObjectgetObject (int nRefId, bool bActiveOnly=false)
 
CBagObjectgetObject (const CBofPoint &xPoint, bool bActiveOnly=false)
 
CBagObjectgetObject (const CBofString &sName, bool bActiveOnly=false)
 
CBagObjectgetObjectByType (const CBofString &sType, bool bActiveOnly=false)
 
CBofList< CBagObject * > * getObjectList () const
 
void setObjectList (CBofList< CBagObject *> *pOList, CBofList< CBagExpression *> *pEList=nullptr)
 
bool contains (CBagObject *pObj, bool bActive=true)
 
virtual ErrorCode addObject (CBagObject *pObj, int nPos=0)
 
virtual ErrorCode activateLocalObject (CBagObject *pObj)
 
virtual ErrorCode activateLocalObject (const CBofString &sName)
 
virtual ErrorCode removeObject (CBagObject *pRObj)
 
virtual ErrorCode deactivateLocalObject (CBagObject *pObj)
 
virtual ErrorCode deactivateLocalObject (const CBofString &sName)
 
virtual void setHelpFilename (const CBofString &)
 
const CBofStringgetName () const
 
void setName (const CBofString &str)
 
void setFilterId (uint16 nId)
 
uint16 getFilterId () const
 
void setFadeId (uint16 nId)
 
uint16 getFadeId () const
 
const CBofStringgetPrevSDev () const
 
const CBofPoint getPrevLoc () const
 
void setPrevSDev (const CBofString &str)
 
bool getCloseOnOpen () const
 
void setCloseOnOpen (bool bVal)
 
uint16 getExitOnEdge () const
 
void setExitOnEdge (uint16 nVal)
 
CBagObjectgetLActiveObject () const
 
ErrorCode setLActiveObject (CBagObject *pObj)
 
virtual ErrorCode onLActiveObject (uint32, CBofPoint *, void *=nullptr)
 
MouseActivity getLActivity () const
 
void setLActivity (MouseActivity ma)
 
ErrorCode paintStorageDevice (CBofWindow *pWnd, CBofBitmap *pBmp=nullptr, CBofRect *=nullptr)
 
virtual void setAssociateWnd (CBofWindow *pWnd)
 
virtual CBofWindowgetAssociateWnd ()
 
ParseCodes setInfo (CBagIfstream &fpInput) override
 
const CBofStringgetBackgroundName () const
 
ErrorCode attach () override
 
ErrorCode detach () override
 
virtual ErrorCode close ()
 
virtual ErrorCode loadObjects ()
 
virtual ErrorCode releaseObjects ()
 
virtual ErrorCode noObjectsUnderMouse ()
 
virtual const CBofPoint viewPortToDevPt (const CBofPoint &xPoint)
 
virtual void onMouseMove (uint32, CBofPoint *, void *=nullptr)
 
virtual ErrorCode onMouseOver (uint32, CBofPoint *, void *=nullptr)
 
virtual ErrorCode onCursorUpdate (int)
 
virtual CBagObjectonNewSpriteObject (const CBofString &sInit)
 
virtual CBagObjectonNewBitmapObject (const CBofString &sInit)
 
virtual CBagObjectonNewTextObject (const CBofString &sInit)
 
virtual CBagObjectonNewLinkObject (const CBofString &sInit)
 
virtual CBagObjectonNewRPObject (const CBofString &sInit)
 
virtual CBagObjectonNewEDObject (const CBofString &sInit)
 
virtual CBagObjectonNewDosObject (const CBofString &sInit)
 
virtual CBagObjectonNewSoundObject (const CBofString &sInit)
 
virtual CBagObjectonNewCharacterObject (const CBofString &sInit)
 
virtual CBagObjectonNewMovieObject (const CBofString &)
 
virtual CBagObjectonNewCommandObject (const CBofString &sInit)
 
virtual CBagObjectonNewAreaObject (const CBofString &sInit)
 
virtual CBagObjectonNewExpressionObject (const CBofString &sInit)
 
virtual CBagObjectonNewVariableObject (const CBofString &sInit)
 
virtual CBagObjectonNewThingObject (const CBofString &sInit)
 
virtual CBofPoint arrangeFloater (CBofPoint &nPos, CBagObject *pObj)
 
int getNumFloatPages () const
 
void setNumFloatPages (int nFloatPages)
 
void onSetFilter (bool(*filterFunction)(uint16 nFilterId, CBofBitmap *, CBofRect *))
 
FilterFunction getFilter ()
 
bool isFiltered () const
 
- Public Member Functions inherited from Bagel::SBBasePda
 SBBasePda (CBofWindow *parent=nullptr, const CBofRect &rect=CBofRect(), bool activated=false)
 
bool isActivated () const
 
bool isActivating () const
 
void synchronizePdaState ()
 
void activate ()
 
void deactivate ()
 
virtual bool showMovie ()
 
virtual bool hideMovie ()
 
bool setMovie (CBofString &movieName) const
 
void stopMovie (bool bResetPDA) const
 
void setDeactivate (bool b)
 
bool getDeactivate () const
 
virtual bool showMap ()
 
virtual bool hideMap ()
 
virtual bool zoom ()
 
virtual bool showLog ()
 
virtual bool msgLight ()
 
void setPdaState ()
 
void getPdaState ()
 
void setZoomed (bool newVal)
 
bool getZoomed () const
 
int getProperCursor (const CBofPoint &pos, CBofRect &pdaRect) const
 
CBofRect getViewRect () const
 

Static Public Member Functions

static void initialize ()
 
static void addToMovieQueue (CBagMovieObject *)
 
static void removeFromMovieQueue (CBagMovieObject *)
 
static bool isMovieWaiting ()
 
static bool isMoviePlaying ()
 
static void runWaitingMovie ()
 
- Static Public Member Functions inherited from Bagel::CBagParseObject
static void initialize ()
 
- Static Public Member Functions inherited from Bagel::CBofObject
static bool isValidObject (const CBofObject *pObject)
 
- Static Public Member Functions inherited from Bagel::CBofError
static void fatalError (ErrorCode errCode, const char *format,...)
 
static void initialize ()
 
static int getErrorCount ()
 
- Static Public Member Functions inherited from Bagel::CBagStorageDev
static void initialize ()
 
static void shutdown ()
 
static CBofPointgetLastCursorLocation ()
 
static void setDirtyAllObjects (bool b)
 
static bool getDirtyAllObjects ()
 
static void setPreFiltered (bool b=true)
 
static bool getPreFiltered ()
 
static bool preFilterPan ()
 
static void setPreFilterPan (bool b=true)
 
- Static Public Member Functions inherited from Bagel::SBBasePda
static void initialize ()
 
static void setPdaMode (PdaMode pdaMode)
 
static PdaMode getPdaMode ()
 
static void * pdaButtonHandler (int refId, void *info)
 

Protected Attributes

int _activeHeight
 
int _deactiveHeight
 
- Protected Attributes inherited from Bagel::CBagStorageDevBmp
int _nMaskColor
 
CBofPoint _xCursorLocation
 
CBofRect _cSrcRect
 
bool _bTrans
 
CBofBitmap_pWorkBmp
 
- Protected Attributes inherited from Bagel::CBagObject
uint16 _xObjType = AREA_OBJ
 
byte _bInteractive = 0
 
- Protected Attributes inherited from Bagel::CBofError
ErrorCode _errCode
 
- Protected Attributes inherited from Bagel::CBagStorageDev
uint16 _xSDevType
 
FilterFunction _pBitmapFilter
 
bool _bForeignList: true
 
bool _bCloseOnOpen: true
 
bool _bCloseup: true
 
bool _bCIC: true
 
bool _bCustom: true
 
bool _bFirstPaint: true
 
int _nFloatPages
 
- Protected Attributes inherited from Bagel::SBBasePda
int _numMoves
 
int _activating
 
bool _activated
 
int _moveDist
 
CBagStorageDevBmp_mooWnd
 
CBagStorageDevBmp_invWnd
 
CBagStorageDevBmp_mapWnd
 
CBagStorageDevBmp_logWnd
 
CBagStorageDevBmp_curDisplay
 
CBofWindow_parent
 
bool _zoomedFl
 
bool _deactivateFl
 
CBagStorageDevBmp_holdDisplay
 

Static Protected Attributes

static bool _flashingFl
 
static bool _soundsPausedFl
 
static CBofList< CBagMovieObject * > * _movieList
 
- Static Protected Attributes inherited from Bagel::CBofError
static int _count
 
- Static Protected Attributes inherited from Bagel::CBagStorageDev
static CBofPoint_xCursorLocation
 
static CBofRectgRepaintRect
 
static bool _bHandledUpEvent
 
static bool _hidePdaFl
 
static bool _bPanPreFiltered
 
static bool _bDirtyAllObjects
 
static bool _bPreFilter
 
- Static Protected Attributes inherited from Bagel::SBBasePda
static PdaMode _pdaMode
 
static PdaPos _pdaPos
 
static PdaMode _holdMode
 

Additional Inherited Members

- Public Types inherited from Bagel::CBagParseObject
enum  KEYWORDS {
  UNKNOWN = 0, STORAGEDEV, START_WLD, VARIABLE,
  REMARK, DISKID, CURSOR, SHAREDPAL,
  DISKAUDIO, PDASTATE, SYSSCREEN, WIELDCURSOR
}
 
- Public Types inherited from Bagel::CBagStorageDev
enum  MouseActivity { kMouseNONE = 0x0000, kMouseDRAGGING = 0x0001 }
 
- Protected Member Functions inherited from Bagel::CBagBmpObject
void setBitmap (CBofBitmap *bmp)
 
- Protected Member Functions inherited from Bagel::CBagObject
bool isProperty (BAG_OBJECT_PROPERTIES xProp)
 
void setProperty (BAG_OBJECT_PROPERTIES xProp, bool bVal)
 
- Protected Member Functions inherited from Bagel::CBofError
virtual void bofMessageBox (const Common::String &content, const Common::String &title)
 

Constructor & Destructor Documentation

◆ CBagPDA()

Bagel::CBagPDA::CBagPDA ( CBofWindow pParent = nullptr,
const CBofRect xRect = CBofRect(),
bool  bActivated = false 
)

Constructor

Parameters
pParentPointer to the parent window
xRectRect of the pda
bActivatedState of PDA whe constructed (optional)

◆ ~CBagPDA()

virtual Bagel::CBagPDA::~CBagPDA ( )
virtual

Destructor

Member Function Documentation

◆ setPosInWindow()

void Bagel::CBagPDA::setPosInWindow ( int  cx,
int  cy,
int  nDist = 13 
)

Positions the PDA centered vertically and window

Parameters
cxx position
cyy position
nDistDistance to bring move PDA

◆ update()

ErrorCode Bagel::CBagPDA::update ( CBofBitmap pBmp,
CBofPoint  pt,
CBofRect pSrcRect = nullptr,
int  nMaskColor = -1 
)
overridevirtual

Update the PDA to the screen and then call CBagStorageDevBmp update

Parameters
pBmpBackground bitmap to paint to
ptOffset into bitmap
pSrcRectClip rect of the object to be painted
nMaskColorMask color for the object

Reimplemented from Bagel::CBagBmpObject.

◆ paintFGObjects()

bool Bagel::CBagPDA::paintFGObjects ( CBofBitmap pBmp)
overridevirtual

Called to overload specific types of sprite objects

Parameters
pBmpBitmap
Returns
Success/failure

Reimplemented from Bagel::CBagStorageDevBmp.

◆ onNewButtonObject()

CBagObject* Bagel::CBagPDA::onNewButtonObject ( const CBofString sInit)
overridevirtual

Called to overload specific types of sprite objects

Parameters
sInitInit
Returns
Pointer to the new object

Reimplemented from Bagel::CBagStorageDev.

◆ onLButtonUp()

void Bagel::CBagPDA::onLButtonUp ( uint32  nFlags,
CBofPoint xPoint,
void *  info = nullptr 
)
overridevirtual

Called on the mouse left button down Is the PDA is deactivated mouse down activates the PDA else it calls CBagStorageDevBmp::onLButtonDown

Parameters
nFlagsFlags
xPointX, Y position
infoOptional info

Reimplemented from Bagel::CBagStorageDev.

◆ onLButtonDown()

void Bagel::CBagPDA::onLButtonDown ( uint32  nFlags,
CBofPoint xPoint,
void *  info = nullptr 
)
overridevirtual

Called on the mouse left button down

Parameters
nFlagsFlags
xPointX, Y position
infoOptional info

Reimplemented from Bagel::CBagStorageDev.

◆ addToMovieQueue()

static void Bagel::CBagPDA::addToMovieQueue ( CBagMovieObject )
static

Allow the movie code to queue up asynch pda messages Must be before the destructor

◆ removeFromMovieQueue()

static void Bagel::CBagPDA::removeFromMovieQueue ( CBagMovieObject )
static

Just remove this message from the queue, remember that we don't own this object, so just remove it, don't delete it!!!!

◆ isMovieWaiting()

static bool Bagel::CBagPDA::isMovieWaiting ( )
static

Return true if a movie is waiting to play.

◆ showInventory()

bool Bagel::CBagPDA::showInventory ( )
overridevirtual

SHow the inventory

Reimplemented from Bagel::SBBasePda.

◆ hideInventory()

bool Bagel::CBagPDA::hideInventory ( )
overridevirtual

Hide the inventory

Reimplemented from Bagel::SBBasePda.

◆ hideCurDisplay()

bool Bagel::CBagPDA::hideCurDisplay ( )
overridevirtual

Hide the current display

Reimplemented from Bagel::SBBasePda.

◆ restoreCurDisplay()

bool Bagel::CBagPDA::restoreCurDisplay ( )
overridevirtual

Restore display

Reimplemented from Bagel::SBBasePda.

◆ handleZoomButton()

void Bagel::CBagPDA::handleZoomButton ( bool  bButtonDown)

Handle switching back and forth from our flashing zoom button


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