• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ end_update函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中end_update函数的典型用法代码示例。如果您正苦于以下问题:C++ end_update函数的具体用法?C++ end_update怎么用?C++ end_update使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了end_update函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: begin_update

void debug_view_disasm::set_expression(const char *expression)
{
	begin_update();
	m_expression.set_string(expression);
	m_recompute = m_update_pending = true;
	end_update();
}
开发者ID:dinkc64,项目名称:mame,代码行数:7,代码来源:dvdisasm.c


示例2: begin_update

void CKJVPassageNavigator::setPassage(const TPhraseTag &tag)
{
	begin_update();

	TPhraseTag tagUpdated = tag;
	// If we are passed a tag that has a reference to a word of a colophon or superscription,
	//		remove the word selection so that we are referencing just the book or chapter itself:
	if ((tag.relIndex().chapter() == 0) || (tag.relIndex().word() == 0)) {
		tagUpdated = TPhraseTag(CRelIndex(tag.relIndex().book(), tag.relIndex().chapter(), tag.relIndex().verse(), 0), tag.count());
	}

	m_tagPassage = tagUpdated;

	ui.comboTestament->setCurrentIndex(ui.comboTestament->findData(0));
	m_nTestament = 0;
	ui.spinBook->setValue(tagUpdated.relIndex().book());
	m_nBook = tagUpdated.relIndex().book();
	ui.spinChapter->setValue(tagUpdated.relIndex().chapter());
	m_nChapter = tagUpdated.relIndex().chapter();
	ui.spinVerse->setValue(tagUpdated.relIndex().verse());
	m_nVerse = tagUpdated.relIndex().verse();
	ui.spinWord->setValue(tagUpdated.relIndex().word());
	m_nWord = tagUpdated.relIndex().word();
	CalcPassage();

	end_update();
}
开发者ID:dewhisna,项目名称:KingJamesPureBibleSearch,代码行数:27,代码来源:KJVPassageNavigator.cpp


示例3: assert

void CKJVPassageNavigator::startAbsoluteMode(TPhraseTag tagPassage)
{
	assert(!m_pBibleDatabase.isNull());

	begin_update();

	m_tagStartRef = TPhraseTag(CRelIndex(), 1);		// Unset (but one word) to indicate absolute mode

	ui.lblStartRef->hide();
	ui.editStartRef->hide();
	ui.chkboxReverse->setChecked(false);
	ui.chkboxReverse->hide();

	ui.lblTestament->show();
	ui.comboTestament->show();

	ui.lblBook->setText(tr("&Book:", "CKJVPassageNavigator"));
	ui.lblChapter->setText(tr("C&hapter:", "CKJVPassageNavigator"));
	ui.lblVerse->setText(tr("&Verse:", "CKJVPassageNavigator"));
	ui.lblWord->setText(tr("&Word:", "CKJVPassageNavigator"));

	ui.spinBook->setPrefix("");
	ui.spinChapter->setPrefix("");
	ui.spinVerse->setPrefix("");
	ui.spinWord->setPrefix("");

	ui.lblBookDirect->setVisible(true);
	ui.comboBookDirect->setVisible(true);
	ui.lblChapterDirect->setVisible(true);
	ui.comboChapterDirect->setVisible(true);
	ui.lblVerseDirect->setVisible(true);
	ui.comboVerseDirect->setVisible(true);
	ui.lblWordDirect->setVisible(true);
	ui.comboWordDirect->setVisible(true);
	ui.widgetPassageReference->setVisible(true);
	ui.lineDirectReference->setVisible(true);
	ui.linePassageReference->setVisible(true);
	ui.widgetPassageReference->clear();
	ui.widgetPassageReference->setFocus();

	if (tagPassage.relIndex().isSet()) {
		setPassage(tagPassage);
		// setPassage will already call CalcPassage
	} else {
		CalcPassage();
	}

	// If the caller told us to not highlight any words, we will have not done
	//		so above on the setPassage painting, but we'll set it to one word
	//		here so that as the user starts selecting things, his word will
	//		highlighted appear:
	if (m_tagPassage.count() == 0) m_tagPassage.count() = 1;

	emit modeChanged(false);

	end_update();
}
开发者ID:dewhisna,项目名称:KingJamesPureBibleSearch,代码行数:57,代码来源:KJVPassageNavigator.cpp


