38ac8def5a
* refactored private/mutable stuff out of LocaleRoster into MutableLocaleRoster * moved management of Locale/Time settings file and broadcasting of any changes out of preflets and into MutableLocaleRoster * added proper sorting to the listviews of the Locale preflet * the Time preflet no longer overlaps long timezone names into the actual time * several fixes with respect to leaking ICU objects, esp. in BCountry * the locale roster no longer passes out references to its own BCountry object, but uses copies, instead - this makes locking superfluous, as the clients' BCountry objects can no longer be changed by the setting a new default country in the locale roster * removed pretty useless POSIX-style symbol fetching from BCountry - if we need that at all, it should live in the dedicated formatter classes * adjusted readonlybootprompt, dstcheck and Deskbar to the changed Locale API * refactored existing Time-formatter into TimeUnitFormat and DurationFormat (the latter of which is now used by AboutSystem) * added stubs for Date, DateTime and Time formatters * lots of coding style fixes throughout the Locale Kit and the Locale and Time preflets This will probably break most external apps making use of the Locale Kit - it does break WebPositive. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37831 a95241bf-73f2-0310-859d-f6bbb57e9c96
53 lines
884 B
C++
53 lines
884 B
C++
/*
|
|
* Copyright 2003-2010, Haiku, Inc.
|
|
* Distributed under the terms of the MIT Licence.
|
|
*/
|
|
#ifndef _B_FORMAT_H_
|
|
#define _B_FORMAT_H_
|
|
|
|
#include <FormatParameters.h>
|
|
#include <SupportDefs.h>
|
|
|
|
|
|
// types of fields contained in formatted strings
|
|
enum {
|
|
// number format fields
|
|
B_CURRENCY_FIELD,
|
|
B_DECIMAL_SEPARATOR_FIELD,
|
|
B_EXPONENT_FIELD,
|
|
B_EXPONENT_SIGN_FIELD,
|
|
B_EXPONENT_SYMBOL_FIELD,
|
|
B_FRACTION_FIELD,
|
|
B_GROUPING_SEPARATOR_FIELD,
|
|
B_INTEGER_FIELD,
|
|
B_PERCENT_FIELD,
|
|
B_PERMILLE_FIELD,
|
|
B_SIGN_FIELD,
|
|
|
|
// date format fields
|
|
// TODO: ...
|
|
};
|
|
|
|
// structure filled in while formatting
|
|
struct format_field_position {
|
|
uint32 field_type;
|
|
int32 start;
|
|
int32 length;
|
|
};
|
|
|
|
|
|
class BFormatImpl;
|
|
|
|
class BFormat {
|
|
protected:
|
|
BFormat(const BFormat& other);
|
|
virtual ~BFormat();
|
|
|
|
BFormat& operator=(const BFormat& other);
|
|
|
|
BFormat();
|
|
};
|
|
|
|
|
|
#endif // _B_FORMAT_H_
|