2013-03-15 13:11:33 +00:00
|
|
|
@interface CocoaTextEdit : NSScrollView <NSTextViewDelegate> {
|
|
|
|
@public
|
2013-05-02 11:25:45 +00:00
|
|
|
phoenix::TextEdit* textEdit;
|
|
|
|
NSTextView* content;
|
2013-03-15 13:11:33 +00:00
|
|
|
}
|
2013-03-21 12:59:01 +00:00
|
|
|
-(id) initWith:(phoenix::TextEdit&)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
|
|
|
|
|
|
|
|
namespace phoenix {
|
|
|
|
|
|
|
|
struct pTextEdit : public pWidget {
|
2013-05-02 11:25:45 +00:00
|
|
|
TextEdit& textEdit;
|
|
|
|
CocoaTextEdit* cocoaTextEdit = nullptr;
|
2013-03-15 13:11:33 +00:00
|
|
|
|
|
|
|
void setCursorPosition(unsigned position);
|
|
|
|
void setEditable(bool editable);
|
2013-07-29 09:42:45 +00:00
|
|
|
void setFont(string font);
|
|
|
|
void setText(string text);
|
2013-03-15 13:11:33 +00:00
|
|
|
void setWordWrap(bool wordWrap);
|
|
|
|
string text();
|
|
|
|
|
2013-05-02 11:25:45 +00:00
|
|
|
pTextEdit(TextEdit& textEdit) : pWidget(textEdit), textEdit(textEdit) {}
|
2013-03-15 13:11:33 +00:00
|
|
|
void constructor();
|
|
|
|
void destructor();
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|