Debian Codegraph @

hiro/gtk/widget/combo-edit-item.cpp

raw
1 #if defined(Hiro_ComboEdit)
2
3 namespace hiro {
4
5 auto pComboEditItem::construct() -> void {
6 }
7
8 auto pComboEditItem::destruct() -> void {
9 }
10
11 auto pComboEditItem::setIcon(const image& icon) -> void {
12 if(auto parent = _parent()) {
13 auto pixbuf = CreatePixbuf(icon, true);
14 gtk_list_store_set(parent->gtkListStore, &gtkIter, 0, pixbuf, -1);
15 }
16 }
17
18 auto pComboEditItem::setText(const string& text) -> void {
19 if(auto parent = _parent()) {
20 gtk_list_store_set(parent->gtkListStore, &gtkIter, 1, text.data(), -1);
21 }
22 }
23
24 auto pComboEditItem::_parent() -> maybe<pComboEdit&> {
25 if(auto parent = self().parentComboEdit()) {
26 if(auto self = parent->self()) return *self;
27 }
28 return nothing;
29 }
30
31 }
32
33 #endif