当前位置: 首页>>代码示例>>C++>>正文


C++ RefreshRect函数代码示例

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


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

示例1: RefreshRect

void AudioDisplay::SetTrackCursor(int new_pos, bool show_time)
{
	if (new_pos != track_cursor_pos)
	{
		int old_pos = track_cursor_pos;
		track_cursor_pos = new_pos;

		RefreshRect(wxRect(old_pos - scroll_left - 0, audio_top, 1, audio_height), false);
		RefreshRect(wxRect(new_pos - scroll_left - 0, audio_top, 1, audio_height), false);

		// Make sure the old label gets cleared away
		RefreshRect(track_cursor_label_rect, false);

		if (show_time)
		{
			AssTime new_label_time = TimeFromAbsoluteX(track_cursor_pos);
			track_cursor_label = new_label_time.GetAssFormated();
			track_cursor_label_rect.x += new_pos - old_pos;
			RefreshRect(track_cursor_label_rect, false);
		}
		else
		{
			track_cursor_label_rect.SetSize(wxSize(0,0));
			track_cursor_label.Clear();
		}
	}
}
开发者ID:Gpower2,项目名称:Aegisub,代码行数:27,代码来源:audio_display.cpp

示例2: GetBarArea

void thBarViewCtrl::Mark(int bar)
{
    if (bar == m_mark)
        return;

    //PRINTF("Mark(%d), m_mark = %d\n", bar, m_mark);

    // add the old bar and the new bar to the update region
    wxRect rc = m_rcClient;
    if (m_mark >= 0)
    {
        rc.x = GetBarArea(m_mark, rc.width);
        rc.x -= 4; rc.width += 8;
        RefreshRect(rc, false);
    }

    if (bar >= 0)
    {
        rc.x = GetBarArea(bar, rc.width);
        rc.x -= 4; rc.width += 8;
        RefreshRect(rc, false);
    }

    wxMemoryDC memDC;
    memDC.SelectObject(dbw.m_bmp);
    Erase(memDC); // sets m_mark = -1
    Mark(memDC, bar); // sets m_mark = bar
    memDC.SelectObject(wxNullBitmap);
    //Update();
}
开发者ID:pulsa,项目名称:t.hex,代码行数:30,代码来源:BarViewCtrl.cpp

示例3: SetSelectedSet

void BaseGrid::SelectRow(int row, bool addToSelected, bool select) {
	if (row < 0 || (size_t)row >= index_line_map.size()) return;

	AssDialogue *line = index_line_map[row];

	if (!addToSelected) {
		Selection sel;
		if (select) sel.insert(line);
		SetSelectedSet(sel);
		return;
	}

	if (select && selection.find(line) == selection.end()) {
		selection.insert(line);

		Selection added;
		added.insert(line);

		AnnounceSelectedSetChanged(added, Selection());
	}
	else if (!select && selection.find(line) != selection.end()) {
		selection.erase(line);

		Selection removed;
		removed.insert(line);

		AnnounceSelectedSetChanged(Selection(), removed);
	}

	int w = GetClientSize().GetWidth();
	RefreshRect(wxRect(0, (row + 1 - yPos) * lineHeight, w, lineHeight), false);
}
开发者ID:sthenc,项目名称:Aegisub,代码行数:32,代码来源:base_grid.cpp

示例4: sel

void AudioDisplay::OnSelectionChanged()
{
	TimeRange sel(controller->GetPrimaryPlaybackRange());
	scrollbar->SetSelection(AbsoluteXFromTime(sel.begin()), AbsoluteXFromTime(sel.length()));

	if (audio_marker)
	{
		if (!scroll_timer.IsRunning())
		{
			// If the dragged object is outside the visible area, start the
			// scroll timer to shift it back into view
			int rel_x = RelativeXFromTime(audio_marker->GetPosition());
			if (rel_x < 0 || rel_x >= GetClientSize().GetWidth())
			{
				// 50ms is the default for this on Windows (hardcoded since
				// wxSystemSettings doesn't expose DragScrollDelay etc.)
				scroll_timer.Start(50, true);
			}
		}
	}
	else if (OPT_GET("Audio/Auto/Scroll")->GetBool() && sel.end() != 0)
	{
		ScrollTimeRangeInView(sel);
	}

	RefreshRect(scrollbar->GetBounds(), false);
}
开发者ID:Gpower2,项目名称:Aegisub,代码行数:27,代码来源:audio_display.cpp

示例5: wxASSERT_MSG

void wxVScrolledWindow::RefreshLines(size_t from, size_t to)
{
    wxASSERT_MSG( from <= to, _T("RefreshLines(): empty range") );

    // clump the range to just the visible lines -- it is useless to refresh
    // the other ones
    if ( from < GetVisibleBegin() )
        from = GetVisibleBegin();

    if ( to >= GetVisibleEnd() )
        to = GetVisibleEnd();
    else
        to++;

    // calculate the rect occupied by these lines on screen
    wxRect rect;
    rect.width = GetClientSize().x;
    for ( size_t nBefore = GetVisibleBegin(); nBefore < from; nBefore++ )
    {
        rect.y += OnGetLineHeight(nBefore);
    }

    for ( size_t nBetween = from; nBetween < to; nBetween++ )
    {
        rect.height += OnGetLineHeight(nBetween);
    }

    // do refresh it
    RefreshRect(rect);
}
开发者ID:ACanadianKernel,项目名称:pcsx2,代码行数:30,代码来源:vscroll.cpp

