Esempio n. 1
0
int32_t Exception::getLineNumber(size_t depth) const throw() {
	const Entry *entry = getEntryAt(depth);
	if (entry == NULL) {
		return -1;
	}

	return entry->lineNumber_;
}
Esempio n. 2
0
int32_t Exception::getErrorCode(size_t depth) const throw() {
	const Entry *entry = getEntryAt(depth);
	if (entry == NULL) {
		return 0;
	}

	return entry->namedErrorCode_.getCode();
}
Esempio n. 3
0
Exception::DuplicatedLiteralFlags Exception::inheritLiteralFlags(
		DuplicatedLiteralFlags baseFlags, size_t depth) const throw() {
	if (depth <= maxDepth_) {
		return (getEntryAt(depth)->literalFlags_ & baseFlags);
	}
	else {
		return LITERAL_NORMAL;
	}
}
Esempio n. 4
0
Exception::NamedErrorCode Exception::getNamedErrorCode(
		size_t depth) const throw() {
	const Entry *entry = getEntryAt(depth);
	if (entry == NULL) {
		return NamedErrorCode();
	}

	return entry->namedErrorCode_;
}
Esempio n. 5
0
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_;
}
Esempio n. 6
0
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();
}
Esempio n. 7
0
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();
}
Esempio n. 8
0
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;
}
Esempio n. 9
0
int OSToolBarWnd::hitTest(int x, int y) {
  OSTOOLBARWND_PARENT::onMouseMove(x, y);
  return (getEntryAt(x, y) != NULL) ? HITTEST_NONE : HITTEST_DRAGANDDOCK;
}
Esempio n. 10
0
bool Exception::hasLineNumber(size_t depth) const throw() {
	return (depth <= maxDepth_ && getEntryAt(depth)->lineNumber_ > 0);
}
Esempio n. 11
0
bool Exception::hasFunctionName(size_t depth) const throw() {
	return (depth <= maxDepth_ && getEntryAt(depth)->functionName_ != NULL);
}
Esempio n. 12
0
bool Exception::hasStackTrace(size_t depth) const throw() {
	return (depth <= maxDepth_ && getEntryAt(depth)->stackTrace_ != NULL);
}
Esempio n. 13
0
bool Exception::hasMessage(size_t depth) const throw() {
	return (depth <= maxDepth_ && getEntryAt(depth)->message_ != NULL);
}
Esempio n. 14
0
bool Exception::hasErrorCodeName(size_t depth) const throw() {
	return (depth <= maxDepth_ &&
			getEntryAt(depth)->namedErrorCode_.getName() != NULL);
}
Esempio n. 15
0
bool Exception::hasErrorCode(size_t depth) const throw() {
	return (depth <= maxDepth_ &&
			!getEntryAt(depth)->namedErrorCode_.isEmpty());
}