From 571b0b138bc5c910e4dbc5bca510b65859741e1b Mon Sep 17 00:00:00 2001 From: Ryan Norton Date: Fri, 22 Apr 2005 01:13:45 +0000 Subject: [PATCH 1/1] flag checkin' git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/cocoa/gauge.mm | 6 ++++++ src/cocoa/spinbutt.mm | 4 +++- src/cocoa/tooltip.mm | 4 ++++ src/cocoa/utilsexc.mm | 1 + 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/cocoa/gauge.mm b/src/cocoa/gauge.mm index 1769e1062f..3405ae7db5 100644 --- a/src/cocoa/gauge.mm +++ b/src/cocoa/gauge.mm @@ -34,6 +34,12 @@ bool wxGauge::Create(wxWindow *parent, wxWindowID winid, int range, const wxPoint& pos, const wxSize& size, long style, const wxValidator& validator, const wxString& name) { + //flag checking + wxASSERT_MSG( !(style & wxGA_HORIZONTAL), wxT("Horizontal gauge not supported on cocoa"));//* + wxASSERT_MSG( !(style & wxGA_SMOOTH), wxT("Smooth gauge not supported on cocoa")); + //* - GNUStep made isVertical and setVertical part of thier framework, but its specific to them + //the way they do it is just handle that flag in drawRect. + if(!CreateControl(parent,winid,pos,size,style,validator,name)) return false; SetNSView([[NSProgressIndicator alloc] initWithFrame: MakeDefaultNSRect(size)]); diff --git a/src/cocoa/spinbutt.mm b/src/cocoa/spinbutt.mm index 86c8b886af..a304c38be5 100644 --- a/src/cocoa/spinbutt.mm +++ b/src/cocoa/spinbutt.mm @@ -30,12 +30,14 @@ bool wxSpinButton::Create(wxWindow *parent, wxWindowID winid, const wxPoint& pos, const wxSize& size, long style, const wxString& name) { + //bad flag checking + wxASSERT_MSG( !(style & wxSP_HORIZONTAL), wxT("Horizontal wxSpinButton not supported in cocoa")); if(!CreateControl(parent,winid,pos,size,style,wxDefaultValidator,name)) return false; SetNSControl([[NSStepper alloc] initWithFrame: MakeDefaultNSRect(size)]); [m_cocoaNSView release]; - //flag handling (note wxSP_HORIZONTAL IS _NOT_ Supported in cocoa) + //flag handling [(NSStepper*)m_cocoaNSView setValueWraps:style & wxSP_WRAP]; //default == true, evidently //final setup diff --git a/src/cocoa/tooltip.mm b/src/cocoa/tooltip.mm index fcc9c6e0aa..a1eeed486a 100644 --- a/src/cocoa/tooltip.mm +++ b/src/cocoa/tooltip.mm @@ -29,6 +29,10 @@ #import +// +// Private object in AppKit - exists in 10.2 at least - +// most likely exists earlier too +// @interface NSToolTipManager : NSObject { /* diff --git a/src/cocoa/utilsexc.mm b/src/cocoa/utilsexc.mm index a6fa6e499a..13400d029a 100644 --- a/src/cocoa/utilsexc.mm +++ b/src/cocoa/utilsexc.mm @@ -15,6 +15,7 @@ #ifndef WX_PRECOMP #endif #include "wx/unix/execute.h" +#include "wx/utils.h" #if 0 -- 2.45.2