Horizon
src
widgets
text_editor.hpp
1
#pragma once
2
#include <gtkmm.h>
3
#include "util/changeable.hpp"
4
5
namespace
horizon {
6
class
TextEditor
:
public
Gtk::Stack,
public
Changeable
{
7
public
:
8
enum class
Lines { MULTI, SINGLE };
9
TextEditor
(Lines mode = Lines::SINGLE);
10
enum class
Select { YES, NO };
11
void
set_text(
const
std::string &text, Select select);
12
std::string get_text()
const
;
13
14
type_signal_changed signal_activate()
15
{
16
return
s_signal_activate;
17
}
18
19
type_signal_changed signal_lost_focus()
20
{
21
return
s_signal_lost_focus;
22
}
23
24
private
:
25
Gtk::Entry *entry =
nullptr
;
26
Gtk::TextView *view =
nullptr
;
27
28
type_signal_changed s_signal_activate;
29
type_signal_changed s_signal_lost_focus;
30
sigc::connection entry_focus_out_conn;
31
};
32
}
// namespace horizon
horizon::Changeable
Definition:
changeable.hpp:5
horizon::TextEditor
Definition:
text_editor.hpp:6
Generated by
1.9.1