2 * Copyright 2010, Haiku Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
6 * Adrien Destugues <pulkomandy@pulkomandy.ath.cx>
8 #ifndef _TIME_ZONE_LIST_ITEM_H
9 #define _TIME_ZONE_LIST_ITEM_H
12 #include <StringItem.h>
20 class TimeZoneListItem
: public BStringItem
{
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;
47 void _DrawItemWithTextOffset(BView
* owner
,
48 BRect frame
, bool complete
,
57 #endif // _TIME_ZONE_LIST_ITEM_H