CFx SDK Documentation  2022 SP0
DbPlotSettingsValidator.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, 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 Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 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 
34 class OdDbPlotSettings;
35 
40 
57 {
58 public:
60 
72  OdDbPlotSettings* pPlotSettings,
73  const OdString& plotDeviceName,
74  const OdString& mediaName = OdString::kEmpty) = 0;
75 
92  OdDbPlotSettings* pPlotSettings,
93  const OdString& mediaName) = 0;
94 
108  OdDbPlotSettings *pPlotSettings,
109  double xCoordinate,
110  double yCoordinate) = 0;
111 
112 
132  OdDbPlotSettings* pPlotSettings,
133  const PlotPaperUnits plotPaperUnits) = 0;
134 
135 
154  OdDbPlotSettings* pPlotSettings,
155  const PlotRotation plotRotation) = 0;
156 
164  OdDbPlotSettings* pPlotSettings,
165  bool plotCentered) = 0;
166 
187  OdDbPlotSettings* pPlotSettings,
188  const PlotType plotType) = 0;
189 
203  OdDbPlotSettings* pPlotSettings,
204  double xMin,
205  double yMin,
206  double xMax,
207  double yMax) = 0;
208 
219  OdDbPlotSettings* pPlotSettings,
220  const OdString& plotViewName) = 0;
221 
229  OdDbPlotSettings* pPlotSettings,
230  bool useStandardScale) = 0;
231 
243  OdDbPlotSettings* pPlotSettings,
244  double numerator,
245  double denominator) = 0;
246 
254  OdDbPlotSettings* pPlotSettings,
255  const OdString& currentStyleSheet) = 0;
256 
306  OdDbPlotSettings* pPlotSettings,
307  const StdScaleType stdScaleType) = 0;
308 
316  OdDbPlotSettings* pPlotSettings,
317  double standardScale) = 0;
318 
329 //FELIX_CHANGE_BEGIN
330 protected:
331  virtual void plotDeviceList(
332  OdArray<const OdChar*> & deviceList) = 0;
333  friend struct Helper;
334 public:
335  struct Helper;
336 //FELIX_CHANGE_END
337 
350 //FELIX_CHANGE_BEGIN
351 protected:
353  OdDbPlotSettings* pPlotSettings,
354  OdArray<const OdChar*> & mediaList) = 0;
355 public:
356  //FELIX_CHANGE_END
357 
370  OdDbPlotSettings *pPlotSettings,
371  const OdString& canonicalName) = 0;
372 
380  OdDbPlotSettings *pPlotSettings,
381  int mediaIndex) = 0;
382 
405  OdDbPlotSettings* pPlotSettings,
406  double paperWidth,
407  double paperHeight,
408  const PlotPaperUnits plotPaperUnits,
409  bool matchPrintableArea) = 0;
410 
421 //FELIX_CHANGE_BEGIN
423 protected:
425  OdArray<const OdChar*> & styleList) = 0;
426  friend class CExport2PDFDialog;
427 public:
428 //FELIX_CHANGE_END
429 
440 //FELIX_CHANGE_BEGIN
441 protected:
442  virtual void refreshLists(
443  OdDbPlotSettings* pPlotSettings) = 0;
445 public:
446 //FELIX_CHANGE_END
447 
448 
456  OdDbPlotSettings* pPlotSettings,
457  bool zoomToPaperOnUpdate) = 0;
458 
465  OdDbPlotSettings* pPlotSettings) = 0;
466 
467 //FELIX_CHANGE_BEGIN
468 #ifndef SWIG
469  virtual void plotDeviceList(OdArray<OdString> & deviceList) = 0;
470  virtual OdResult canonicalMediaNameList(OdDbPlotSettings* pPlotSettings, OdArray<OdString> & mediaList) = 0;
472 #endif
473 //FELIX_CHANGE_END
474 };
475 
480 
481 //FELIX_CHANGE_BEGIN
482 
487 
488 #ifndef SWIG
490 {
491 public:
493 
495  OdDbPlotSettings* pPlotSet,
496  const OdDbObjectId& id) = 0;
497 
498  virtual OdResult setPlotPaperSize(OdDbPlotSettings* pPlotSet, double paperWidth, double paperHeight) = 0;
499  virtual OdResult setMargins(OdDbPlotSettings* pPlotSet, double leftMargin, double topMargin, double rightMargin, double bottomMargin) = 0;
500  virtual OdResult setStyleSheet(OdDbPlotSettings* pPlotSet, const OdString& styleSheetName) = 0;
501 
504  {
505  friend class OdDbPlotSettingsValidatorImpl2;
506  public:
508  : m_flags(0), m_value(0), m_or(true)
509  {
510  }
512  : m_flags(0), m_value(0), m_or(true)
513  {
514  this->operator=(rh);
515  }
517  : m_flags(0), m_value(0), m_or(true)
518  {
519  this->operator=(rh);
520  }
522  {
523  reset();
524  }
525  void operator = (FlagResetter &rh)
526  {
527  std::swap(m_flags, rh.m_flags);
528  std::swap(m_value, rh.m_value);
529  std::swap(m_or, rh.m_or);
530  }
531  void operator = (FlagResetter &&rh)
532  {
533  std::swap(m_flags, rh.m_flags);
534  std::swap(m_value, rh.m_value);
535  std::swap(m_or, rh.m_or);
536  }
537  void reset()
538  {
539  if (m_flags)
540  {
541  if (m_or)
542  *m_flags |= m_value;
543  else
544  *m_flags &= ~m_value;
545  m_flags = 0;
546  } }
547  protected:
548  FlagResetter(unsigned int &flags, unsigned int value, bool set)
549  : m_flags(&flags), m_value(value), m_or(!set)
550  {
551  if (m_or)
552  *m_flags &= ~m_value;
553  else
554  *m_flags |= m_value;
555  }
556  unsigned int *m_flags, m_value;
557  bool m_or;
558  };
560 };
561 
563 #endif
564 //FELIX_CHANGE_END
565 
566 
567 #endif // OD_DBPLOTSETVAL_H
568 
#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
void swap(signal< Handler, SignalTraits, Allocator > &lhs, signal< Handler, SignalTraits, Allocator > &rhs)
FlagResetter(unsigned int &flags, unsigned int value, bool set)