示例4: begin_update

void debug_view::set_visible_position(debug_view_xy pos)
{
	if (pos.x != m_topleft.x || pos.y != m_topleft.y)
	{
		begin_update();
		m_topleft = pos;
		m_update_pending = true;
		view_notify(VIEW_NOTIFY_VISIBLE_CHANGED);
		end_update();
	}
}
开发者ID:dezi,项目名称:mame-libretro-odroid,代码行数:11,代码来源:debugvw.c


示例5: sef_cb_init_restart

/*===========================================================================*
 *		            sef_cb_init_restart                              *
 *===========================================================================*/
static int sef_cb_init_restart(int type, sef_init_info_t *info)
{
/* Restart the reincarnation server. */
  int r;
  struct rproc *old_rs_rp, *new_rs_rp;

  assert(info->endpoint == RS_PROC_NR);

  /* Perform default state transfer first. */
  r = SEF_CB_INIT_RESTART_STATEFUL(type, info);
  if(r != OK) {
      printf("SEF_CB_INIT_RESTART_STATEFUL failed: %d\n", r);
      return r;
  }

  /* New RS takes over. */
  old_rs_rp = rproc_ptr[_ENDPOINT_P(RS_PROC_NR)];
  new_rs_rp = rproc_ptr[_ENDPOINT_P(info->old_endpoint)];
  if(rs_verbose)
      printf("RS: %s is the new RS after restart\n", srv_to_string(new_rs_rp));

  /* If an update was in progress, end it. */
  if(SRV_IS_UPDATING(old_rs_rp)) {
      end_update(ERESTART, RS_REPLY);
  }

  /* Update the service into the replica. */
  r = update_service(&old_rs_rp, &new_rs_rp, RS_DONTSWAP, 0);
  if(r != OK) {
      printf("update_service failed: %d\n", r);
      return r;
  }

  /* Initialize the new RS instance. */
  r = init_service(new_rs_rp, SEF_INIT_RESTART, 0);
  if(r != OK) {
      printf("init_service failed: %d\n", r);
      return r;
  }

  /* Reschedule a synchronous alarm for the next period. */
  if (OK != (r=sys_setalarm(RS_DELTA_T, 0)))
      panic("couldn't set alarm: %d", r);

  return OK;
}
开发者ID:Stichting-MINIX-Research-Foundation,项目名称:minix,代码行数:49,代码来源:main.c


示例6: begin_update

static bool begin_update(struct view *view)
{
    if (view->pipe)
        end_update(view);
    else {
        view->cmd = fmt_cmd;
        view->pipe = popen(view->cmd, "r");
    }

    if (!view->pipe)
        return false;

    view->offset = 0;
    view->line = 0;
    view->lines = 0;

    return TRUE;
}
开发者ID:lexuszhi1990,项目名称:hen,代码行数:18,代码来源:xxx.c


示例7: begin_update

static bool begin_update(struct view *view)
{
    if (view->pipe)
        end_update(view);
    else {
        view->cmd = fmt_cmd;
        view->pipe = popen(view->cmd, "r");
#ifdef yaomoon
fprintf(moon_log,"394: view->pipe= cmd\n");
#endif
    }

    if (!view->pipe)
        return false;

    view->offset = 0;
    view->line = 0;
    view->lines = 0;

    return TRUE;
}
开发者ID:yaomoon,项目名称:GT2440,代码行数:21,代码来源:xxx.c


示例8: if

