| 1 |
#if defined(Hiro_IconView) |
| 2 |
|
| 3 |
namespace hiro { |
| 4 |
|
| 5 |
auto pIconViewItem::construct() -> void { |
| 6 |
} |
| 7 |
|
| 8 |
auto pIconViewItem::destruct() -> void { |
| 9 |
} |
| 10 |
|
| 11 |
auto pIconViewItem::setIcon(const image& icon) -> void { |
| 12 |
if(auto parent = _parent()) { |
| 13 |
parent->setItemIcon(self().offset(), icon); |
| 14 |
} |
| 15 |
} |
| 16 |
|
| 17 |
auto pIconViewItem::setSelected(bool selected) -> void { |
| 18 |
if(auto parent = _parent()) { |
| 19 |
parent->setItemSelected(self().offset(), selected); |
| 20 |
} |
| 21 |
} |
| 22 |
|
| 23 |
auto pIconViewItem::setText(const string& text) -> void { |
| 24 |
if(auto parent = _parent()) { |
| 25 |
parent->setItemText(self().offset(), text); |
| 26 |
} |
| 27 |
} |
| 28 |
|
| 29 |
auto pIconViewItem::_parent() -> pIconView* { |
| 30 |
if(auto parent = self().parentIconView()) return parent->self(); |
| 31 |
return nullptr; |
| 32 |
} |
| 33 |
|
| 34 |
} |
| 35 |
|
| 36 |
#endif |