openclonk/src/editor/C4ObjectListDlg.h

55 lines
1.5 KiB
C
Raw Normal View History

2009-05-08 13:28:41 +00:00
/*
* OpenClonk, http://www.openclonk.org
*
* 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
*
* Distributed under the terms of the ISC license; see accompanying file
* "COPYING" for details.
2009-05-08 13:28:41 +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
*
* 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
#ifdef USE_GTK
2010-09-22 15:11:19 +00:00
#include <gtk/gtk.h>
#endif // USE_GTK
2009-05-08 13:28:41 +00:00
#include "object/C4ObjectList.h"
2009-05-08 13:28:41 +00:00
class C4ObjectListDlg: public C4ObjectListChangeListener
{
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);
#ifdef USE_GTK
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);
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);
#endif // USE_GTK
2009-05-08 13:28:41 +00:00
};
#endif //INC_C4ObjectListDlg