home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 October / Chip_1997-10_cd.bin / tema / sybase / powerj / hpp.z / WLOCALE.HPP < prev    next >
C/C++ Source or Header  |  1996-10-18  |  25KB  |  493 lines

  1. /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2.    %     Copyright (C) 1994, by WATCOM International Inc.  All rights    %
  3.    %     reserved.  No part of this software may be reproduced or        %
  4.    %     used in any form or by any means - graphic, electronic or       %
  5.    %     mechanical, including photocopying, recording, taping or        %
  6.    %     information storage and retrieval systems - except with the     %
  7.    %     written permission of WATCOM International Inc.                 %
  8.    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  9. */
  10.  
  11. /*************************************************************************
  12.  *
  13.  * WLocaleID --
  14.  *
  15.  *************************************************************************/
  16.  
  17. #ifndef _WLOCALE_HPP_INCLUDED
  18. #define _WLOCALE_HPP_INCLUDED
  19.  
  20. #ifndef _WNO_PRAGMA_PUSH
  21. #pragma pack(push,8);
  22. #pragma enum int;
  23. #endif
  24.  
  25. #ifndef _WOBJECT_HPP_INCLUDED
  26. #  include "wobject.hpp"
  27. #endif
  28.  
  29.  
  30. /*
  31.  *  Language IDs.
  32.  *
  33.  *  The following two combinations of primary language ID and
  34.  *  sublanguage ID have special semantics:
  35.  *
  36.  *    Primary Language ID   Sublanguage ID      Result
  37.  *    -------------------   ---------------     ------------------------
  38.  *    WPrimLangNeutral          WSubLangNeutral     Language neutral
  39.  *    WPrimLangNeutral          WSubLangDefault     User default language
  40.  *    WPrimLangNeutral          WSubLangSysDefault  System default language
  41.  */
  42.  
  43. /*
  44.  *  Primary language IDs.
  45.  */
  46.  
  47. typedef WUShort WLanguageIDType;
  48.  
  49. enum WPrimaryLanguageID {
  50.  
  51.         WPrimLangNeutral                     =0x00,
  52.  
  53.         WPrimLangArabic                      =0x01,
  54.         WPrimLangAfrikaans                   =0x36,
  55.         WPrimLangAlbanian                    =0x1c,
  56.         WPrimLangBasque                      =0x2d,
  57.         WPrimLangBulgarian                   =0x02,
  58.         WPrimLangByelorussian                =0x23,
  59.         WPrimLangCatalan                     =0x03,
  60.         WPrimLangChinese                     =0x04,
  61.         WPrimLangCroatian                    =0x1a,
  62.         WPrimLangCzech                       =0x05,
  63.         WPrimLangDanish                      =0x06,
  64.         WPrimLangDutch                       =0x13,
  65.         WPrimLangEnglish                     =0x09,
  66.         WPrimLangEstonian                    =0x25,
  67.         WPrimLangFaeroese                    =0x38,
  68.         WPrimLangFarsi                       =0x29,
  69.         WPrimLangFinnish                     =0x0b,
  70.         WPrimLangFrench                      =0x0c,
  71.         WPrimLangGerman                      =0x07,
  72.         WPrimLangGreek                       =0x08,
  73.         WPrimLangHebrow                      =0x0D,
  74.         WPrimLangHungarian                   =0x0e,
  75.         WPrimLangIcelandic                   =0x0f,
  76.         WPrimLangIndonesian                  =0x21,
  77.         WPrimLangItalian                     =0x10,
  78.         WPrimLangJapanese                    =0x11,
  79.         WPrimLangKorean                      =0x12,
  80.         WPrimLangLatvian                     =0x26,
  81.         WPrimLangLithuanian                  =0x27,
  82.         WPrimLangNorwegian                   =0x14,
  83.         WPrimLangPolish                      =0x15,
  84.         WPrimLangPortuguese                  =0x16,
  85.         WPrimLangRomanian                    =0x18,
  86.         WPrimLangRussian                     =0x19,
  87.         WPrimLangSlovak                      =0x1b,
  88.         WPrimLangSlovenian                   =0x24,
  89.         WPrimLangSorbian                     =0x2e,
  90.         WPrimLangSpanish                     =0x0a,
  91.         WPrimLangSwedish                     =0x1d,
  92.         WPrimLangThai                        =0x1e,
  93.         WPrimLangTurkish                     =0x1f,
  94.         WPrimLangUkrainian                   =0x22
  95. };
  96.  
  97. /*
  98.  *  Sublanguage IDs.
  99.  *
  100.  *  The name immediately following WSubLang_ dictates which primary
  101.  *  language ID that sublanguage ID can be combined with to form a
  102.  *  valid language ID.
  103.  */
  104.  
  105. enum WSubLanguageID {
  106.  
  107.         WSubLangNeutral                         = 0x00,    /* language neutral */
  108.         WSubLangDefault                         = 0x01,    /* user default */
  109.         WSubLangSysDefault                      = 0x02,    /* system default */
  110.  
  111.         WSubLangArabic                          = 0x01,    /* Arabic (Saudi Arabia) */
  112.         WSubLangArabicIraq                      = 0x02,    /* Arabic (Iraq) */
  113.         WSubLangArabicEgypt                     = 0x03,    /* Arabic (Egypt) */
  114.         WSubLangArabicLibya                     = 0x04,    /* Arabic (Libya) */
  115.         WSubLangArabicAlgeria                   = 0x05,    /* Arabic (Algeria) */
  116.         WSubLangArabicMorocco                   = 0x06,    /* Arabic (Morocco) */
  117.         WSubLangArabicTunisia                   = 0x07,    /* Arabic (Tunisia) */
  118.         WSubLangArabicOman                      = 0x08,    /* Arabic (Oman) */
  119.         WSubLangArabicYemen                     = 0x09,    /* Arabic (Yemen) */
  120.         WSubLangArabicSyria                     = 0x10,    /* Arabic (Syria) */
  121.         WSubLangArabicJordan                    = 0x11,    /* Arabic (Jordan) */
  122.         WSubLangArabicLebanon                   = 0x12,    /* Arabic (Lebanon) */
  123.         WSubLangArabicKuwait                    = 0x13,    /* Arabic (Kuwait) */
  124.         WSubLangArabicUnitedArabEmirates        = 0x14,    /* Arabic (United Arab Emirates) */
  125.         WSubLangArabicBahrain                   = 0x15,    /* Arabic (Bahrain) */
  126.         WSubLangArabicQatar                     = 0x16,    /* Arabic (Qatar) */
  127.         WSubLangChineseTaiwan                   = 0x01,    /* Chinese (Taiwan) */
  128.         WSubLangChineseSimplified               = 0x02,    /* Chinese (PR China) */
  129.         WSubLangChineseHongKong                 = 0x03,    /* Chinese (Hong Kong) */
  130.         WSubLangChineseSingapore                = 0x04,    /* Chinese (Singapore) */
  131.         WSubLangDutch                           = 0x01,    /* Dutch */
  132.         WSubLangDutchBelgian                    = 0x02,    /* Dutch (Belgian) */
  133.         WSubLangEnglishUSA                      = 0x01,    /* English (USA) */
  134.         WSubLangEnglishUK                       = 0x02,    /* English (UK) */
  135.         WSubLangEnglishAustralian               = 0x03,    /* English (Australian) */
  136.         WSubLangEnglishCanadian                 = 0x04,    /* English (Canadian) */
  137.         WSubLangEnglishNewZealand               = 0x05,    /* English (New Zealand) */
  138.         WSubLangEnglishIrish                    = 0x06,    /* English (Irish) */
  139.         WSubLangEnglishSouthAfrica              = 0x07,    /* English (South Africa) */
  140.         WSubLangEnglishJamaica                  = 0x08,    /* English (Jamaica) */
  141.         WSubLangEnglishCarribean                = 0x09,    /* English (Carribean) */
  142.         WSubLangFrench                          = 0x01,   /* French */
  143.         WSubLangFrenchBelgian                   = 0x02,    /* French (Belgian) */
  144.         WSubLangFrenchCanadian                  = 0x03,    /* French (Canadian) */
  145.         WSubLangFrenchSwiss                     = 0x04,   /* French (Swiss) */
  146.         WSubLangFrenchLuxembourg                = 0x05,    /* French (Luxembourg) */
  147.         WSubLangGerman                          = 0x01,    /* German */
  148.         WSubLangGermanSwiss                     = 0x02,    /* German (Swiss) */
  149.         WSubLangGermanAustrian                  = 0x03,    /* German (Austrian) */
  150.         WSubLangGermanLuxembourg                = 0x04,    /* German (Luxembourg) */
  151.         WSubLangGermanLiechtenstein             = 0x05,    /* German (Liechtenstein) */
  152.         WSubLangItalian                         = 0x01,    /* Italian */
  153.         WSubLangItalianSwiss                    = 0x02,    /* Italian (Swiss) */
  154.         WSubLangKorean                          = 0x01,    /* Korean */
  155.         WSubLangKoreanJohab                     = 0x02,    /* Korean (Johab) */
  156.         WSubLangNorwegianBokmal                 = 0x01,    /* Norwegian (Bokmal) */
  157.         WSubLangNorwegianNynorsk                = 0x02,    /* Norwegian (Nynorsk) */
  158.         WSubLangPortuguese                      = 0x02,    /* Portuguese */
  159.         WSubLangPortugueseBrazilian             = 0x01,    /* Portuguese (Brazilian) */
  160.         WSubLangSpanishCastilian                = 0x01,    /* Spanish (Castilian) */
  161.         WSubLangSpanishMexican                  = 0x02,    /* Spanish (Mexican) */
  162.         WSubLangSpanishModern                   = 0x03,    /* Spanish (Modern) */
  163.         WSubLangSpanishGuatemala                = 0x04,    /* Spanish (Guatemala) */
  164.         WSubLangSpanishCostaRica                = 0x05,    /* Spanish (Costa Rica) */
  165.         WSubLangSpanishPanama                   = 0x06,    /* Spanish (Panama) */
  166.         WSubLangSpanishDominicanRepublic        = 0x07,    /* Spanish (Dominican Republic) */
  167.         WSubLangSpanishVenezuela                = 0x08,   /* Spanish (Venezuela) */
  168.         WSubLangSpanishColombia                 = 0x09,    /* Spanish (Colombia) */
  169.         WSubLangSpanishPeru                     = 0x10,    /* Spanish (Peru) */
  170.         WSubLangSpanishArgentina                = 0x11,    /* Spanish (Argentina) */
  171.         WSubLangSpanishEcuador                  = 0x12,    /* Spanish (Ecuador) */
  172.         WSubLangSpanishChile                    = 0x13,    /* Spanish (Chile) */
  173.         WSubLangSpanishUruguay                  = 0x14,    /* Spanish (Uruguay) */
  174.         WSubLangSpanishParaguay                 = 0x15,    /* Spanish (Paraguay) */
  175.         WSubLangSpanishBolivia                  = 0x16    /* Spanish (Bolivia) */
  176. };
  177.  
  178. /*
  179.  *  A language ID is a 16 bit value which is the combination of a
  180.  *  primary language ID and a secondary language ID.  The bits are
  181.  *  allocated as follows:
  182.  *
  183.  *       +-----------------------+-------------------------+
  184.  *       |     Sublanguage ID    |   Primary Language ID   |
  185.  *       +-----------------------+-------------------------+
  186.  *        15                   10 9                       0   bit
  187.  *
  188.  *
  189.  */
  190.  
  191.  
  192. enum WLanguageIDPart {
  193.     WLanguageIDPrimaryPart,
  194.     WLanguageIDSubPart,
  195.     WLanguageIDAllParts
  196. };
  197.  
  198.  
  199. class WCMCLASS WLanguageID : public WObject {
  200.         WDeclareSubclass( WLanguageID, WObject );
  201.  
  202.         public:
  203.         
  204.         /*********************************************************
  205.          * Constructors and destructors
  206.          *********************************************************/
  207.  
  208.         WLanguageID();
  209.         WLanguageID( WUShort langID );
  210.         WLanguageID( WPrimaryLanguageID primID, WSubLanguageID subID );
  211.         
  212.         ~WLanguageID();
  213.  
  214.  
  215.         /*********************************************************
  216.          * Properties
  217.          *********************************************************/
  218.  
  219.         // ID
  220.  
  221.         WUShort GetID( WLanguageIDPart partID=WLanguageIDAllParts ) const;
  222.  
  223.         /*********************************************************
  224.          * Methods
  225.          *********************************************************/
  226.  
  227.         // Clean
  228.  
  229.         void Clear();
  230.  
  231.  
  232.         // Create
  233.  
  234.         WBool Create();
  235.         WBool Create( WLanguageIDType langID );
  236.         WBool Create( WPrimaryLanguageID primID, WSubLanguageID subID );
  237.  
  238.  
  239.          /*********************************************************
  240.          * Data members
  241.          *********************************************************/
  242.  
  243.     private:
  244.         WUShort _languageID;
  245.  
  246. };
  247.  
  248. /*
  249.  *  A locale ID is a 32 bit value which is the combination of a
  250.  *  language ID, a sort ID, and a reserved area.  The bits are
  251.  *  allocated as follows:
  252.  *
  253.  *       +-------------+---------+-------------------------+
  254.  *       |   Reserved  | Sort ID |      Language ID        |
  255.  *       +-------------+---------+-------------------------+
  256.  *        31         20 19     16 15                      0   bit
  257.  *
  258.  *
  259.  */
  260.  
  261.  /*
  262.  *  Sorting IDs.
  263.  *
  264.  */
  265.  
  266. enum WLocaleSortID {
  267.         WLocaleSortDefault                   = 0x0,     /* sorting default */
  268.  
  269.         WLocaleSortJapaneseXJIS              = 0x0,     /* Japanese XJIS order */
  270.         WLocaleSortJapaneseUnicode           = 0x1,     /* Japanese Unicode order */
  271.  
  272.         WLocaleSortChineseBig5               = 0x0,     /* Chinese BIG5 order */
  273.         WLocaleSortChineseUnicode            = 0x1,     /* Chinese Unicode order */
  274.  
  275.         WLocaleSortKoreanKSC                 = 0x0,     /* Korean KSC order */
  276.         WLocaleSortKoreanUnicode             = 0x1     /* Korean Unicode order */
  277. };
  278.  
  279.  
  280. #define WNlsValidLocaleMask  0x000fffff
  281.  
  282.  
  283. enum WLocaleConst {
  284.         WLocaleConstNoUserOverride              =0x80000000,   /* do not use user overrides */
  285.         WLocaleConstUseSystemACP                =0x40000000,   /* use the system ACP */
  286.  
  287.         WLocaleConstLanguageId                  =0x00000001,   /* language id */
  288.         WLocaleConstLocalLangName               =0x00000002,   /* localized name of language */
  289.         WLocaleConstEngLangName                 =0x00001001,   /* English name of language */
  290.         WLocaleConstAbbrevLangName              =0x00000003,   /* abbreviated language name */
  291.         WLocaleConstNativeLangName              =0x00000004,   /* native name of language */
  292.         WLocaleConstCountryCode                 =0x00000005,   /* country code */
  293.         WLocaleConstLocalCountryName            =0x00000006,   /* localized name of country */
  294.         WLocaleConstEngCountryName              =0x00001002,   /* English name of country */
  295.         WLocaleConstAbbrevCountryName           =0x00000007,   /* abbreviated country name */
  296.         WLocaleConstNativeCountryName           =0x00000008,   /* native name of country */
  297.         WLocaleConstDefaultLangName             =0x00000009,   /* default language id */
  298.         WLocaleConstDefaultCountryCode          =0x0000000A,   /* default country code */
  299.         WLocaleConstDefaultOemCodePage          =0x0000000B,   /* default oem code page */
  300.         WLocaleConstDefaultAnsiCodePage         =0x00001004,   /* default ansi code page */
  301.  
  302.         WLocaleConstListItemSeparator           =0x0000000C,   /* list item separator */
  303.         WLocaleConstMeasureId                   =0x0000000D,   /* 0 = metric, 1 = US */
  304.  
  305.         WLocaleConstDecimalSeparator            =0x0000000E,   /* decimal separator */
  306.         WLocaleConstThousandSeparator           =0x0000000F,   /* thousand separator */
  307.         WLocaleConstDigitGrouping               =0x00000010,   /* digit grouping */
  308.         WLocaleConstNumberFractionalDigit       =0x00000011,   /* number of fractional digits */
  309.         WLocaleConstLeadingZerosDecimal         =0x00000012,   /* leading zeros for decimal */
  310.         WLocaleConstNegativeNumberMode          =0x00001010,   /* negative number mode */
  311.         WLocaleConstNativeAscii                 =0x00000013,   /* native ascii 0-9 */
  312.  
  313.         WLocaleConstCurrencySymbol              =0x00000014,   /* local monetary symbol */
  314.         WLocaleConstIntMonetarySymbol           =0x00000015,   /* intl monetary symbol */
  315.         WLocaleConstMonetaryDecimalSeparator    =0x00000016,   /* monetary decimal separator */
  316.         WLocaleConstMonetaryThousandSeparator   =0x00000017,   /* monetary thousand separator */
  317.         WLocaleConstMonetaryGrouping            =0x00000018,   /* monetary grouping */
  318.         WLocaleConstNLocalMonetaryDigits        =0x00000019,   /* # local monetary digits */
  319.         WLocaleConstNIntMonetaryDigits          =0x0000001A,   /* # intl monetary digits */
  320.         WLocaleConstPositiveCurrencyMode        =0x0000001B,   /* positive currency mode */
  321.         WLocaleConstNegativeCurrencyMode        =0x0000001C,   /* negative currency mode */
  322.  
  323.         WLocaleConstDateSeparator               =0x0000001D,   /* date separator */
  324.         WLocaleConstTimeSeparator               =0x0000001E,   /* time separator */
  325.         WLocaleConstShortDateFormatString       =0x0000001F,   /* short date format string */
  326.         WLocaleConstLongDateFormatString        =0x00000020,   /* long date format string */
  327.         WLocaleConstTimeFormatString            =0x00001003,   /* time format string */
  328.         WLocaleConstShortDateFormatOrdering     =0x00000021,   /* short date format ordering */
  329.         WLocaleConstLongDateFormatOrdering      =0x00000022,   /* long date format ordering */
  330.         WLocaleConstTimeFormatSpecifier         =0x00000023,   /* time format specifier */
  331.         WLocaleConstTimeMarkerPosition          =0x00001005,   /* time marker position */
  332.         WLocaleConstCenturyFormatSpec           =0x00000024,   /* century format specifier (short date) */
  333.         WLocaleConstLeadingZerosTimeField       =0x00000025,   /* leading zeros in time field */
  334.         WLocaleConstLeadingZerosDayField        =0x00000026,   /* leading zeros in day field (short date) */
  335.         WLocaleConstLeadingZerosMonthField      =0x00000027,   /* leading zeros in month field (short date) */
  336.         WLocaleConstAmDesignator                =0x00000028,   /* AM designator */
  337.         WLocaleConstPmDesignator                =0x00000029,   /* PM designator */
  338.  
  339.         WLocaleConstCalendarTypeSpec            =0x00001009,   /* type of calendar specifier */
  340.         WLocaleConstAdditionalCalendarTypeSpec  =0x0000100B,   /* additional calendar types specifier */
  341.         WLocaleConstFirstDayWeekSpec            =0x0000100C,   /* first day of week specifier */
  342.         WLocaleConstFirstWeekYearSpec           =0x0000100D,   /* first week of year specifier */
  343.  
  344.         WLocaleConstLongMondayName              =0x0000002A,   /* long name for Monday */
  345.         WLocaleConstLongTuesdayName             =0x0000002B,   /* long name for Tuesday */
  346.         WLocaleConstLongWednesdayName           =0x0000002C,   /* long name for Wednesday */
  347.         WLocaleConstLongThursdayName            =0x0000002D,   /* long name for Thursday */
  348.         WLocaleConstLongFridayName              =0x0000002E,   /* long name for Friday */
  349.         WLocaleConstLongSaturdayName            =0x0000002F,   /* long name for Saturday */
  350.         WLocaleConstLongSundayName              =0x00000030,   /* long name for Sunday */
  351.         WLocaleConstAbbrevMondayName            =0x00000031,   /* abbreviated name for Monday */
  352.         WLocaleConstAbbrevTuesdayName           =0x00000032,   /* abbreviated name for Tuesday */
  353.         WLocaleConstAbbrevWednesdayName         =0x00000033,   /* abbreviated name for Wednesday */
  354.         WLocaleConstAbbrevThursdayName          =0x00000034,   /* abbreviated name for Thursday */
  355.         WLocaleConstAbbrevFridayName            =0x00000035,   /* abbreviated name for Friday */
  356.         WLocaleConstAbbrevSaturdayName          =0x00000036,   /* abbreviated name for Saturday */
  357.         WLocaleConstAbbrevSundayName            =0x00000037,   /* abbreviated name for Sunday */
  358.         WLocaleConstLongJanuaryName             =0x00000038,   /* long name for January */
  359.         WLocaleConstLongFebruaryName            =0x00000039,   /* long name for February */
  360.         WLocaleConstLongMarchName               =0x0000003A,   /* long name for March */
  361.         WLocaleConstLongAprilName               =0x0000003B,   /* long name for April */
  362.         WLocaleConstLongMayName                 =0x0000003C,   /* long name for May */
  363.         WLocaleConstLongJuneName                =0x0000003D,   /* long name for June */
  364.         WLocaleConstLongJulyName                =0x0000003E,   /* long name for July */
  365.         WLocaleConstLongAugustName              =0x0000003F,   /* long name for August */
  366.         WLocaleConstLongSeptemberName           =0x00000040,   /* long name for September */
  367.         WLocaleConstLongOctoberName             =0x00000041,   /* long name for October */
  368.         WLocaleConstLongNovemberName            =0x00000042,   /* long name for November */
  369.         WLocaleConstLongDecemberName            =0x00000043,   /* long name for December */
  370.         WLocaleConstLong13monthName             =0x0000100E,   /* long name for 13th month (if exists) */
  371.         WLocaleConstAbbrevJanuaryName           =0x00000044,   /* abbreviated name for January */
  372.         WLocaleConstAbbrevFebruaryName          =0x00000045,   /* abbreviated name for February */
  373.         WLocaleConstAbbrevMarchName             =0x00000046,   /* abbreviated name for March */
  374.         WLocaleConstAbbrevAprilName             =0x00000047,   /* abbreviated name for April */
  375.         WLocaleConstAbbrevMayName               =0x00000048,   /* abbreviated name for May */
  376.         WLocaleConstAbbrevJuneName              =0x00000049,   /* abbreviated name for June */
  377.         WLocaleConstAbbrevJulyName              =0x0000004A,   /* abbreviated name for July */
  378.         WLocaleConstAbbrevAugustName            =0x0000004B,   /* abbreviated name for August */
  379.         WLocaleConstAbbrevSeptemberName         =0x0000004C,   /* abbreviated name for September */
  380.         WLocaleConstAbbrevOctoberName           =0x0000004D,   /* abbreviated name for October */
  381.         WLocaleConstAbbrevNovemberName          =0x0000004E,   /* abbreviated name for November */
  382.         WLocaleConstAbbrevDecemberName          =0x0000004F,   /* abbreviated name for December */
  383.         WLocaleConstAbbrev13monthName           =0x0000100F,   /* abbreviated name for 13th month (if exists) */
  384.  
  385.         WLocaleConstPositiveSign                =0x00000050,   /* positive sign */
  386.         WLocaleConstNegativeSign                =0x00000051,   /* negative sign */
  387.         WLocaleConstPositiveSignPosition        =0x00000052,   /* positive sign position */
  388.         WLocaleConstNegativeSignPosition        =0x00000053,   /* negative sign position */
  389.         WLocaleConstMonSymPrecedesPosAmt        =0x00000054,   /* mon sym precedes pos amt */
  390.         WLocaleConstMonSymSepBySpaceFromPosAmt  =0x00000055,   /* mon sym sep by space from pos amt */
  391.         WLocaleConstMonSymPrecedesNegAmt        =0x00000056,   /* mon sym precedes neg amt */
  392.         WLocaleConstMonSymSepBySpaceFromNegAmt  =0x00000057,   /* mon sym sep by space from neg amt */
  393.  
  394.         WLocaleConstFontSignature               =0x00000058    /* font signature */
  395. };      
  396.     
  397. /*
  398.  *  Time Flags for GetTimeFormat
  399.  */
  400. enum WTimeFormat {
  401.         WTimeFormatNoMinutesOrSeconds    =0x00000001,  /* do not use minutes or seconds */
  402.         WTimeFormatNoSeconds             =0x00000002,  /* do not use seconds */
  403.         WTimeFormatNoTimeMarker          =0x00000004,  /* do not use time marker */
  404.         WTimeFormatForce24hourFormat     =0x00000008   /* always use 24 hour format */
  405. };
  406.  
  407. /*
  408.  *  Date Flags for GetDateFormat
  409.  */
  410. enum WDateFormat {
  411.         WDateFormatShortDatePicture     =0x00000001,  /* use short date picture */
  412.         WDateFormatLongDatePicture      =0x00000002,  /* use long date picture */
  413.         WDateFormatUseAltCalendar       =0x00000004   /* use alternate calendar (if any) */
  414. };
  415.  
  416. typedef WDWord WLocaleIDType;
  417.  
  418. class WCMCLASS WLocaleID : public WObject {
  419.     WDeclareSubclass( WLocaleID, WObject );
  420.     
  421.     public:
  422.  
  423.         /*********************************************************
  424.          * Constructors and destructors
  425.          *********************************************************/
  426.  
  427.         WLocaleID();
  428.         WLocaleID( WDWord locID );
  429.         WLocaleID( const WLanguageID & langID,
  430.                    WLocaleSortID sortID=WLocaleSortDefault );
  431.  
  432.         ~WLocaleID();
  433.  
  434.         /*********************************************************
  435.          * Properties
  436.          *********************************************************/
  437.  
  438.         // ID
  439.  
  440.         WDWord GetID() const;
  441.  
  442.         // Info
  443.  
  444.         WString GetInfo( WLocaleConst locConst ) const;
  445.         WBool SetInfo( WLocaleConst locConst, const WString & locInfo ) const;
  446.  
  447.         // LanguageID
  448.  
  449.         WLanguageIDType GetLanguageID() const;
  450.  
  451.         // Time/Date  Format
  452.  
  453.         WString GetFormatTime( WTimeFormat tFormat ) const;
  454.         WString GetFormatDate( WDateFormat dFormat ) const;
  455.  
  456.  
  457.         // Thread
  458.  
  459.         WBool SetThread() const;
  460.  
  461.         /*********************************************************
  462.          * Methods
  463.          *********************************************************/
  464.  
  465.         // Clean
  466.  
  467.         void Clear();
  468.  
  469.  
  470.         // Create
  471.  
  472.         WBool Create();
  473.         WBool Create( WDWord locID );
  474.         WBool Create( const WLanguageID & langID,
  475.                       WLocaleSortID sortID=WLocaleSortDefault );
  476.  
  477.  
  478.         /*********************************************************
  479.          * Data members
  480.          *********************************************************/
  481.  
  482.     private:
  483.         WDWord _localeID;
  484. };
  485.  
  486.  
  487. #ifndef _WNO_PRAGMA_PUSH
  488. #pragma enum pop;
  489. #pragma pack(pop);
  490. #endif
  491.  
  492. #endif // _WLOCALE_HPP_INCLUDED
  493.