void CBubbleCtrl::UnFreeze( TBool aUpdate )
    {
    iFreeze = EFalse;
    if( aUpdate )
        {
        if( !iInvalidRect.IsEmpty() )
            {
            RootControl()->ReDrawRect( iInvalidRect );
            }
        Draw();
        
        if(iInvalidRect.IsEmpty() )
            {
            iInvalidRect = Rect();
            }
        else
            {
            iInvalidRect.BoundingRect( Rect() );
            }      
                  
        UpdateArea(iInvalidRect); 
        }
    
    iInvalidRect = TRect();
    }
Esempio n. 2
0
BOOL CxpGbaDlg::OnInitDialog() 
{
	ASSERT(mpDib);
	
	int nclrs= dib_get_nclrs(mpDib);
	if(nclrs > 0 && mPalStart+mPalCount>nclrs)
	{
		mPalStart= 0;
		mPalCount= nclrs;
	}
	if(moAreaSize != 0)
	{
		mAreaLeft= 0;	mAreaWidth= dib_get_width(mpDib);
		mAreaTop=0;		mAreaHeight= dib_get_height(mpDib);
	}
	if(mbSymChk == FALSE)
		mSymName= mDstTitle;

	CDialog::OnInitDialog();
	OnPalChk();
	OnGfxChk();
	OnMapChk();
	UpdateObj();
	UpdateMap();
	UpdateArea();

	GetDlgItem(IDC_VAR_NAME)->EnableWindow(mbSymChk);

	//UpdateSummary();

	return TRUE;
}
Esempio n. 3
0
InteractiveScreen::InteractiveScreen(MythPlayer *player,
                                     const QString &name) :
    MythScreenType((MythScreenType*)NULL, name),
    m_player(player),  m_safeArea(QRect())
{
    UpdateArea();
}
Esempio n. 4
0
void InteractiveScreen::OptimiseDisplayedArea(void)
{
    UpdateArea();

    QRegion visible;
    QListIterator<MythUIType *> i(m_ChildrenList);
    while (i.hasNext())
    {
        MythUIType *img = i.next();
        visible = visible.united(img->GetArea());
    }

    if (visible.isEmpty())
        return;

    QRect bounding  = visible.boundingRect();
    bounding = bounding.translated(m_safeArea.topLeft());
    bounding = m_safeArea.intersected(bounding);
    int left = m_safeArea.left() - bounding.left();
    int top  = m_safeArea.top()  - bounding.top();
    SetArea(MythRect(bounding));

    i.toFront();;
    while (i.hasNext())
    {
        MythUIType *img = i.next();
        img->SetArea(img->GetArea().translated(left, top));
    }
}
Esempio n. 5
0
void FreeWindow::MoveResize(int newx, int newy, int neww, int newh)
{
  if (newx == win_x && newy == win_y && neww == win_w && newh == win_h)
    return;

  win_x = newx;
  win_y = newy;
  win_w = neww;
  win_h = newh;

  int realw = win_w;
  if (realw == AUTOSIZE) {
    realw = GetWishWidth();
    if (realw == AUTOSIZE)
      realw = Curses::getmaxx() - win_x;
  }
  int realh = win_h;
  if (realh == AUTOSIZE) {
    realh = GetWishHeight();
    if (realh == AUTOSIZE)
      realh = Curses::getmaxy() - win_y;
  }
  Container::MoveResize(0, 0, MAX(0, realw), MAX(0, realh));
  UpdateArea();
}
Esempio n. 6
0
void Ctrl::DrawCtrl(Draw& w, int x, int y)
{
	GuiLock __;
	w.Offset(x, y);
	SystemDraw *ws = dynamic_cast<SystemDraw *>(&w);
	if(ws)
		UpdateArea(*ws, GetRect().GetSize());
	w.End();
}
Esempio n. 7
0
void CGeoTri::Init()
{
	UpdateMid();
	UpdateArea();
	if( m_fArea != 0.0f )
		UpdateNormal();
	else
		m_oNormal.Clear();
}
Esempio n. 8
0
FreeWindow::FreeWindow(int x, int y, int w, int h, Type t)
: Container(w, h), win_x(x), win_y(y), win_w(w), win_h(h), copy_x(0)
, copy_y(0), copy_w(0), copy_h(0), realwindow(NULL), type(t)
{
  UpdateArea();

  COREMANAGER->signal_resize.connect(sigc::mem_fun(this,
        &FreeWindow::ResizeAndUpdateArea));
  COREMANAGER->signal_resize.connect(sigc::mem_fun(this,
        &FreeWindow::ScreenResized));

  DeclareBindables();
}
// -----------------------------------------------------------------------------
// CFepUiLayoutRootCtrl::Draw
// Draw the control
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//    
void CFepUiLayoutRootCtrl::Draw()
    {

	if(!AbleToDraw())
        return;
	
    CControlGroup::Draw();

    if(!iShadowRect.IsEmpty())        
        {
        iShadowShown = ETrue;
        DrawShadow();        
        }
    
    UpdateArea(iRect, EFalse);    
    }
