forked from ennorehling/csmapfx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
regionlist.h
61 lines (42 loc) · 1.3 KB
/
regionlist.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#ifndef _CSMAP_REGIONLIST
#define _CSMAP_REGIONLIST
#include <fx.h>
#include <list>
#include "datafile.h"
class FXRegionList : public FXTreeList
{
FXDECLARE(FXRegionList)
public:
FXRegionList(FXComposite* p, FXObject* tgt=NULL,FXSelector sel=0, FXuint opts=0, FXint x=0,FXint y=0,FXint w=0,FXint h=0);
void create();
virtual ~FXRegionList();
void mapfiles(std::list<datafile> *f);
public:
long onSelected(FXObject*,FXSelector,void*);
long onPopup(FXObject*,FXSelector,void*);
long onPopupClicked(FXObject*,FXSelector,void*);
long onToggleOwnFactionGroup(FXObject*,FXSelector,void*);
long onUpdateOwnFactionGroup(FXObject*,FXSelector,void*);
long onMapChange(FXObject*,FXSelector,void*);
long onQueryHelp(FXObject*,FXSelector,void*);
public:
enum
{
ID_POPUP_CLICKED = FXTreeList::ID_LAST,
ID_TOGGLEOWNFACTIONGROUP,
ID_LAST
};
protected:
datafile::SelectionState selection;
std::list<datafile> *files;
FXIcon *terrainIcons[datablock::TERRAIN_LAST];
FXIcon *green, *red, *blue, *cyan, *yellow, *orange, *gray, *black;
FXFont *boldfont;
// rekursivly searches item with userdata=data in treeitem list
FXTreeItem* findTreeItem(FXTreeItem* first, void* data);
bool active_faction_group;
protected:
FXRegionList(){}
FXRegionList(const FXRegionList&) {}
};
#endif //_CSMAP_REGIONLIST