VR-Forces 4.0.4 Class Documentation
include/vrfGuiCore/DtVrfSelectionHandler.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2008 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 /******************************************************************************
00006 ** $RCSfile: DtVrfSelectionHandler.h,v $ $Revision: 1.1 $ $State: Exp $
00007 ******************************************************************************/
00008 
00011 
00013 
00014 #pragma once
00015 
00016 #include <vrfGuiCore/vrfGuiCore.h>
00017 #include <vrfGuiCore/DtVrfObjectDataState.h>
00018 #include <vrfGuiCore/DtVrfStateViewCollectionManager.h>
00019 
00020 #include <vrvUtil/DtVirtualBaseClass.h>
00021 #include <vrvCore/DtSelectionManager.h>
00022 #include <vrvCore/DtUniqueID.h>
00023 #include <vrvCore/DtSimState.h>
00024 #include <vrvCore/DtEntityState.h>
00025 
00026 #include <vlpi/entityType.h>
00027 #include <boost/signal.hpp>
00028 
00029 namespace makVrv
00030 {
00031    class DtDe;
00032    class DtBaseStateView;
00033    class DtSimEntry;
00034    class DtChannel;
00035 }
00036 
00037 namespace makVrf
00038 {
00041    class DT_DLL_VRFGUICORE DtVrfSelectionHandler : public makVrv::DtVirtualBaseClass
00042    {
00043    public:
00044       DtVrfSelectionHandler(makVrv::DtDe&);
00045       virtual ~DtVrfSelectionHandler();
00046 
00048       static DtVrfSelectionHandler& instance(makVrv::DtDe& de);
00049 
00050    public:
00052       virtual void currentSelectionChanged(const makVrv::DtSelectionManager::IdSet& selected);
00053       boost::signal<void (const makVrv::DtSelectionManager::IdSet& selected)> signal_currentSelectionChanged;
00054 
00056       virtual std::vector<std::string> getSelectedNames() const;
00057       virtual std::vector<std::string> getSelectedNames(const makVrv::DtSelectionManager::IdSet&) const;
00058 
00060       virtual std::vector<makVrv::DtSimEntry*> getSelectedEntries() const;
00061       virtual std::vector<makVrv::DtSimEntry*> getSelectedEntries(const makVrv::DtSelectionManager::IdSet&) const;
00062 
00064       virtual bool allObjectsAreVrfSimulated(const makVrv::DtSelectionManager::IdSet&) const;
00065 
00067       virtual bool objectIsVrfSimulated(makVrv::DtUniqueID) const;
00068 
00069       virtual const makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>* getVrlinkSimulatedState(makVrv::DtUniqueID id) const;
00070 
00073       virtual DtEntityType getEntityTypeFromUniqueID(makVrv::DtUniqueID id) const;
00074 
00079       virtual void selectItemsInScreenBox(makVrv::DtChannel& channel,
00080          int minX, int minY, int maxX, int maxY, const makVrv::DtSelectionManager::IdSet& mergeWith = makVrv::DtSelectionManager::IdSet());
00081 
00083       virtual bool isWithinScreenBounds(makVrv::DtChannel&, const makVrv::DtUniqueID& id, const makVrv::DtVrlinkSimulatedBaseState*,
00084          int minX, int minY, int maxX, int maxY) const;
00085       virtual makVrv::DtUniqueID sceneObjectIdFromElementId( makVrv::DtChannel& channel, const makVrv::DtUniqueID& elementID ) const;
00086 
00088       virtual void setLastDatabaseLocation(const DtVector&);
00089 
00091       virtual const DtVector& lastDatabaseLocation() const;
00092 
00094       virtual void setAllowNonVrfItemsToBeManipulated(bool);
00095       virtual bool allowNonVrfItemsToBeManipulated() const;
00096 
00097    protected:
00098 
00099       virtual void slot_onCurrentSelectionChanged(
00100          const makVrv::DtSelectionManager::IdSet& selected,
00101          const makVrv::DtSelectionManager::IdSet& deselected);
00102 
00103       virtual void slot_onObjectEntryAdded(makVrv::DtSimObjectEntry&);
00104 
00107       virtual void slot_onSimStateAdded(makVrv::DtSimObjectEntry& entry);
00108 
00109       virtual void slot_onStateViewUpdated(makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>*);
00110 
00111       virtual void slot_deInitialized(makVrv::DtDe&);
00112 
00113    public:
00114       boost::signal<void (const DtVector&)> signal_lastDatabaseLocationSet;
00115 
00116    protected:
00117       makVrv::DtDe&              myDe;
00118       makVrv::DtSelectionManager::IdSet myLastSelection;
00119       DtVrfStateViewCollectionManager* myStateViewCollectionManager;
00120       DtVector myLastDatabaseLocation;
00121       bool myAllowNonVrfItemsToBeManipulated;
00122    };
00123 }

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)