ScummVM API documentation
MM::Xeen::Window Class Reference
Inheritance diagram for MM::Xeen::Window:
MM::Xeen::FontSurface MM::Shared::Xeen::XSurface MM::Xeen::FontData MM::Shared::Xeen::BaseSurface Graphics::ManagedSurface

Public Member Functions

 Window (const Window &src)
 
 Window (const Common::Rect &bounds, int a, int border, int xLo, int ycL, int xHi, int ycH)
 
void addDirtyRect (const Common::Rect &r) override
 
void setBounds (const Common::Rect &r)
 
const Common::RectgetBounds ()
 
void open ()
 
void close ()
 
void update ()
 
void frame ()
 
void fill ()
 
void drawList (DrawStruct *items, int count)
 
int getString (Common::String &line, uint maxLen, int maxWidth)
 
const char * writeString (const Common::String &s, const Common::Rect &clipRect)
 
const char * writeString (const Common::String &s)
 
void writeCharacter (char c)
 
- Public Member Functions inherited from MM::Xeen::FontSurface
 FontSurface (int wv, int hv)
 
void writeSymbol (int symbolId)
 
const char * writeString (const Common::String &s, const Common::Rect &clipRect)
 
bool isSpace (char c)
 
void writeCharacter (char c, const Common::Rect &clipRect)
 
- Public Member Functions inherited from MM::Shared::Xeen::XSurface
 XSurface (int width, int height)
 
- Public Member Functions inherited from MM::Shared::Xeen::BaseSurface
 BaseSurface (int width, int height)
 
- Public Member Functions inherited from Graphics::ManagedSurface
bool clip (Common::Rect &srcBounds, Common::Rect &destBounds) const
 
 ManagedSurface ()
 
 ManagedSurface (const ManagedSurface &surf)
 
 ManagedSurface (int width, int height)
 
 ManagedSurface (int width, int height, const Graphics::PixelFormat &pixelFormat)
 
 ManagedSurface (ManagedSurface &surf, const Common::Rect &bounds)
 
 ManagedSurface (Surface *surf, DisposeAfterUse::Flag disposeAfterUse=DisposeAfterUse::YES)
 
 ManagedSurface (const Surface *surf)
 
virtual ~ManagedSurface ()
 
 operator const Surface & () const
 
const SurfacerawSurface () const
 
SurfacesurfacePtr ()
 
ManagedSurfaceoperator= (const ManagedSurface &surf)
 
bool empty () const
 
DisposeAfterUse::Flag disposeAfterUse () const
 
uint32 getPixel (int x, int y) const
 
void setPixel (int x, int y, uint32 pixel)
 
const void * getBasePtr (int x, int y) const
 
void * getBasePtr (int x, int y)
 
void * getPixels ()
 
const void * getPixels () const
 
virtual void setPixels (void *newPixels)
 
virtual void create (int16 width, int16 height)
 
virtual void create (int16 width, int16 height, const PixelFormat &pixelFormat)
 
virtual void create (ManagedSurface &surf, const Common::Rect &bounds)
 
virtual void free ()
 
virtual void clearDirtyRects ()
 
const Common::Point getOffsetFromOwner () const
 
const Common::Rect getBounds () const
 
void blitFrom (const Surface &src, const Palette *srcPalette=nullptr)
 
void blitFrom (const Surface &src, const Common::Point &destPos, const Palette *srcPalette=nullptr)
 
void blitFrom (const Surface &src, const Common::Rect &srcRect, const Common::Point &destPos, const Palette *srcPalette=nullptr)
 
void blitFrom (const Surface &src, const Common::Rect &srcRect, const Common::Rect &destRect, const Palette *srcPalette=nullptr)
 
void blitFrom (const ManagedSurface &src, const Common::Rect &srcRect, const Common::Rect &destRect)
 
void blitFrom (const ManagedSurface &src)
 
void blitFrom (const ManagedSurface &src, const Common::Point &destPos)
 
