예제 #1
0
void CVwsSession::RemoveViewL(const RMessage2& aMessage)
	{
	TVwsViewId viewId(ViewIdFromMessageL(aMessage));
	LOG4(CVwsLog::ENormal,_L("Removing view \"%x,%x\""),viewId.iAppUid.iUid,viewId.iViewUid.iUid);
	if (RemoveView(aMessage,viewId)==KErrNotFound)
		{
		PanicClient(aMessage,EVwsViewNotFound);
		}
	}
ECode ActionBarContainer::SetTabContainer(
    /* [in] */ IScrollingTabContainerView* tabView)
{
    if (mTabContainer != NULL) {
        RemoveView(mTabContainer);
    }
    mTabContainer = tabView;
    if (tabView != NULL) {
        AddView(tabView);
        AutoPtr<IViewGroupLayoutParams> lp;
        tabView->GetLayoutParams((IViewGroupLayoutParams**)&lp);
        lp->SetWidth(IViewGroupLayoutParams::MATCH_PARENT);
        lp->SetHeight(IViewGroupLayoutParams::WRAP_CONTENT);
        tabView->SetAllowCollapse(FALSE);
    }
    return NOERROR;
}
예제 #3
0
파일: View3D.cpp 프로젝트: olegp/v3d
void View3D::Destroy()
{
	wglMakeCurrent(NULL, NULL);
  if(hGLRC != NULL) {
    wglDeleteContext(hGLRC);
    hGLRC = NULL;
  }

  if(hWnd != NULL && hDC != NULL)
    ReleaseDC(hWnd, hDC);

  hDC = NULL;
  hWnd = NULL;

  trackball.SetWindow(NULL);

  RemoveView();
}
예제 #4
0
    // JG TODO: why this is a member function??
    void CreateView(const viewLabel_t viewLabel, const RCP<const Matrix>& A, bool transposeA = false, const RCP<const Matrix>& B = Teuchos::null, bool transposeB = false) {
      RCP<const Map> domainMap = Teuchos::null;
      RCP<const Map> rangeMap  = Teuchos::null;

      const size_t        blkSize = 1;
      std::vector<size_t> stridingInfo(1, blkSize);
      LocalOrdinal        stridedBlockId = -1;


      if (A->IsView(viewLabel)) {
        rangeMap  = transposeA ? A->getColMap(viewLabel) : A->getRowMap(viewLabel);
        domainMap = transposeA ? A->getRowMap(viewLabel) : A->getColMap(viewLabel); // will be overwritten if B != Teuchos::null

      } else {
        rangeMap  = transposeA ? A->getDomainMap()       : A->getRangeMap();
        domainMap = transposeA ? A->getRangeMap()        : A->getDomainMap();

        if (viewLabel == "stridedMaps") {
          rangeMap  = Xpetra::StridedMapFactory<LocalOrdinal, GlobalOrdinal, Node>::Build(rangeMap,  stridingInfo, stridedBlockId);
          domainMap = Xpetra::StridedMapFactory<LocalOrdinal, GlobalOrdinal, Node>::Build(domainMap, stridingInfo, stridedBlockId);
        }
      }

      if (B != Teuchos::null ) {
        // B has strided Maps

        if (B->IsView(viewLabel)) {
          domainMap = transposeB ? B->getRowMap(viewLabel) : B->getColMap(viewLabel);

        } else {
          domainMap = transposeB ? B->getRangeMap()        : B->getDomainMap();

          if (viewLabel == "stridedMaps")
            domainMap = Xpetra::StridedMapFactory<LocalOrdinal, GlobalOrdinal, Node>::Build(domainMap, stridingInfo, stridedBlockId);
        }
      }


      if (IsView(viewLabel))
        RemoveView(viewLabel);

      CreateView(viewLabel, rangeMap, domainMap);
    }
예제 #5
0
    /**
     * Set fixed block size of operator (e.g., 3 for 3 DOFs per node).
     *
     * @param blksize: block size denoting how many DOFs per node are used (LocalOrdinal)
     * @param offset:  global offset allows to define operators with global indices starting from a given value "offset" instead of 0. (GlobalOrdinal, default = 0)
     * */
    void SetFixedBlockSize(LocalOrdinal blksize, GlobalOrdinal offset=0) {

      TEUCHOS_TEST_FOR_EXCEPTION(isFillComplete() == false, Exceptions::RuntimeError, "Xpetra::Matrix::SetFixedBlockSize(): operator is not filled and completed."); // TODO: do we need this? we just wanna "copy" the domain and range map

      std::vector<size_t> stridingInfo;
      stridingInfo.push_back(Teuchos::as<size_t>(blksize));
      LocalOrdinal stridedBlockId = -1;

      RCP<const Xpetra::StridedMap<LocalOrdinal, GlobalOrdinal, Node> > stridedRangeMap = Xpetra::StridedMapFactory<LocalOrdinal, GlobalOrdinal, Node>::Build(
                                                    this->getRangeMap(),
                                                    stridingInfo,
                                                    stridedBlockId,
                                                    offset
                                                    );
      RCP<const Map> stridedDomainMap = Xpetra::StridedMapFactory<LocalOrdinal, GlobalOrdinal, Node>::Build(
                                              this->getDomainMap(),
                                              stridingInfo,
                                              stridedBlockId,
                                              offset
                                              );

      if(IsView("stridedMaps") == true) RemoveView("stridedMaps");
      CreateView("stridedMaps", stridedRangeMap, stridedDomainMap);
    }
예제 #6
0
	void Delete()
	{
		RemoveView( m_pcView );
	}