1
0

statswnd.cpp 836 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #include <precomp.h>
  2. #include "statswnd.h"
  3. #include <bfc/string/StringW.h>
  4. StatsWnd::StatsWnd()
  5. {
  6. registerXml();
  7. WASABI_API_WNDMGR->autopopup_registerGroupId(L"statswnd.group", L"Internal Statistics");
  8. WASABI_API_SYSCB->syscb_registerCallback(this);
  9. }
  10. StatsWnd::~StatsWnd()
  11. {
  12. WASABI_API_SYSCB->syscb_deregisterCallback(this);
  13. }
  14. int StatsWnd::skincb_onBeforeLoadingElements()
  15. {
  16. registerXml();
  17. return 1;
  18. }
  19. void StatsWnd::registerXml()
  20. {
  21. StringW xml;
  22. xml = L"buf:";
  23. xml += L"<?xml version=\"1.0\" encoding=\"UTF-16\" standalone=\"yes\"?>\n";
  24. xml += L"<WasabiXml version=\"1.0\">\n";
  25. xml += L"<groupdef id=\"statswnd.group\" name=\"Internal Statistics\">\n";
  26. xml += L" <Wasabi:Stats fitparent=\"1\" />\n";
  27. xml += L"</groupdef>\n";
  28. xml += L"</WasabiXml>\n";
  29. WASABI_API_SKIN->loadSkinFile(xml);
  30. }