| 1 |
#if defined(Hiro_TextEdit) |
| 2 |
|
| 3 |
@interface CocoaTextEdit : NSScrollView <NSTextViewDelegate> { |
| 4 |
@public |
| 5 |
hiro::mTextEdit* textEdit; |
| 6 |
NSTextView* content; |
| 7 |
} |
| 8 |
-(id) initWith:(hiro::mTextEdit&)textEdit; |
| 9 |
-(NSTextView*) content; |
| 10 |
-(void) configure; |
| 11 |
-(void) textDidChange:(NSNotification*)notification; |
| 12 |
@end |
| 13 |
|
| 14 |
namespace hiro { |
| 15 |
|
| 16 |
struct pTextEdit : pWidget { |
| 17 |
Declare(TextEdit, Widget) |
| 18 |
|
| 19 |
auto setBackgroundColor(Color color) -> void; |
| 20 |
auto setEditable(bool editable) -> void; |
| 21 |
auto setEnabled(bool enabled) -> void override; |
| 22 |
auto setFont(const Font& font) -> void override; |
| 23 |
auto setForegroundColor(Color color) -> void; |
| 24 |
auto setGeometry(Geometry geometry) -> void override; |
| 25 |
auto setText(const string& text) -> void; |
| 26 |
auto setTextCursor(TextCursor textCursor) -> void; |
| 27 |
auto setWordWrap(bool wordWrap) -> void; |
| 28 |
auto text() const -> string; |
| 29 |
auto textCursor() const -> TextCursor; |
| 30 |
|
| 31 |
CocoaTextEdit* cocoaTextEdit = nullptr; |
| 32 |
}; |
| 33 |
|
| 34 |
} |
| 35 |
|
| 36 |
#endif |