InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CUnitOfMeasure.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Michael Burbidge
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 #ifndef __CUNITOFMEASURE__
25 #define __CUNITOFMEASURE__
26 
27 #include "IUnitOfMeasure.h"
28 #include "HelperInterface.h"
29 
30 //========================================================================================
31 // CLASS CUnitOfMeasure
32 //========================================================================================
33 
34 #ifdef PUBLIC_BUILD
35 #endif
36 
38 {
39 // ----- Constructor/destructor
40 public:
42  virtual ~CUnitOfMeasure();
43 
44  virtual PMReal GetSmallIncrement() const; // get a reasonable increment,
45  virtual PMReal GetLargeIncrement() const; // get a reasonable increment,
46 
47 // ----- Utility
48 protected:
49 
50  // removes number from start of string, puts number value in numOut, sets boolean if number is negative,
51  // returns kFalse if no number found
52  virtual bool16 EvaluateRemoveLeadingNumber(PMString* strInOut,PMReal *numOut, bool16 *isNegOut = nil);
53 
54  virtual void FormatFractionalPortion(PMReal units, PMString *outStr, int32 nDecimalPlaces = 3, bool16 bStripTrailingZeros = kTrue) const;
55 
56 // ----- Flags
57 public:
59 
60 
61 };
62 
63 
64 #endif