1/*
2 * Copyright 2010-2013, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT license.
4 *
5 * Authors:
6 *		Geoffry Song, goffrie@gmail.com
7 */
8#ifndef _LEAVES_H_
9#define _LEAVES_H_
10
11
12#include <vector>
13
14#include <ScreenSaver.h>
15
16
17class Leaves : public BScreenSaver, public BHandler {
18public:
19						Leaves(BMessage* archive, image_id id);
20	virtual	void		Draw(BView* view, int32 frame);
21	virtual	void		StartConfig(BView* view);
22	virtual	status_t	StartSaver(BView* view, bool preview);
23
24	virtual	status_t	SaveState(BMessage* into) const;
25
26	virtual	void		MessageReceived(BMessage* message);
27
28private:
29			int32		fDropRate;
30			int32		fLeafSize;
31			int32		fSizeVariation;
32
33	inline	BPoint		_RandomPoint(const BRect& bound);
34};
35
36
37#endif	// _LEAVES_H_
38