2015-12-30 17:41:46 +11:00
|
|
|
#if defined(Hiro_TextEdit)
|
|
|
|
|
2013-03-16 00:11:33 +11:00
|
|
|
@interface CocoaTextEdit : NSScrollView <NSTextViewDelegate> {
|
|
|
|
@public
|
2015-12-30 17:41:46 +11:00
|
|
|
hiro::mTextEdit* textEdit;
|
2013-05-02 21:25:45 +10:00
|
|
|
NSTextView* content;
|
2013-03-16 00:11:33 +11:00
|
|
|
}
|
2015-12-30 17:41:46 +11:00
|
|
|
-(id) initWith:(hiro::mTextEdit&)textEdit;
|
2013-03-16 00:11:33 +11:00
|
|
|
-(NSTextView*) content;
|
|
|
|
-(void) configure;
|
2013-03-21 23:59:01 +11:00
|
|
|
-(void) textDidChange:(NSNotification*)notification;
|
2013-03-16 00:11:33 +11:00
|
|
|
@end
|
|
|
|
|
2015-12-30 17:41:46 +11:00
|
|
|
namespace hiro {
|
2013-03-16 00:11:33 +11:00
|
|
|
|
2015-12-30 17:41:46 +11:00
|
|
|
struct pTextEdit : pWidget {
|
|
|
|
Declare(TextEdit, Widget)
|
2013-03-16 00:11:33 +11:00
|
|
|
|
2015-12-30 17:41:46 +11:00
|
|
|
auto setBackgroundColor(Color color) -> void;
|
|
|
|
auto setCursor(Cursor cursor) -> void;
|
|
|
|
auto setEditable(bool editable) -> void;
|
2016-01-08 20:23:46 +11:00
|
|
|
auto setEnabled(bool enabled) -> void override;
|
2015-12-30 17:41:46 +11:00
|
|
|
auto setFont(const Font& font) -> void override;
|
|
|
|
auto setForegroundColor(Color color) -> void;
|
|
|
|
auto setText(const string& text) -> void;
|
|
|
|
auto setWordWrap(bool wordWrap) -> void;
|
|
|
|
auto text() const -> string;
|
2013-03-16 00:11:33 +11:00
|
|
|
|
2015-12-30 17:41:46 +11:00
|
|
|
CocoaTextEdit* cocoaTextEdit = nullptr;
|
2013-03-16 00:11:33 +11:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
2015-12-30 17:41:46 +11:00
|
|
|
|
|
|
|
#endif
|