14 |
# include <gig.h> |
# include <gig.h> |
15 |
#endif |
#endif |
16 |
|
|
17 |
#include <gtkmm.h> |
#ifdef GTKMM_HEADER_FILE |
18 |
|
# include GTKMM_HEADER_FILE(gtkmm.h) |
19 |
|
#else |
20 |
|
# include <gtkmm.h> |
21 |
|
#endif |
22 |
#if HAVE_CONFIG_H |
#if HAVE_CONFIG_H |
23 |
# include <config.h> |
# include <config.h> |
24 |
#endif |
#endif |
25 |
#include "compat.h" |
#include "compat.h" |
26 |
#include <gtkmm/uimanager.h> |
|
27 |
#include <gtkmm/actiongroup.h> |
#if USE_GTKMM_BUILDER |
28 |
|
# include <gtkmm/builder.h> |
29 |
|
#else |
30 |
|
# include <gtkmm/uimanager.h> // deprecated in gtkmm >= 3.21.4 |
31 |
|
#endif |
32 |
|
|
33 |
|
#if USE_GLIB_ACTION |
34 |
|
# include <giomm/simpleactiongroup.h> |
35 |
|
#else |
36 |
|
# include <gtkmm/actiongroup.h> |
37 |
|
#endif |
38 |
|
|
39 |
#include "ManagedWindow.h" |
#include "ManagedWindow.h" |
40 |
|
|
41 |
// Should we use a very simple (and buggy) local NKSP syntax parser, or should |
// Should we use a very simple (and buggy) local NKSP syntax parser, or should |
71 |
virtual Settings::Property<int>* windowSettingHeight() { return &Settings::singleton()->scriptEditorWindowH; } |
virtual Settings::Property<int>* windowSettingHeight() { return &Settings::singleton()->scriptEditorWindowH; } |
72 |
|
|
73 |
protected: |
protected: |
74 |
Gtk::VBox m_vbox; |
VBox m_vbox; |
75 |
Gtk::HBox m_footerHBox; |
HBox m_footerHBox; |
76 |
Gtk::HBox m_statusHBox; |
HBox m_statusHBox; |
77 |
Gtk::HButtonBox m_buttonBox; |
HButtonBox m_buttonBox; |
78 |
Gtk::ScrolledWindow m_scrolledWindow; |
Gtk::ScrolledWindow m_scrolledWindow; |
79 |
Gtk::HBox m_textViewHBox; |
HBox m_textViewHBox; |
80 |
Glib::RefPtr<Gtk::TextBuffer> m_lineNrBuffer; |
Glib::RefPtr<Gtk::TextBuffer> m_lineNrBuffer; |
81 |
Glib::RefPtr<Gtk::TextBuffer> m_textBuffer; |
Glib::RefPtr<Gtk::TextBuffer> m_textBuffer; |
82 |
Glib::RefPtr<Gtk::TextBuffer::TagTable> m_tagTable; |
Glib::RefPtr<Gtk::TextBuffer::TagTable> m_tagTable; |
100 |
Gtk::Button m_applyButton; |
Gtk::Button m_applyButton; |
101 |
Gtk::Button m_cancelButton; |
Gtk::Button m_cancelButton; |
102 |
|
|
103 |
|
#if GTKMM_MAJOR_VERSION > 3 || (GTKMM_MAJOR_VERSION == 3 && GTKMM_MINOR_VERSION >= 20) |
104 |
|
Glib::RefPtr<Gtk::CssProvider> m_css; |
105 |
|
#endif |
106 |
|
|
107 |
Glib::RefPtr<Gdk::Pixbuf> m_warningIcon; |
Glib::RefPtr<Gdk::Pixbuf> m_warningIcon; |
108 |
Glib::RefPtr<Gdk::Pixbuf> m_errorIcon; |
Glib::RefPtr<Gdk::Pixbuf> m_errorIcon; |
109 |
Glib::RefPtr<Gdk::Pixbuf> m_successIcon; |
Glib::RefPtr<Gdk::Pixbuf> m_successIcon; |
110 |
|
|
111 |
|
#if USE_GLIB_ACTION |
112 |
|
Glib::RefPtr<Gio::SimpleActionGroup> m_actionGroup; |
113 |
|
#else |
114 |
Glib::RefPtr<Gtk::ActionGroup> m_actionGroup; |
Glib::RefPtr<Gtk::ActionGroup> m_actionGroup; |
115 |
|
#endif |
116 |
|
#if USE_GTKMM_BUILDER |
117 |
|
Glib::RefPtr<Gtk::Builder> m_uiManager; |
118 |
|
#else |
119 |
Glib::RefPtr<Gtk::UIManager> m_uiManager; |
Glib::RefPtr<Gtk::UIManager> m_uiManager; |
120 |
|
#endif |
121 |
|
|
122 |
gig::Script* m_script; |
gig::Script* m_script; |
123 |
#if USE_LS_SCRIPTVM |
#if USE_LS_SCRIPTVM |
143 |
void updateStatusBar(); |
void updateStatusBar(); |
144 |
#endif |
#endif |
145 |
bool on_motion_notify_event(GdkEventMotion* e); |
bool on_motion_notify_event(GdkEventMotion* e); |
146 |
bool onWindowDelete(GdkEventAny* e); |
#if GTKMM_MAJOR_VERSION > 3 || (GTKMM_MAJOR_VERSION == 3 && (GTKMM_MINOR_VERSION > 91 || (GTKMM_MINOR_VERSION == 91 && GTKMM_MICRO_VERSION >= 2))) // GTKMM >= 3.91.2 |
147 |
|
bool onWindowDelete(Gdk::Event& e); |
148 |
|
#endif |
149 |
|
bool onWindowDeleteP(GdkEventAny* e); |
150 |
void onMenuChangeFontSize(); |
void onMenuChangeFontSize(); |
151 |
int currentFontSize() const; |
int currentFontSize() const; |
152 |
void setFontSize(int size, bool save); |
void setFontSize(int size, bool save); |