/Frameworks/Debug/AppKit/rhino.platform/CPCheckBox.j

http://github.com/jfahrenkrug/MapKit-HelloWorld · Unknown · 37 lines · 36 code · 1 blank · 0 comment · 0 complexity · 3c4a705dc98790d417067807160f6ea2 MD5 · raw file

  1. i;10;CPButton.jc;1421;
  2. {var the_class = objj_allocateClassPair(CPButton, "CPCheckBox"),
  3. meta_class = the_class.isa;objj_registerClassPair(the_class);
  4. objj_addClassForBundle(the_class, objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
  5. class_addMethods(the_class, [new objj_method(sel_getUid("initWithFrame:"), function $CPCheckBox__initWithFrame_(self, _cmd, aFrame)
  6. { with(self)
  7. {
  8. self = objj_msgSendSuper({ receiver:self, super_class:objj_getClass("CPButton") }, "initWithFrame:", aFrame);
  9. if (self)
  10. {
  11. objj_msgSend(self, "setHighlightsBy:", CPContentsCellMask);
  12. objj_msgSend(self, "setShowsStateBy:", CPContentsCellMask);
  13. objj_msgSend(self, "setImagePosition:", CPImageLeft);
  14. objj_msgSend(self, "setAlignment:", CPLeftTextAlignment);
  15. objj_msgSend(self, "setBordered:", YES);
  16. }
  17. return self;
  18. }
  19. })]);
  20. class_addMethods(meta_class, [new objj_method(sel_getUid("checkBoxWithTitle:theme:"), function $CPCheckBox__checkBoxWithTitle_theme_(self, _cmd, aTitle, aTheme)
  21. { with(self)
  22. {
  23. return objj_msgSend(self, "buttonWithTitle:theme:", aTitle, aTheme);
  24. }
  25. }), new objj_method(sel_getUid("checkBoxWithTitle:"), function $CPCheckBox__checkBoxWithTitle_(self, _cmd, aTitle)
  26. { with(self)
  27. {
  28. return objj_msgSend(self, "buttonWithTitle:", aTitle);
  29. }
  30. }), new objj_method(sel_getUid("themeClass"), function $CPCheckBox__themeClass(self, _cmd)
  31. { with(self)
  32. {
  33. return "check-box";
  34. }
  35. })]);
  36. }