2015-12-30 06:41:46 +00:00
|
|
|
#if defined(Hiro_LineEdit)
|
|
|
|
|
2013-03-15 13:11:33 +00:00
|
|
|
@interface CocoaLineEdit : NSTextField <NSTextFieldDelegate> {
|
|
|
|
@public
|
2015-12-30 06:41:46 +00:00
|
|
|
hiro::mLineEdit* lineEdit;
|
2013-03-15 13:11:33 +00:00
|
|
|
}
|
2015-12-30 06:41:46 +00:00
|
|
|
-(id) initWith:(hiro::mLineEdit&)lineEdit;
|
2013-03-21 12:59:01 +00:00
|
|
|
-(void) textDidChange:(NSNotification*)n;
|
|
|
|
-(IBAction) activate:(id)sender;
|
2013-03-15 13:11:33 +00:00
|
|
|
@end
|
|
|
|
|
2015-12-30 06:41:46 +00:00
|
|
|
namespace hiro {
|
2013-03-15 13:11:33 +00:00
|
|
|
|
2015-12-30 06:41:46 +00:00
|
|
|
struct pLineEdit : pWidget {
|
|
|
|
Declare(LineEdit, Widget)
|
2013-03-15 13:11:33 +00:00
|
|
|
|
2015-12-30 06:41:46 +00:00
|
|
|
auto minimumSize() const -> Size override;
|
|
|
|
auto setBackgroundColor(Color color) -> void;
|
|
|
|
auto setEditable(bool editable) -> void;
|
|
|
|
auto setForegroundColor(Color color) -> void;
|
|
|
|
auto setText(const string& text) -> void;
|
2013-03-15 13:11:33 +00:00
|
|
|
|
2015-12-30 06:41:46 +00:00
|
|
|
CocoaLineEdit* cocoaLineEdit = nullptr;
|
2013-03-15 13:11:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
2015-12-30 06:41:46 +00:00
|
|
|
|
|
|
|
#endif
|