2 * Copyright 2006, Haiku.
3 * Distributed under the terms of the MIT License.
6 * Stephan Aßmus <superstippi@gmx.de>
9 #ifndef OPTION_PROPERTY_H
10 #define OPTION_PROPERTY_H
17 class OptionProperty
: public Property
{
19 OptionProperty(uint32 identifier
);
20 OptionProperty(const OptionProperty
& other
);
21 OptionProperty(BMessage
* archive
);
22 virtual ~OptionProperty();
25 virtual status_t
Archive(BMessage
* archive
,
26 bool deep
= true) const;
27 static BArchivable
* Instantiate(BMessage
* archive
);
29 virtual Property
* Clone() const;
31 virtual type_code
Type() const;
33 virtual bool SetValue(const char* value
);
34 virtual bool SetValue(const Property
* other
);
35 virtual void GetValue(BString
& string
);
38 virtual bool MakeAnimatable(bool animatable
= true);
42 void AddOption(int32 id
, const char* name
);
44 int32
CurrentOptionID() const;
45 bool SetCurrentOptionID(int32 id
);
47 bool GetOption(int32 index
, BString
* string
, int32
* id
) const;
48 bool GetCurrentOption(BString
* string
) const;
50 bool SetOptionAtOffset(int32 indexOffset
);
60 int32 fCurrentOptionID
;
64 #endif // OPTION_PROPERTY_H