xref: /haiku/src/add-ons/translators/gif/GIFView.h (revision 4bd0c1066b227cec4b79883bdef697c7a27f2e90)
1 ////////////////////////////////////////////////////////////////////////////////
2 //
3 //	File: GIFView.h
4 //
5 //	Date: December 1999
6 //
7 //	Author: Daniel Switkin
8 //
9 //	Copyright 2003 (c) by Daniel Switkin. This file is made publically available
10 //	under the BSD license, with the stipulations that this complete header must
11 //	remain at the top of the file indefinitely, and credit must be given to the
12 //	original author in any about box using this software.
13 //
14 ////////////////////////////////////////////////////////////////////////////////
15 
16 // Additional authors:	Stephan Aßmus, <superstippi@gmx.de>
17 //						Philippe Saint-Pierre, <stpere@gmail.com>
18 //						John Scipione, <jscipione@gmail.com>
19 
20 #ifndef GIF_VIEW_H
21 #define GIF_VIEW_H
22 
23 
24 #include <GroupView.h>
25 #include "TranslatorSettings.h"
26 
27 
28 #define GV_WEB_SAFE					'gvws'
29 #define GV_BEOS_SYSTEM				'gvbe'
30 #define GV_GREYSCALE				'gvgr'
31 #define GV_OPTIMAL					'gvop'
32 #define GV_INTERLACED				'gvin'
33 #define GV_USE_DITHERING			'gvud'
34 #define GV_USE_TRANSPARENT			'gvut'
35 #define GV_USE_TRANSPARENT_AUTO		'gvua'
36 #define GV_USE_TRANSPARENT_COLOR	'gvuc'
37 #define GV_TRANSPARENT_RED			'gvtr'
38 #define GV_TRANSPARENT_GREEN		'gvtg'
39 #define GV_TRANSPARENT_BLUE			'gvtb'
40 #define GV_SET_COLOR_COUNT			'gvcc'
41 
42 
43 const BRect kRectView(110, 110, 339, 339);
44 
45 
46 class BBox;
47 class BCheckBox;
48 class BPopUpMenu;
49 class BMenuField;
50 class BMenuItem;
51 class BRadioButton;
52 class BStringView;
53 class BTextControl;
54 
55 
56 
57 class GIFView : public BGroupView {
58 public:
59 								GIFView(TranslatorSettings* settings);
60 	virtual						~GIFView();
61 
62 	virtual	void				AllAttached();
63 	virtual	void				MessageReceived(BMessage* message);
64 
65 private:
66 			void				RestorePrefs();
67 			int					CheckInput(BTextControl* control);
68 
69 			TranslatorSettings*	fSettings;
70 
71 			BStringView*		fTitle;
72 			BStringView*		fVersion;
73 			BStringView*		fCopyright;
74 
75 			BMenuField*			fPaletteMF;
76 			BPopUpMenu*			fPaletteM;
77 			BMenuItem*			fWebSafeMI;
78 			BMenuItem*			fBeOSSystemMI;
79 			BMenuItem*			fGreyScaleMI;
80 			BMenuItem*			fOptimalMI;
81 
82 			BMenuField*			fColorCountMF;
83 			BPopUpMenu*			fColorCountM;
84 			BMenuItem*			fColorCountMI[8];
85 			BMenuItem*			fColorCount256MI;
86 
87 			BCheckBox*			fInterlacedCB;
88 			BCheckBox*			fUseTransparentCB;
89 			BCheckBox*			fUseDitheringCB;
90 
91 			BRadioButton*		fUseTransparentAutoRB;
92 			BRadioButton*		fUseTransparentColorRB;
93 
94 			BBox*				fDitheringBox;
95 			BBox*				fInterlacedBox;
96 			BBox*				fTransparentBox;
97 
98 			BTextControl*		fRedTextControl;
99 			BTextControl*		fGreenTextControl;
100 			BTextControl*		fBlueTextControl;
101 };
102 
103 
104 #endif	// GIF_VIEW_H
105