home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-04-25 | 21.7 KB | 704 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWPxyFrm.cpp
- // Release Version: $ ODF 1 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #include "FWFrameW.hpp"
-
- #ifndef FWPXYFRM_H
- #include "FWPxyFrm.h"
- #endif
-
- #ifndef FWPARTNG_H
- #include "FWPartng.h"
- #endif
-
- #ifndef FWFRMING_H
- #include "FWFrming.h"
- #endif
-
- #ifndef FWPROXY_H
- #include "FWProxy.h"
- #endif
-
- #ifndef FWUTIL_H
- #include "FWUtil.h"
- #endif
-
- #ifndef FWCLNINF_H
- #include "FWClnInf.h"
- #endif
-
- // ----- OS Layer -----
-
- #ifndef FWBARRAY_H
- #include "FWBArray.h"
- #endif
-
- #ifndef FWGRUTIL_H
- #include "FWGrUtil.h"
- #endif
-
- #ifndef FWODGEOM_H
- #include "FWODGeom.h"
- #endif
-
- // ----- OpenDoc Includes -----
-
- #ifndef SOM_ODFrame_xh
- #include <Frame.xh>
- #endif
-
- #ifndef SOM_ODFacet_xh
- #include <Facet.xh>
- #endif
-
- #ifndef SOM_Module_OpenDoc_StdProps_defined
- #include <StdProps.xh>
- #endif
-
- #ifndef SOM_ODStorageUnitView_xh
- #include <SUView.xh>
- #endif
-
- #ifndef SOM_Module_OpenDoc_StdTypes_defined
- #include <StdTypes.xh>
- #endif
-
- #ifndef SOM_ODEmbeddedFramesIterator_xh
- #include <EmbFrItr.xh>
- #endif
-
- #ifndef SOM_ODTransform_xh
- #include <Trnsform.xh>
- #endif
-
- #ifndef SOM_ODDraft_xh
- #include <Draft.xh>
- #endif
-
- #if defined(__MWERKS__) && GENERATING68K
- // A hack to work around a bug
- #pragma import list somGetGlobalEnvironment
- #endif
-
- //========================================================================================
- // RunTime Info
- //========================================================================================
-
- #ifdef FW_BUILD_MAC
- #pragma segment fw_embedding2
- #endif
-
-
- //========================================================================================
- // Template Instantiations
- //========================================================================================
-
- FW_DEFINE_AUTO_TEMPLATE(FW_TOrderedCollectionIterator, FW_CProxyFrame)
- FW_DEFINE_AUTO_TEMPLATE(FW_TOrderedCollection, FW_CProxyFrame)
-
- #ifdef FW_USE_TEMPLATE_PRAGMAS
-
- #pragma template_access public
- #pragma template FW_TOrderedCollection<FW_CProxyFrame>
- #pragma template FW_TOrderedCollectionIterator<FW_CProxyFrame>
-
- #endif
-
- //========================================================================================
- // class FW_CProxyFrame
- //========================================================================================
-
- //----------------------------------------------------------------------------------------
- // FW_CProxyFrame::FW_CProxyFrame
- //----------------------------------------------------------------------------------------
-
- FW_CProxyFrame::FW_CProxyFrame(Environment* ev,
- FW_MProxy* proxy,
- FW_CEmbeddingPart* part) :
- fPart(part),
- fProxy(proxy),
- fFrameID(kODNULLID),
- fContainingFrameID(kODNULLID),
- fEmbeddedFrame(NULL),
- fPurgeable(FALSE),
- fAttached(TRUE),
- fFrameDraft(NULL)
- {
- FW_UNUSED(ev);
- FW_ASSERT(fPart != NULL);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CProxyFrame::FW_CProxyFrame
- //----------------------------------------------------------------------------------------
-
- FW_CProxyFrame::FW_CProxyFrame(Environment* ev,
- FW_MProxy* proxy,
- FW_CEmbeddingPart* part,
- FW_CEmbeddingFrame* containingFrame,
- ODFrame* embeddedFrame) :
- fPart(part),
- fProxy(proxy),
- fFrameID(kODNULLID),
- fContainingFrameID(kODNULLID),
- fEmbeddedFrame(embeddedFrame),
- fPurgeable(FALSE),
- fAttached(TRUE),
- fFrameDraft(NULL)
- {
- FW_ASSERT(fPart != NULL);
- FW_ASSERT(fProxy != NULL);
- FW_ASSERT(containingFrame != NULL);
- FW_ASSERT(fEmbeddedFrame != NULL);
- FW_ASSERT(containingFrame->GetPart(ev) == part);
-
- fEmbeddedFrame->Acquire(ev);
- fFrameID = fEmbeddedFrame->GetID(ev);
-
- // ----- Save embedded frame's draft if persistent frame
- ODStorageUnit* frameSU = fEmbeddedFrame->GetStorageUnit(ev);
- if (frameSU != NULL)
- fFrameDraft = frameSU->GetDraft(ev);
-
- fContainingFrameID = containingFrame->GetID(ev);
-
- #ifdef FW_DEBUG
- {
- FW_CAcquiredODFrame aqContainingFrame = embeddedFrame->AcquireContainingFrame(ev);
- FW_ASSERT(aqContainingFrame == containingFrame->GetODFrame(ev));
- }
- #endif
-
- // ----- If the frame was in Limbo -----
- embeddedFrame->SetInLimbo(ev, FALSE);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CProxyFrame::~FW_CProxyFrame
- //----------------------------------------------------------------------------------------
-
- FW_CProxyFrame::~FW_CProxyFrame()
- {
- // [HLX] Need a try block
- if (fEmbeddedFrame)
- {
- Environment* ev = somGetGlobalEnvironment();
- if (FW_IsInLimbo(ev, fEmbeddedFrame)) // [HLX] do not call ODFrame::IsInLimbo. see FW_IsInLimbo
- {
- // If the embedded frame doesn't have fContainingFrameID as containing frame then
- // doesn't remove
- FW_CAcquiredODFrame embeddingFrame = fEmbeddedFrame->AcquireContainingFrame(ev);
- if (embeddingFrame == NULL || embeddingFrame->GetID(ev) == fContainingFrameID)
- fEmbeddedFrame->Remove(ev);
- else
- fEmbeddedFrame->Release(ev);
- }
- else
- fEmbeddedFrame->Release(ev);
- }
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CProxyFrame::GetContainingFrame
- //----------------------------------------------------------------------------------------
- // GetContainingFrame returns null if the containing frame of this proxyframe is not a valid
- // display frame
-
- FW_CEmbeddingFrame* FW_CProxyFrame::GetContainingFrame(Environment* ev) const
- {
- FW_CProxyFrame* self = (FW_CProxyFrame*)this;
-
- if (fPart->IsValidDisplayFrame(ev, fContainingFrameID))
- {
- FW_CAcquiredODFrame aqContainingODFrame = fPart->GetDraft(ev)->AcquireFrame(ev, fContainingFrameID);
-
- FW_CEmbeddingFrame* containingFrame = FW_CEmbeddingFrame::ODtoFWEmbeddingFrame(ev, aqContainingODFrame);
- FW_ASSERT(containingFrame != NULL);
-
- return containingFrame;
- }
-
- return NULL;
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CProxyFrame::GetFrame
- //----------------------------------------------------------------------------------------
-
- ODFrame* FW_CProxyFrame::GetFrame(Environment* ev) const
- {
- if (fEmbeddedFrame == NULL)
- {
- FW_ASSERT(fFrameDraft != NULL);
-
- FW_CProxyFrame* self = (FW_CProxyFrame*)this;
-
- self->fEmbeddedFrame = fFrameDraft->AcquireFrame(ev, fFrameID);
- if (fAttached)
- fEmbeddedFrame->SetInLimbo(ev, FALSE); // Just in case
-
- FW_ASSERT(fEmbeddedFrame != NULL);
- }
-
- return fEmbeddedFrame;
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CProxyFrame::IsVisible
- //----------------------------------------------------------------------------------------
-
- FW_Boolean FW_CProxyFrame::IsVisible(Environment* ev, ODFacet* containingFacet, const FW_CRect& bounds) const
- {
- FW_CAcquiredODShape aqClipShape = containingFacet->AcquireClipShape(ev, NULL);
- FW_CRect clipRect = FW_GetShapeBoundingBox(ev, aqClipShape);
-
- FW_CAcquiredODTransform aqInternalTransform = containingFacet->GetFrame(ev)->AcquireInternalTransform(ev, NULL);
- FW_CRect tempRect = bounds.TransformCopy(ev, aqInternalTransform);
-
- if (clipRect.IsIntersecting(tempRect))
- return TRUE;
-
- return FALSE;
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CProxyFrame::SetPurgeable
- //----------------------------------------------------------------------------------------
-
- void FW_CProxyFrame::SetPurgeable(Environment* ev, FW_Boolean purgeable)
- {
- fPurgeable = purgeable;
-
- if (!fPurgeable)
- {
- FW_Boolean wasInMemory = IsFrameInMemory(ev);
-
- GetFrame(ev); // to be sure that the frame is in memory
-
- // ----- Create facets for the new frame if it was not in memory-----
- if (!wasInMemory)
- {
- FW_ASSERT(fPart->IsValidDisplayFrame(ev, fContainingFrameID));
- CreateAllFacets(ev);
- }
- }
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CProxyFrame::PrivClose
- //----------------------------------------------------------------------------------------
-
- void FW_CProxyFrame::PrivClose(Environment* ev)
- {
- if (fEmbeddedFrame != NULL)
- fEmbeddedFrame->Close(ev); // Will call release
- fEmbeddedFrame = NULL;
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CProxyFrame::Release
- //----------------------------------------------------------------------------------------
-
- void FW_CProxyFrame::Release(Environment* ev)
- {
- if (fEmbeddedFrame != NULL)
- fEmbeddedFrame->Release(ev);
- fEmbeddedFrame = NULL;
- }
-
- //----------------------------------------------------------------------------------------
- // ExternalizeInScope
- //----------------------------------------------------------------------------------------
-
- static void ExternalizeInScope(Environment* ev, ODPart* thePart, ODFrame* scopeFrame)
- {
- ODEmbeddedFramesIterator* ite = thePart->CreateEmbeddedFramesIterator(ev, scopeFrame);
- for (ODFrame* embeddedFrame = ite->First(ev); ite->IsNotComplete(ev); embeddedFrame = ite->Next(ev))
- {
- FW_CAcquiredODFrame aqContainingFrame = embeddedFrame->AcquireContainingFrame(ev);
- if (aqContainingFrame == scopeFrame)
- {
- FW_CAcquiredODPart aqEmbeddedPart = embeddedFrame->AcquirePart(ev);
-
- embeddedFrame->Externalize(ev);
- aqEmbeddedPart->Externalize(ev);
-
- ExternalizeInScope(ev, aqEmbeddedPart, embeddedFrame);
- }
- }
-
- delete ite;
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CProxyFrame::Purge
- //----------------------------------------------------------------------------------------
-
- ODSize FW_CProxyFrame::Purge(Environment* ev)
- {
- if (!IsFrameInMemory(ev))
- return 0; // already gone
-
- // [HLX] I am not sure about that. If purge is called in a middle of a drag&drop I
- // may not be the owner of this frame anymore ????
- FW_CAcquiredODFrame aqODContainingFrame = fEmbeddedFrame->AcquireContainingFrame(ev);
- FW_CAcquiredODPart aqODContainingPart = aqODContainingFrame->AcquirePart(ev);
- if (aqODContainingPart != fPart->GetODPart(ev))
- fPurgeable = FALSE;
-
- if (fPurgeable)
- {
- // ----- HLX] OpenDoc Bug????
- fEmbeddedFrame->Externalize(ev);
- FW_CAcquiredODPart aqEmbeddedPart = fEmbeddedFrame->AcquirePart(ev);
- aqEmbeddedPart->Externalize(ev);
- ExternalizeInScope(ev, aqEmbeddedPart, fEmbeddedFrame);
- // ----- [HLX] OpenDoc Bug????
-
- // ----- Remove its facets
- FW_ASSERT(fPart->IsValidDisplayFrame(ev, fContainingFrameID));
- this->RemoveAllFacets(ev);
-
- // ----- Now I can release the frame
- Release(ev);
- }
-
- return 0; // [HLX] need to be able to get the size of what I am releasing
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CProxyFrame::InternalizeProxyFrame
- //----------------------------------------------------------------------------------------
- // returns true if valid
-
- FW_Boolean FW_CProxyFrame::InternalizeProxyFrame(Environment* ev, ODStorageUnitView* suView, FW_CCloneInfo* cloneInfo)
- {
- ODStorageUnitRef aSURef;
- FW_CByteArray byteArray;
-
- // ----- Read reference -----
- suView->GetValue(ev, sizeof(ODStorageUnitRef), byteArray);
- byteArray.CopyBuffer(&aSURef, sizeof(ODStorageUnitRef));
-
- if (!suView->IsValidStorageUnitRef(ev, aSURef))
- return FALSE;
-
- ODStorageUnitID fromFrameID = suView->GetIDFromStorageUnitRef(ev, aSURef);
-
- if (cloneInfo != NULL)
- {
- // ----- We are cloning -----
- fFrameID = cloneInfo->Clone(ev, fromFrameID, 0, 0);
- fFrameDraft = cloneInfo->GetToDraft(ev);
-
- fContainingFrameID = cloneInfo->GetScopeFrame(ev)->GetID(ev);
- }
- else
- {
- // ----- Save the frame's draft
- fFrameDraft = suView->GetStorageUnit(ev)->GetDraft(ev);
-
- // ----- Cache the id of the containing frame -----
- FW_CAcquiredODStorageUnit aqFrameSU = fFrameDraft->AcquireStorageUnit(ev, fromFrameID);
- aqFrameSU->Focus(ev, kODPropContainingFrame, kODPosUndefined, kODWeakStorageUnitRef, 0, kODPosUndefined);
-
- aqFrameSU->GetValue(ev, sizeof(ODStorageUnitRef), byteArray);
- byteArray.CopyBuffer(&aSURef, sizeof(ODStorageUnitRef));
-
- if (aqFrameSU->IsValidStorageUnitRef(ev, aSURef))
- fContainingFrameID = aqFrameSU->GetIDFromStorageUnitRef(ev, aSURef);
- else
- fContainingFrameID = kODNULLID;
-
- // ----- Now we can set the frame ID -----
- fFrameID = fromFrameID;
- }
-
- return TRUE;
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CProxyFrame::ExternalizeProxyFrame
- //----------------------------------------------------------------------------------------
-
- FW_Boolean FW_CProxyFrame::ExternalizeProxyFrame(Environment* ev, ODStorageUnitView* suView, FW_CCloneInfo* cloneInfo)
- {
- FW_ASSERT(fPart->IsValidDisplayFrame(ev, fContainingFrameID));
-
- // We only externalize frame that have a persistent containing Frame
- FW_Boolean externalize = GetContainingFrame(ev)->IsPersistent(ev);
-
- ODStorageUnitID frameID = fFrameID;
-
- if (cloneInfo != NULL)
- {
- if (cloneInfo->GetScopeFrame(ev) != NULL)
- externalize = (cloneInfo->GetScopeFrame(ev)->GetID(ev) == fContainingFrameID);
-
- if (externalize)
- frameID = cloneInfo->Clone(ev, fFrameID, 0, fFrameID);
- }
-
- if (externalize)
- {
- // ----- Write out the embedded frame reference -----
- ODStorageUnitRef aSURef;
- FW_CByteArray byteArray(&aSURef, sizeof(ODStorageUnitRef));
- suView->GetStrongStorageUnitRef(ev, frameID, aSURef);
- suView->SetValue(ev, byteArray);
- }
-
- return externalize;
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CProxyFrame::SetProxy
- //----------------------------------------------------------------------------------------
-
- void FW_CProxyFrame::SetProxy(Environment* ev, FW_MProxy* proxy)
- {
- FW_UNUSED(ev);
- FW_ASSERT(fProxy == NULL || proxy == NULL || fProxy == proxy);
- fProxy = proxy;
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CProxyFrame::SetContainingFrame
- //----------------------------------------------------------------------------------------
- // We can't change the containing frame is this proxyframe is not orphaned
-
- void FW_CProxyFrame::SetContainingFrame(Environment* ev, FW_CEmbeddingFrame* containingFrame)
- {
- FW_ASSERT(IsOrphan(ev));
- fContainingFrameID = containingFrame->GetID(ev);
-
- ODFrame* embeddedFrame = GetFrame(ev); // Need to bring it into memory
- embeddedFrame->SetContainingFrame(ev, containingFrame->GetODFrame(ev));
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CProxyFrame::PrivAttach
- //----------------------------------------------------------------------------------------
-
- void FW_CProxyFrame::PrivAttach(Environment* ev)
- {
- FW_CEmbeddingFrame* embeddingFrame = GetContainingFrame(ev);
- if (embeddingFrame != NULL && !fAttached)
- {
- // [HLX] I have to load the frame. Is this a problem?
- ODFrame* odEmbeddedFrame = GetFrame(ev);
-
- odEmbeddedFrame->SetContainingFrame(ev, embeddingFrame->GetODFrame(ev));
- odEmbeddedFrame->SetInLimbo(ev, FALSE);
-
- // ----- It is now attached -----
- fAttached = TRUE;
-
- // ----- Create the facets -----
- CreateAllFacets(ev);
- }
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CProxyFrame::PrivDetach
- //----------------------------------------------------------------------------------------
-
- void FW_CProxyFrame::PrivDetach(Environment* ev)
- {
- FW_CEmbeddingFrame* embeddingFrame = GetContainingFrame(ev);
- if (embeddingFrame != NULL && fAttached)
- {
- this->RemoveAllFacets(ev);
-
- // [HLX] I have to load the frame. Is this a problem?
- ODFrame* odEmbeddedFrame = GetFrame(ev);
-
- // ----- Set the containing frame to null -----
- FW_CAcquiredODFrame aqODContainingFrame = odEmbeddedFrame->AcquireContainingFrame(ev);
- if (aqODContainingFrame == NULL || aqODContainingFrame == embeddingFrame->GetODFrame(ev))
- {
- odEmbeddedFrame->SetInLimbo(ev, TRUE);
- odEmbeddedFrame->SetContainingFrame(ev, NULL);
- }
-
- // ----- It is now detached -----
- fAttached = FALSE;
- }
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CProxyFrame::RemoveAllFacets
- //----------------------------------------------------------------------------------------
- // Remove all the facets of this proxyframe
-
- void FW_CProxyFrame::RemoveAllFacets(Environment* ev)
- {
- FW_CEmbeddingFrame* embeddingFrame = GetContainingFrame(ev);
-
- if (embeddingFrame && this->IsFrameInMemory(ev))
- {
- FW_CFrameFacetIterator ite(ev, embeddingFrame);
- for (ODFacet* facet = ite.First(ev); ite.IsNotComplete(ev); facet = ite.Next(ev))
- this->RemoveFacets(ev, embeddingFrame, facet);
- }
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CProxyFrame::RemoveFacets
- //----------------------------------------------------------------------------------------
- // Remove all the facet embedded in embeddingFacet
-
- void FW_CProxyFrame::RemoveFacets(Environment* ev, FW_CEmbeddingFrame* frame, ODFacet* embeddingFacet)
- {
- FW_ASSERT(frame != NULL);
- FW_ASSERT(embeddingFacet != NULL);
-
- if (!this->IsFrameInMemory(ev)) // if not in memory should not have any facets
- return;
-
- ODFrame* embeddedFrame = this->GetFrame(ev);
-
- FW_TOrderedCollection<ODFacet> tempCollect;
-
- // Attention: Do not try to iterate through all the facets of the embedded frame because
- // if we are in a middle of a drag&drop, the embedded frame may already have been stripped
- // of all its facets (in the case where the frame is reused, SetContainingFrame is called
- // which remove all the facets of the frame). But the hierarchy of facets is still there
- FW_CFacetIterator ite(ev, embeddingFacet, kODChildrenOnly, kODFrontToBack);
- ODFacet* facet;
- for (facet = ite.First(ev); ite.IsNotComplete(ev); facet = ite.Next(ev))
- {
- if (facet->GetFrame(ev) == embeddedFrame)
- tempCollect.AddLast(facet);
- }
-
- FW_TOrderedCollectionIterator<ODFacet> ite2(&tempCollect);
- for (facet = ite2.First(); ite2.IsNotComplete(); facet = ite2.Next())
- {
- frame->EmbeddedFacetRemoved(ev, facet); // Notify Embedding frame
- fProxy->PrivEmbeddedFacetRemoved(ev); // Notify proxy
-
- embeddingFacet->RemoveFacet(ev, facet);
- delete facet;
- }
-
- // RemoveAll will be called by the destructor of tempCollect
- // tempCollect.RemoveAll();
- }
-
-
- //----------------------------------------------------------------------------------------
- // FW_CEmbeddingFrame::CreateAllFacets
- //----------------------------------------------------------------------------------------
-
- FW_DECLARE_THROW_POINT (FW_CProxyFrame_CreateAllFacets);
-
- void FW_CProxyFrame::CreateAllFacets(Environment* ev)
- {
- FW_CEmbeddingFrame* embeddingFrame = GetContainingFrame(ev);
- FW_ASSERT(embeddingFrame);
-
- if (!IsFrameInMemory(ev) || !fProxy->IsShown(ev))
- return;
-
- FW_CFrameFacetIterator ite(ev, embeddingFrame);
- // Exception Handling: as with all loops, if one pass fails we need to undo the
- // effects of the previous ones.
- FW_TRY
- {
- for (ODFacet* containingFacet = ite.First(ev); ite.IsNotComplete(ev); containingFacet = ite.Next(ev))
- {
- CreateFacets(ev, embeddingFrame, containingFacet);
-
- // Testing: what happens if one facet is created and then we fail? (as
- // if we tried and failed to create two facets?)
- FW_CHECK_THROW_POINT (FW_CProxyFrame_CreateAllFacets);
- }
- }
- FW_CATCH_BEGIN
- FW_CATCH_EVERYTHING ()
- {
- RemoveAllFacets(ev);
- FW_THROW_SAME ();
- }
- FW_CATCH_END
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CProxyFrame::CreateFacets
- //----------------------------------------------------------------------------------------
-
- FW_DECLARE_THROW_POINT (FW_CProxyFrame_CreateFacets);
-
- void FW_CProxyFrame::CreateFacets(Environment* ev, FW_CEmbeddingFrame* frame, ODFacet* embeddingFacet)
- {
- FW_ASSERT(embeddingFacet);
-
- if (!IsFrameInMemory(ev) || !fProxy->IsShown(ev))
- return;
-
- ODFrame* embeddedFrame = this->GetFrame(ev);
-
- FW_CAcquiredODShape proposedClipShape = FW_CopyAndRelease(ev, embeddedFrame->AcquireFrameShape(ev, NULL));
-
- frame->CreateEmbeddedFacet(ev,
- embeddingFacet,
- fProxy,
- embeddedFrame,
- proposedClipShape);
-
- // ----- I need to go through all the embedded facets because I don't know how many where added -----
- // For example, if we embedded Puzzle part then it would create 9 embedded facets. That's
- // why CreateEmbeddedFacet doesn't return a pointer to the "one" created facet.
- FW_TRY {
- FW_CFacetIterator ite(ev, embeddingFacet, kODChildrenOnly, kODFrontToBack);
- for (ODFacet* embeddedFacet = ite.First(ev); ite.IsNotComplete(ev); embeddedFacet = ite.Next(ev))
- {
- if (embeddedFacet->GetFrame(ev) == embeddedFrame)
- {
- embeddedFacet->SetSelected(ev, fProxy->GetSelectState(ev));
- frame->EmbeddedFacetAdded(ev, embeddedFacet); // Notify containing frame
- fProxy->PrivEmbeddedFacetAdded(ev); // Notify proxy
- }
-
- // Testing: what happens if one facet is created and then we fail? (as
- // if we tried and failed to create two facets?)
- FW_CHECK_THROW_POINT (FW_CProxyFrame_CreateFacets);
- }
- }
- FW_CATCH_BEGIN
- FW_CATCH_EVERYTHING () {
- // This actually removes embedded facets of the proxyFrame *in* this embeddingFacet
- RemoveFacets(ev, frame, embeddingFacet);
- FW_THROW_SAME ();
- }
- FW_CATCH_END
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CProxyFrame::PrivSetFrameGroup
- //----------------------------------------------------------------------------------------
-
- void FW_CProxyFrame::PrivSetFrameGroup(Environment* ev, ODID frameGroup)
- {
- GetFrame(ev)->SetFrameGroup(ev, frameGroup);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CProxyFrame::PrivChangeSequenceNumber
- //----------------------------------------------------------------------------------------
-
- void FW_CProxyFrame::PrivChangeSequenceNumber(Environment* ev, ODID sequenceNumber)
- {
- GetFrame(ev)->ChangeSequenceNumber(ev, sequenceNumber);
- }
-
-
-
-