xuititlebox.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef __SCRIPTTITLEBOX_H
  2. #define __SCRIPTTITLEBOX_H
  3. #include <api/skin/widgets/titlebox.h>
  4. #include <api/script/objects/c_script/h_guiobject.h>
  5. #include <api/wnd/accessible.h>
  6. #define SCRIPTTITLEBOX_PARENT TitleBox
  7. // -----------------------------------------------------------------------
  8. // Your wnd object class
  9. class ScriptTitleBox : public SCRIPTTITLEBOX_PARENT {
  10. public:
  11. ScriptTitleBox();
  12. virtual ~ScriptTitleBox();
  13. // XuiObject automatically calls this back for all parameters registered using addParam
  14. // encountered in the xml source
  15. virtual int setXuiParam(int xuihandle, int xmlattributeid, const wchar_t *xmlattributename, const wchar_t *value);
  16. protected:
  17. /*static */void CreateXMLParameters(int master_handle);
  18. private:
  19. // a list of IDs for our xml attributes, we use them in addParam() in the constructor
  20. enum {
  21. SCRIPTTITLEBOX_TITLE= 0,
  22. SCRIPTTITLEBOX_CONTENT,
  23. SCRIPTTITLEBOX_CENTERED,
  24. SCRIPTTITLEBOX_SUFFIX,
  25. };
  26. int myxuihandle;
  27. static XMLParamPair params[];
  28. };
  29. // -----------------------------------------------------------------------
  30. // This defines the svc_xuiObject that exposes your wnd object
  31. extern const wchar_t ScriptTitleBoxXuiObjectStr[];
  32. extern char ScriptTitleBoxXuiSvcName[];
  33. class ScriptTitleBoxXuiSvc : public XuiObjectSvc<ScriptTitleBox, ScriptTitleBoxXuiObjectStr, ScriptTitleBoxXuiSvcName> {};
  34. #endif