本文整理汇总了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();
}
}
}
示例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();
}
示例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);
}
示例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);
}
示例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);
}
示例6: CalcScrolledPosition
void ProsodyDisplay::RefreshLine(int line)
{//=====================================
int x,y;
CalcScrolledPosition(0,line*FRAMEHEIGHT,&x,&y);
RefreshRect(wxRect(0,y,linewidth,FRAMEHEIGHT));
}
示例7: RefreshRect
void wxStatusBarUniv::DoUpdateStatusText(int i)
{
wxRect rect;
if ( GetFieldRect(i, rect) )
{
RefreshRect(rect);
}
}
示例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);
}
示例9: RefreshRect
void wxStatusBarUniv::RefreshField(int i)
{
wxRect rect;
if ( GetFieldRect(i, rect) )
{
RefreshRect(rect);
}
}
示例10: GetClientRect
void wxHeaderCtrl::RefreshCol(unsigned int idx)
{
wxRect rect = GetClientRect();
rect.x += GetColStart(idx);
rect.width = GetColumn(idx).GetWidth();
RefreshRect(rect);
}
示例11: RefreshRect
void
JXTable::TableRefreshRect
(
const JRect& rect
)
{
RefreshRect(rect);
}
示例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);
}
}
示例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)));
}
示例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());
}
示例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);
}
}
}