incremented minor version number
[fegdk.git] / feditor / src / editorwnd.cpp
blobd54f8cb8b8b8cfe4b94863d1bd0e5311e614c201
1 #include <fegdk/pch.h>
2 #include "editorwnd.h"
4 namespace feditor
7 editorWnd::editorWnd (GtkWidget *widget, const char *name)
9 mpWidget = widget;
10 mpWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
11 gtk_window_set_title (GTK_WINDOW (mpWindow), name);
12 gtk_window_set_resizable (GTK_WINDOW (mpWindow), TRUE);
13 gtk_window_set_default_size (GTK_WINDOW (mpWindow), 300, 200);
14 g_signal_connect (G_OBJECT (mpWindow), "delete_event", G_CALLBACK (gtk_widget_hide_on_delete), this);
15 gtk_container_add (GTK_CONTAINER (mpWindow), widget);
18 editorWnd::~editorWnd (void)
22 GtkWidget *editorWnd::getWidget (void) const
24 return mpWidget;
27 GtkWidget *editorWnd::getWindow (void) const
29 return mpWindow;
32 void editorWnd::toggle (void)
34 bool vis = (mpWindow->object.flags & GTK_VISIBLE) ? true : false;
35 if (!vis)
36 gtk_widget_show_all (mpWindow);
37 else
38 gtk_widget_hide (mpWindow);
41 bool editorWnd::isVisible (void) const
43 return (mpWindow->object.flags & GTK_VISIBLE) ? true : false;