5#include "Stroika/Foundation/StroikaPreComp.h"
11#include "LedItResources.h"
16using namespace Stroika::Frameworks::Led;
23Unit::Unit (
int nTPU,
int nSmallDiv,
int nMediumDiv,
int nLargeDiv,
int nMinMove,
const char* nAbbrev, BOOL bSpaceAbbrev)
26 m_nSmallDiv = nSmallDiv;
27 m_nMediumDiv = nMediumDiv;
28 m_nLargeDiv = nLargeDiv;
29 m_nMinMove = nMinMove;
30 m_strAbbrev = nAbbrev;
31 m_bSpaceAbbrev = bSpaceAbbrev;
39const char IDS_INCH1_ABBREV[] =
"\"\"";
40const char IDS_INCH2_ABBREV[] =
"in";
41const char IDS_INCH3_ABBREV[] =
"inch";
42const char IDS_INCH4_ABBREV[] =
"inches";
43const char IDS_CM_ABBREV[] =
"cm";
44const char IDS_POINT_ABBREV[] =
"pt";
45const char IDS_PICA_ABBREV[] =
"pi";
46const Unit StandardUnits::kUnits[StandardUnits::kNumUnits] = {
48 Unit (1440, 180, 720, 1440, 90, IDS_INCH1_ABBREV, FALSE),
49 Unit (568, 142, 284, 568, 142, IDS_CM_ABBREV, TRUE),
50 Unit (20, 120, 720, 720, 100, IDS_POINT_ABBREV, TRUE),
51 Unit (240, 240, 1440, 1440, 120, IDS_PICA_ABBREV, TRUE),
52 Unit (1440, 180, 720, 1440, 90, IDS_INCH2_ABBREV, FALSE),
53 Unit (1440, 180, 720, 1440, 90, IDS_INCH3_ABBREV, FALSE),
54 Unit (1440, 180, 720, 1440, 90, IDS_INCH4_ABBREV, FALSE)
57Unit StandardUnits::GetCurrentUnits ()
62 GetLocaleInfo(GetUserDefaultLCID(), LOCALE_IMEASURE, buf, 2);
63 int nDefUnits = buf[0] ==
'1' ? 0 : 1;
64 SetUnits(GetProfileInt(szSection, szUnits, nDefUnits));