haiku/src/apps/pulse/ProgressBar.h
ejakowatz 52a3801208 It is accomplished ...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-09 12:24:59 +00:00

45 lines
860 B
C++

//****************************************************************************************
//
// File: ProgressBar.h
//
// Written by: David Ramsey and Daniel Switkin
//
// Copyright 1999, Be Incorporated
//
//****************************************************************************************
#ifndef PROGRESSBAR_H
#define PROGRESSBAR_H
#include <interface/View.h>
typedef struct {
rgb_color color;
BRect rect;
} segment;
#define ltgray 216
#define dkgray 80
class ProgressBar : public BView {
public:
ProgressBar(BRect r, char* name);
void Draw(BRect rect);
void Set(int32 value);
void UpdateColors(int32 color, bool fade);
void AttachedToWindow();
enum {
PROGRESS_WIDTH = 146,
PROGRESS_HEIGHT = 20
};
private:
void Render(bool all = false);
segment segments[20];
int32 current_value, previous_value;
};
#endif