OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
MWGui::ToolTips Class Reference

#include <tooltips.hpp>

Inheritance diagram for MWGui::ToolTips:
Collaboration diagram for MWGui::ToolTips:

Public Member Functions

 ToolTips ()
 
void onFrame (float frameDuration)
 
void setEnabled (bool enabled)
 
bool toggleFullHelp ()
 show extra info in item tooltips (owner, script) More...
 
bool getFullHelp () const
 
void setDelay (float delay)
 
void setFocusObject (const MWWorld::ConstPtr &focus)
 
void setFocusObjectScreenCoords (float min_x, float min_y, float max_x, float max_y)
 set the screen-space position of the tooltip for focused object More...
 
bool checkOwned ()
 
- Public Member Functions inherited from MWGui::Layout
 Layout (const std::string &_layout, MyGUI::Widget *_parent=nullptr)
 
virtual ~Layout ()
 
MyGUI::Widget * getWidget (const std::string &_name)
 
template<typename T >
void getWidget (T *&_widget, const std::string &_name)
 
void setCoord (int x, int y, int w, int h)
 
virtual void setVisible (bool b)
 
void setText (const std::string &name, const std::string &caption)
 
void setTitle (const std::string &title)
 

Static Public Member Functions

static std::string getWeightString (const float weight, const std::string &prefix)
 
static std::string getValueString (const int value, const std::string &prefix)
 
static std::string getMiscString (const std::string &text, const std::string &prefix)
 
static std::string toString (const float value)
 
static std::string toString (const int value)
 
static std::string getCountString (const int value)
 
static std::string getCellRefString (const MWWorld::CellRef &cellref)
 Returns a string containing debug tooltip information about the given cellref. More...
 
static void createSkillToolTip (MyGUI::Widget *widget, int skillId)
 
static void createAttributeToolTip (MyGUI::Widget *widget, int attributeId)
 
static void createSpecializationToolTip (MyGUI::Widget *widget, const std::string &name, int specId)
 
static void createBirthsignToolTip (MyGUI::Widget *widget, const std::string &birthsignId)
 
static void createRaceToolTip (MyGUI::Widget *widget, const ESM::Race *playerRace)
 
static void createClassToolTip (MyGUI::Widget *widget, const ESM::Class &playerClass)
 
static void createMagicEffectToolTip (MyGUI::Widget *widget, short id)
 

Private Member Functions

MyGUI::IntSize getToolTipViaPtr (int count, bool image=true)
 
MyGUI::IntSize createToolTip (const ToolTipInfo &info, bool isFocusObject)
 
void position (MyGUI::IntPoint &position, MyGUI::IntSize size, MyGUI::IntSize viewportSize)
 Adjust position for a tooltip so that it doesn't leave the screen and does not obscure the mouse cursor. More...
 

Private Attributes

MyGUI::Widget * mDynamicToolTipBox
 Returns True if taking mFocusObject would be crime. More...
 
MWWorld::ConstPtr mFocusObject
 
float mFocusToolTipX
 
float mFocusToolTipY
 
int mHorizontalScrollIndex
 
float mDelay
 
float mRemainingDelay
 
int mLastMouseX
 
int mLastMouseY
 
bool mEnabled
 
bool mFullHelp
 
int mShowOwned
 

Static Private Attributes

static std::string sSchoolNames [6] = {"#{sSchoolAlteration}", "#{sSchoolConjuration}", "#{sSchoolDestruction}", "#{sSchoolIllusion}", "#{sSchoolMysticism}", "#{sSchoolRestoration}"}
 

Additional Inherited Members

- Public Attributes inherited from MWGui::Layout
MyGUI::Widget * mMainWidget
 
- Protected Attributes inherited from MWGui::Layout
std::string mPrefix
 
std::string mLayoutName
 
MyGUI::VectorWidgetPtr mListWindowRoot
 

Constructor & Destructor Documentation

MWGui::ToolTips::ToolTips ( )

Here is the call graph for this function:

Member Function Documentation

bool MWGui::ToolTips::checkOwned ( )

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::ToolTips::createAttributeToolTip ( MyGUI::Widget *  widget,
int  attributeId 
)
static

Here is the caller graph for this function:

