Verovio
Source code documentation
options.h
1 // Name: options.h
3 // Author: Laurent Pugin
4 // Created: 2005
5 // Copyright (c) Authors and others. All rights reserved.
7 
8 #ifndef __VRV_OPTIONS_H__
9 #define __VRV_OPTIONS_H__
10 
11 #ifdef CUSTOM_VEROVIO_OPTIONS
12 #include "custom_options.h"
13 #else
14 
15 #include <map>
16 #include <string>
17 #include <vector>
18 
19 //----------------------------------------------------------------------------
20 
21 #include "attalternates.h"
22 #include "atttypes.h"
23 #include "smufl.h"
24 #include "toolkitdef.h"
25 #include "vrvdef.h"
26 
27 //----------------------------------------------------------------------------
28 
29 #include "jsonxx.h"
30 
31 //----------------------------------------------------------------------------
32 
33 namespace vrv {
34 
35 class OptionGrp;
36 
37 //----------------------------------------------------------------------------
38 // Default scaling (%) and spacing (units) values
39 //----------------------------------------------------------------------------
40 
41 #define DEFAULT_SCALE 100
42 #define MIN_SCALE 1
43 #define MAX_SCALE 1000
44 
45 //----------------------------------------------------------------------------
46 // Options
47 //----------------------------------------------------------------------------
48 
49 // the space between each lyric line in units
50 #define TEMP_LYRIC_LINE_SPACE 5.0
51 // the key signature spacing factor
52 #define TEMP_KEYSIG_STEP 0.4
53 // the key signature spacing factor for natural (usually slighly larger)
54 #define TEMP_KEYSIG_NATURAL_STEP 0.6
55 
56 //----------------------------------------------------------------------------
57 // Option defines
58 //----------------------------------------------------------------------------
59 
60 enum option_BREAKS { BREAKS_none = 0, BREAKS_auto, BREAKS_line, BREAKS_smart, BREAKS_encoded };
61 
62 enum option_CONDENSE { CONDENSE_none = 0, CONDENSE_auto, CONDENSE_all, CONDENSE_encoded };
63 
64 enum option_DURATION_EQ { DURATION_EQ_brevis = 0, DURATION_EQ_semibrevis, DURATION_EQ_minima };
65 
66 enum option_ELISION {
67  ELISION_regular = SMUFL_E551_lyricsElision,
68  ELISION_narrow = SMUFL_E550_lyricsElisionNarrow,
69  ELISION_wide = SMUFL_E552_lyricsElisionWide,
70  ELISION_unicode = UNICODE_UNDERTIE
71 };
72 
73 enum option_FONT_FALLBACK { FONT_FALLBACK_Leipzig = 0, FONT_FALLBACK_Bravura };
74 
75 enum option_FOOTER { FOOTER_none = 0, FOOTER_auto, FOOTER_encoded, FOOTER_always };
76 
77 enum option_HEADER { HEADER_none = 0, HEADER_auto, HEADER_encoded };
78 
79 enum option_LIGATURE_OBL { LIGATURE_OBL_auto = 0, LIGATURE_OBL_straight, LIGATURE_OBL_curved };
80 
81 enum option_MENSURAL_RESP { MENSURAL_RESP_none = 0, MENSURAL_RESP_auto, MENSURAL_RESP_selection };
82 
83 enum option_MULTIRESTSTYLE {
84  MULTIRESTSTYLE_auto = 0,
85  MULTIRESTSTYLE_default,
86  MULTIRESTSTYLE_block,
87  MULTIRESTSTYLE_symbols
88 };
89 
90 enum option_SYSTEMDIVIDER { SYSTEMDIVIDER_none = 0, SYSTEMDIVIDER_auto, SYSTEMDIVIDER_left, SYSTEMDIVIDER_left_right };
91 
92 enum option_SMUFLTEXTFONT { SMUFLTEXTFONT_embedded = 0, SMUFLTEXTFONT_linked, SMUFLTEXTFONT_none };
93 
94 //----------------------------------------------------------------------------
95 // Option
96 //----------------------------------------------------------------------------
97 
98 enum class OptionsCategory { None, Base, General, Json, Layout, Mensural, Margins, Midi, Selectors, Full };
99 
103 class Option {
104 public:
105  // constructors and destructors
106  Option()
107  {
108  m_shortOption = 0;
109  m_isCmdOnly = false;
110  }
111  virtual ~Option() {}
112  virtual void CopyTo(Option *option) = 0;
113 
114  void SetKey(const std::string &key) { m_key = key; }
115  std::string GetKey() const { return m_key; }
116 
117  virtual bool SetValueBool(bool value);
118  virtual bool SetValueDbl(double value);
119  virtual bool SetValueArray(const std::vector<std::string> &values);
120  virtual bool SetValue(const std::string &value);
121  virtual std::string GetStrValue() const = 0;
122  virtual std::string GetDefaultStrValue() const = 0;
123 
124  virtual void Reset() = 0;
125  virtual bool IsSet() const = 0;
126 
127  void SetInfo(const std::string &title, const std::string &description);
128  std::string GetTitle() const { return m_title; }
129  std::string GetDescription() const { return m_description; }
130 
131  void SetShortOption(char shortOption, bool isCmdOnly);
132  char GetShortOption() const { return m_shortOption; }
133  bool IsCmdOnly() const { return m_isCmdOnly; }
134  virtual bool IsArgumentRequired() const { return true; }
135 
139  jsonxx::Object ToJson() const;
140 
141 public:
142  //----------------//
143  // Static members //
144  //----------------//
145 
149  static const std::map<int, std::string> s_breaks;
150  static const std::map<int, std::string> s_condense;
151  static const std::map<int, std::string> s_durationEq;
152  static const std::map<int, std::string> s_elision;
153  static const std::map<int, std::string> s_fontFallback;
154  static const std::map<int, std::string> s_footer;
155  static const std::map<int, std::string> s_header;
156  static const std::map<int, std::string> s_ligatureOblique;
157  static const std::map<int, std::string> s_mensuralResponsiveness;
158  static const std::map<int, std::string> s_multiRestStyle;
159  static const std::map<int, std::string> s_pedalStyle;
160  static const std::map<int, std::string> s_systemDivider;
161  static const std::map<int, std::string> s_smuflTextFont;
162 
163 protected:
164  std::string m_title;
165  std::string m_description;
166 
167 private:
168  std::string m_key;
169  /* the character for a short option - not set (0) by default) */
170  char m_shortOption;
171  /* a flag indicating that the option is available only on the command line */
172  bool m_isCmdOnly;
173 };
174 
175 //----------------------------------------------------------------------------
176 // OptionBool
177 //----------------------------------------------------------------------------
178 
182 class OptionBool : public Option {
183 public:
184  // constructors and destructors
185  OptionBool() { m_defaultValue = false; }
186  virtual ~OptionBool() {}
187  void CopyTo(Option *option) override;
188  void Init(bool defaultValue);
189 
190  bool SetValueBool(bool value) override;
191  bool SetValueDbl(double value) override;
192  bool SetValue(const std::string &value) override;
193  std::string GetStrValue() const override;
194  std::string GetDefaultStrValue() const override;
195 
196  void Reset() override;
197  bool IsSet() const override;
198 
199  bool GetValue() const { return m_value; }
200  bool GetDefault() const { return m_defaultValue; }
201  bool SetValue(bool value);
202 
203  bool IsArgumentRequired() const override { return false; }
204 
205 private:
206  //
207 public:
208  //
209 private:
210  bool m_value;
211  bool m_defaultValue;
212 };
213 
214 //----------------------------------------------------------------------------
215 // OptionDbl
216 //----------------------------------------------------------------------------
217 
221 class OptionDbl : public Option {
222 public:
223  // constructors and destructors
224  OptionDbl()
225  {
226  m_defaultValue = 0.0;
227  m_minValue = 0.0;
228  m_maxValue = 0.0;
229  m_definitionFactor = false;
230  }
231  virtual ~OptionDbl() {}
232  void CopyTo(Option *option) override;
233  void Init(double defaultValue, double minValue, double maxValue, bool definitionFactor = false);
234 
235  bool SetValueDbl(double value) override;
236  bool SetValue(const std::string &value) override;
237  std::string GetStrValue() const override;
238  std::string GetDefaultStrValue() const override;
239 
240  void Reset() override;
241  bool IsSet() const override;
242 
243  double GetValue() const;
244  double GetUnfactoredValue() const;
245  double GetDefault() const { return m_defaultValue; }
246  double GetMin() const { return m_minValue; }
247  double GetMax() const { return m_maxValue; }
248  bool SetValue(double value);
249 
250 private:
251  //
252 public:
253  //
254 private:
255  double m_value;
256  double m_defaultValue;
257  double m_minValue;
258  double m_maxValue;
259  bool m_definitionFactor;
260 };
261 
262 //----------------------------------------------------------------------------
263 // OptionInt
264 //----------------------------------------------------------------------------
265 
269 class OptionInt : public Option {
270 public:
271  // constructors and destructors
272  OptionInt()
273  {
274  m_defaultValue = 0;
275  m_minValue = 0;
276  m_maxValue = 0;
277  m_definitionFactor = false;
278  }
279  virtual ~OptionInt() {}
280  void CopyTo(Option *option) override;
281  void Init(int defaultValue, int minValue, int maxValue, bool definitionFactor = false);
282 
283  bool SetValueDbl(double value) override;
284  bool SetValue(const std::string &value) override;
285  std::string GetStrValue() const override;
286  std::string GetDefaultStrValue() const override;
287 
288  void Reset() override;
289  bool IsSet() const override;
290 
291  int GetValue() const;
292  int GetUnfactoredValue() const;
293  int GetDefault() const { return m_defaultValue; }
294  int GetMin() const { return m_minValue; }
295  int GetMax() const { return m_maxValue; }
296  bool SetValue(int value);
297 
298 private:
299  //
300 public:
301  //
302 private:
303  int m_value;
304  int m_defaultValue;
305  int m_minValue;
306  int m_maxValue;
307  bool m_definitionFactor;
308 };
309 
310 //----------------------------------------------------------------------------
311 // OptionString
312 //----------------------------------------------------------------------------
313 
317 class OptionString : public Option {
318 public:
319  // constructors and destructors
320  OptionString() {}
321  virtual ~OptionString() {}
322  void CopyTo(Option *option) override;
323  void Init(const std::string &defaultValue);
324 
325  bool SetValue(const std::string &value) override;
326  std::string GetStrValue() const override { return m_value; }
327  std::string GetDefaultStrValue() const override { return m_defaultValue; }
328 
329  std::string GetValue() const { return m_value; }
330  std::string GetDefault() const { return m_defaultValue; }
331 
332  void Reset() override;
333  bool IsSet() const override;
334 
335 private:
336  //
337 public:
338  //
339 private:
340  std::string m_value;
341  std::string m_defaultValue;
342 };
343 
344 //----------------------------------------------------------------------------
345 // OptionArray
346 //----------------------------------------------------------------------------
347 
351 class OptionArray : public Option {
352 public:
353  // constructors and destructors
354  OptionArray() {}
355  virtual ~OptionArray() {}
356  void CopyTo(Option *option) override;
357  void Init();
358 
359  bool SetValueArray(const std::vector<std::string> &values) override;
360  bool SetValue(const std::string &value) override;
361  std::string GetStrValue() const override;
362  std::string GetDefaultStrValue() const override;
363 
364  std::vector<std::string> GetValue() const { return m_values; }
365  std::vector<std::string> GetDefault() const { return m_defaultValues; }
366  bool SetValue(std::vector<std::string> const &values);
367 
368  void Reset() override;
369  bool IsSet() const override;
370 
371 private:
372  std::string GetStr(const std::vector<std::string> &values) const;
373 
374 public:
375  //
376 private:
377  std::vector<std::string> m_values;
378  std::vector<std::string> m_defaultValues;
379 };
380 
381 //----------------------------------------------------------------------------
382 // OptionIntMap
383 //----------------------------------------------------------------------------
384 
388 class OptionIntMap : public Option {
389 public:
390  // constructors and destructors
391  OptionIntMap();
392  virtual ~OptionIntMap() {}
393  void CopyTo(Option *option) override;
394  void Init(int defaultValue, const std::map<int, std::string> *values);
395 
396  bool SetValue(const std::string &value) override;
397  std::string GetStrValue() const override;
398  std::string GetDefaultStrValue() const override;
399 
400  int GetValue() const { return m_value; }
401  int GetDefault() const { return m_defaultValue; }
402  bool SetValue(int value);
403 
404  std::vector<std::string> GetStrValues(bool withoutDefault) const;
405  std::string GetStrValuesAsStr(bool withoutDefault) const;
406 
407  void Reset() override;
408  bool IsSet() const override;
409 
410 private:
411  //
412 public:
413  //
414 private:
415  const std::map<int, std::string> *m_values;
416  int m_value;
417  int m_defaultValue;
418 };
419 
420 //----------------------------------------------------------------------------
421 // OptionStaffrel
422 //----------------------------------------------------------------------------
423 
427 class OptionStaffrel : public Option {
428 public:
429  // constructors and destructors
430  OptionStaffrel() {}
431  virtual ~OptionStaffrel() {}
432  void CopyTo(Option *option) override;
433  // Alternate type style cannot have a restricted list of possible values
434  void Init(data_STAFFREL defaultValue);
435 
436  bool SetValue(const std::string &value) override;
437  std::string GetStrValue() const override;
438  std::string GetDefaultStrValue() const override;
439 
440  void Reset() override;
441  bool IsSet() const override;
442 
443  // For alternate types return a reference to the value
444  // Alternatively we can have a values vector for each sub-type
445  const data_STAFFREL *GetValueAlternate() const { return &m_value; }
446  const data_STAFFREL *GetDefaultAlernate() const { return &m_defaultValue; }
447 
448 private:
449  //
450 public:
451  //
452 private:
453  data_STAFFREL m_value;
454  data_STAFFREL m_defaultValue;
455 };
456 
457 //----------------------------------------------------------------------------
458 // OptionJson
459 //----------------------------------------------------------------------------
460 
462 enum class JsonSource { String, FilePath };
463 
468 class OptionJson : public Option {
469  using JsonPath = std::vector<std::reference_wrapper<jsonxx::Value>>;
470 
471 public:
476  OptionJson() = default;
477  virtual ~OptionJson() = default;
478  void CopyTo(Option *option) override;
479  void Init(JsonSource source, const std::string &defaultValue);
481 
485  JsonSource GetSource() const;
486  jsonxx::Object GetValue(bool getDefault = false) const;
487 
492  bool SetValue(const std::string &value) override;
493  std::string GetStrValue() const override;
494  std::string GetDefaultStrValue() const override;
495 
496  void Reset() override;
497  bool IsSet() const override;
499 
504  bool HasValue(const std::vector<std::string> &jsonNodePath) const;
505  int GetIntValue(const std::vector<std::string> &jsonNodePath, bool getDefault = false) const;
506  double GetDblValue(const std::vector<std::string> &jsonNodePath, bool getDefault = false) const;
507  std::string GetStrValue(const std::vector<std::string> &jsonNodePath, bool getDefault = false) const;
508  bool UpdateNodeValue(const std::vector<std::string> &jsonNodePath, const std::string &value);
510 
515  std::set<std::string> GetKeys() const;
516  std::set<std::string> GetKeysByNode(const std::string &nodeName, std::list<std::string> &jsonNodePath) const;
518 
519 protected:
520  JsonPath StringPath2NodePath(const jsonxx::Object &obj, const std::vector<std::string> &jsonNodePath) const;
521 
522  // Find node by recursively processing all elements within. Only nodes of OBJECT_ type are processed
523  const jsonxx::Object *FindNodeByName(
524  const jsonxx::Object &obj, const std::string &jsonNodeName, std::list<std::string> &jsonNodePath) const;
525 
527  bool ReadJson(jsonxx::Object &output, const std::string &input) const;
528 
529 private:
530  JsonSource m_source = JsonSource::String;
531 
532  jsonxx::Object m_values;
533  jsonxx::Object m_defaultValues;
534 };
535 
536 //----------------------------------------------------------------------------
537 // OptionGrp
538 //----------------------------------------------------------------------------
539 
543 class OptionGrp {
544 public:
545  // constructors and destructors
546  OptionGrp() {}
547  virtual ~OptionGrp() {}
548 
549  void SetLabel(const std::string &label, const std::string &id)
550  {
551  m_label = label;
552  m_id = id;
553  }
554  std::string GetLabel() const { return m_label; }
555  std::string GetId() const { return m_id; }
556 
557  void SetCategory(OptionsCategory category) { m_category = category; }
558  OptionsCategory GetCategory() const { return m_category; }
559 
560  void AddOption(Option *option) { m_options.push_back(option); }
561 
562  const std::vector<Option *> *GetOptions() const { return &m_options; }
563 
564 public:
565  //
566 protected:
567  std::string m_id;
568  std::string m_label;
569  std::vector<Option *> m_options;
570  OptionsCategory m_category = OptionsCategory::None;
571 };
572 
573 //----------------------------------------------------------------------------
574 // Options
575 //----------------------------------------------------------------------------
576 
580 class Options {
581 public:
582  // constructors and destructors
583  Options();
584  virtual ~Options();
585 
586  Options(const Options &options);
587  Options &operator=(const Options &options);
588 
589  bool SetInputFrom(std::string const &inputFrom);
590  bool SetOutputTo(std::string const &outputTo);
591  FileFormat GetInputFrom() const { return m_inputFromFormat; }
592  FileFormat GetOutputTo() const { return m_outputToFormat; }
593 
594  const MapOfStrOptions *GetItems() const { return &m_items; }
595 
596  const std::vector<OptionGrp *> *GetGrps() const { return &m_grps; }
597 
598  jsonxx::Object GetBaseOptGrp();
599 
600  const std::vector<Option *> *GetBaseOptions() const;
601 
602  // post processing of parameters
603  void Sync();
604 
605 private:
606  void Register(Option *option, const std::string &key, OptionGrp *grp);
607 
608 public:
613 
614  // These options are only given for documentation - except for m_scale
615  // They are ordered by short option alphabetical order
616  OptionBool m_standardOutput;
617  OptionString m_help;
618  OptionBool m_allPages;
619  OptionString m_inputFrom;
620  OptionString m_logLevel;
621  OptionString m_outfile;
622  OptionInt m_page;
623  OptionString m_resourcePath;
624  OptionInt m_scale;
625  OptionString m_outputTo;
626  OptionBool m_version;
627  OptionInt m_xmlIdSeed;
628 
629  FileFormat m_inputFromFormat;
630  FileFormat m_outputToFormat;
631 
636 
637  OptionBool m_adjustPageHeight;
638  OptionBool m_adjustPageWidth;
639  OptionIntMap m_breaks;
640  OptionDbl m_breaksSmartSb;
641  OptionIntMap m_condense;
642  OptionBool m_condenseFirstPage;
643  OptionBool m_condenseNotLastSystem;
644  OptionBool m_condenseTempoPages;
645  OptionBool m_evenNoteSpacing;
646  OptionIntMap m_footer;
647  OptionIntMap m_header;
648  OptionBool m_humType;
649  OptionBool m_incip;
650  OptionBool m_justifyVertically;
651  OptionBool m_landscape;
652  OptionDbl m_minLastJustification;
653  OptionBool m_mmOutput;
654  OptionBool m_moveScoreDefinitionToStaff;
655  OptionBool m_neumeAsNote;
656  OptionBool m_noJustification;
657  OptionBool m_openControlEvents;
658  OptionBool m_outputFormatRaw;
659  OptionInt m_outputIndent;
660  OptionBool m_outputIndentTab;
661  OptionBool m_outputSmuflXmlEntities;
662  OptionInt m_pageHeight;
663  OptionInt m_pageMarginBottom;
664  OptionInt m_pageMarginLeft;
665  OptionInt m_pageMarginRight;
666  OptionInt m_pageMarginTop;
667  OptionInt m_pageWidth;
668  OptionIntMap m_pedalStyle;
669  OptionBool m_preserveAnalyticalMarkup;
670  OptionBool m_removeIds;
671  OptionBool m_scaleToPageSize;
672  OptionBool m_setLocale;
673  OptionBool m_showRuntime;
674  OptionBool m_shrinkToFit;
675  OptionIntMap m_smuflTextFont;
676  OptionBool m_staccatoCenter;
677  OptionBool m_svgBoundingBoxes;
678  OptionBool m_svgContentBoundingBoxes;
679  OptionString m_svgCss;
680  OptionBool m_svgViewBox;
681  OptionBool m_svgHtml5;
682  OptionBool m_svgFormatRaw;
683  OptionBool m_svgRemoveXlink;
684  OptionArray m_svgAdditionalAttribute;
685  OptionDbl m_unit;
686  OptionBool m_useFacsimile;
687  OptionBool m_usePgFooterForAll;
688  OptionBool m_usePgHeaderForAll;
689  OptionBool m_useBraceGlyph;
690  OptionBool m_xmlIdChecksum;
691 
696 
697  OptionDbl m_barLineSeparation;
698  OptionDbl m_barLineWidth;
699  OptionBool m_beamFrenchStyle;
700  OptionInt m_beamMaxSlope;
701  OptionBool m_beamMixedPreserve;
702  OptionDbl m_beamMixedStemMin;
703  OptionDbl m_bracketThickness;
704  OptionBool m_breaksNoWidow;
705  OptionDbl m_dashedBarLineDashLength;
706  OptionDbl m_dashedBarLineGapLength;
707  OptionDbl m_dynamDist;
708  OptionBool m_dynamSingleGlyphs;
709  OptionJson m_engravingDefaults;
710  OptionJson m_engravingDefaultsFile;
711  OptionDbl m_extenderLineMinSpace;
712  OptionDbl m_fingeringScale;
713  OptionString m_font;
714  OptionArray m_fontAddCustom;
715  OptionIntMap m_fontFallback;
716  OptionBool m_fontLoadAll;
717  OptionBool m_fontTextLiberation;
718  OptionDbl m_graceFactor;
719  OptionBool m_graceRhythmAlign;
720  OptionBool m_graceRightAlign;
721  OptionDbl m_hairpinSize;
722  OptionDbl m_hairpinThickness;
723  OptionArray m_handwrittenFont;
724  OptionDbl m_harmDist;
725  OptionDbl m_justificationBraceGroup;
726  OptionDbl m_justificationBracketGroup;
727  OptionDbl m_justificationStaff;
728  OptionDbl m_justificationSystem;
729  OptionDbl m_justificationMaxVertical;
730  OptionDbl m_ledgerLineThickness;
731  OptionDbl m_ledgerLineExtension;
732  OptionIntMap m_lyricElision;
733  OptionDbl m_lyricHeightFactor;
734  OptionDbl m_lyricLineThickness;
735  OptionBool m_lyricNoStartHyphen;
736  OptionDbl m_lyricSize;
737  OptionDbl m_lyricTopMinMargin;
738  OptionBool m_lyricVerseCollapse;
739  OptionDbl m_lyricWordSpace;
740  OptionInt m_measureMinWidth;
741  OptionInt m_mnumInterval;
742  OptionIntMap m_multiRestStyle;
743  OptionDbl m_multiRestThickness;
744  OptionBool m_octaveAlternativeSymbols;
745  OptionDbl m_octaveLineThickness;
746  OptionBool m_octaveNoSpanningParentheses;
747  OptionDbl m_ossiaStaffSize;
748  OptionDbl m_pedalLineThickness;
749  OptionDbl m_repeatBarLineDotSeparation;
750  OptionDbl m_repeatEndingLineThickness;
751  OptionDbl m_slurCurveFactor;
752  OptionDbl m_slurEndpointFlexibility;
753  OptionDbl m_slurEndpointThickness;
754  OptionDbl m_slurMargin;
755  OptionInt m_slurMaxSlope;
756  OptionDbl m_slurMidpointThickness;
757  OptionDbl m_slurSymmetry;
758  OptionInt m_spacingBraceGroup;
759  OptionInt m_spacingBracketGroup;
760  OptionBool m_spacingDurDetection;
761  OptionDbl m_spacingLinear;
762  OptionDbl m_spacingNonLinear;
763  OptionDbl m_spacingOssia;
764  OptionInt m_spacingStaff;
765  OptionInt m_spacingSystem;
766  OptionDbl m_staffLineWidth;
767  OptionDbl m_stemWidth;
768  OptionDbl m_subBracketThickness;
769  OptionIntMap m_systemDivider;
770  OptionInt m_systemMaxPerPage;
771  OptionDbl m_textEnclosureThickness;
772  OptionDbl m_thickBarlineThickness;
773  OptionDbl m_tieEndpointThickness;
774  OptionDbl m_tieMidpointThickness;
775  OptionDbl m_tieMinLength;
776  OptionBool m_tupletAngledOnBeams;
777  OptionDbl m_tupletBracketThickness;
778  OptionBool m_tupletNumHead;
779 
784 
785  OptionArray m_appXPathQuery;
786  OptionArray m_choiceXPathQuery;
787  OptionString m_expand;
788  OptionBool m_expandAlways;
789  OptionBool m_expandNever;
790  OptionBool m_loadSelectedMdivOnly;
791  OptionBool m_mdivAll;
792  OptionString m_mdivXPathQuery;
793  OptionBool m_ossiaHidden;
794  OptionArray m_substXPathQuery;
795  OptionString m_transpose;
796  OptionJson m_transposeMdiv;
797  OptionBool m_transposeSelectedOnly;
798  OptionBool m_transposeToSoundingPitch;
799 
804 
805  OptionDbl m_defaultBottomMargin;
806  OptionDbl m_defaultLeftMargin;
807  OptionDbl m_defaultRightMargin;
808  OptionDbl m_defaultTopMargin;
809  //
810  OptionDbl m_bottomMarginArtic;
811  OptionDbl m_bottomMarginHarm;
812  OptionDbl m_bottomMarginOctave;
813  OptionDbl m_bottomMarginPgHead;
814  //
815  OptionDbl m_leftMarginAccid;
816  OptionDbl m_leftMarginBarLine;
817  OptionDbl m_leftMarginBeatRpt;
818  OptionDbl m_leftMarginChord;
819  OptionDbl m_leftMarginClef;
820  OptionDbl m_leftMarginKeySig;
821  OptionDbl m_leftMarginLeftBarLine;
822  OptionDbl m_leftMarginMensur;
823  OptionDbl m_leftMarginMeterSig;
824  OptionDbl m_leftMarginMRest;
825  OptionDbl m_leftMarginMRpt2;
826  OptionDbl m_leftMarginMultiRest;
827  OptionDbl m_leftMarginMultiRpt;
828  OptionDbl m_leftMarginNote;
829  OptionDbl m_leftMarginRest;
830  OptionDbl m_leftMarginRightBarLine;
831  OptionDbl m_leftMarginTabDurSym;
832  //
833  OptionDbl m_rightMarginAccid;
834  OptionDbl m_rightMarginBarLine;
835  OptionDbl m_rightMarginBeatRpt;
836  OptionDbl m_rightMarginChord;
837  OptionDbl m_rightMarginClef;
838  OptionDbl m_rightMarginKeySig;
839  OptionDbl m_rightMarginLeftBarLine;
840  OptionDbl m_rightMarginMensur;
841  OptionDbl m_rightMarginMeterSig;
842  OptionDbl m_rightMarginMRest;
843  OptionDbl m_rightMarginMRpt2;
844  OptionDbl m_rightMarginMultiRest;
845  OptionDbl m_rightMarginMultiRpt;
846  OptionDbl m_rightMarginNote;
847  OptionDbl m_rightMarginRest;
848  OptionDbl m_rightMarginRightBarLine;
849  OptionDbl m_rightMarginTabDurSym;
850  //
851  OptionDbl m_topMarginArtic;
852  OptionDbl m_topMarginHarm;
853  OptionDbl m_topMarginPgFooter;
854 
859 
860  OptionBool m_midiNoCue;
861  OptionDbl m_midiTempoAdjustment;
862  OptionString m_midiTuningFile;
863 
868 
869  OptionIntMap m_durationEquivalence;
870  OptionBool m_ligatureAsBracket;
871  OptionIntMap m_ligatureOblique;
872  OptionBool m_mensuralScoreUp;
873  OptionIntMap m_mensuralResponsiveView;
874  OptionBool m_mensuralToCmn;
875 
880 
881  OptionString m_timemapOptions;
882 
887 
888 private:
890  MapOfStrOptions m_items;
891 
892  std::vector<OptionGrp *> m_grps;
893 };
894 
895 } // namespace vrv
896 
897 #endif // CUSTOM_VEROVIO_OPTIONS
898 
899 #endif // __VRV_DEF_H__
This class is for array (string) styling params.
Definition: options.h:351
This class is for boolean styling params.
Definition: options.h:182
This class is for integer styling params.
Definition: options.h:221
This class is a base class of each styling parameter.
Definition: options.h:543
This class is a base class of each styling parameter.
Definition: options.h:103
static const std::map< int, std::string > s_breaks
Static maps used my OptionIntMap objects.
Definition: options.h:149
jsonxx::Object ToJson() const
Return a JSON object for the option.
This class is for integer styling params.
Definition: options.h:269
This class is for map break options.
Definition: options.h:388
This class is for Json input params.
Definition: options.h:468
std::set< std::string > GetKeys() const
Accessing all keys.
bool ReadJson(jsonxx::Object &output, const std::string &input) const
Read json from string or file.
JsonSource GetSource() const
Member access.
bool HasValue(const std::vector< std::string > &jsonNodePath) const
Accessing values as json node path.
bool SetValue(const std::string &value) override
Interface methods: accessing values as string.
This class is for map styling params.
Definition: options.h:427
This class is for string styling params.
Definition: options.h:317
This class contains the document styling parameters.
Definition: options.h:580
OptionGrp m_generalLayout
General layout.
Definition: options.h:695
OptionGrp m_baseOptions
Comments in implementation file options.cpp.
Definition: options.h:612
OptionGrp m_general
General.
Definition: options.h:635
OptionGrp m_midi
Midi.
Definition: options.h:858
OptionGrp m_elementMargins
Element margins.
Definition: options.h:803
OptionGrp m_deprecated
Deprecated options.
Definition: options.h:886
OptionGrp m_mensural
Mensural.
Definition: options.h:867
OptionGrp m_jsonCmdLineOptions
Additional options for passing method JSON options to the command-line.
Definition: options.h:879
OptionGrp m_selectors
Selectors.
Definition: options.h:783