BTRFS: Implement BTree::Path and change _Find.
[haiku.git] / src / apps / pulse / ProgressBar.h
blob1988e6a73ff1abdfb0260e4b242d2c0a02ea21ba
1 //****************************************************************************************
2 //
3 // File: ProgressBar.h
4 //
5 // Written by: David Ramsey and Daniel Switkin
6 //
7 // Copyright 1999, Be Incorporated
8 //
9 //****************************************************************************************
11 #ifndef PROGRESSBAR_H
12 #define PROGRESSBAR_H
14 #include <interface/View.h>
16 typedef struct {
17 rgb_color color;
18 BRect rect;
19 } segment;
21 #define ltgray 216
22 #define dkgray 80
24 class ProgressBar : public BView {
25 public:
26 ProgressBar(BRect r, char* name);
27 virtual void Draw(BRect rect);
28 void Set(int32 value);
29 void UpdateColors(int32 color, bool fade);
30 virtual void AttachedToWindow();
31 virtual void MouseDown(BPoint point);
33 enum {
34 PROGRESS_WIDTH = 146,
35 PROGRESS_HEIGHT = 20
38 private:
39 void Render(bool all = false);
41 segment segments[20];
42 int32 current_value, previous_value;
45 #endif