1 /* 2 * Copyright 2004-2011, Haiku, Inc. All Rights Reserved. 3 * Distributed under the terms of the MIT License. 4 * 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> 10 */ 11 #ifndef _TZ_DISPLAY_H 12 #define _TZ_DISPLAY_H 13 14 15 #include <String.h> 16 #include <View.h> 17 #include <stdio.h> 18 19 20 class TTZDisplay : public BView { 21 public: 22 TTZDisplay(const char* name, 23 const char* label); 24 virtual ~TTZDisplay(); 25 26 virtual void AttachedToWindow(); 27 virtual void ResizeToPreferred(); 28 virtual void Draw(BRect updateRect); 29 30 virtual BSize MaxSize(); 31 virtual BSize MinSize(); 32 virtual BSize PreferredSize(); 33 34 const char* Label() const; 35 void SetLabel(const char* label); 36 37 const char* Text() const; 38 void SetText(const char* text); 39 40 const char* Time() const; 41 void SetTime(const char* time); 42 43 private: 44 BSize _CalcPrefSize(); 45 46 BString fLabel; 47 BString fText; 48 BString fTime; 49 }; 50 51 52 #endif // _TZ_DISPLAY_H 53 54