2004-11-07 19:56:58 +03:00
|
|
|
// Author: Michael Wilber
|
|
|
|
// Copyright (C) Haiku, uses the MIT license
|
|
|
|
#ifndef ICONVIEW_H
|
|
|
|
#define ICONVIEW_H
|
|
|
|
|
2011-03-17 04:15:04 +03:00
|
|
|
|
2004-11-07 19:56:58 +03:00
|
|
|
#include <Bitmap.h>
|
2011-04-14 02:56:10 +04:00
|
|
|
#include <Mime.h>
|
2004-11-08 02:26:37 +03:00
|
|
|
#include <Path.h>
|
2011-03-17 04:15:04 +03:00
|
|
|
#include <View.h>
|
|
|
|
|
2004-11-07 19:56:58 +03:00
|
|
|
|
|
|
|
class IconView : public BView {
|
|
|
|
public:
|
2011-04-14 02:56:10 +04:00
|
|
|
IconView(icon_size iconSize = B_LARGE_ICON);
|
|
|
|
|
2011-03-17 04:15:04 +03:00
|
|
|
~IconView();
|
2011-04-14 02:56:10 +04:00
|
|
|
|
|
|
|
status_t InitCheck() const;
|
2011-03-17 04:15:04 +03:00
|
|
|
virtual void Draw(BRect area);
|
2011-04-14 02:56:10 +04:00
|
|
|
|
|
|
|
void DrawIcon(bool draw);
|
|
|
|
status_t SetIcon(const BPath& path,
|
|
|
|
icon_size iconSize = B_LARGE_ICON);
|
2004-11-07 19:56:58 +03:00
|
|
|
|
|
|
|
private:
|
2011-04-14 02:56:10 +04:00
|
|
|
void _SetSize();
|
|
|
|
|
|
|
|
icon_size fIconSize;
|
2011-03-17 04:15:04 +03:00
|
|
|
BBitmap* fIconBitmap;
|
|
|
|
bool fDrawIcon;
|
2004-11-07 19:56:58 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // #ifndef ICONVIEW_H
|