2015-12-30 06:41:46 +00:00
|
|
|
#if defined(Hiro_TabFrame)
|
|
|
|
|
2013-11-28 10:29:01 +00:00
|
|
|
@interface CocoaTabFrame : NSTabView <NSTabViewDelegate> {
|
|
|
|
@public
|
2015-12-30 06:41:46 +00:00
|
|
|
hiro::mTabFrame* tabFrame;
|
2013-11-28 10:29:01 +00:00
|
|
|
}
|
2015-12-30 06:41:46 +00:00
|
|
|
-(id) initWith:(hiro::mTabFrame&)tabFrame;
|
2013-11-28 10:29:01 +00:00
|
|
|
-(void) tabView:(NSTabView*)tabView didSelectTabViewItem:(NSTabViewItem*)tabViewItem;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface CocoaTabFrameItem : NSTabViewItem {
|
|
|
|
@public
|
2015-12-30 06:41:46 +00:00
|
|
|
hiro::mTabFrame* tabFrame;
|
2013-11-28 10:29:01 +00:00
|
|
|
CocoaTabFrame* cocoaTabFrame;
|
|
|
|
}
|
2015-12-30 06:41:46 +00:00
|
|
|
-(id) initWith:(hiro::mTabFrame&)tabFrame;
|
2013-11-28 10:29:01 +00:00
|
|
|
-(NSSize) sizeOfLabel:(BOOL)shouldTruncateLabel;
|
|
|
|
-(void) drawLabel:(BOOL)shouldTruncateLabel inRect:(NSRect)tabRect;
|
|
|
|
@end
|
|
|
|
|
2015-12-30 06:41:46 +00:00
|
|
|
namespace hiro {
|
|
|
|
|
|
|
|
struct pTabFrame : pWidget {
|
|
|
|
Declare(TabFrame, Widget)
|
|
|
|
|
|
|
|
auto append(sTabFrameItem item) -> void;
|
|
|
|
auto remove(sTabFrameItem item) -> void;
|
|
|
|
auto setGeometry(Geometry geometry) -> void override;
|
|
|
|
auto setNavigation(Navigation navigation) -> void;
|
|
|
|
|
|
|
|
auto _synchronizeLayout() -> void;
|
|
|
|
auto _updateSelected(int selected) -> void;
|
2013-11-28 10:29:01 +00:00
|
|
|
|
|
|
|
CocoaTabFrame* cocoaTabFrame = nullptr;
|
|
|
|
vector<CocoaTabFrameItem*> tabs;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
2015-12-30 06:41:46 +00:00
|
|
|
|
|
|
|
#endif
|