| 1 | /* |
| 2 | * LegacyClonk |
| 3 | * |
| 4 | * Copyright (c) 1998-2000, Matthes Bender (RedWolf Design) |
| 5 | * Copyright (c) 2017-2022, The LegacyClonk Team and contributors |
| 6 | * |
| 7 | * Distributed under the terms of the ISC license; see accompanying file |
| 8 | * "COPYING" for details. |
| 9 | * |
| 10 | * "Clonk" is a registered trademark of Matthes Bender, used with permission. |
| 11 | * See accompanying file "TRADEMARK" for details. |
| 12 | * |
| 13 | * To redistribute this file separately, substitute the full license texts |
| 14 | * for the above references. |
| 15 | */ |
| 16 | |
| 17 | /* Console mode dialog for object properties and script interface */ |
| 18 | |
| 19 | #pragma once |
| 20 | |
| 21 | #include "C4ObjectList.h" |
| 22 | |
| 23 | #ifdef WITH_DEVELOPER_MODE |
| 24 | #include <gtk/gtk.h> |
| 25 | #endif |
| 26 | |
| 27 | class C4PropertyDlg |
| 28 | { |
| 29 | public: |
| 30 | C4PropertyDlg(); |
| 31 | ~C4PropertyDlg(); |
| 32 | void Default(); |
| 33 | void Clear(); |
| 34 | void Execute(); |
| 35 | void ClearPointers(C4Object *pObj); |
| 36 | void UpdateInputCtrl(C4Object *pObj); |
| 37 | bool Open(); |
| 38 | bool Update(); |
| 39 | bool Update(C4ObjectList &rSelection); |
| 40 | bool Active; |
| 41 | #ifdef _WIN32 |
| 42 | HWND hDialog; |
| 43 | friend INT_PTR CALLBACK PropertyDlgProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam); |
| 44 | #elif defined(WITH_DEVELOPER_MODE) |
| 45 | GtkWidget *vbox; |
| 46 | GtkWidget *textview; |
| 47 | GtkWidget *entry; |
| 48 | |
| 49 | gulong handlerHide; |
| 50 | |
| 51 | static void OnScriptActivate(GtkWidget *widget, gpointer data); |
| 52 | static void OnWindowHide(GtkWidget *widget, gpointer data); |
| 53 | #endif |
| 54 | |
| 55 | protected: |
| 56 | C4ID idSelectedDef; |
| 57 | C4ObjectList Selection; |
| 58 | }; |
| 59 | |