2015-12-30 06:41:46 +00:00
|
|
|
#if defined(Hiro_TextEdit)
|
|
|
|
|
2013-03-15 13:11:33 +00:00
|
|
|
@interface CocoaTextEdit : NSScrollView <NSTextViewDelegate> {
|
|
|
|
@public
|
2015-12-30 06:41:46 +00:00
|
|
|
hiro::mTextEdit* textEdit;
|
2013-05-02 11:25:45 +00:00
|
|
|
NSTextView* content;
|
2013-03-15 13:11:33 +00:00
|
|
|
}
|
2015-12-30 06:41:46 +00:00
|
|
|
-(id) initWith:(hiro::mTextEdit&)textEdit;
|
2013-03-15 13:11:33 +00:00
|
|
|
-(NSTextView*) content;
|
|
|
|
-(void) configure;
|
2013-03-21 12:59:01 +00:00
|
|
|
-(void) textDidChange:(NSNotification*)notification;
|
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 pTextEdit : pWidget {
|
|
|
|
Declare(TextEdit, Widget)
|
2013-03-15 13:11:33 +00:00
|
|
|
|
2015-12-30 06:41:46 +00:00
|
|
|
auto setBackgroundColor(Color color) -> void;
|
|
|
|
auto setCursor(Cursor cursor) -> void;
|
|
|
|
auto setEditable(bool editable) -> void;
|
2016-01-08 09:23:46 +00:00
|
|
|
auto setEnabled(bool enabled) -> void override;
|
2015-12-30 06:41:46 +00: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-15 13:11:33 +00:00
|
|
|
|
2015-12-30 06:41:46 +00:00
|
|
|
CocoaTextEdit* cocoaTextEdit = nullptr;
|
2013-03-15 13:11:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
2015-12-30 06:41:46 +00:00
|
|
|
|
|
|
|
#endif
|