summaryrefslogtreecommitdiff
path: root/libskindesignerapi/pluginstructure.h
blob: 17a6971042abccf9df7666aa5be1da4a0abe44b1 (plain)
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
#ifndef __PLUGINSTRUCTURE_H
#define __PLUGINSTRUCTURE_H

#include "tokencontainer.h"

namespace skindesignerapi {

struct sPlugMenu {
    int type;
    string tplname;
    cTokenContainer *tokenContainer;
};

struct sPlugViewElement {
    int id;
    int viewId;
    string name;
    cTokenContainer *tokenContainer;
};

struct sPlugViewGrid {
    int id;
    int viewId;
    string name;
    cTokenContainer *tokenContainer;
};

class cPluginStructure {
public:
    cPluginStructure(void);
    ~cPluginStructure(void);
    void RegisterMenu(int key, int type, string tpl, cTokenContainer *tk);
    cTokenContainer *GetMenuTokenContainer(int key);    
    void RegisterRootView(string templateName);
    void RegisterSubView(int subView, string templateName);
    void RegisterViewElement(int view, int viewElement, string name, cTokenContainer *tk);
    void RegisterViewGrid(int view, int viewGrid, string name, cTokenContainer *tk);
    void RegisterViewTab(int view, cTokenContainer *tk);
    cTokenContainer *GetTokenContainerVE(int viewId, int veId);
    cTokenContainer *GetTokenContainerGE(int viewId, int geId);
    cTokenContainer *GetTokenContainerTab(int viewId);
    string name;                                     //name of plugin
    string libskindesignerAPIVersion;                //skindesigner API Version plugin is using
    int id;                                          //id of plugin in skindesigner
    //basic plugin interface
    map< int, sPlugMenu > menus;                     //menus as key -> sPlugMenu struct hashmap 
    //advanced plugin interface
    string rootview;                                 //template name of root view
    map< int, string > subviews;                     //subviews as subviewid -> template name map 
    multimap< int, sPlugViewElement > viewelements;  //viewelements as viewid -> sPlugViewElement struct multimap 
    multimap< int, sPlugViewGrid > viewgrids;        //viewgrids as viewid -> sPlugViewGrid struct hashmap
    map< int, cTokenContainer* > viewtabs;           //viewtabs as viewid -> tokencontainer hashmap
};


}
#endif //__PLUGINSTRUCTURE_H