2015-12-30 06:41:46 +00:00
|
|
|
#if defined(Hiro_Label)
|
|
|
|
|
2019-07-26 15:52:29 +00:00
|
|
|
@interface CocoaLabel : NSView {
|
2013-03-15 13:11:33 +00:00
|
|
|
@public
|
2015-12-30 06:41:46 +00:00
|
|
|
hiro::mLabel* label;
|
2013-03-15 13:11:33 +00:00
|
|
|
}
|
2015-12-30 06:41:46 +00:00
|
|
|
-(id) initWith:(hiro::mLabel&)label;
|
2019-07-26 15:52:29 +00:00
|
|
|
-(void) resetCursorRects;
|
|
|
|
-(void) drawRect:(NSRect)dirtyRect;
|
|
|
|
-(void) mouseButton:(NSEvent*)event down:(BOOL)isDown;
|
|
|
|
-(void) mouseEntered:(NSEvent*)event;
|
|
|
|
-(void) mouseExited:(NSEvent*)event;
|
|
|
|
-(void) mouseMove:(NSEvent*)event;
|
|
|
|
-(void) mouseDown:(NSEvent*)event;
|
|
|
|
-(void) mouseUp:(NSEvent*)event;
|
|
|
|
-(void) mouseDragged:(NSEvent*)event;
|
|
|
|
-(void) rightMouseDown:(NSEvent*)event;
|
|
|
|
-(void) rightMouseUp:(NSEvent*)event;
|
|
|
|
-(void) rightMouseDragged:(NSEvent*)event;
|
|
|
|
-(void) otherMouseDown:(NSEvent*)event;
|
|
|
|
-(void) otherMouseUp:(NSEvent*)event;
|
|
|
|
-(void) otherMouseDragged:(NSEvent*)event;
|
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 pLabel : pWidget {
|
|
|
|
Declare(Label, Widget)
|
2013-03-15 13:11:33 +00:00
|
|
|
|
2015-12-30 06:41:46 +00:00
|
|
|
auto minimumSize() const -> Size override;
|
|
|
|
auto setAlignment(Alignment alignment) -> void;
|
2018-06-24 04:53:44 +00:00
|
|
|
auto setBackgroundColor(Color color) -> void;
|
|
|
|
auto setForegroundColor(Color color) -> void;
|
2015-12-30 06:41:46 +00:00
|
|
|
auto setText(const string& text) -> void;
|
2013-03-15 13:11:33 +00:00
|
|
|
|
2015-12-30 06:41:46 +00:00
|
|
|
CocoaLabel* cocoaLabel = nullptr;
|
2013-03-15 13:11:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
2015-12-30 06:41:46 +00:00
|
|
|
|
|
|
|
#endif
|