1
0

metricscb.h 681 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef _METRICSCB_H
  2. #define _METRICSCB_H
  3. #include <bfc/dispatch.h>
  4. // metrics codes
  5. namespace Metric {
  6. enum {
  7. TEXTDELTA=10,
  8. };
  9. };
  10. class MetricsCallback : public Dispatchable {
  11. public:
  12. int setMetric(int metricid, int param1=0, int param2=0);
  13. // class Dispatchable codes
  14. enum {
  15. SETMETRIC=100,
  16. };
  17. };
  18. inline int MetricsCallback::setMetric(int metricid, int param1, int param2) {
  19. return _call(SETMETRIC, 0, metricid, param1, param2);
  20. }
  21. class MetricsCallbackI : public MetricsCallback {
  22. public:
  23. virtual int metricscb_setTextDelta(int delta) { return 0; }
  24. protected:
  25. int mcb_setMetric(int metricid, int param1, int param2);
  26. RECVS_DISPATCH;
  27. };
  28. #endif