///////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
// All rights reserved.
//
// This software and its documentation and related materials are owned by
// the Alliance. The software may only be incorporated into application
// programs owned by members of the Alliance, subject to a signed
// Membership Agreement and Supplemental Software License Agreement with the
// Alliance. The structure and organization of this software are the valuable
// trade secrets of the Alliance and its suppliers. The software is also
// protected by copyright law and international treaty provisions. Application
// programs incorporating this software must include the following statement
// with their copyright notices:
//
// This application incorporates Open Design Alliance software pursuant to a license
// agreement with Open Design Alliance.
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
// All rights reserved.
//
// By use of this software, its documentation or related materials, you
// acknowledge and accept the above terms.
///////////////////////////////////////////////////////////////////////////////
#ifndef _STEP_GSMANAGER_H_
#define _STEP_GSMANAGER_H_
#include "StepBuildOptions.h"
class OdDAIObjectId;
class OdStepFile;
class OdGiContextForStepDatabase;
#include "Gs/Gs.h"
/** \details
An abstract class that implements base functionality for working with layout views.
*/
class STEPCORE_EXPORT OdGsStepLayoutHelper : public OdGsDevice
{
public:
//DOM-IGNORE-BEGIN
ODRX_DECLARE_MEMBERS(OdGsStepLayoutHelper);
//DOM-IGNORE-END
/** \details
Retrieves the current layout identifier.
\returns Returns the layout object's identifier associated with the object.
*/
virtual OdDAIObjectId layoutId() const = 0;
/** \details
Retrieves the current active Gs view object associated with the object.
\returns Returns a smart pointer to the OdGsView object.
*/
virtual OdGsViewPtr activeView() const = 0;
/** \details
Sets a new active Gs view for the layout associated with the object.
\param pView [in] A raw pointer to the OdGsView object.
*/
virtual void makeViewActive(OdGsView* pView) = 0;
/** \details
Retrieves the current Gs model instance associated with the object.
\returns Returns a raw pointer to the OdGsModel object associated with the object.
*/
virtual OdGsModel* gsModel() = 0;
/** \details
Retrieves the current underlying Gs device object associated with the object.
\returns Returns a smart pointer to the OdGsDevice underlying object associated with the object.
*/
virtual OdGsDevicePtr underlyingDevice() const = 0;
/** \details
Sets a new active viewport for the object.
\param screenPt [in] A pick point in the device coordinates that defines the viewport.
\returns Returns true if the new active viewport was successfully set; otherwise, the method returns false.
*/
virtual bool setActiveViewport(const OdGePoint2d& screenPt) = 0;
/** \details
Sets a new active viewport for the object.
\param id [in] An identifier of the new viewport object that should be set as active.
\returns Returns true if the new active viewport was successfully set; otherwise, the method returns false.
*/
virtual bool setActiveViewport(const OdDAIObjectId& id) = 0;
/** \details
Restores the layout GsView database linkage state.
*/
virtual void restoreGsViewDbLinkState() = 0;
};
/** \details
A data type that represents a smart pointer to an OdGsStepModelHelper object.
*/
typedef OdSmartPtr OdGsStepModelHelperPtr;
/** \details
Contains declarations of common functions for Gs object management.
*/
namespace OdStepGsManager
{
/** \details
Sets active views for the layout.
\param reprContextId [in] An identifier of a representation context object.
\param pDevice [in] A raw pointer to a Gs device object.
\param pGiCtx [in] A raw pointer to a OdGsDevice-derived STEP wrapper object that handles appropriate OdGsDevice object calls.
*/
STEPCORE_EXPORT OdGsStepLayoutHelperPtr setupActiveLayoutViews(OdGsDevice* pDevice, OdGiContextForStepDatabase* pGiCtx);
//DOM-IGNORE-BEGIN
/** \details
Sets layout views.
\param layoutId [in] A layout object identifier.
\param pDevice [in] A pointer to a Gs device.
\param pGiCtx [in] A pointer to a PRC database context.
\returns Returns an OdGsDevice-derived wrapper that handles OdGsDevice object calls.
*/
//DOM-IGNORE-END
//STEPCORE_EXPORT OdGsStepLayoutHelperPtr setupLayoutViews(OdStep::OdStepRepresentationContextPtr layoutId, OdGsDevice* pDevice,
// OdGiContextForStepDatabase* pGiCtx);
/** \details
Sets a new palette associated with a specified layout for a specified OdGsDevice-derived object.
\param device [in] A raw pointer to an OdGsDevice-derived object.
\param giContext [in] A raw pointer to a