ScummVM API documentation
Sherlock::Tattoo::WidgetBase Class Reference
Inheritance diagram for Sherlock::Tattoo::WidgetBase:
Sherlock::Tattoo::WidgetFiles Sherlock::Tattoo::WidgetFoolscap Sherlock::Tattoo::WidgetInventory Sherlock::Tattoo::WidgetInventoryVerbs Sherlock::Tattoo::WidgetLab Sherlock::Tattoo::WidgetMessage Sherlock::Tattoo::WidgetOptions Sherlock::Tattoo::WidgetPassword Sherlock::Tattoo::WidgetQuit Sherlock::Tattoo::WidgetTalk Sherlock::Tattoo::WidgetText Sherlock::Tattoo::WidgetTooltipBase Sherlock::Tattoo::WidgetVerbs

Public Member Functions

 WidgetBase (SherlockEngine *vm)
 
bool active () const
 
virtual void erase ()
 
virtual void draw ()
 
void checkTabbingKeys (int numOptions)
 
virtual void summonWindow ()
 
virtual void banishWindow ()
 
virtual void handleEvents ()
 

Protected Member Functions

Common::String splitLines (const Common::String &str, Common::StringArray &lines, int maxWidth, uint maxLines)
 
void restrictToScreen ()
 
void makeInfoArea (Surface &s)
 
void makeInfoArea ()
 
void drawDialogRect (const Common::Rect &r, bool raised=true)
 
virtual Common::Rect getScrollBarBounds () const
 
void drawScrollBar (int index, int pageSize, int count)
 
void handleScrollbarEvents (int index, int pageSize, int count)
 
void handleScrolling (int &scrollIndex, int pageSize, int max)
 
void close ()
 
virtual void drawBackground ()
 

Protected Attributes

SherlockEngine_vm
 
Common::Rect _bounds
 
Common::Rect _oldBounds
 
Surface _surface
 
bool _outsideMenu
 
bool _scroll
 

Member Function Documentation

◆ splitLines()

Common::String Sherlock::Tattoo::WidgetBase::splitLines ( const Common::String str,
Common::StringArray lines,
int  maxWidth,
uint  maxLines 
)
protected

Used by descendent classes to split up long text for display across multiple lines

◆ restrictToScreen()

void Sherlock::Tattoo::WidgetBase::restrictToScreen ( )
protected

Ensure that menu is drawn entirely on-screen

◆ makeInfoArea() [1/2]

void Sherlock::Tattoo::WidgetBase::makeInfoArea ( Surface s)
protected

Draw a window frame around the dges of the passed surface

◆ makeInfoArea() [2/2]

void Sherlock::Tattoo::WidgetBase::makeInfoArea ( )
protected

Draw a window frame around the widget's surface

◆ drawDialogRect()

void Sherlock::Tattoo::WidgetBase::drawDialogRect ( const Common::Rect r,
bool  raised = true 
)
protected

Draw a dialog rectangle

◆ getScrollBarBounds()

virtual Common::Rect Sherlock::Tattoo::WidgetBase::getScrollBarBounds ( ) const
protectedvirtual

Return the area of a widget that the scrollbar will be drawn in

◆ drawScrollBar()

void Sherlock::Tattoo::WidgetBase::drawScrollBar ( int  index,
int  pageSize,
int  count 
)
protected

Draw the scrollbar for the dialog

◆ handleScrollbarEvents()

void Sherlock::Tattoo::WidgetBase::handleScrollbarEvents ( int  index,
int  pageSize,
int  count 
)
protected

Handles any events when the mouse is on the scrollbar

◆ handleScrolling()

void Sherlock::Tattoo::WidgetBase::handleScrolling ( int &  scrollIndex,
int  pageSize,
int  max 
)
protected

Handle adjusting a passed scrolling index as necessary

◆ close()

void Sherlock::Tattoo::WidgetBase::close ( )
protected

Close the dialog

◆ drawBackground()

virtual void Sherlock::Tattoo::WidgetBase::drawBackground ( )
protectedvirtual

Handle drawing the background on the area the widget is going to cover

Reimplemented in Sherlock::Tattoo::WidgetInventoryTooltip.

◆ active()

bool Sherlock::Tattoo::WidgetBase::active ( ) const

Returns true if the given widget is active in the user interface's widget list

◆ erase()

virtual void Sherlock::Tattoo::WidgetBase::erase ( )
virtual

Erase any previous display of the widget on the screen

Reimplemented in Sherlock::Tattoo::WidgetInventory, and Sherlock::Tattoo::WidgetTooltipBase.

◆ draw()

virtual void Sherlock::Tattoo::WidgetBase::draw ( )
virtual

Update the display of the widget on the screen

Reimplemented in Sherlock::Tattoo::WidgetInventory, and Sherlock::Tattoo::WidgetTooltipBase.

◆ checkTabbingKeys()

void Sherlock::Tattoo::WidgetBase::checkTabbingKeys ( int  numOptions)

Used by some descendents to check for keys to mouse the mouse within the dialog

◆ summonWindow()

virtual void Sherlock::Tattoo::WidgetBase::summonWindow ( )
virtual

Summon the window

Reimplemented in Sherlock::Tattoo::WidgetLab.

◆ banishWindow()

virtual void Sherlock::Tattoo::WidgetBase::banishWindow ( )
virtual

Close a currently active menu

Reimplemented in Sherlock::Tattoo::WidgetInventory.

◆ handleEvents()


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