BPicture: Fix archive constructor.
[haiku.git] / src / add-ons / translators / stxt / STXTTranslator.h
blob84c828b2363cdd5813d7117edc84720b94bc6842
1 /*****************************************************************************/
2 // STXTTranslator
3 // Written by Michael Wilber, OBOS Translation Kit Team
4 //
5 // STXTTranslator.h
6 //
7 // This BTranslator based object is for opening and writing
8 // StyledEdit (STXT) files.
9 //
11 // Copyright (c) 2002 OpenBeOS Project
13 // Permission is hereby granted, free of charge, to any person obtaining a
14 // copy of this software and associated documentation files (the "Software"),
15 // to deal in the Software without restriction, including without limitation
16 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
17 // and/or sell copies of the Software, and to permit persons to whom the
18 // Software is furnished to do so, subject to the following conditions:
20 // The above copyright notice and this permission notice shall be included
21 // in all copies or substantial portions of the Software.
23 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29 // DEALINGS IN THE SOFTWARE.
30 /*****************************************************************************/
32 #ifndef STXT_TRANSLATOR_H
33 #define STXT_TRANSLATOR_H
35 #include <Translator.h>
36 #include <TranslatorFormats.h>
37 #include <TranslationDefs.h>
38 #include <GraphicsDefs.h>
39 #include <InterfaceDefs.h>
40 #include <DataIO.h>
41 #include <File.h>
42 #include <ByteOrder.h>
43 #include <fs_attr.h>
44 #include "BaseTranslator.h"
46 #define STXT_TRANSLATOR_VERSION B_TRANSLATION_MAKE_VERSION(1,0,0)
47 #define STXT_IN_QUALITY 0.5
48 #define STXT_IN_CAPABILITY 0.5
49 #define STXT_OUT_QUALITY 0.5
50 #define STXT_OUT_CAPABILITY 0.5
52 #define TEXT_IN_QUALITY 0.4
53 #define TEXT_IN_CAPABILITY 0.6
54 #define TEXT_OUT_QUALITY 0.4
55 #define TEXT_OUT_CAPABILITY 0.6
57 class STXTTranslator : public BaseTranslator {
58 public:
59 STXTTranslator();
61 virtual status_t Identify(BPositionIO *inSource,
62 const translation_format *inFormat, BMessage *ioExtension,
63 translator_info *outInfo, uint32 outType);
64 // determines whether or not this translator can convert the
65 // data in inSource to the type outType
67 virtual status_t Translate(BPositionIO *inSource,
68 const translator_info *inInfo, BMessage *ioExtension,
69 uint32 outType, BPositionIO *outDestination);
70 // this function is the whole point of the Translation Kit,
71 // it translates the data in inSource to outDestination
72 // using the format outType
74 virtual BView *NewConfigView(TranslatorSettings *settings);
76 protected:
77 virtual ~STXTTranslator();
78 // this is protected because the object is deleted by the
79 // Release() function instead of being deleted directly by
80 // the user
82 private:
85 #endif // #ifndef STXT_TRANSLATOR_H