2 * Copyright 2004-2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 #ifndef RTF_TRANSLATOR_H
6 #define RTF_TRANSLATOR_H
9 #include <Translator.h>
10 #include <TranslatorFormats.h>
11 #include <TranslationDefs.h>
12 #include <GraphicsDefs.h>
13 #include <InterfaceDefs.h>
16 #include <ByteOrder.h>
20 #define RTF_TRANSLATOR_VERSION B_TRANSLATION_MAKE_VERSION(0, 7, 0)
21 #define RTF_TEXT_FORMAT 'RTF '
22 #define RTF_IN_QUALITY 0.7
23 #define RTF_IN_CAPABILITY 0.9
25 #define TEXT_OUT_QUALITY 0.3
26 #define TEXT_OUT_CAPABILITY 0.6
27 #define STXT_OUT_QUALITY 0.5
28 #define STXT_OUT_CAPABILITY 0.5
31 class RTFTranslator
: public BTranslator
{
35 virtual const char *TranslatorName() const;
36 virtual const char *TranslatorInfo() const;
37 virtual int32
TranslatorVersion() const;
39 virtual const translation_format
*InputFormats(int32
*_outCount
) const;
40 virtual const translation_format
*OutputFormats(int32
*_outCount
) const;
42 virtual status_t
Identify(BPositionIO
*inSource
,
43 const translation_format
*inFormat
, BMessage
*ioExtension
,
44 translator_info
*outInfo
, uint32 outType
);
46 virtual status_t
Translate(BPositionIO
*inSource
,
47 const translator_info
*inInfo
, BMessage
*ioExtension
,
48 uint32 outType
, BPositionIO
*outDestination
);
50 virtual status_t
MakeConfigurationView(BMessage
*ioExtension
,
51 BView
**outView
, BRect
*outExtent
);
54 virtual ~RTFTranslator();
55 // this is protected because the object is deleted by the
56 // Release() function instead of being deleted directly by
63 #endif /* RTF_TRANSLATOR_H */