1 |
/* |
/* |
2 |
Copyright (c) 2016 Christian Schoenebeck |
Copyright (c) 2016 - 2017 Christian Schoenebeck |
3 |
|
|
4 |
This file is part of "gigedit" and released under the terms of the |
This file is part of "gigedit" and released under the terms of the |
5 |
GNU General Public License version 2. |
GNU General Public License version 2. |
8 |
#include "global.h" |
#include "global.h" |
9 |
#include "ManagedWindow.h" |
#include "ManagedWindow.h" |
10 |
#include <typeinfo> |
#include <typeinfo> |
11 |
#include <glib.h> |
#ifdef GLIB_HEADER_FILE |
12 |
|
# include GLIB_HEADER_FILE(glib.h) |
13 |
|
#else |
14 |
|
# include <glib.h> |
15 |
|
#endif |
16 |
|
|
17 |
/////////////////////////////////////////////////////////////////////////// |
/////////////////////////////////////////////////////////////////////////// |
18 |
// class 'ManagedWindow' |
// class 'ManagedWindow' |
33 |
); |
); |
34 |
} |
} |
35 |
|
|
36 |
|
#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 |
37 |
|
bool ManagedWindow::on_configure_event(Gdk::EventConfigure& event) { |
38 |
|
GdkEventConfigure* e = event.gobj(); |
39 |
|
#else |
40 |
bool ManagedWindow::on_configure_event(GdkEventConfigure* e) { |
bool ManagedWindow::on_configure_event(GdkEventConfigure* e) { |
41 |
|
#endif |
42 |
//printf("on_configure_event x=%d y=%d w=%d h=%d\n", e->x, e->y, e->width, e->height); |
//printf("on_configure_event x=%d y=%d w=%d h=%d\n", e->x, e->y, e->width, e->height); |
43 |
if (m_listenOnConfigureEvents) { |
if (m_listenOnConfigureEvents) { |
44 |
//printf("reset event throttle timer\n"); |
//printf("reset event throttle timer\n"); |
63 |
); |
); |
64 |
m_eventThrottleTimer->attach(Glib::MainContext::get_default()); |
m_eventThrottleTimer->attach(Glib::MainContext::get_default()); |
65 |
} |
} |
66 |
|
#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 |
67 |
|
return Gtk::Window::on_configure_event(event); |
68 |
|
#else |
69 |
return Gtk::Window::on_configure_event(e); |
return Gtk::Window::on_configure_event(e); |
70 |
|
#endif |
71 |
} |
} |
72 |
|
|
73 |
bool ManagedWindow::saveWindowDimensions(int x, int y, int w, int h) { |
bool ManagedWindow::saveWindowDimensions(int x, int y, int w, int h) { |
131 |
); |
); |
132 |
} |
} |
133 |
|
|
134 |
|
#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 |
135 |
|
bool ManagedDialog::on_configure_event(Gdk::EventConfigure& event) { |
136 |
|
GdkEventConfigure* e = event.gobj(); |
137 |
|
#else |
138 |
bool ManagedDialog::on_configure_event(GdkEventConfigure* e) { |
bool ManagedDialog::on_configure_event(GdkEventConfigure* e) { |
139 |
|
#endif |
140 |
//printf("on_configure_event x=%d y=%d w=%d h=%d\n", e->x, e->y, e->width, e->height); |
//printf("on_configure_event x=%d y=%d w=%d h=%d\n", e->x, e->y, e->width, e->height); |
141 |
if (m_listenOnConfigureEvents) { |
if (m_listenOnConfigureEvents) { |
142 |
//printf("reset event throttle timer\n"); |
//printf("reset event throttle timer\n"); |
161 |
); |
); |
162 |
m_eventThrottleTimer->attach(Glib::MainContext::get_default()); |
m_eventThrottleTimer->attach(Glib::MainContext::get_default()); |
163 |
} |
} |
164 |
|
#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 |
165 |
|
return Gtk::Dialog::on_configure_event(event); |
166 |
|
#else |
167 |
return Gtk::Dialog::on_configure_event(e); |
return Gtk::Dialog::on_configure_event(e); |
168 |
|
#endif |
169 |
} |
} |
170 |
|
|
171 |
bool ManagedDialog::saveWindowDimensions(int x, int y, int w, int h) { |
bool ManagedDialog::saveWindowDimensions(int x, int y, int w, int h) { |