aboutsummaryrefslogtreecommitdiff
path: root/Src/Wasabi/api/skin/widgets/xuititlebox.h
blob: 804e25ab7c66a5950ea1732644f2748b33a76a8d (plain) (blame)
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
#ifndef __SCRIPTTITLEBOX_H
#define __SCRIPTTITLEBOX_H

#include <api/skin/widgets/titlebox.h>
#include <api/script/objects/c_script/h_guiobject.h>
#include <api/wnd/accessible.h>

#define  SCRIPTTITLEBOX_PARENT TitleBox

// -----------------------------------------------------------------------
// Your wnd object class
class ScriptTitleBox : public SCRIPTTITLEBOX_PARENT {
  
  public:

    ScriptTitleBox();
    virtual ~ScriptTitleBox();

    // XuiObject automatically calls this back for all parameters registered using addParam
    // encountered in the xml source
    virtual int setXuiParam(int xuihandle, int xmlattributeid, const wchar_t *xmlattributename, const wchar_t *value);
protected:
	/*static */void CreateXMLParameters(int master_handle);
  private:

    // a list of IDs for our xml attributes, we use them in addParam() in the constructor
    enum {
       SCRIPTTITLEBOX_TITLE= 0,
       SCRIPTTITLEBOX_CONTENT,
       SCRIPTTITLEBOX_CENTERED,
       SCRIPTTITLEBOX_SUFFIX,
    };
    int myxuihandle;
		static XMLParamPair params[];
};

// -----------------------------------------------------------------------
// This defines the svc_xuiObject that exposes your wnd object

extern const wchar_t ScriptTitleBoxXuiObjectStr[];
extern char ScriptTitleBoxXuiSvcName[];
class ScriptTitleBoxXuiSvc : public XuiObjectSvc<ScriptTitleBox, ScriptTitleBoxXuiObjectStr, ScriptTitleBoxXuiSvcName> {};

#endif