void debug_view_watchpoints::view_click(const int button, const debug_view_xy& pos)
{
	bool const clickedTopRow = (m_topleft.y == pos.y);

	if (clickedTopRow)
	{
		if (pos.x < tableBreaks[0])
			m_sortType = (m_sortType == &cIndexAscending) ? &cIndexDescending : &cIndexAscending;
		else if (pos.x < tableBreaks[1])
			m_sortType = (m_sortType == &cEnabledAscending) ? &cEnabledDescending : &cEnabledAscending;
		else if (pos.x < tableBreaks[2])
			m_sortType = (m_sortType == &cCpuAscending) ? &cCpuDescending : &cCpuAscending;
		else if (pos.x < tableBreaks[3])
			m_sortType = (m_sortType == &cSpaceAscending) ? &cSpaceDescending : &cSpaceAscending;
		else if (pos.x < tableBreaks[4])
			m_sortType = (m_sortType == &cAddressAscending) ? &cAddressDescending : &cAddressAscending;
		else if (pos.x < tableBreaks[5])
			m_sortType = (m_sortType == &cTypeAscending) ? &cTypeDescending : &cTypeAscending;
		else if (pos.x < tableBreaks[6])
			m_sortType = (m_sortType == &cConditionAscending) ? &cConditionDescending : &cConditionAscending;
		else if (pos.x < tableBreaks[7])
			m_sortType = (m_sortType == &cActionAscending) ? &cActionDescending : &cActionAscending;
	}
	else
	{
		// Gather a sorted list of all the watchpoints for all the CPUs
		gather_watchpoints();

		int const wpIndex = pos.y - 1;
		if ((wpIndex >= m_buffer.size()) || (wpIndex < 0))
			return;

		// Enable / disable
		m_buffer[wpIndex]->setEnabled(!m_buffer[wpIndex]->enabled());
	}

	begin_update();
	m_update_pending = true;
	end_update();
}
开发者ID:goofwear,项目名称:mame,代码行数:40,代码来源:dvwpoints.cpp


示例9: if

void debug_view_breakpoints::view_click(const int button, const debug_view_xy& pos)
{
	bool clickedTopRow = (m_topleft.y == pos.y);

	if (clickedTopRow)
	{
		if (pos.x < tableBreaks[0])
			m_sortType = (m_sortType == &cIndexAscending) ? &cIndexDescending : &cIndexAscending;
		else if (pos.x < tableBreaks[1])
			m_sortType = (m_sortType == &cEnabledAscending) ? &cEnabledDescending : &cEnabledAscending;
		else if (pos.x < tableBreaks[2])
			m_sortType = (m_sortType == &cCpuAscending) ? &cCpuDescending : &cCpuAscending;
		else if (pos.x < tableBreaks[3])
			m_sortType = (m_sortType == &cAddressAscending) ? &cAddressDescending : &cAddressAscending;
		else if (pos.x < tableBreaks[4])
			m_sortType = (m_sortType == &cConditionAscending) ? &cConditionDescending : &cConditionAscending;
		else if (pos.x < tableBreaks[5])
			m_sortType = (m_sortType == &cActionAscending) ? &cActionDescending : &cActionAscending;
	}
	else
	{
		// Gather a sorted list of all the breakpoints for all the CPUs
		gather_breakpoints();

		int const bpIndex = pos.y - 1;
		if ((bpIndex >= m_buffer.count()) || (bpIndex < 0))
			return;

		// Enable / disable
		m_buffer[bpIndex]->setEnabled(!m_buffer[bpIndex]->enabled());

		machine().debug_view().update_all(DVT_DISASSEMBLY);
	}

	begin_update();
	m_update_pending = true;
	end_update();
}
开发者ID:MisterTea,项目名称:MAMEHub,代码行数:38,代码来源:dvbpoints.c


示例10: assert

