-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcustomEntry.hpp
100 lines (81 loc) · 1.43 KB
/
customEntry.hpp
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#ifndef CPP_CUSTOMENTRY_CLASS_H
#define CPP_CUSTOMENTRY_CLASS_H
/*!
* \project_name EBU Player
* \file customEntry.hpp
* \brief Custom entry
* \details This class specification defines a custom entry
* \authors Marco Dos Santos Oliveira
* \version 0.1
* \date 3 may 2013
* \copyright This software is published under MPL v2.0
*
*/
#include <iostream>
#include <iomanip>
#include <string>
#include <glibmm.h>
#include <gtkmm/entry.h>
#include <gtkmm/label.h>
//#include <gdkmm/screen.h>
#include <gtkmm/cssprovider.h>
#include <gtkmm/stylecontext.h>
class customEntry : public Gtk::Entry
{
public:
customEntry
(
std::string expression,
std::string placeholder,
std::string value = ""
);
~customEntry
(
void
);
bool error
(
void
) const;
Glib::ustring get_value
(
void
);
void set_value
(
Glib::ustring value
);
Gtk::Label * get_sample
(
void
);
Gtk::Label * get_description
(
void
);
protected:
bool m_error;
Glib::RefPtr<Glib::Regex> regex;
Glib::ustring description;
Glib::ustring sample;
Glib::RefPtr<Gdk::Screen> screen;
Glib::RefPtr<Gtk::CssProvider> css;
Glib::RefPtr<Gtk::StyleContext> style_context;
std::string getRegEx
(
std::string type
);
void insert_text_handler
(
void
);
void statechanged
(
Gtk::StateType s
);
void stateflagschanged
(
Gtk::StateFlags f
);
};
#endif