tcp: Fix 64 bit build with debugging features enabled.
[haiku.git] / src / preferences / time / TimeZoneListItem.h
blob526c81021818935ad3d86d09b361121e81a15ba0
1 /*
2 * Copyright 2010, Haiku Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Adrien Destugues <pulkomandy@pulkomandy.ath.cx>
7 */
8 #ifndef _TIME_ZONE_LIST_ITEM_H
9 #define _TIME_ZONE_LIST_ITEM_H
12 #include <StringItem.h>
15 class BBitmap;
16 class BCountry;
17 class BTimeZone;
20 class TimeZoneListItem : public BStringItem {
21 public:
22 TimeZoneListItem(const char* text,
23 BCountry* country, BTimeZone* timeZone);
24 virtual ~TimeZoneListItem();
26 virtual void DrawItem(BView* owner, BRect frame,
27 bool complete = false);
29 virtual void Update(BView* owner, const BFont* font);
31 bool HasCountry() const
32 { return fCountry != NULL; };
33 const BCountry& Country() const { return *fCountry; };
34 void SetCountry(BCountry* country);
36 bool HasTimeZone() const
37 { return fTimeZone != NULL; };
38 const BTimeZone& TimeZone() const
39 { return *fTimeZone; };
40 void SetTimeZone(BTimeZone* timeZone);
42 const BString& ID() const;
43 const BString& Name() const;
44 int OffsetFromGMT() const;
46 private:
47 void _DrawItemWithTextOffset(BView* owner,
48 BRect frame, bool complete,
49 float textOffset);
51 BCountry* fCountry;
52 BTimeZone* fTimeZone;
53 BBitmap* fIcon;
57 #endif // _TIME_ZONE_LIST_ITEM_H