File: treeviewcolumn_extra_def_impl.hpp

package info (click to toggle)
cppgir 2.0%2Bgit20240928.c8bb1c6%2Breally2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,228 kB
  • sloc: cpp: 14,307; ansic: 339; makefile: 11; sh: 9
file content (35 lines) | stat: -rw-r--r-- 669 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef _GI_GTK_TREEVIEWCOLUMN_EXTRA_DEF_IMPL_HPP_
#define _GI_GTK_TREEVIEWCOLUMN_EXTRA_DEF_IMPL_HPP_

namespace gi
{
namespace repository
{
namespace Gtk
{
namespace base
{
Gtk::TreeViewColumn
TreeViewColumnExtra::new_(const std::string title, Gtk::CellRenderer renderer,
    const std::map<std::string, int> attribs) noexcept
{
  auto result = TreeViewColumnBase::new_();
  result.set_title(title);
  if (renderer) {
    result.pack_start(renderer, true);
    for (auto &e : attribs) {
      result.add_attribute(renderer, e.first, e.second);
    }
  }
  return result;
}

} // namespace base

} // namespace Gtk

} // namespace repository

} // namespace gi

#endif