1
0

status.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. #ifndef _STATUS_H
  2. #define _STATUS_H
  3. #include <api/wnd/wndclass/guiobjwnd.h>
  4. #include <bfc/string/StringW.h>
  5. #include <api/wndmgr/guistatuscb.h>
  6. #include <bfc/depend.h>
  7. class ButtBar;
  8. class AppCmds;
  9. #define STATUSBAR_PARENT GuiObjectWnd
  10. /**
  11. Class
  12. @short
  13. @author Nullsoft
  14. @ver 1.0
  15. @see
  16. */
  17. class StatusBar : public STATUSBAR_PARENT, public GuiStatusCallbackI {
  18. public:
  19. /**
  20. Method
  21. @see
  22. @ret
  23. @param
  24. */
  25. StatusBar();
  26. /**
  27. Method
  28. @see
  29. @ret
  30. @param
  31. */
  32. virtual ~StatusBar();
  33. /**
  34. Method
  35. @see
  36. @ret
  37. @param
  38. */
  39. virtual int onInit();
  40. // completeness indicator
  41. /**
  42. Method
  43. @see
  44. @ret
  45. @param
  46. */
  47. virtual void pushCompleted(int max);
  48. /**
  49. Method
  50. @see
  51. @ret
  52. @param
  53. */
  54. virtual void incCompleted(int add);
  55. /**
  56. Method
  57. @see
  58. @ret
  59. @param
  60. */
  61. virtual void setCompleted(int pos);
  62. /**
  63. Method
  64. @see
  65. @ret
  66. @param
  67. */
  68. virtual void popCompleted();
  69. /**
  70. Method
  71. @see
  72. @ret
  73. @param
  74. */
  75. virtual void timerCallback(int id);
  76. /**
  77. Method
  78. @see
  79. @ret
  80. @param
  81. */
  82. virtual int onResize();
  83. virtual api_dependent *status_getDependencyPtr() { return this; }
  84. /**
  85. Method
  86. @see
  87. @ret
  88. @param
  89. */
  90. virtual void onSetStatusText(const wchar_t *text, int overlay);
  91. /**
  92. Method
  93. @see
  94. @ret
  95. @param
  96. */
  97. virtual void onAddAppCmds(AppCmds *commands);
  98. /**
  99. Method
  100. @see
  101. @ret
  102. @param
  103. */
  104. virtual void onRemoveAppCmds(AppCmds *commands);
  105. /**
  106. Method
  107. @see
  108. @ret
  109. @param
  110. */
  111. void fakeButtonPush(const wchar_t *name);
  112. protected:
  113. int fakeButtonPush(ButtBar *bb, const wchar_t *name);
  114. void setExclude(const wchar_t *val);
  115. void setIncludeOnly(const wchar_t *val);
  116. StringW exclude_list, include_only;
  117. protected:
  118. void regenerate();
  119. private:
  120. StringW contentgroupname;
  121. StringW status_text;
  122. int overtimer;
  123. // completeness
  124. int max;
  125. int completed;
  126. int progress_width;
  127. GuiObjectWnd bg;
  128. ButtBar *bbleft, *bbright;
  129. PtrList<AppCmds> appcmds;
  130. };
  131. #endif