void CKJVBrowser::initialize()
{
	// --------------------------------------------------------------

	ui.widgetPassageReference->initialize(m_pBibleDatabase);

	// --------------------------------------------------------------

	//	Swapout the widgetKJVPassageNavigator from the layout with
	//		one that we can set the database on:

	int ndx = ui.gridLayout->indexOf(ui.textBrowserMainText);
	assert(ndx != -1);
	if (ndx == -1) return;
	int nRow;
	int nCol;
	int nRowSpan;
	int nColSpan;
	ui.gridLayout->getItemPosition(ndx, &nRow, &nCol, &nRowSpan, &nColSpan);

	int ndxChapterScrollbar = ui.gridLayout->indexOf(ui.scrollbarChapter);
	assert(ndxChapterScrollbar != -1);
	if (ndxChapterScrollbar == -1) return;
	int nRowChapterScrollbar;
	int nColChapterScrollbar;
	int nRowSpanChapterScrollbar;
	int nColSpanChapterScrollbar;
	ui.gridLayout->getItemPosition(ndxChapterScrollbar, &nRowChapterScrollbar, &nColChapterScrollbar, &nRowSpanChapterScrollbar, &nColSpanChapterScrollbar);

	assert(nRow == nRowChapterScrollbar);
	assert(nColSpan == 1);
	assert(nColSpanChapterScrollbar == 1);

	m_pScriptureBrowser = new CScriptureBrowser(m_pBibleDatabase, this);
	m_pScriptureBrowser->setObjectName(QString::fromUtf8("textBrowserMainText"));
	m_pScriptureBrowser->setMouseTracking(true);
	en_changedScrollbarsEnabled(CPersistentSettings::instance()->scrollbarsEnabled());
	m_pScriptureBrowser->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
	m_pScriptureBrowser->setTabChangesFocus(false);
	m_pScriptureBrowser->setTextInteractionFlags(Qt::TextSelectableByKeyboard | Qt::TextSelectableByMouse | Qt::LinksAccessibleByMouse | Qt::LinksAccessibleByKeyboard);
	m_pScriptureBrowser->setOpenLinks(false);
	connect(CPersistentSettings::instance(), SIGNAL(changedScrollbarsEnabled(bool)), this, SLOT(en_changedScrollbarsEnabled(bool)));

	bool bChapterScrollNone = (CPersistentSettings::instance()->chapterScrollbarMode() == CSME_NONE);
	bool bChapterScrollLeft = (CPersistentSettings::instance()->chapterScrollbarMode() == CSME_LEFT);

	delete ui.textBrowserMainText;
	delete ui.scrollbarChapter;
	ui.textBrowserMainText = NULL;
	ui.scrollbarChapter = NULL;
	ui.gridLayout->addWidget(m_pScriptureBrowser, nRow, (bChapterScrollLeft ? nColChapterScrollbar : nCol), nRowSpan, (bChapterScrollNone ? (nColSpan + nColSpanChapterScrollbar) : nColSpan));

	if (!bChapterScrollNone) {
		ui.scrollbarChapter = new QScrollBar(this);
		ui.scrollbarChapter->setObjectName(QString::fromUtf8("scrollbarChapter"));
		ui.scrollbarChapter->setOrientation(Qt::Vertical);
		ui.gridLayout->addWidget(ui.scrollbarChapter, nRowChapterScrollbar, (bChapterScrollLeft ? nCol : nColChapterScrollbar), nRowSpanChapterScrollbar, nColSpanChapterScrollbar);
	}

	// Reinsert it in the correct TabOrder:
	QWidget::setTabOrder(ui.comboBkChp, m_pScriptureBrowser);
	QWidget::setTabOrder(m_pScriptureBrowser, ui.comboTstBk);

	// --------------------------------------------------------------

	begin_update();

	unsigned int nBibleChp = 0;
	ui.comboBk->clear();
	ui.comboBibleBk->clear();
	for (unsigned int ndxBk=1; ndxBk<=m_pBibleDatabase->bibleEntry().m_nNumBk; ++ndxBk) {
		const CBookEntry *pBook = m_pBibleDatabase->bookEntry(ndxBk);
		assert(pBook != NULL);
		ui.comboBk->addItem(pBook->m_strBkName, ndxBk);
		ui.comboBibleBk->addItem(QString("%1").arg(ndxBk), ndxBk);
		nBibleChp += pBook->m_nNumChp;
	}
	ui.comboBibleChp->clear();
	for (unsigned int ndxBibleChp=1; ndxBibleChp<=nBibleChp; ++ndxBibleChp) {
		ui.comboBibleChp->addItem(QString("%1").arg(ndxBibleChp), ndxBibleChp);
	}

	// Setup the Chapter Scroller:
	setupChapterScrollbar();

	end_update();
}
开发者ID:dewhisna,项目名称:KingJamesPureBibleSearch,代码行数:87,代码来源:KJVBrowser.cpp


示例11: update_view

