| 1 | /* |
| 2 | * LegacyClonk |
| 3 | * |
| 4 | * Copyright (c) RedWolf Design |
| 5 | * Copyright (c) 2007, Günther |
| 6 | * Copyright (c) 2017-2020, 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 | /* A window listing all objects in the game */ |
| 19 | |
| 20 | #pragma once |
| 21 | |
| 22 | #ifdef WITH_DEVELOPER_MODE |
| 23 | #include <gtk/gtk.h> |
| 24 | #endif // WITH_DEVELOPER_MODE |
| 25 | |
| 26 | #include "C4ObjectList.h" |
| 27 | |
| 28 | class C4ObjectListDlg : public C4ObjectListChangeListener |
| 29 | { |
| 30 | public: |
| 31 | C4ObjectListDlg(); |
| 32 | virtual ~C4ObjectListDlg(); |
| 33 | void Execute(); |
| 34 | void Open(); |
| 35 | void Update(C4ObjectList &rSelection); |
| 36 | |
| 37 | virtual void OnObjectRemove(C4ObjectList *pList, C4ObjectLink *pLnk) override; |
| 38 | virtual void OnObjectAdded(C4ObjectList *pList, C4ObjectLink *pLnk) override; |
| 39 | virtual void OnObjectRename(C4ObjectList *pList, C4ObjectLink *pLnk) override; |
| 40 | |
| 41 | #ifdef WITH_DEVELOPER_MODE |
| 42 | private: |
| 43 | GtkWidget *window; |
| 44 | GtkWidget *treeview; |
| 45 | GObject *model; |
| 46 | bool updating_selection; |
| 47 | |
| 48 | static void OnDestroy(GtkWidget *widget, C4ObjectListDlg *dlg); |
| 49 | static void OnSelectionChanged(GtkTreeSelection *selection, C4ObjectListDlg *dlg); |
| 50 | #endif // WITH_DEVELOPER_MODE |
| 51 | }; |
| 52 | |