Go to the documentation of this file.
49 cursorNode->valueAt<
Point>(
"hot-spot"));
59 m_cursors[name] = cursorId;
66 auto it = m_cursors.find(name);
67 if(it == m_cursors.end())
70 int cursorId = it->second;
72 m_cursorStack.push_back(cursorId);
78 if(m_cursorStack.empty())
81 if(name.empty() || m_cursors.find(name) == m_cursors.end())
82 m_cursorStack.pop_back();
84 int cursorId = m_cursors[name];
86 for(
uint i=0;i<m_cursorStack.size();++i) {
87 if(m_cursorStack[i] == cursorId)
91 m_cursorStack.erase(m_cursorStack.begin() + index);
96 if(!m_cursorStack.empty())
104 return !m_cursorStack.empty();
112 void Mouse::checkStackSize()
114 if(m_cursorStack.size() > 5) {
116 m_cursorStack.pop_front();
void popCursor(const std::string &name)
bool pushCursor(const std::string &name)
static OTMLDocumentPtr parse(const std::string &fileName)
Parse OTML from a file.
void error(const std::string &what)
void addCursor(const std::string &name, const std::string &file, const Point &hotSpot)
ResourceManager g_resources
std::string resolve_path(const std::string &filePath, std::string sourcePath)
Resolve a file path by combining sourcePath with filePath.
virtual const char * what() const
bool isPressed(Fw::MouseButton mouseButton)
void loadCursors(std::string filename)
OTMLNodePtr at(const std::string &childTag)
std::string guessFilePath(const std::string &filename, const std::string &type)