File ColorTree.hpp changed (mode: 100644) (index 2456b10..38502ed) |
19 |
19 |
#ifndef LIBCURSED__COLORTREE_HPP__ |
#ifndef LIBCURSED__COLORTREE_HPP__ |
20 |
20 |
#define LIBCURSED__COLORTREE_HPP__ |
#define LIBCURSED__COLORTREE_HPP__ |
21 |
21 |
|
|
|
22 |
|
#include <array> |
22 |
23 |
#include <functional> |
#include <functional> |
23 |
24 |
#include <string> |
#include <string> |
24 |
25 |
#include <vector> |
#include <vector> |
|
... |
... |
public: |
144 |
145 |
template <std::size_t N> |
template <std::size_t N> |
145 |
146 |
ColorTree(const wchar_t (&text)[N]) : text(text, text + N - 1) |
ColorTree(const wchar_t (&text)[N]) : text(text, text + N - 1) |
146 |
147 |
{ } |
{ } |
|
148 |
|
// Constructs a leaf node from text specified as `std::array<wchar_t, N>`. |
|
149 |
|
template <std::size_t N> |
|
150 |
|
ColorTree(const std::array<wchar_t, N> &text) : text(text.data()) |
|
151 |
|
{ } |
147 |
152 |
// Constructs a leaf node with specified text and format. |
// Constructs a leaf node with specified text and format. |
148 |
153 |
ColorTree(std::wstring text, Format format); |
ColorTree(std::wstring text, Format format); |
149 |
154 |
|
|