static int update_view(struct view *view)
{
	char buffer[BUFSIZ];
	char *line;
	void **tmp;
	int redraw_from = -1;
	unsigned long lines = view->height;
    char *top = "Binary file";

	if (!view->pipe)
		return TRUE;

	/* Only redraw if lines are visible. */
	if (view->offset + view->height >= view->lines)
		redraw_from = view->lines - view->offset;

	tmp = realloc(view->line, sizeof(*view->line) * (view->lines + lines));
	if (!tmp)
		goto alloc_error;

	view->line = tmp;

	while ((line = fgets(buffer, sizeof(buffer), view->pipe))) 
    {
		int linelen;
		linelen = strlen(line);

		if (linelen)
			line[linelen - 1] = 0;

        if(!strncmp(line, top, strlen(top))) 
            continue;

		if (!view->read(view, line))
			goto alloc_error;

		if (lines-- == 1)
			break;
	}

	if (redraw_from >= 0) {
		/* If this is an incremental update, redraw the previous line
		 * since for commits some members could have changed when
		 * loading the main view. */
		if (redraw_from > 0)
			redraw_from--;

		/* Incrementally draw avoids flickering. */
		redraw_view_from(view, redraw_from);
	}

	update_title_win(view);

	if (ferror(view->pipe)) {
		printw("Failed to read %s", view->cmd);
		goto end;

	} else if (feof(view->pipe)) {
        report("load %d lines", view->lines);
		goto end;
	}

	return TRUE;

alloc_error:
	printw("Allocation failure");

end:
	end_update(view);
	return FALSE;
}
开发者ID:lexuszhi1990,项目名称:hen,代码行数:71,代码来源:xxx.c


示例12: view_driver


//.........这里部分代码省略.........
	case REQ_TOGGLE_DATE:
	case REQ_TOGGLE_AUTHOR:
	case REQ_TOGGLE_FILENAME:
	case REQ_TOGGLE_GRAPHIC:
	case REQ_TOGGLE_REV_GRAPH:
	case REQ_TOGGLE_REFS:
	case REQ_TOGGLE_CHANGES:
	case REQ_TOGGLE_IGNORE_SPACE:
	case REQ_TOGGLE_ID:
	case REQ_TOGGLE_FILES:
	case REQ_TOGGLE_TITLE_OVERFLOW:
	case REQ_TOGGLE_FILE_SIZE:
	case REQ_TOGGLE_UNTRACKED_DIRS:
	case REQ_TOGGLE_VERTICAL_SPLIT:
		{
			char action[SIZEOF_STR] = "";
			enum view_flag flags = toggle_option(view, request, action);
	
			if (flags == VIEW_FLAG_RESET_DISPLAY) {
				resize_display();
				redraw_display(TRUE);
			} else {
				foreach_displayed_view(view, i) {
					if (view_has_flags(view, flags) && !view->unrefreshable)
						reload_view(view);
					else
						redraw_view(view);
				}
			}

			if (*action)
				report("%s", action);
		}
		break;

	case REQ_TOGGLE_SORT_FIELD:
	case REQ_TOGGLE_SORT_ORDER:
		report("Sorting is not yet supported for the %s view", view->name);
		break;

	case REQ_DIFF_CONTEXT_UP:
	case REQ_DIFF_CONTEXT_DOWN:
		report("Changing the diff context is not yet supported for the %s view", view->name);
		break;

	case REQ_SEARCH:
	case REQ_SEARCH_BACK:
		search_view(view, request);
		break;

	case REQ_FIND_NEXT:
	case REQ_FIND_PREV:
		find_next(view, request);
		break;

	case REQ_STOP_LOADING:
		foreach_view(view, i) {
			if (view->pipe)
				report("Stopped loading the %s view", view->name),
			end_update(view, TRUE);
		}
		break;

	case REQ_SHOW_VERSION:
		report("tig-%s (built %s)", TIG_VERSION, __DATE__);
		return TRUE;

	case REQ_SCREEN_REDRAW:
		redraw_display(TRUE);
		break;

	case REQ_EDIT:
		report("Nothing to edit");
		break;

	case REQ_ENTER:
		report("Nothing to enter");
		break;

	case REQ_VIEW_CLOSE:
		/* XXX: Mark closed views by letting view->prev point to the
		 * view itself. Parents to closed view should never be
		 * followed. */
		if (view->prev && view->prev != view) {
			maximize_view(view->prev, TRUE);
			view->prev = view;
			break;
		}
		/* Fall-through */
	case REQ_QUIT:
		return FALSE;

	default:
		report("Unknown key, press %s for help",
		       get_view_key(view, REQ_VIEW_HELP));
		return TRUE;
	}

	return TRUE;
}
开发者ID:lcd047,项目名称:tig,代码行数:101,代码来源:tig.c


