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 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;
|
2019-07-07 09:44:09 +00:00
|
|
|
auto setTextCursor(TextCursor textCursor) -> void;
|
2015-12-30 06:41:46 +00:00
|
|
|
auto setWordWrap(bool wordWrap) -> void;
|
|
|
|
auto text() const -> string;
|
2019-07-07 09:44:09 +00:00
|
|
|
auto textCursor() const -> TextCursor;
|
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
|