summaryrefslogtreecommitdiffstats
path: root/beos/liblayout/MProgressBar.h
blob: 3938c2583b35427ddfdf9334b7a9709bba267498 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58

#ifndef _MSTATUSBAR_H
#define _MSTATUSBAR_H
#include "layout.h"
#include <View.h>

#if __POWERPC__
#pragma simple_class_byval off
#endif

class IMPEXPLIBLAYOUT MProgressBar :  public MView, public BView
{
	public:		float	value;
				float currentwidth;

	public:		MProgressBar(BHandler *, bool pulsed_updates=false);
				MProgressBar(BMessage*);
				virtual ~MProgressBar();
				virtual long Archive(BMessage *archive, bool deep=true) const;
				static BArchivable *Instantiate(BMessage *archive);

				virtual	minimax	layoutprefs();
				virtual BRect	layout(BRect rect);
				virtual void	setcolor(rgb_color,bool);
						void	setbarcolor(rgb_color);
					rgb_color	getbarcolor() {return bar_fill;};
				virtual void	Draw(BRect);
				virtual void	Pulse();
						void	Refresh();
						void	SetValue(float value);
				virtual void	MouseDown(BPoint);
				virtual void	WindowActivated(bool);
				virtual void	FrameResized(float,float);
				virtual void	MessageReceived(BMessage *mes);
				virtual void	AttachedToWindow();
				virtual void	DetachedFromWindow();

	private:	virtual void _expansionmprogressbar1(); 
				virtual void _expansionmprogressbar2(); 

				thread_id		mousethread;
				static	long	_mousetracker(void *arg);
						long	mousetracker();

				BRect	lastbounds;
				BHandler *target;
				rgb_color	bar_hi;
				rgb_color	bar_fill;
				rgb_color	bar_low;
				float barwidth;

				uint32  _expansiondata[2];
};

extern const IMPEXPLIBLAYOUT char M_PROGRESSBAR_FRACTION[];

#endif