2009-05-08 13:28:41 +00:00
|
|
|
/*
|
|
|
|
* OpenClonk, http://www.openclonk.org
|
|
|
|
*
|
2013-12-17 20:01:09 +00:00
|
|
|
* Copyright (c) 2007-2009, RedWolf Design GmbH, http://www.clonk.de/
|
2016-04-03 18:18:29 +00:00
|
|
|
* Copyright (c) 2013-2016, The OpenClonk Team and contributors
|
2009-05-08 13:28:41 +00:00
|
|
|
*
|
2013-12-17 20:01:09 +00:00
|
|
|
* Distributed under the terms of the ISC license; see accompanying file
|
|
|
|
* "COPYING" for details.
|
2009-05-08 13:28:41 +00:00
|
|
|
*
|
2013-12-17 20:01:09 +00:00
|
|
|
* "Clonk" is a registered trademark of Matthes Bender, used with permission.
|
|
|
|
* See accompanying file "TRADEMARK" for details.
|
2009-05-08 13:28:41 +00:00
|
|
|
*
|
2013-12-17 20:01:09 +00:00
|
|
|
* To redistribute this file separately, substitute the full license texts
|
|
|
|
* for the above references.
|
2009-05-08 13:28:41 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* A window listing all objects in the game */
|
|
|
|
|
|
|
|
#ifndef INC_C4ObjectListDlg
|
|
|
|
#define INC_C4ObjectListDlg
|
|
|
|
|
2016-01-22 19:05:43 +00:00
|
|
|
#ifdef USE_GTK
|
2010-09-22 15:11:19 +00:00
|
|
|
#include <gtk/gtk.h>
|
2016-01-22 19:05:43 +00:00
|
|
|
#endif // USE_GTK
|
2009-05-08 13:28:41 +00:00
|
|
|
|
2016-04-03 18:07:56 +00:00
|
|
|
#include "object/C4ObjectList.h"
|
2009-05-08 13:28:41 +00:00
|
|
|
|
|
|
|
class C4ObjectListDlg: public C4ObjectListChangeListener
|
|
|
|
{
|
2010-03-28 17:58:21 +00:00
|
|
|
public:
|
2009-05-08 13:28:41 +00:00
|
|
|
C4ObjectListDlg();
|
|
|
|
virtual ~C4ObjectListDlg();
|
|
|
|
void Execute();
|
|
|
|
void Open();
|
|
|
|
void Update(C4ObjectList &rSelection);
|
|
|
|
|
|
|
|
virtual void OnObjectRemove(C4ObjectList * pList, C4ObjectLink * pLnk);
|
|
|
|
virtual void OnObjectAdded(C4ObjectList * pList, C4ObjectLink * pLnk);
|
|
|
|
virtual void OnObjectRename(C4ObjectList * pList, C4ObjectLink * pLnk);
|
|
|
|
|
2016-01-22 19:05:43 +00:00
|
|
|
#ifdef USE_GTK
|
2010-03-28 17:58:21 +00:00
|
|
|
private:
|
2009-05-08 13:28:41 +00:00
|
|
|
GtkWidget * window;
|
|
|
|
GtkWidget * treeview;
|
|
|
|
GObject * model;
|
|
|
|
bool updating_selection;
|
|
|
|
|
|
|
|
static void OnDestroy(GtkWidget * widget, C4ObjectListDlg * dlg);
|
2011-01-12 21:09:28 +00:00
|
|
|
static void OnRowActivated(GtkTreeView * tree_view, GtkTreePath * path, GtkTreeViewColumn * column, C4ObjectListDlg * dlg);
|
2009-05-08 13:28:41 +00:00
|
|
|
static void OnSelectionChanged(GtkTreeSelection * selection, C4ObjectListDlg * dlg);
|
2016-01-22 19:05:43 +00:00
|
|
|
#endif // USE_GTK
|
2009-05-08 13:28:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif //INC_C4ObjectListDlg
|