make IsEnabled() return false even if the window parent, and not the window itself, is disabled and added IsThisEnabled() implementing the old IsEnabled() behaviour; also significantly simplify the window state management code in all ports by factoring out the common parts in wxWindowBase

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-03-23 14:01:53 +00:00
parent 68a9527d51
commit 47a8a4d5cc
24 changed files with 189 additions and 330 deletions

View File

@@ -81,13 +81,8 @@ public:
WX_NSAffineTransform CocoaGetWxToBoundsTransform();
#endif //def __OBJC__
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);
@@ -198,7 +193,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 );
virtual void DoEnable( bool enable );
virtual bool IsDoubleBuffered() const { return true; }
};