Beispiel #1
0
void Caret::setPosition( const CPoint& pos )
{
    if( parent_ ) 
    {
        position_ = pos;
        parent_->localToFrame( position_ );
        SetCaretPos( position_.x, position_.y );
    }
}
Beispiel #2
0
//-----------------------------------------------------------------------------
CMessageResult CScrollView::notify (CBaseObject* sender, IdStringPtr message)
{
	if (message == kMsgNewFocusView && getStyle () & kFollowFocusView)
	{
		CView* focusView = (CView*)sender;
		if (sc->isChild (focusView, true))
		{
			CRect r = focusView->getViewSize ();
			CPoint p;
			focusView->localToFrame (p);
			frameToLocal (p);
			r.offset (p.x, p.y);
			makeRectVisible (r);
		}
	}
	return CViewContainer::notify (sender, message);
}