vfs: check userland buffers before reading them.
[haiku.git] / src / preferences / appearance / ColorWhichItem.h
blob7e21eceee6dc0ecc282ae81ebccf34757e7f917b
1 /*
2 * Copyright 2001-2002 OpenBeOS
3 * Copyright 2003-2016 Haiku, Inc. All rights reserved.
4 * Distributed under the terms of the MIT License.
6 * Authors:
7 * DarkWyrm, bpmagic@columbus.rr.com
8 * Rene Gollent, rene@gollent.com
9 * Ryan Leavengood, leavengood@gmail.com
10 * John Scipione, jscipione@gmail.com
12 #ifndef COLORWHICH_ITEM_H
13 #define COLORWHICH_ITEM_H
16 #include <InterfaceDefs.h>
17 #include <StringItem.h>
20 class ColorWhichItem : public BStringItem
22 public:
23 ColorWhichItem(const char* text, color_which which,
24 rgb_color color);
26 virtual void DrawItem(BView* owner, BRect frame, bool complete);
28 color_which ColorWhich() { return fColorWhich; };
30 rgb_color Color() { return fColor; };
31 void SetColor(rgb_color color) { fColor = color; };
33 private:
34 color_which fColorWhich;
35 rgb_color fColor;
39 #endif