TastaturEreignis.cpp 1007 B

123456789101112131415161718192021222324252627282930
  1. #include "TastaturEreignis.h"
  2. using namespace Framework;
  3. bool Framework::_ret1TE(void* param, void* obj, TastaturEreignis te)
  4. {
  5. return 1;
  6. }
  7. bool Framework::_nurNummernTE(void* param, void* obj, TastaturEreignis te)
  8. {
  9. if (te.taste[0] >= '0' && te.taste[0] <= '9') return 1;
  10. if (te.virtualKey == T_Entf || te.virtualKey == T_BackSpace) return 1;
  11. if (te.virtualKey == T_Links || te.virtualKey == T_Rechts
  12. || te.virtualKey == T_Unten || te.virtualKey == T_Oben)
  13. return 1;
  14. return 0;
  15. }
  16. bool Framework::_nurHexTE(void* param, void* obj, TastaturEreignis te)
  17. {
  18. if (te.taste[0] >= '0' && te.taste[0] <= '9') return 1;
  19. if (te.taste[0] >= 'A' && te.taste[0] <= 'F') return 1;
  20. if (te.taste[0] >= 'a' && te.taste[0] <= 'f') return 1;
  21. if (te.virtualKey == T_Entf || te.virtualKey == T_BackSpace) return 1;
  22. if (te.virtualKey == T_Links || te.virtualKey == T_Rechts
  23. || te.virtualKey == T_Unten || te.virtualKey == T_Oben)
  24. return 1;
  25. return 0;
  26. }