line-edit.hpp 615 B

1234567891011121314151617181920212223242526272829
  1. #if defined(Hiro_LineEdit)
  2. @interface CocoaLineEdit : NSTextField <NSTextFieldDelegate> {
  3. @public
  4. hiro::mLineEdit* lineEdit;
  5. }
  6. -(id) initWith:(hiro::mLineEdit&)lineEdit;
  7. -(void) textDidChange:(NSNotification*)n;
  8. -(IBAction) activate:(id)sender;
  9. @end
  10. namespace hiro {
  11. struct pLineEdit : pWidget {
  12. Declare(LineEdit, Widget)
  13. auto minimumSize() const -> Size override;
  14. auto setBackgroundColor(Color color) -> void;
  15. auto setEditable(bool editable) -> void;
  16. auto setForegroundColor(Color color) -> void;
  17. auto setText(const string& text) -> void;
  18. CocoaLineEdit* cocoaLineEdit = nullptr;
  19. };
  20. }
  21. #endif