| 1 |
@interface CocoaWindow : NSWindow <NSWindowDelegate> { |
| 2 |
@public |
| 3 |
phoenix::Window* window; |
| 4 |
NSMenu* menuBar; |
| 5 |
NSMenu* rootMenu; |
| 6 |
NSTextField* statusBar; |
| 7 |
} |
| 8 |
-(id) initWith:(phoenix::Window&)window; |
| 9 |
-(BOOL) canBecomeKeyWindow; |
| 10 |
-(BOOL) canBecomeMainWindow; |
| 11 |
-(void) windowDidBecomeMain:(NSNotification*)notification; |
| 12 |
-(void) windowDidMove:(NSNotification*)notification; |
| 13 |
-(void) windowDidResize:(NSNotification*)notification; |
| 14 |
-(BOOL) windowShouldClose:(id)sender; |
| 15 |
-(NSDragOperation) draggingEntered:(id<NSDraggingInfo>)sender; |
| 16 |
-(BOOL) performDragOperation:(id<NSDraggingInfo>)sender; |
| 17 |
-(NSMenu*) menuBar; |
| 18 |
-(void) menuAbout; |
| 19 |
-(void) menuPreferences; |
| 20 |
-(void) menuQuit; |
| 21 |
-(NSTextField*) statusBar; |
| 22 |
@end |
| 23 |
|
| 24 |
namespace phoenix { |
| 25 |
|
| 26 |
struct pWindow : public pObject { |
| 27 |
Window& window; |
| 28 |
CocoaWindow* cocoaWindow = nullptr; |
| 29 |
|
| 30 |
static Window& none(); |
| 31 |
|
| 32 |
void append(Layout& layout); |
| 33 |
void append(Menu& menu); |
| 34 |
void append(Widget& widget); |
| 35 |
bool focused(); |
| 36 |
Geometry frameMargin(); |
| 37 |
Geometry geometry(); |
| 38 |
void remove(Layout& layout); |
| 39 |
void remove(Menu& menu); |
| 40 |
void remove(Widget& widget); |
| 41 |
void setBackgroundColor(Color color); |
| 42 |
void setDroppable(bool droppable); |
| 43 |
void setFocused(); |
| 44 |
void setFullScreen(bool fullScreen); |
| 45 |
void setGeometry(Geometry geometry); |
| 46 |
void setMenuFont(string font); |
| 47 |
void setMenuVisible(bool visible); |
| 48 |
void setModal(bool modal); |
| 49 |
void setResizable(bool resizable); |
| 50 |
void setStatusFont(string font); |
| 51 |
void setStatusText(string text); |
| 52 |
void setStatusVisible(bool visible); |
| 53 |
void setTitle(string text); |
| 54 |
void setVisible(bool visible); |
| 55 |
void setWidgetFont(string font); |
| 56 |
|
| 57 |
pWindow(Window& window) : pObject(window), window(window) {} |
| 58 |
void constructor(); |
| 59 |
void destructor(); |
| 60 |
void moveEvent(); |
| 61 |
void sizeEvent(); |
| 62 |
unsigned statusBarHeight(); |
| 63 |
void statusBarReposition(); |
| 64 |
}; |
| 65 |
|
| 66 |
} |