void blitFrom (const ManagedSurface &src, const Common::Rect &srcRect, const Common::Point &destPos)
 
void transBlitFrom (const Surface &src, uint32 transColor=0, bool flipped=false, uint32 overrideColor=0, uint32 srcAlpha=0xff, const Palette *srcPalette=nullptr)
 
void transBlitFrom (const Surface &src, const Common::Point &destPos, uint32 transColor=0, bool flipped=false, uint32 overrideColor=0, uint32 srcAlpha=0xff, const Palette *srcPalette=nullptr)
 
void transBlitFrom (const Surface &src, const Common::Point &destPos, const ManagedSurface &mask, const Palette *srcPalette=nullptr)
 
void transBlitFrom (const Surface &src, const Common::Point &destPos, const Surface &mask, const Palette *srcPalette=nullptr)
 
void transBlitFrom (const Surface &src, const Common::Rect &srcRect, const Common::Point &destPos, uint32 transColor=0, bool flipped=false, uint32 overrideColor=0, uint32 srcAlpha=0xff, const Palette *srcPalette=nullptr)
 
void transBlitFrom (const Surface &src, const Common::Rect &srcRect, const Common::Rect &destRect, const Palette *srcPalette)
 
void transBlitFrom (const Surface &src, const Common::Rect &srcRect, const Common::Rect &destRect, uint32 transColor=0, bool flipped=false, uint32 overrideColor=0, uint32 srcAlpha=0xff, const Surface *mask=nullptr, bool maskOnly=false, const Palette *srcPalette=nullptr)
 
void transBlitFrom (const ManagedSurface &src, uint32 transColor=0, bool flipped=false, uint32 overrideColor=0, uint32 srcAlpha=0xff)
 
void transBlitFrom (const ManagedSurface &src, const Common::Point &destPos, uint32 transColor=0, bool flipped=false, uint32 overrideColor=0, uint32 srcAlpha=0xff)
 
void transBlitFrom (const ManagedSurface &src, const Common::Point &destPos, const ManagedSurface &mask)
 
void transBlitFrom (const ManagedSurface &src, const Common::Rect &srcRect, const Common::Point &destPos, uint32 transColor=0, bool flipped=false, uint32 overrideColor=0, uint32 srcAlpha=0xff)
 
void transBlitFrom (const ManagedSurface &src, const Common::Rect &srcRect, const Common::Rect &destRect, uint32 transColor=0, bool flipped=false, uint32 overrideColor=0, uint32 srcAlpha=0xff, const Surface *mask=nullptr, bool maskOnly=false)
 
void rawBlitFrom (const ManagedSurface &src, const Common::Rect &srcRect, const Common::Point &destPos)
 
Common::Rect blendBlitTo (ManagedSurface &target, const int posX=0, const int posY=0, const int flipping=FLIP_NONE, const Common::Rect *srcRect=nullptr, const uint colorMod=(uint32)(((255)<< 24)|((255)<< 16)|((255)<< 8)|(255)), const int width=-1, const int height=-1, const TSpriteBlendMode blend=BLEND_NORMAL, const AlphaType alphaType=ALPHA_FULL)
 Renders this surface onto target. More...
 
Common::Rect blendBlitTo (Surface &target, const int posX=0, const int posY=0, const int flipping=FLIP_NONE, const Common::Rect *srcRect=nullptr, const uint colorMod=(uint32)(((255)<< 24)|((255)<< 16)|((255)<< 8)|(255)), const int width=-1, const int height=-1, const TSpriteBlendMode blend=BLEND_NORMAL, const AlphaType alphaType=ALPHA_FULL)
 
void clear (uint32 color=0)
 
void markAllDirty ()
 
void copyRectToSurface (const void *buffer, int srcPitch, int destX, int destY, int width, int height)
 
void copyRectToSurface (const Graphics::Surface &srcSurface, int destX, int destY, const Common::Rect subRect)
 
