You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

35 lines
793 B

  1. /*
  2. Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
  3. This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
  4. which should be included with this package. The terms are also available at
  5. http://www.gnu.org/licenses/gpl-3.0.html
  6. */
  7. #import "StatsLabel.h"
  8. #import "Utils.h"
  9. @implementation StatsLabel
  10. - (id)initWithPyRef:(PyObject *)aPyRef view:(NSTextField *)aLabelView
  11. {
  12. return [super initWithPyRef:aPyRef wrapperClass:[PyStatsLabel class]
  13. callbackClassName:@"StatsLabelView" view:aLabelView];
  14. }
  15. - (PyStatsLabel *)model
  16. {
  17. return (PyStatsLabel *)model;
  18. }
  19. - (NSTextField *)labelView
  20. {
  21. return (NSTextField *)view;
  22. }
  23. /* Python --> Cocoa */
  24. - (void)refresh
  25. {
  26. [[self labelView] setStringValue:[[self model] display]];
  27. }
  28. @end