示例6: CalcScrolledPosition

void ProsodyDisplay::RefreshLine(int line)
{//=====================================
	int x,y;

	CalcScrolledPosition(0,line*FRAMEHEIGHT,&x,&y);
	RefreshRect(wxRect(0,y,linewidth,FRAMEHEIGHT));
}
开发者ID:Jongsix,项目名称:espeak,代码行数:7,代码来源:prosodydisplay.cpp

示例7: RefreshRect

void wxStatusBarUniv::DoUpdateStatusText(int i)
{
    wxRect rect;
    if ( GetFieldRect(i, rect) )
    {
        RefreshRect(rect);
    }
}
开发者ID:3v1n0,项目名称:wxWidgets,代码行数:8,代码来源:statusbr.cpp

示例8: RefreshRect

void CardViewer::redraw(const ValueViewer& v) {
	// Don't refresh if we OR ANOTHER CardViewer is drawing
	// drawing another viewer causes styles to be updated for its active card, which may be different,
	// causing the two viewers to continously refresh.
	if (drawing_card()) return;
	up_to_date = false;
	RefreshRect(getRotation().trRectToBB(v.boundingBox()), false);
}
开发者ID:CustomCardsOnline,项目名称:MagicSetEditor,代码行数:8,代码来源:card_viewer.cpp

示例9: RefreshRect

void wxStatusBarUniv::RefreshField(int i)
{
    wxRect rect;
    if ( GetFieldRect(i, rect) )
    {
        RefreshRect(rect);
    }
}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:8,代码来源:statusbr.cpp

示例10: GetClientRect

void wxHeaderCtrl::RefreshCol(unsigned int idx)
{
    wxRect rect = GetClientRect();
    rect.x += GetColStart(idx);
    rect.width = GetColumn(idx).GetWidth();

    RefreshRect(rect);
}
开发者ID:Toonerz,项目名称:project64,代码行数:8,代码来源:headerctrlg.cpp

示例11: RefreshRect

void
JXTable::TableRefreshRect
	(
	const JRect& rect
	)
{
	RefreshRect(rect);
}
开发者ID:mbert,项目名称:mulberry-lib-jx,代码行数:8,代码来源:JXTable.cpp

示例12: Refresh

void wxSVGCtrlBase::Refresh(const wxSVGRect* rect) {
	if (!rect || rect->IsEmpty())
		Refresh(true, NULL);
	else {
		wxRect winRect((int) (rect->GetX() * GetScaleX()), (int) (rect->GetY() * GetScaleY()),
				(int) (rect->GetWidth() * GetScaleX()), (int) (rect->GetHeight() * GetScaleY()));
		RefreshRect(winRect);
	}
}
开发者ID:jfiguinha,项目名称:Regards,代码行数:9,代码来源:svgctrl.cpp

示例13: CalcScrolledPosition

void SpectDisplay::RefreshFrame(int frame)
{//=======================================
	int frame_x, frame_y;

	CalcScrolledPosition(0,int(frame*FRAME_HEIGHT*zoomy),
			&frame_x,&frame_y);

	RefreshRect(wxRect(0,frame_y,int(1000*zoomx),int(FRAME_HEIGHT*zoomy)));
}
开发者ID:ragb,项目名称:espeak,代码行数:9,代码来源:spectdisplay.cpp

示例14: RefreshRect

void CodeView::OnPopUpMenuArgStyleHex(wxCommandEvent& event)
{
	if (line_info.argSelected == 1)
		line_info.dasmitem->SetStyleArgument(0, ast_bytehex);

	if (line_info.argSelected == 2)
		line_info.dasmitem->SetStyleArgument(1, ast_bytehex);

		RefreshRect(CalcCursorRfshRect());
}
开发者ID:felipempc,项目名称:idz80,代码行数:10,代码来源:codeview_events.cpp

示例15: GetItemRect

/// Select or deselect an item
void InstanceCtrl::Select( VisualCoord n, bool select )
{
	VisualCoord oldFocusItem = m_focusItem;
	m_focusItem = n;
	m_selectedItem = n;
	
	if (m_freezeCount == 0)
	{
		wxRect rect;
		GetItemRect(n, rect);
		RefreshRect(rect);
		
		if (!oldFocusItem.isVoid() && oldFocusItem != n)
		{
			GetItemRect(oldFocusItem, rect);
			RefreshRect(rect);
		}
	}
}
开发者ID:Glought,项目名称:MultiMC4,代码行数:20,代码来源:instancectrl.cpp


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