CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
DbPlotSettingsValidator.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, Open Design Alliance (the "Alliance").
3// All rights reserved.
4//
5// This software and its documentation and related materials are owned by
6// the Alliance. The software may only be incorporated into application
7// programs owned by members of the Alliance, subject to a signed
8// Membership Agreement and Supplemental Software License Agreement with the
9// Alliance. The structure and organization of this software are the valuable
10// trade secrets of the Alliance and its suppliers. The software is also
11// protected by copyright law and international treaty provisions. Application
12// programs incorporating this software must include the following statement
13// with their copyright notices:
14//
15// This application incorporates Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 by Open Design Alliance.
18// All rights reserved.
19//
20// By use of this software, its documentation or related materials, you
21// acknowledge and accept the above terms.
23
24
25
26
27#ifndef OD_DBPLOTSETVAL_H
28#define OD_DBPLOTSETVAL_H
29
30#include "RxObject.h"
31#include "DbPlotSettings.h"
32#include "OdArray.h"
33
35
40
55{
56public:
58
70 OdDbPlotSettings* pPlotSettings,
71 const OdString& plotDeviceName,
72 const OdString& mediaName = OdString::kEmpty) = 0;
73
90 OdDbPlotSettings* pPlotSettings,
91 const OdString& mediaName) = 0;
92
106 OdDbPlotSettings *pPlotSettings,
107 double xCoordinate,
108 double yCoordinate) = 0;
109
110
130 OdDbPlotSettings* pPlotSettings,
131 const PlotPaperUnits plotPaperUnits) = 0;
132
133
152 OdDbPlotSettings* pPlotSettings,
153 const PlotRotation plotRotation) = 0;
154
162 OdDbPlotSettings* pPlotSettings,
163 bool plotCentered) = 0;
164
188 OdDbPlotSettings* pPlotSettings,
189 const PlotType plotType) = 0;
190
204 OdDbPlotSettings* pPlotSettings,
205 double xMin,
206 double yMin,
207 double xMax,
208 double yMax) = 0;
209
220 OdDbPlotSettings* pPlotSettings,
221 const OdString& plotViewName) = 0;
222
230 OdDbPlotSettings* pPlotSettings,
231 bool useStandardScale) = 0;
232
244 OdDbPlotSettings* pPlotSettings,
245 double numerator,
246 double denominator) = 0;
247
255 OdDbPlotSettings* pPlotSettings,
256 const OdString& currentStyleSheet) = 0;
257
307 OdDbPlotSettings* pPlotSettings,
308 const StdScaleType stdScaleType) = 0;
309
317 OdDbPlotSettings* pPlotSettings,
318 double standardScale) = 0;
319
330//FELIX_CHANGE_BEGIN
331protected:
332 virtual void plotDeviceList(
333 OdArray<const OdChar*> & deviceList) = 0;
334 friend struct Helper;
335public:
336 struct Helper;
337//FELIX_CHANGE_END
338
351//FELIX_CHANGE_BEGIN
352protected:
354 OdDbPlotSettings* pPlotSettings,
355 OdArray<const OdChar*> & mediaList) = 0;
356public:
357 //FELIX_CHANGE_END
358
371 OdDbPlotSettings *pPlotSettings,
372 const OdString& canonicalName) = 0;
373
381 OdDbPlotSettings *pPlotSettings,
382 int mediaIndex) = 0;
383
406 OdDbPlotSettings* pPlotSettings,
407 double paperWidth,
408 double paperHeight,
409 const PlotPaperUnits plotPaperUnits,
410 bool matchPrintableArea) = 0;
411
422//FELIX_CHANGE_BEGIN
424protected:
426 OdArray<const OdChar*> & styleList) = 0;
427 friend class CExport2PDFDialog;
428public:
429//FELIX_CHANGE_END
430
441//FELIX_CHANGE_BEGIN
442protected:
443 virtual void refreshLists(
444 OdDbPlotSettings* pPlotSettings) = 0;
446public:
447//FELIX_CHANGE_END
448
449
457 OdDbPlotSettings* pPlotSettings,
458 bool zoomToPaperOnUpdate) = 0;
459
466 OdDbPlotSettings* pPlotSettings) = 0;
467
468//FELIX_CHANGE_BEGIN
469#if !defined (SWIGWIN) && !defined (SWIG)
470 virtual void plotDeviceList(OdArray<OdString> & deviceList) = 0;
471 virtual OdResult canonicalMediaNameList(OdDbPlotSettings* pPlotSettings, OdArray<OdString> & mediaList) = 0;
473#endif
474//FELIX_CHANGE_END
475};
476
481
482//FELIX_CHANGE_BEGIN
483
488
489#ifndef SWIG
491{
492public:
494
496 OdDbPlotSettings* pPlotSet,
497 const OdDbObjectId& id) = 0;
498
499 virtual OdResult setPlotPaperSize(OdDbPlotSettings* pPlotSet, double paperWidth, double paperHeight) = 0;
500 virtual OdResult setMargins(OdDbPlotSettings* pPlotSet, double leftMargin, double topMargin, double rightMargin, double bottomMargin) = 0;
501 virtual OdResult setStyleSheet(OdDbPlotSettings* pPlotSet, const OdString& styleSheetName) = 0;
502
505 {
506 friend class OdDbPlotSettingsValidatorImpl2;
507 public:
509 : m_flags(0), m_value(0), m_or(true)
510 {
511 }
513 : m_flags(0), m_value(0), m_or(true)
514 {
515 this->operator=(rh);
516 }
518 : m_flags(0), m_value(0), m_or(true)
519 {
520 this->operator=(rh);
521 }
523 {
524 reset();
525 }
526 void operator = (FlagResetter &rh)
527 {
528 std::swap(m_flags, rh.m_flags);
529 std::swap(m_value, rh.m_value);
530 std::swap(m_or, rh.m_or);
531 }
532 void operator = (FlagResetter &&rh)
533 {
534 std::swap(m_flags, rh.m_flags);
535 std::swap(m_value, rh.m_value);
536 std::swap(m_or, rh.m_or);
537 }
538 void reset()
539 {
540 if (m_flags)
541 {
542 if (m_or)
543 *m_flags |= m_value;
544 else
545 *m_flags &= ~m_value;
546 m_flags = 0;
547 } }
548 protected:
549 FlagResetter(unsigned int &flags, unsigned int value, bool set)
550 : m_flags(&flags), m_value(value), m_or(!set)
551 {
552 if (m_or)
553 *m_flags &= ~m_value;
554 else
555 *m_flags |= m_value;
556 }
557 unsigned int *m_flags, m_value;
558 bool m_or;
559 };
561};
562
564#endif
565//FELIX_CHANGE_END
566
567
568#endif // OD_DBPLOTSETVAL_H
569
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
OdSmartPtr< OdDbPlotSettingsValidator2 > OdDbPlotSettingsValidator2Ptr
OdSmartPtr< OdDbPlotSettingsValidator > OdDbPlotSettingsValidatorPtr
OdDbPlotSettings::StdScaleType StdScaleType
TOOLKIT_EXPORT void fxRefreshLists(OdDbPlotSettingsValidator *p, OdDbPlotSettings *pPlotSettings)
OdDbPlotSettings::PlotRotation PlotRotation
OdDbPlotSettings::PlotType PlotType
OdDbPlotSettings::PlotPaperUnits PlotPaperUnits
true
Definition: DimVarDefs.h:2046
OdResult
Definition: OdResult.h:29
virtual OdResult setStyleSheet(OdDbPlotSettings *pPlotSet, const OdString &styleSheetName)=0
virtual OdResult recalculatePlotData(OdDbPlotSettings *pPlotSet)=0
virtual OdResult setPlotViewId(OdDbPlotSettings *pPlotSet, const OdDbObjectId &id)=0
virtual OdResult setPlotPaperSize(OdDbPlotSettings *pPlotSet, double paperWidth, double paperHeight)=0
virtual FlagResetter disablePlotDataRecomputation()=0
ODRX_DECLARE_MEMBERS(OdDbPlotSettingsValidator2)
virtual OdResult setMargins(OdDbPlotSettings *pPlotSet, double leftMargin, double topMargin, double rightMargin, double bottomMargin)=0
virtual OdResult setCustomPrintScale(OdDbPlotSettings *pPlotSettings, double numerator, double denominator)=0
virtual OdResult recalculatePlotData(OdDbPlotSettings *pPlotSet)=0
virtual OdResult plotStyleSheetList(OdArray< const OdChar * > &styleList)=0
virtual OdString getLocaleMediaName(OdDbPlotSettings *pPlotSettings, const OdString &canonicalName)=0
virtual OdResult setPlotViewName(OdDbPlotSettings *pPlotSettings, const OdString &plotViewName)=0
virtual OdResult canonicalMediaNameList(OdDbPlotSettings *pPlotSettings, OdArray< OdString > &mediaList)=0
virtual OdResult setCurrentStyleSheet(OdDbPlotSettings *pPlotSettings, const OdString &currentStyleSheet)=0
virtual OdResult setPlotOrigin(OdDbPlotSettings *pPlotSettings, double xCoordinate, double yCoordinate)=0
virtual OdResult canonicalMediaNameList(OdDbPlotSettings *pPlotSettings, OdArray< const OdChar * > &mediaList)=0
virtual OdString getLocaleMediaName(OdDbPlotSettings *pPlotSettings, int mediaIndex)=0
friend TOOLKIT_EXPORT void fxRefreshLists(OdDbPlotSettingsValidator *p, OdDbPlotSettings *pPlotSettings)
virtual OdResult plotStyleSheetList(OdArray< OdString > &styleList)=0
virtual OdResult setDefaultPlotConfig(OdDbPlotSettings *pPlotSettings)=0
virtual OdResult setPlotCfgName(OdDbPlotSettings *pPlotSettings, const OdString &plotDeviceName, const OdString &mediaName=OdString::kEmpty)=0
virtual OdResult setStdScale(OdDbPlotSettings *pPlotSettings, double standardScale)=0
virtual OdResult setZoomToPaperOnUpdate(OdDbPlotSettings *pPlotSettings, bool zoomToPaperOnUpdate)=0
virtual OdResult setStdScaleType(OdDbPlotSettings *pPlotSettings, const StdScaleType stdScaleType)=0
virtual OdResult setClosestMediaName(OdDbPlotSettings *pPlotSettings, double paperWidth, double paperHeight, const PlotPaperUnits plotPaperUnits, bool matchPrintableArea)=0
virtual OdResult setPlotRotation(OdDbPlotSettings *pPlotSettings, const PlotRotation plotRotation)=0
virtual OdResult setPlotWindowArea(OdDbPlotSettings *pPlotSettings, double xMin, double yMin, double xMax, double yMax)=0
virtual void plotDeviceList(OdArray< const OdChar * > &deviceList)=0
virtual void plotDeviceList(OdArray< OdString > &deviceList)=0
virtual OdResult setUseStandardScale(OdDbPlotSettings *pPlotSettings, bool useStandardScale)=0
virtual OdResult setPlotPaperUnits(OdDbPlotSettings *pPlotSettings, const PlotPaperUnits plotPaperUnits)=0
virtual void refreshLists(OdDbPlotSettings *pPlotSettings)=0
virtual OdResult setPlotCentered(OdDbPlotSettings *pPlotSettings, bool plotCentered)=0
virtual OdResult setCanonicalMediaName(OdDbPlotSettings *pPlotSettings, const OdString &mediaName)=0
virtual OdResult setPlotType(OdDbPlotSettings *pPlotSettings, const PlotType plotType)=0
ODRX_DECLARE_MEMBERS(OdDbPlotSettingsValidator)
FIRSTDLL_EXPORT_STATIC static const OdString kEmpty
Definition: OdString.h:98
GLsizei const GLfloat * value
Definition: gles2_ext.h:302
FlagResetter(unsigned int &flags, unsigned int value, bool set)