button.hpp 587 B

1234567891011121314151617181920212223242526272829
  1. #if defined(Hiro_Button)
  2. @interface CocoaButton : NSButton {
  3. @public
  4. hiro::mButton* button;
  5. }
  6. -(id) initWith:(hiro::mButton&)button;
  7. -(IBAction) activate:(id)sender;
  8. @end
  9. namespace hiro {
  10. struct pButton : pWidget {
  11. Declare(Button, Widget)
  12. auto minimumSize() const -> Size override;
  13. auto setBordered(bool bordered) -> void;
  14. auto setGeometry(Geometry geometry) -> void override;
  15. auto setIcon(const image& icon) -> void;
  16. auto setOrientation(Orientation orientation) -> void;
  17. auto setText(const string& text) -> void;
  18. CocoaButton* cocoaButton = nullptr;
  19. };
  20. }
  21. #endif