2016-04-13 05:18:40 +03:00
|
|
|
/*
|
2022-12-21 23:47:08 +03:00
|
|
|
* Copyright 2016-2022 Haiku, Inc. All rights reserved.
|
2016-04-13 05:18:40 +03:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* John Scipione, jscipione@gmail.com
|
|
|
|
*
|
2016-04-13 05:36:33 +03:00
|
|
|
* Based on ColorWhichItem by DarkWyrm (bpmagic@columbus.rr.com)
|
2016-04-13 05:18:40 +03:00
|
|
|
*/
|
|
|
|
#ifndef _COLOR_ITEM_H
|
|
|
|
#define _COLOR_ITEM_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <InterfaceDefs.h>
|
|
|
|
#include <StringItem.h>
|
|
|
|
|
|
|
|
|
|
|
|
class ColorItem : public BStringItem {
|
|
|
|
public:
|
|
|
|
ColorItem(const char* string, rgb_color color);
|
|
|
|
|
|
|
|
virtual void DrawItem(BView* owner, BRect frame, bool complete);
|
2022-12-21 23:47:08 +03:00
|
|
|
void SetColor(rgb_color color) { fColor = color; }
|
|
|
|
rgb_color Color() const { return fColor; }
|
2016-04-13 05:18:40 +03:00
|
|
|
|
|
|
|
private:
|
|
|
|
rgb_color fColor;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // _COLOR_ITEM_H
|