1/*
2 * Copyright 2002-2006 Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT license.
4 *
5 * Copyright 1999, Be Incorporated. All Rights Reserved.
6 * This file may be used under the terms of the Be Sample Code License.
7 *
8 * Written by:	Daniel Switkin
9 */
10#ifndef CONFIG_VIEW_H
11#define CONFIG_VIEW_H
12
13
14#include "Prefs.h"
15
16#include <Box.h>
17#include <ColorControl.h>
18
19class BCheckBox;
20class BRadioButton;
21class BTextControl;
22
23
24class RTColorControl : public BColorControl {
25	public:
26		RTColorControl(BPoint point, BMessage *message);
27		void SetValue(int32 color);
28};
29
30class ConfigView : public BBox {
31	public:
32		ConfigView(BRect rect, const char *name, uint32 mode,
33			BMessenger& target, Prefs *prefs);
34
35		virtual void AttachedToWindow();
36		virtual void MessageReceived(BMessage *message);
37		virtual void GetPreferredSize(float* _width, float* _height);
38
39		void UpdateDeskbarIconWidth();
40
41	private:
42		void _ResetDefaults();
43
44		int32			fMode;
45		BMessenger		fTarget;
46		Prefs*			fPrefs;
47		RTColorControl* fColorControl;
48
49		bool			fFirstTimeAttached;
50
51		// For Normal
52		BCheckBox*		fFadeCheckBox;
53		// For Mini and Deskbar
54		BRadioButton*	fActiveButton;
55		BRadioButton*	fIdleButton;
56		BRadioButton*	fFrameButton;
57		// For Deskbar
58		BTextControl*	fIconWidthControl;
59};
60
61#endif	// CONFIG_VIEW_H
62