示例13: CScriptureEdit

void CKJVPassageNavigator::initialize()
{
	// --------------------------------------------------------------

	ui.widgetPassageReference->initialize(m_pBibleDatabase);

	// --------------------------------------------------------------

	//	Swapout the editVersePreview from the layout with
	//		one that we can set the database on:

	m_pEditVersePreview = new CScriptureEdit(m_pBibleDatabase, this);
	m_pEditVersePreview->setObjectName(QString::fromUtf8("editVersePreview"));
	m_pEditVersePreview->setMinimumSize(QSize(200, 150));
	m_pEditVersePreview->setMouseTracking(true);
	m_pEditVersePreview->setAcceptDrops(false);
	m_pEditVersePreview->setTabChangesFocus(true);
	m_pEditVersePreview->setUndoRedoEnabled(false);
	m_pEditVersePreview->setTextInteractionFlags(Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse);

	delete ui.editVersePreview;
	ui.editVersePreview = NULL;
	ui.verticalLayoutMain->addWidget(m_pEditVersePreview);

	// Updated Tab Ordering:
	QWidget::setTabOrder(ui.widgetPassageReference, ui.spinWord);
	QWidget::setTabOrder(ui.spinWord, ui.spinVerse);
	QWidget::setTabOrder(ui.spinVerse, ui.spinChapter);
	QWidget::setTabOrder(ui.spinChapter, ui.spinBook);
	QWidget::setTabOrder(ui.spinBook, ui.comboTestament);
	QWidget::setTabOrder(ui.comboTestament, ui.editStartRef);
	QWidget::setTabOrder(ui.editStartRef, ui.editResolved);
	QWidget::setTabOrder(ui.editResolved, ui.editVersePreview);
	QWidget::setTabOrder(ui.editVersePreview, ui.comboBookDirect);
	QWidget::setTabOrder(ui.comboBookDirect, ui.comboChapterDirect);
	QWidget::setTabOrder(ui.comboChapterDirect, ui.comboVerseDirect);
	QWidget::setTabOrder(ui.comboVerseDirect, ui.comboWordDirect);
	QWidget::setTabOrder(ui.comboWordDirect, ui.comboRefType);
	QWidget::setTabOrder(ui.comboRefType, ui.chkboxReverse);

	// Add the ScriptureEdit's editMenu to this widget's actions so that the
	//		keyboard shortcuts work correctly inside this widget:
	addAction(m_pEditVersePreview->getEditMenu()->menuAction());

	// --------------------------------------------------------------

	begin_update();

	m_tagStartRef = TPhraseTag(CRelIndex(), 1);		// Start with default word-size of one so we highlight at least one word when tracking
	m_tagPassage = TPhraseTag(CRelIndex(), 1);		// ""  (ditto)

	int nBooks = 0;
	int nChapters = 0;
	int nVerses = 0;
	int nWords = 0;

	ui.comboTestament->clear();
	for (unsigned int ndx=0; ndx<=m_pBibleDatabase->bibleEntry().m_nNumTst; ++ndx){
		if (ndx == 0) {
			// Search for "Entire Bible".  First try and see if we can translate it in the language of the selected Bible,
			//		but if not, try in the current language setting
			QString strEntireBible = tr("Entire Bible", "Scope");
			TTranslatorPtr pTranslator = CTranslatorList::instance()->translator(m_pBibleDatabase->language());
			if (!pTranslator.isNull()) {
				QString strTemp = pTranslator->translatorApp().translate("CKJVPassageNavigator", "Entire Bible", "Scope");
				if (!strTemp.isEmpty()) strEntireBible = strTemp;
			}
			ui.comboTestament->addItem(strEntireBible, ndx);
		} else {
			ui.comboTestament->addItem(m_pBibleDatabase->testamentEntry(ndx)->m_strTstName, ndx);
			nBooks += m_pBibleDatabase->testamentEntry(ndx)->m_nNumBk;
			nChapters += m_pBibleDatabase->testamentEntry(ndx)->m_nNumChp;
			nVerses += m_pBibleDatabase->testamentEntry(ndx)->m_nNumVrs;
			nWords += m_pBibleDatabase->testamentEntry(ndx)->m_nNumWrd;
		}
	}

	ui.spinBook->setRange(0, nBooks);
	ui.spinChapter->setRange(0, nChapters);
	ui.spinVerse->setRange(0, nVerses);
	ui.spinWord->setRange(0, nWords);

	bool bAllTypes = (m_flagsRefTypes == NRTO_Default);
	ui.comboRefType->clear();
	if ((m_flagsRefTypes & NRTO_Word) || (bAllTypes)) ui.comboRefType->addItem(tr("Word", "Scope"), static_cast<int>(NRTE_WORD));
	if ((m_flagsRefTypes & NRTO_Verse) || (bAllTypes)) ui.comboRefType->addItem(tr("Verse", "Scope"), static_cast<int>(NRTE_VERSE));
	if ((m_flagsRefTypes & NRTO_Chapter) || (bAllTypes)) ui.comboRefType->addItem(tr("Chapter", "Scope"), static_cast<int>(NRTE_CHAPTER));
	if ((m_flagsRefTypes & NRTO_Book) || (bAllTypes)) ui.comboRefType->addItem(tr("Book", "Scope"), static_cast<int>(NRTE_BOOK));
	int nTypeIndex = ui.comboRefType->findData(static_cast<int>(m_nRefType));
	assert(nTypeIndex != -1);
	ui.comboRefType->setCurrentIndex(nTypeIndex);

	ui.comboBookDirect->clear();
	for (unsigned int ndxBk=1; ndxBk<=m_pBibleDatabase->bibleEntry().m_nNumBk; ++ndxBk) {
		const CBookEntry *pBook = m_pBibleDatabase->bookEntry(ndxBk);
		assert(pBook != NULL);
		ui.comboBookDirect->addItem(pBook->m_strBkName, ndxBk);
	}

	end_update();
//.........这里部分代码省略.........
开发者ID:dewhisna,项目名称:KingJamesPureBibleSearch,代码行数:101,代码来源:KJVPassageNavigator.cpp


示例14: switch

void debug_view_disasm::view_char(int chval)
{
	debug_view_xy origcursor = m_cursor;
	UINT8 end_buffer = 3;
	INT32 temp;

	switch (chval)
	{
		case DCH_UP:
			if (m_cursor.y > 0)
				m_cursor.y--;
			break;

		case DCH_DOWN:
			if (m_cursor.y < m_total.y - 1)
				m_cursor.y++;
			break;

		case DCH_PUP:
			temp = m_cursor.y - (m_visible.y - end_buffer);
			if (temp < 0)
				m_cursor.y = 0;
			else
				m_cursor.y = temp;
			break;

		case DCH_PDOWN:
			temp = m_cursor.y + (m_visible.y - end_buffer);
			if (temp > m_total.y - 1)
				m_cursor.y = m_total.y - 1;
			else
				m_cursor.y = temp;
			break;

		case DCH_HOME:              // set the active column to the PC
		{
			const debug_view_disasm_source &source = downcast<const debug_view_disasm_source &>(*m_source);
			offs_t pc = source.m_space.address_to_byte(source.m_device.safe_pc()) & source.m_space.logbytemask();

			// figure out which row the pc is on
			for (unsigned int curline = 0; curline < m_byteaddress.size(); curline++)
				if (m_byteaddress[curline] == pc)
					m_cursor.y = curline;
			break;
		}

		case DCH_CTRLHOME:
			m_cursor.y = 0;
			break;

		case DCH_CTRLEND:
			m_cursor.y = m_total.y - 1;
			break;
	}

	/* send a cursor changed notification */
	if (m_cursor.y != origcursor.y)
	{
		begin_update();
		view_notify(VIEW_NOTIFY_CURSOR_CHANGED);
		m_update_pending = true;
		end_update();
	}
}
开发者ID:dinkc64,项目名称:mame,代码行数:64,代码来源:dvdisasm.c



注:本文中的end_update函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ end_write函数代码示例发布时间:2022-05-30
下一篇:
C++ end_time函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap