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