xref: /haiku/src/add-ons/translators/gif/GIFView.h (revision 04a0e9c7b68cbe3a43d38e2bca8e860fd80936fb)
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, 2013, <stpere@gmail.com>
18 
19 #ifndef GIFVIEW_H
20 #define GIFVIEW_H
21 
22 #include <View.h>
23 #include "TranslatorSettings.h"
24 
25 class BMenuField;
26 class BPopUpMenu;
27 class BMenuItem;
28 class BCheckBox;
29 class BRadioButton;
30 class BTextControl;
31 
32 #define GV_WEB_SAFE					'gvws'
33 #define GV_BEOS_SYSTEM				'gvbe'
34 #define GV_GREYSCALE				'gvgr'
35 #define GV_OPTIMAL					'gvop'
36 #define GV_INTERLACED				'gvin'
37 #define GV_USE_DITHERING			'gvud'
38 #define GV_USE_TRANSPARENT			'gvut'
39 #define GV_USE_TRANSPARENT_AUTO		'gvua'
40 #define GV_USE_TRANSPARENT_COLOR	'gvuc'
41 #define GV_TRANSPARENT_RED			'gvtr'
42 #define GV_TRANSPARENT_GREEN		'gvtg'
43 #define GV_TRANSPARENT_BLUE			'gvtb'
44 #define GV_SET_COLOR_COUNT			'gvcc'
45 
46 
47 const BRect kRectView(110, 110, 339, 339);
48 
49 class GIFView : public BView {
50  public:
51 							GIFView(TranslatorSettings* settings);
52 	virtual					~GIFView();
53 
54 	virtual	void			MessageReceived(BMessage* message);
55 	virtual	void			AllAttached();
56 
57  private:
58 			void			RestorePrefs();
59 			int				CheckInput(BTextControl* control);
60 
61 		TranslatorSettings*		fSettings;
62 
63 		BMenuField*			fPaletteMF;
64 		BPopUpMenu*			fPaletteM;
65 		BMenuItem*			fWebSafeMI;
66 		BMenuItem*			fBeOSSystemMI;
67 		BMenuItem*			fGreyScaleMI;
68 		BMenuItem*			fOptimalMI;
69 
70 		BMenuField*			fColorCountMF;
71 		BPopUpMenu*			fColorCountM;
72 		BMenuItem*			fColorCountMI[8];
73 		BMenuItem*			fColorCount256MI;
74 
75 		BCheckBox*			fInterlacedCB;
76 		BCheckBox*			fUseTransparentCB;
77 		BCheckBox*			fUseDitheringCB;
78 
79 		BRadioButton*		fUseTransparentAutoRB;
80 		BRadioButton*		fUseTransparentColorRB;
81 
82 		BTextControl*		fTransparentRedTC;
83 		BTextControl*		fTransparentGreenTC;
84 		BTextControl*		fTransparentBlueTC;
85 };
86 
87 #endif
88 
89