void MWGui::ToolTips::createBirthsignToolTip ( MyGUI::Widget *  widget,
const std::string &  birthsignId 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::ToolTips::createClassToolTip ( MyGUI::Widget *  widget,
const ESM::Class playerClass 
)
static

Here is the caller graph for this function:

void MWGui::ToolTips::createMagicEffectToolTip ( MyGUI::Widget *  widget,
short  id 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::ToolTips::createRaceToolTip ( MyGUI::Widget *  widget,
const ESM::Race playerRace 
)
static

Here is the caller graph for this function:

void MWGui::ToolTips::createSkillToolTip ( MyGUI::Widget *  widget,
int  skillId 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::ToolTips::createSpecializationToolTip ( MyGUI::Widget *  widget,
const std::string &  name,
int  specId 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

MyGUI::IntSize MWGui::ToolTips::createToolTip ( const ToolTipInfo info,
bool  isFocusObject 
)
private
Returns
requested tooltip size
Parameters
isFocusObjectIs the object this tooltips originates from mFocusObject?

Here is the call graph for this function:

Here is the caller graph for this function:

std::string MWGui::ToolTips::getCellRefString ( const MWWorld::CellRef cellref)
static

Returns a string containing debug tooltip information about the given cellref.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string MWGui::ToolTips::getCountString ( const int  value)
static
Returns
blank string if count is 1, or else " (value)"

Here is the call graph for this function:

Here is the caller graph for this function:

bool MWGui::ToolTips::getFullHelp ( ) const

Here is the caller graph for this function:

std::string MWGui::ToolTips::getMiscString ( const std::string &  text,
const std::string &  prefix 
)
static
Returns
"prefix: text" or "" if text is empty

Here is the caller graph for this function:

MyGUI::IntSize MWGui::ToolTips::getToolTipViaPtr ( int  count,
bool  image = true 
)
private
Returns
requested tooltip size

Here is the call graph for this function:

Here is the caller graph for this function:

std::string MWGui::ToolTips::getValueString ( const int  value,
const std::string &  prefix 
)
static
Returns
"prefix: value" or "" if value is 0

Here is the call graph for this function:

Here is the caller graph for this function:

std::string MWGui::ToolTips::getWeightString ( const float  weight,
const std::string &  prefix 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::ToolTips::onFrame ( float  frameDuration)

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::ToolTips::position ( MyGUI::IntPoint &  position,
MyGUI::IntSize  size,
MyGUI::IntSize  viewportSize 
)
private

Adjust position for a tooltip so that it doesn't leave the screen and does not obscure the mouse cursor.

Here is the caller graph for this function:

void MWGui::ToolTips::setDelay ( float  delay)

Here is the caller graph for this function:

void MWGui::ToolTips::setEnabled ( bool  enabled)

Here is the caller graph for this function:

void MWGui::ToolTips::setFocusObject ( const MWWorld::ConstPtr focus)

Here is the caller graph for this function:

void MWGui::ToolTips::setFocusObjectScreenCoords ( float  min_x,
float  min_y,
float  max_x,
float  max_y 
)

set the screen-space position of the tooltip for focused object

Here is the caller graph for this function:

bool MWGui::ToolTips::toggleFullHelp ( )

show extra info in item tooltips (owner, script)

Here is the caller graph for this function:

std::string MWGui::ToolTips::toString ( const float  value)
static

Here is the caller graph for this function:

std::string MWGui::ToolTips::toString ( const int  value)
static

Member Data Documentation

float MWGui::ToolTips::mDelay
private
MyGUI::Widget* MWGui::ToolTips::mDynamicToolTipBox
private

Returns True if taking mFocusObject would be crime.

bool MWGui::ToolTips::mEnabled
private
MWWorld::ConstPtr MWGui::ToolTips::mFocusObject
private
float MWGui::ToolTips::mFocusToolTipX
private
float MWGui::ToolTips::mFocusToolTipY
private
bool MWGui::ToolTips::mFullHelp
private
int MWGui::ToolTips::mHorizontalScrollIndex
private
int MWGui::ToolTips::mLastMouseX
private
int MWGui::ToolTips::mLastMouseY
private
float MWGui::ToolTips::mRemainingDelay
private
int MWGui::ToolTips::mShowOwned
private
std::string MWGui::ToolTips::sSchoolNames = {"#{sSchoolAlteration}", "#{sSchoolConjuration}", "#{sSchoolDestruction}", "#{sSchoolIllusion}", "#{sSchoolMysticism}", "#{sSchoolRestoration}"}
staticprivate

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