| 1 | /* |
| 2 | * LegacyClonk |
| 3 | * |
| 4 | * Copyright (c) RedWolf Design |
| 5 | * Copyright (c) 2007, Clonk-Karl |
| 6 | * Copyright (c) 2017-2019, The LegacyClonk Team and contributors |
| 7 | * |
| 8 | * Distributed under the terms of the ISC license; see accompanying file |
| 9 | * "COPYING" for details. |
| 10 | * |
| 11 | * "Clonk" is a registered trademark of Matthes Bender, used with permission. |
| 12 | * See accompanying file "TRADEMARK" for details. |
| 13 | * |
| 14 | * To redistribute this file separately, substitute the full license texts |
| 15 | * for the above references. |
| 16 | */ |
| 17 | |
| 18 | /* Common window for drawing and property tool dialogs in console mode */ |
| 19 | |
| 20 | #pragma once |
| 21 | |
| 22 | #ifdef WITH_DEVELOPER_MODE |
| 23 | #include <gtk/gtk.h> |
| 24 | #endif // WITH_DEVELOPER_MODE |
| 25 | |
| 26 | // TODO: Threadsafety? |
| 27 | class C4DevmodeDlg |
| 28 | { |
| 29 | // Make sure all developer tools are held in the same window |
| 30 | #ifdef WITH_DEVELOPER_MODE |
| 31 | private: |
| 32 | static GtkWidget *window; |
| 33 | static GtkWidget *notebook; |
| 34 | |
| 35 | static int x, y; |
| 36 | |
| 37 | static void OnDestroy(GtkWidget *widget, gpointer user_data); |
| 38 | |
| 39 | public: |
| 40 | static GtkWidget *GetWindow() { return window; } |
| 41 | static void AddPage(GtkWidget *widget, GtkWindow *parent, const char *title); |
| 42 | static void RemovePage(GtkWidget *widget); |
| 43 | static void SwitchPage(GtkWidget *widget); |
| 44 | |
| 45 | static void SetTitle(GtkWidget *widget, const char *title); |
| 46 | #endif // WITH_DEVELOPER_MODE |
| 47 | }; |
| 48 | |