Files
haiku-beta6/headers/private/shared/ColorItem.h
T

44 lines
917 B
C++
Raw Normal View History

2016-04-12 19:18:40 -07:00
/*
* Copyright 2016-2024 Haiku, Inc. All rights reserved.
2016-04-12 19:18:40 -07:00
* Distributed under the terms of the MIT License.
*
2016-04-12 19:36:33 -07:00
* Based on ColorWhichItem by DarkWyrm ([email protected])
2016-04-12 19:18:40 -07:00
*/
#ifndef _COLOR_ITEM_H
#define _COLOR_ITEM_H
#include <InterfaceDefs.h>
#include <StringItem.h>
namespace BPrivate {
class BColorItem : public BStringItem {
2016-04-12 19:18:40 -07:00
public:
BColorItem(const char* text, rgb_color color);
BColorItem(const char* text, color_which which, rgb_color color);
2016-04-12 19:18:40 -07:00
virtual void DrawItem(BView* owner, BRect frame, bool complete);
void SetColor(rgb_color color) { fColor = color; };
rgb_color Color() { return fColor; };
color_which ColorWhich() { return fColorWhich; };
2016-04-12 19:18:40 -07:00
private:
rgb_color fColor;
color_which fColorWhich;
2016-04-12 19:18:40 -07:00
};
} // namespace BPrivate
// remove once apps have been updated to use BColorItem
typedef BPrivate::BColorItem ColorItem;
#endif // _COLOR_ITEM_H