void copyRectToSurfaceWithKey (const void *buffer, int srcPitch, int destX, int destY, int width, int height, uint32 key)
 
void copyRectToSurfaceWithKey (const Graphics::Surface &srcSurface, int destX, int destY, const Common::Rect subRect, uint32 key)
 
void copyFrom (const ManagedSurface &surf)
 
void copyFrom (const Surface &surf)
 
void drawLine (int x0, int y0, int x1, int y1, uint32 color)
 
void drawThickLine (int x0, int y0, int x1, int y1, int penX, int penY, uint32 color)
 
void hLine (int x, int y, int x2, uint32 color)
 
void vLine (int x, int y, int y2, uint32 color)
 
void fillRect (Common::Rect r, uint32 color)
 
void frameRect (const Common::Rect &r, uint32 color)
 
Surface getSubArea (const Common::Rect &area)
 
void convertToInPlace (const PixelFormat &dstFormat)
 
void convertToInPlace (const PixelFormat &dstFormat, const byte *palette, uint16 paletteCount)
 
uint getTransparentColor () const
 
void setTransparentColor (uint32 color)
 
void clearTransparentColor ()
 
bool hasTransparentColor () const
 
void clearPalette ()
 
bool hasPalette () const
 
void grabPalette (byte *colors, uint start, uint num) const
 
void setPalette (const byte *colors, uint start, uint num)
 

Public Attributes

bool _enabled
 
- Public Attributes inherited from MM::Xeen::FontSurface
Common::Point_writePos
 
- Public Attributes inherited from Graphics::ManagedSurface
int16 & w
 
int16 & h
 
int32 & pitch
 
PixelFormatformat
 

Additional Inherited Members

- Static Public Member Functions inherited from Graphics::ManagedSurface
static bool isBlendBlitPixelFormatSupported (const PixelFormat &src, const PixelFormat &dst)
 
- Static Public Attributes inherited from MM::Xeen::FontData
static const byte * _fontData
 
static Common::Point_fontWritePos
 
static byte _textColors [4]
 
static byte _bgColor
 
static bool _fontReduced
 
static Justify _fontJustify
 
- Protected Member Functions inherited from Graphics::ManagedSurface
void blitFromInner (const Surface &src, const Common::Rect &srcRect, const Common::Rect &destRect, const Palette *srcPalette)
 
void transBlitFromInner (const Surface &src, const Common::Rect &srcRect, const Common::Rect &destRect, uint32 transColor, bool flipped, uint32 overrideColor, uint32 srcAlpha, const Palette *srcPalette, const Palette *dstPalette, const Surface *mask, bool maskOnly)
 

Member Function Documentation

◆ addDirtyRect()

void MM::Xeen::Window::addDirtyRect ( const Common::Rect r)
overridevirtual

Base method that descendant classes can override for recording the affected dirty areas of the surface.

Reimplemented from MM::Shared::Xeen::BaseSurface.

◆ update()

void MM::Xeen::Window::update ( )

Update the window

◆ fill()

void MM::Xeen::Window::fill ( )

Fill the content area of a window with the current background color

◆ writeString() [1/2]

const char* MM::Xeen::Window::writeString ( const Common::String s,
const Common::Rect clipRect 
)
inline

Write a string to the window

Parameters
sString to display
clipRectWindow bounds to display string within
Returns
Any string remainder that couldn't be displayed
Remarks
Note that bounds is just used for wrapping purposes. Unless justification is set, the message will be written at _writePos

◆ writeString() [2/2]

const char* MM::Xeen::Window::writeString ( const Common::String s)
inline

Write a string to the window

Parameters
sString to display
Returns
Any string remainder that couldn't be displayed
Remarks
Note that bounds is just used for wrapping purposes. Unless justification is set, the message will be written at _writePos

◆ writeCharacter()

void MM::Xeen::Window::writeCharacter ( char  c)
inline

Write a charcter to the window

Parameters
cCharacter

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