GUI : Maximisation remove the 'decoration of the windows' ==> need to be an option
This commit is contained in:
parent
c02747d8fb
commit
0c1f6004eb
@ -59,6 +59,7 @@ MainWindows::MainWindows(void) : MsgBroadcast("Main Windows", EDN_CAT_GUI)
|
|||||||
|
|
||||||
// enable the close signal of the windows
|
// enable the close signal of the windows
|
||||||
g_signal_connect(G_OBJECT(m_mainWindow), "delete-event", G_CALLBACK(OnQuit), this);
|
g_signal_connect(G_OBJECT(m_mainWindow), "delete-event", G_CALLBACK(OnQuit), this);
|
||||||
|
g_signal_connect(G_OBJECT(m_mainWindow), "window-state-event", G_CALLBACK(OnStateChange), this);
|
||||||
//g_signal_connect(G_OBJECT(m_mainWindow), "destroy", G_CALLBACK(OnQuit), this);
|
//g_signal_connect(G_OBJECT(m_mainWindow), "destroy", G_CALLBACK(OnQuit), this);
|
||||||
|
|
||||||
// Create a vertical box for stacking the menu and editor widgets in.
|
// Create a vertical box for stacking the menu and editor widgets in.
|
||||||
@ -105,6 +106,7 @@ MainWindows::~MainWindows(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void MainWindows::SetTitle(Edn::File &fileName, bool isModify)
|
void MainWindows::SetTitle(Edn::File &fileName, bool isModify)
|
||||||
{
|
{
|
||||||
Edn::String tmp = "";
|
Edn::String tmp = "";
|
||||||
@ -180,6 +182,25 @@ bool MainWindows::OnQuit(GtkWidget *widget, gpointer data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
gboolean MainWindows::OnStateChange(GtkWidget *widget, GdkEvent* event, gpointer data)
|
||||||
|
{
|
||||||
|
MainWindows * self = reinterpret_cast<MainWindows*>(data);
|
||||||
|
EDN_WARNING("State change");
|
||||||
|
EDN_INFO(" change state mask : " << event->window_state.changed_mask);
|
||||||
|
EDN_INFO(" change state new val : " << event->window_state.new_window_state);
|
||||||
|
if (event->window_state.changed_mask == GDK_WINDOW_STATE_MAXIMIZED) {
|
||||||
|
EDN_INFO(" ==> Maximisation change...");
|
||||||
|
if (event->window_state.new_window_state == GDK_WINDOW_STATE_MAXIMIZED) {
|
||||||
|
EDN_INFO(" ==> ENABLE");
|
||||||
|
gtk_window_set_decorated(GTK_WINDOW(self->m_mainWindow), FALSE);
|
||||||
|
} else {
|
||||||
|
EDN_INFO(" ==> DISABLE");
|
||||||
|
gtk_window_set_decorated(GTK_WINDOW(self->m_mainWindow), TRUE);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|
||||||
void MainWindows::OnMenuAbout(wxCommandEvent & WXUNUSED(event))
|
void MainWindows::OnMenuAbout(wxCommandEvent & WXUNUSED(event))
|
||||||
|
@ -51,6 +51,7 @@ class MainWindows: public Singleton<MainWindows>, public MsgBroadcast
|
|||||||
GtkWidget * GetWidget(void) { return m_mainWindow;};
|
GtkWidget * GetWidget(void) { return m_mainWindow;};
|
||||||
void OnMessage(int32_t id, int32_t dataID);
|
void OnMessage(int32_t id, int32_t dataID);
|
||||||
static bool OnQuit(GtkWidget *widget, gpointer data);
|
static bool OnQuit(GtkWidget *widget, gpointer data);
|
||||||
|
static gboolean OnStateChange(GtkWidget *widget, GdkEvent* event, gpointer data);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SetTitle(Edn::File &fileName, bool isModify);
|
void SetTitle(Edn::File &fileName, bool isModify);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user