]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/cocoa/window.h
added wxRectFromRECT()
[wxWidgets.git] / include / wx / cocoa / window.h
index 0a072ea49a039e27c215c08ce2972c155aaf3048..d9d55e3218f95c04f8a37c021e8406eeba7c27a9 100644 (file)
@@ -65,11 +65,23 @@ public:
     WX_NSView GetNSViewForSuperview() const;
     // Returns the NSView that may be hidden/is being hidden
     WX_NSView GetNSViewForHiding() const;
+    // Returns the NSView for non-client drawing
+    virtual WX_NSView GetNonClientNSView() { return GetNSViewForSuperview(); }
+    // Add/remove children
     void CocoaAddChild(wxWindowCocoa *child);
     void CocoaRemoveFromParent(void);
 protected:
+    // enable==false: disables the control
+    // enable==true: enables the control IF it should be enabled
+    bool EnableSelfAndChildren(bool enable);
+    // actually enable/disable the cocoa control, overridden by subclasses
+    virtual void CocoaSetEnabled(bool enable) { }
+    // Reflects the state for THIS window (ignoring disables by parents)
+    bool m_shouldBeEnabled;
+
     void CocoaCreateNSScrollView();
     void InitMouseEvent(wxMouseEvent &event, WX_NSEvent cocoaEvent);
+    virtual wxWindow* GetWxWindow() const;
     virtual void Cocoa_FrameChanged(void);
     virtual bool Cocoa_drawRect(const NSRect &rect);
     virtual bool Cocoa_mouseDown(WX_NSEvent theEvent);
@@ -84,6 +96,7 @@ protected:
     virtual bool Cocoa_otherMouseDown(WX_NSEvent theEvent);
     virtual bool Cocoa_otherMouseDragged(WX_NSEvent theEvent);
     virtual bool Cocoa_otherMouseUp(WX_NSEvent theEvent);
+    virtual bool Cocoa_resetCursorRects();
     void SetNSView(WX_NSView cocoaNSView);
     WX_NSView m_cocoaNSView;
     wxWindowCocoaHider *m_cocoaHider;
@@ -149,6 +162,8 @@ public:
     // Get/set client (application-useable) size
     virtual void DoGetClientSize(int *width, int *height) const;
     virtual void DoSetClientSize(int width, int size);
+    // Set this window's tooltip
+    virtual void DoSetToolTip( wxToolTip *tip );
     // Set the size of the wxWindow (the contentView of an NSWindow)
     // wxTopLevelWindow will override this and set the NSWindow size
     // such that the contentView will be this size
@@ -164,6 +179,7 @@ public:
     // NOTE: typically Close() is not virtual, but we want this for Cocoa
     virtual bool Close( bool force = false );
     virtual bool Show( bool show = true );
+    virtual bool Enable( bool enable = true );
 };
 
 #endif // __WX_COCOA_WINDOW_H__