// CFepLayoutChoiceList::HandlePointerDownEventL
// Handle pointer down event.
// (other items were commented in a header).
// ---------------------------------------------------------------------------
//
EXPORT_C CFepUiBaseCtrl* CFepLayoutChoiceList::HandlePointerDownEventL(const TPoint& aPoint)
    {
    if( iFreezeTimer && iFreezeTimer->IsActive() )
        {
        return this;
        }
    CFepUiBaseCtrl* ctrl = CFepLayoutPopupWnd::HandlePointerDownEventL(aPoint);
    if( ctrl )
        {
        return ctrl;
        }
    TInt index = HitTest(aPoint);
    if( index == EListOutside )
        {
        SetPointerDown(EFalse);
        CloseWindow();
        CFepLayoutChoiceList::SEvent event;
        event.iIndex = -1;
        event.iCommand = 0;
        ReportChoiceEvent(event);
		#ifdef RD_TACTILE_FEEDBACK
        if (UiLayout()->SupportTactileFeedback())
        	{
        	UiLayout()->DoTactileFeedback(ETouchFeedbackSensitiveKeypad, ETrue, EFalse);
        	}
		#endif //RD_TACTILE_FEEDBACK     
        }
    else
        {
        SetPointerDown( ETrue );      
        if(  index >= EListItemFirst &&  index != iCurFocusItem )
            {
            //TInt prev = iCurFocusItem;
            iCurFocusItem = index;
       		Draw();
            UpdateArea(Rect(),EFalse);
			#ifdef RD_TACTILE_FEEDBACK
            if (UiLayout()->SupportTactileFeedback())
            	{
            	UiLayout()->DoTactileFeedback(ETouchFeedbackSensitiveKeypad);
            	}
			#endif //RD_TACTILE_FEEDBACK
            }
        }
    return this;
    }
// CFepLayoutChoiceList::HandlePointerMoveEventL
// Handle pointer move event.
// (other items were commented in a header).
// ---------------------------------------------------------------------------
//
EXPORT_C CFepUiBaseCtrl* CFepLayoutChoiceList::HandlePointerMoveEventL(const TPoint& aPoint)
    {
    if( iFreezeTimer && iFreezeTimer->IsActive() )
        {
        return this;
        }
    CFepLayoutPopupWnd::HandlePointerMoveEventL(aPoint);
    if( PointerDown() )
        {
        TInt index = HitTest(aPoint);
        if( index != iCurFocusItem && index >= 0)
            {
            //TInt prev = iCurFocusItem;
            iCurFocusItem = index;
/*        
            if( prev != -1 )
                {
                DrawItem(prev, ETrue);
                }

            if( iCurFocusItem != -1 )
                {
                DrawItem(iCurFocusItem, ETrue);
                }
 */               
    #ifdef RD_TACTILE_FEEDBACK
        if (UiLayout()->SupportTactileFeedback())
            {
            if ( iLastSelIndex != iCurFocusItem) 
                {
                UiLayout()->DoTactileFeedback(ETouchFeedbackSensitiveKeypad);
                iLastSelIndex = iCurFocusItem;
                }
            }
    #endif //RD_TACTILE_FEEDBACK

           	Draw();
            UpdateArea(Rect(),EFalse);
            }
        }
    return this;
    }
Esempio n. 12
0
void CxpGbaDlg::OnAreaFormat(UINT nID)
{
	UpdateData(TRUE);
	UpdateArea();
}
Esempio n. 13
0
void FreeWindow::ResizeAndUpdateArea()
{
  UpdateArea();
}