int32_t Exception::getLineNumber(size_t depth) const throw() { const Entry *entry = getEntryAt(depth); if (entry == NULL) { return -1; } return entry->lineNumber_; }
int32_t Exception::getErrorCode(size_t depth) const throw() { const Entry *entry = getEntryAt(depth); if (entry == NULL) { return 0; } return entry->namedErrorCode_.getCode(); }
Exception::DuplicatedLiteralFlags Exception::inheritLiteralFlags( DuplicatedLiteralFlags baseFlags, size_t depth) const throw() { if (depth <= maxDepth_) { return (getEntryAt(depth)->literalFlags_ & baseFlags); } else { return LITERAL_NORMAL; } }
Exception::NamedErrorCode Exception::getNamedErrorCode( size_t depth) const throw() { const Entry *entry = getEntryAt(depth); if (entry == NULL) { return NamedErrorCode(); } return entry->namedErrorCode_; }
void Exception::formatFileName(std::ostream &stream, size_t depth) const { LocaleUtils::CLocaleScope localeScope(stream); const Entry *entry = getEntryAt(depth); if (entry == NULL || entry->fileName_ == NULL) { return; } stream << entry->fileName_; }
void Exception::formatErrorCodeName(std::ostream &stream, size_t depth) const { LocaleUtils::CLocaleScope localeScope(stream); const Entry *entry = getEntryAt(depth); if (entry == NULL || entry->namedErrorCode_.getName() == NULL) { return; } stream << entry->namedErrorCode_.getName(); }
void OSToolBarWnd::localMouseMove(int x, int y) { OSToolBarEntry *old = m_hilite; OSToolBarEntry *at = getEntryAt(x, y); if (!at) { if (m_hilite) { onLeaveIcon(m_hilite); m_hilite = NULL; } } else { if (at != m_hilite) { if (m_hilite) onLeaveIcon(m_hilite); m_hilite = at; onEnterIcon(m_hilite); } else { // repaint current in case its animated -BU invalidateIcon(m_hilite); } } if (!old && m_hilite) beginCapture(); else if (old && !m_hilite) endCapture(); }
int OSToolBarWnd::onLeftButtonUp(int x, int y) { OSTOOLBARWND_PARENT::onLeftButtonUp(x, y); if (m_hilite) { OSToolBarEntry *at = getEntryAt(x, y); if (m_hilite == at) { endCapture(); // in case event loads up a dialog ... if (!at->isDisabled()) { onClickIcon(at); at->onClicked(); onLeaveIcon(at); // (for parity sake) beginCapture(); // ... we need to leave and restore icon states ... StdWnd::getMousePos(&x, &y); screenToClient(&x, &y); localMouseMove(x, y); // ... according to new mouse pos } } } m_down = 0; m_last_pushed = -1; return 1; }
int OSToolBarWnd::hitTest(int x, int y) { OSTOOLBARWND_PARENT::onMouseMove(x, y); return (getEntryAt(x, y) != NULL) ? HITTEST_NONE : HITTEST_DRAGANDDOCK; }
bool Exception::hasLineNumber(size_t depth) const throw() { return (depth <= maxDepth_ && getEntryAt(depth)->lineNumber_ > 0); }
bool Exception::hasFunctionName(size_t depth) const throw() { return (depth <= maxDepth_ && getEntryAt(depth)->functionName_ != NULL); }
bool Exception::hasStackTrace(size_t depth) const throw() { return (depth <= maxDepth_ && getEntryAt(depth)->stackTrace_ != NULL); }
bool Exception::hasMessage(size_t depth) const throw() { return (depth <= maxDepth_ && getEntryAt(depth)->message_ != NULL); }
bool Exception::hasErrorCodeName(size_t depth) const throw() { return (depth <= maxDepth_ && getEntryAt(depth)->namedErrorCode_.getName() != NULL); }
bool Exception::hasErrorCode(size_t depth) const throw() { return (depth <= maxDepth_ && !getEntryAt(depth)->namedErrorCode_.isEmpty()); }