vfs: check userland buffers before reading them.
[haiku.git] / src / preferences / time / TZDisplay.h
blob331b71d3613c686524908cbcbb94e2a5f32632ac
1 /*
2 * Copyright 2004-2011, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Andrew McCall <mccall@@digitalparadise.co.uk>
7 * Mike Berg <mike@berg-net.us>
8 * Julun <host.haiku@gmx.de>
9 * Hamish Morrison <hamish@lavabit.com>
11 #ifndef _TZ_DISPLAY_H
12 #define _TZ_DISPLAY_H
15 #include <String.h>
16 #include <View.h>
17 #include <stdio.h>
20 class TTZDisplay : public BView {
21 public:
22 TTZDisplay(const char* name,
23 const char* label);
24 virtual ~TTZDisplay();
26 virtual void AttachedToWindow();
27 virtual void ResizeToPreferred();
28 virtual void Draw(BRect updateRect);
30 virtual BSize MaxSize();
31 virtual BSize MinSize();
32 virtual BSize PreferredSize();
34 const char* Label() const;
35 void SetLabel(const char* label);
37 const char* Text() const;
38 void SetText(const char* text);
40 const char* Time() const;
41 void SetTime(const char* time);
43 private:
44 BSize _CalcPrefSize();
46 BString fLabel;
47 BString fText;
48 BString fTime;
52 #endif // _TZ_DISPLAY_H