2015-12-30 06:41:46 +00:00
|
|
|
#if defined(Hiro_ComboButton)
|
|
|
|
|
|
|
|
namespace hiro {
|
|
|
|
|
|
|
|
auto pComboButtonItem::construct() -> void {
|
|
|
|
}
|
|
|
|
|
|
|
|
auto pComboButtonItem::destruct() -> void {
|
|
|
|
}
|
|
|
|
|
2016-01-07 08:14:33 +00:00
|
|
|
auto pComboButtonItem::setIcon(const image& icon) -> void {
|
2015-12-30 06:41:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
auto pComboButtonItem::setSelected() -> void {
|
|
|
|
@autoreleasepool {
|
|
|
|
if(auto parent = _parent()) {
|
|
|
|
[parent->cocoaView selectItemAtIndex:self().offset()];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
auto pComboButtonItem::setText(const string& text) -> void {
|
|
|
|
@autoreleasepool {
|
|
|
|
if(auto parent = _parent()) {
|
|
|
|
[[parent->cocoaView itemAtIndex:self().offset()] setTitle:[NSString stringWithUTF8String:text]];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
auto pComboButtonItem::_parent() -> maybe<pComboButton&> {
|
|
|
|
if(auto parent = self().parentComboButton()) {
|
|
|
|
if(auto self = parent->self()) return *self;
|
|
|
|
}
|
|
|
|
return nothing;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|