1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/osx/core/private.h
3 // Purpose: Private declarations: as this header is only included by
4 // wxWidgets itself, it may contain identifiers which don't start
6 // Author: Stefan Csomor
10 // Copyright: (c) Stefan Csomor
11 // Licence: wxWindows licence
12 /////////////////////////////////////////////////////////////////////////////
14 #ifndef _WX_PRIVATE_CORE_H_
15 #define _WX_PRIVATE_CORE_H_
19 #include <CoreFoundation/CoreFoundation.h>
21 #include "wx/osx/core/cfstring.h"
22 #include "wx/osx/core/cfdataref.h"
24 // Define helper macros allowing to insert small snippets of code to be
25 // compiled for high enough OS X version only: this shouldn't be abused for
26 // anything big but it's handy for e.g. specifying OS X 10.6-only protocols in
27 // the Objective C classes declarations when they're not supported under the
29 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
30 #define wxOSX_10_6_AND_LATER(x) x
32 #define wxOSX_10_6_AND_LATER(x)
35 // common defs for clang analyzer support
37 #ifndef __has_feature // Optional.
38 #define __has_feature(x) 0 // Compatibility with non-clang compilers.
41 #ifndef NS_RETURNS_RETAINED
42 #if __has_feature(attribute_ns_returns_retained)
43 #define NS_RETURNS_RETAINED __attribute__((ns_returns_retained))
45 #define NS_RETURNS_RETAINED
49 #ifndef CF_RETURNS_RETAINED
50 #if __has_feature(attribute_cf_returns_retained)
51 #define CF_RETURNS_RETAINED __attribute__((cf_returns_retained))
53 #define CF_RETURNS_RETAINED
58 #if ( !wxUSE_GUI && !wxOSX_USE_IPHONE ) || wxOSX_USE_COCOA_OR_CARBON
60 // Carbon functions are currently still used in wxOSX/Cocoa too (including
61 // wxBase part of it).
62 #include <Carbon/Carbon.h>
64 WXDLLIMPEXP_BASE
long UMAGetSystemVersion() ;
66 void WXDLLIMPEXP_CORE
wxMacStringToPascal( const wxString
&from
, unsigned char * to
);
67 wxString WXDLLIMPEXP_CORE
wxMacMakeStringFromPascal( const unsigned char * from
);
69 WXDLLIMPEXP_BASE wxString
wxMacFSRefToPath( const FSRef
*fsRef
, CFStringRef additionalPathComponent
= NULL
);
70 WXDLLIMPEXP_BASE OSStatus
wxMacPathToFSRef( const wxString
&path
, FSRef
*fsRef
);
71 WXDLLIMPEXP_BASE wxString
wxMacHFSUniStrToString( ConstHFSUniStr255Param uniname
);
73 // keycode utils from app.cpp
75 WXDLLIMPEXP_BASE CGKeyCode
wxCharCodeWXToOSX(wxKeyCode code
);
76 WXDLLIMPEXP_BASE
long wxMacTranslateKey(unsigned char key
, unsigned char code
);
83 #include <CoreGraphics/CoreGraphics.h>
85 #include <ApplicationServices/ApplicationServices.h>
88 #include "wx/bitmap.h"
89 #include "wx/window.h"
91 class WXDLLIMPEXP_CORE wxMacCGContextStateSaver
93 wxDECLARE_NO_COPY_CLASS(wxMacCGContextStateSaver
);
96 wxMacCGContextStateSaver( CGContextRef cg
)
99 CGContextSaveGState( cg
);
101 ~wxMacCGContextStateSaver()
103 CGContextRestoreGState( m_cg
);
109 class WXDLLIMPEXP_CORE wxDeferredObjectDeleter
: public wxObject
112 wxDeferredObjectDeleter( wxObject
* obj
) : m_obj(obj
)
115 virtual ~wxDeferredObjectDeleter()
125 WXDLLIMPEXP_CORE CGImageRef
wxMacCreateCGImageFromBitmap( const wxBitmap
& bitmap
);
127 WXDLLIMPEXP_CORE CGDataProviderRef
wxMacCGDataProviderCreateWithCFData( CFDataRef data
);
128 WXDLLIMPEXP_CORE CGDataConsumerRef
wxMacCGDataConsumerCreateWithCFData( CFMutableDataRef data
);
129 WXDLLIMPEXP_CORE CGDataProviderRef
wxMacCGDataProviderCreateWithMemoryBuffer( const wxMemoryBuffer
& buf
);
131 CGColorSpaceRef WXDLLIMPEXP_CORE
wxMacGetGenericRGBColorSpace(void);
135 extern wxWindow
* g_MacLastWindow
;
136 class wxNonOwnedWindow
;
138 // temporary typedef so that no additional casts are necessary within carbon code at the moment
147 WXDLLIMPEXP_CORE wxWindowMac
* wxFindWindowFromWXWidget(WXWidget inControl
);
150 typedef wxMacControl wxWidgetImplType
;
152 typedef wxWidgetImpl wxWidgetImplType
;
156 class wxMenuItemImpl
: public wxObject
159 wxMenuItemImpl( wxMenuItem
* peer
) : m_peer(peer
)
163 virtual ~wxMenuItemImpl() ;
164 virtual void SetBitmap( const wxBitmap
& bitmap
) = 0;
165 virtual void Enable( bool enable
) = 0;
166 virtual void Check( bool check
) = 0;
167 virtual void SetLabel( const wxString
& text
, wxAcceleratorEntry
*entry
) = 0;
168 virtual void Hide( bool hide
= true ) = 0;
170 virtual void * GetHMenuItem() = 0;
172 wxMenuItem
* GetWXPeer() { return m_peer
; }
174 static wxMenuItemImpl
* Create( wxMenuItem
* peer
, wxMenu
*pParentMenu
,
176 const wxString
& text
,
177 wxAcceleratorEntry
*entry
,
178 const wxString
& strHelp
,
182 // handle OS specific menu items if they weren't handled during normal processing
183 virtual bool DoDefault() { return false; }
187 DECLARE_ABSTRACT_CLASS(wxMenuItemImpl
)
190 class wxMenuImpl
: public wxObject
193 wxMenuImpl( wxMenu
* peer
) : m_peer(peer
)
197 virtual ~wxMenuImpl() ;
198 virtual void InsertOrAppend(wxMenuItem
*pItem
, size_t pos
) = 0;
199 virtual void Remove( wxMenuItem
*pItem
) = 0;
201 virtual void MakeRoot() = 0;
203 virtual void SetTitle( const wxString
& text
) = 0;
205 virtual WXHMENU
GetHMenu() = 0;
207 wxMenu
* GetWXPeer() { return m_peer
; }
209 virtual void PopUp( wxWindow
*win
, int x
, int y
) = 0;
211 static wxMenuImpl
* Create( wxMenu
* peer
, const wxString
& title
);
212 static wxMenuImpl
* CreateRootMenu( wxMenu
* peer
);
216 DECLARE_ABSTRACT_CLASS(wxMenuItemImpl
)
221 class WXDLLIMPEXP_CORE wxWidgetImpl
: public wxObject
224 wxWidgetImpl( wxWindowMac
* peer
, bool isRootControl
= false, bool isUserPane
= false );
226 virtual ~wxWidgetImpl();
230 bool IsRootControl() const { return m_isRootControl
; }
232 bool IsUserPane() const { return m_isUserPane
; }
234 wxWindowMac
* GetWXPeer() const { return m_wxPeer
; }
236 bool IsOk() const { return GetWXWidget() != NULL
; }
238 // not only the control itself, but also all its parents must be visible
239 // in order for this function to return true
240 virtual bool IsVisible() const = 0;
241 // set the visibility of this widget (maybe latent)
242 virtual void SetVisibility( bool visible
) = 0;
244 virtual bool ShowWithEffect(bool WXUNUSED(show
),
245 wxShowEffect
WXUNUSED(effect
),
246 unsigned WXUNUSED(timeout
))
251 virtual void Raise() = 0;
253 virtual void Lower() = 0;
255 virtual void ScrollRect( const wxRect
*rect
, int dx
, int dy
) = 0;
257 virtual WXWidget
GetWXWidget() const = 0;
259 virtual void SetBackgroundColour( const wxColour
& col
) = 0;
260 virtual bool SetBackgroundStyle(wxBackgroundStyle style
) = 0;
262 // all coordinates in native parent widget relative coordinates
263 virtual void GetContentArea( int &left
, int &top
, int &width
, int &height
) const = 0;
264 virtual void Move(int x
, int y
, int width
, int height
) = 0;
265 virtual void GetPosition( int &x
, int &y
) const = 0;
266 virtual void GetSize( int &width
, int &height
) const = 0;
267 virtual void SetControlSize( wxWindowVariant variant
) = 0;
268 virtual float GetContentScaleFactor() const
273 // the native coordinates may have an 'aura' for shadows etc, if this is the case the layout
274 // inset indicates on which insets the real control is drawn
275 virtual void GetLayoutInset(int &left
, int &top
, int &right
, int &bottom
) const
277 left
= top
= right
= bottom
= 0;
280 // native view coordinates are topleft to bottom right (flipped regarding CoreGraphics origin)
281 virtual bool IsFlipped() const { return true; }
283 virtual void SetNeedsDisplay( const wxRect
* where
= NULL
) = 0;
284 virtual bool GetNeedsDisplay() const = 0;
286 virtual bool NeedsFocusRect() const;
287 virtual void SetNeedsFocusRect( bool needs
);
289 virtual bool NeedsFrame() const;
290 virtual void SetNeedsFrame( bool needs
);
292 virtual bool CanFocus() const = 0;
293 // return true if successful
294 virtual bool SetFocus() = 0;
295 virtual bool HasFocus() const = 0;
297 virtual void RemoveFromParent() = 0;
298 virtual void Embed( wxWidgetImpl
*parent
) = 0;
300 virtual void SetDefaultButton( bool isDefault
) = 0;
301 virtual void PerformClick() = 0;
302 virtual void SetLabel( const wxString
& title
, wxFontEncoding encoding
) = 0;
303 #if wxUSE_MARKUP && wxOSX_USE_COCOA
304 virtual void SetLabelMarkup( const wxString
& WXUNUSED(markup
) ) { }
307 virtual void SetCursor( const wxCursor
& cursor
) = 0;
308 virtual void CaptureMouse() = 0;
309 virtual void ReleaseMouse() = 0;
311 virtual wxInt32
GetValue() const = 0;
312 virtual void SetValue( wxInt32 v
) = 0;
313 virtual wxBitmap
GetBitmap() const = 0;
314 virtual void SetBitmap( const wxBitmap
& bitmap
) = 0;
315 virtual void SetBitmapPosition( wxDirection dir
) = 0;
316 virtual void SetupTabs( const wxNotebook
¬ebook
) =0;
317 virtual void GetBestRect( wxRect
*r
) const = 0;
318 virtual bool IsEnabled() const = 0;
319 virtual void Enable( bool enable
) = 0;
320 virtual void SetMinimum( wxInt32 v
) = 0;
321 virtual void SetMaximum( wxInt32 v
) = 0;
322 virtual wxInt32
GetMinimum() const = 0;
323 virtual wxInt32
GetMaximum() const = 0;
324 virtual void PulseGauge() = 0;
325 virtual void SetScrollThumb( wxInt32 value
, wxInt32 thumbSize
) = 0;
327 virtual void SetFont( const wxFont
& font
, const wxColour
& foreground
, long windowStyle
, bool ignoreBlack
= true ) = 0;
329 virtual void SetToolTip(wxToolTip
* WXUNUSED(tooltip
)) { }
331 // is the clicked event sent AFTER the state already changed, so no additional
332 // state changing logic is required from the outside
333 virtual bool ButtonClickDidStateChange() = 0;
335 virtual void InstallEventHandler( WXWidget control
= NULL
) = 0;
337 // Mechanism used to keep track of whether a change should send an event
338 // Do SendEvents(false) when starting actions that would trigger programmatic events
339 // and SendEvents(true) at the end of the block.
340 virtual void SendEvents(bool shouldSendEvents
) { m_shouldSendEvents
= shouldSendEvents
; }
341 virtual bool ShouldSendEvents() { return m_shouldSendEvents
; }
343 // static methods for associating native controls and their implementations
346 FindFromWXWidget(WXWidget control
);
348 static void RemoveAssociations( wxWidgetImpl
* impl
);
350 static void Associate( WXWidget control
, wxWidgetImpl
*impl
);
352 static WXWidget
FindFocus();
354 // static creation methods, must be implemented by all toolkits
356 static wxWidgetImplType
* CreateUserPane( wxWindowMac
* wxpeer
,
363 static wxWidgetImplType
* CreateContentView( wxNonOwnedWindow
* now
) ;
365 static wxWidgetImplType
* CreateButton( wxWindowMac
* wxpeer
,
368 const wxString
& label
,
374 static wxWidgetImplType
* CreateDisclosureTriangle( wxWindowMac
* wxpeer
,
377 const wxString
& label
,
383 static wxWidgetImplType
* CreateStaticLine( wxWindowMac
* wxpeer
,
391 static wxWidgetImplType
* CreateGroupBox( wxWindowMac
* wxpeer
,
394 const wxString
& label
,
400 static wxWidgetImplType
* CreateStaticText( wxWindowMac
* wxpeer
,
403 const wxString
& label
,
409 static wxWidgetImplType
* CreateTextControl( wxTextCtrl
* wxpeer
,
412 const wxString
& content
,
418 static wxWidgetImplType
* CreateSearchControl( wxSearchCtrl
* wxpeer
,
421 const wxString
& content
,
427 static wxWidgetImplType
* CreateCheckBox( wxWindowMac
* wxpeer
,
430 const wxString
& label
,
436 static wxWidgetImplType
* CreateRadioButton( wxWindowMac
* wxpeer
,
439 const wxString
& label
,
445 static wxWidgetImplType
* CreateToggleButton( wxWindowMac
* wxpeer
,
448 const wxString
& label
,
454 static wxWidgetImplType
* CreateBitmapToggleButton( wxWindowMac
* wxpeer
,
457 const wxBitmap
& bitmap
,
463 static wxWidgetImplType
* CreateBitmapButton( wxWindowMac
* wxpeer
,
466 const wxBitmap
& bitmap
,
472 static wxWidgetImplType
* CreateTabView( wxWindowMac
* wxpeer
,
480 static wxWidgetImplType
* CreateGauge( wxWindowMac
* wxpeer
,
491 static wxWidgetImplType
* CreateSlider( wxWindowMac
* wxpeer
,
502 static wxWidgetImplType
* CreateSpinButton( wxWindowMac
* wxpeer
,
513 static wxWidgetImplType
* CreateScrollBar( wxWindowMac
* wxpeer
,
521 static wxWidgetImplType
* CreateChoice( wxWindowMac
* wxpeer
,
530 static wxWidgetImplType
* CreateListBox( wxWindowMac
* wxpeer
,
539 static wxWidgetImplType
* CreateComboBox( wxComboBox
* wxpeer
,
549 // converts from Toplevel-Content relative to local
550 static void Convert( wxPoint
*pt
, wxWidgetImpl
*from
, wxWidgetImpl
*to
);
552 bool m_isRootControl
;
554 wxWindowMac
* m_wxPeer
;
555 bool m_needsFocusRect
;
557 bool m_shouldSendEvents
;
559 DECLARE_ABSTRACT_CLASS(wxWidgetImpl
)
563 // the interface to be implemented eg by a listbox
566 class WXDLLIMPEXP_CORE wxListWidgetColumn
569 virtual ~wxListWidgetColumn() {}
572 class WXDLLIMPEXP_CORE wxListWidgetCellValue
575 wxListWidgetCellValue() {}
576 virtual ~wxListWidgetCellValue() {}
578 virtual void Set( CFStringRef value
) = 0;
579 virtual void Set( const wxString
& value
) = 0;
580 virtual void Set( int value
) = 0;
581 virtual void Check( bool check
);
583 virtual bool IsChecked() const;
584 virtual int GetIntValue() const = 0;
585 virtual wxString
GetStringValue() const = 0;
588 class WXDLLIMPEXP_CORE wxListWidgetImpl
591 wxListWidgetImpl() {}
592 virtual ~wxListWidgetImpl() { }
594 virtual wxListWidgetColumn
* InsertTextColumn( unsigned pos
, const wxString
& title
, bool editable
= false,
595 wxAlignment just
= wxALIGN_LEFT
, int defaultWidth
= -1) = 0 ;
596 virtual wxListWidgetColumn
* InsertCheckColumn( unsigned pos
, const wxString
& title
, bool editable
= false,
597 wxAlignment just
= wxALIGN_LEFT
, int defaultWidth
= -1) = 0 ;
601 // TODO will be replaced
602 virtual void ListDelete( unsigned int n
) = 0;
603 virtual void ListInsert( unsigned int n
) = 0;
604 virtual void ListClear() = 0;
608 virtual void ListDeselectAll() = 0;
609 virtual void ListSetSelection( unsigned int n
, bool select
, bool multi
) = 0;
610 virtual int ListGetSelection() const = 0;
611 virtual int ListGetSelections( wxArrayInt
& aSelections
) const = 0;
612 virtual bool ListIsSelected( unsigned int n
) const = 0;
616 virtual void ListScrollTo( unsigned int n
) = 0;
617 virtual void UpdateLine( unsigned int n
, wxListWidgetColumn
* col
= NULL
) = 0;
618 virtual void UpdateLineToEnd( unsigned int n
) = 0;
622 virtual unsigned int ListGetCount() const = 0;
624 virtual int DoListHitTest( const wxPoint
& inpoint
) const = 0;
628 // interface to be implemented by a textcontrol
631 class WXDLLIMPEXP_FWD_CORE wxTextAttr
;
632 class WXDLLIMPEXP_FWD_CORE wxTextEntry
;
634 // common interface for all implementations
635 class WXDLLIMPEXP_CORE wxTextWidgetImpl
639 // Any widgets implementing this interface must be associated with a
640 // wxTextEntry so instead of requiring the derived classes to implement
641 // another (pure) virtual function, just take the pointer to this entry in
642 // our ctor and implement GetTextEntry() ourselves.
643 wxTextWidgetImpl(wxTextEntry
*entry
) : m_entry(entry
) {}
645 virtual ~wxTextWidgetImpl() {}
647 wxTextEntry
*GetTextEntry() const { return m_entry
; }
649 virtual bool CanFocus() const { return true; }
651 virtual wxString
GetStringValue() const = 0 ;
652 virtual void SetStringValue( const wxString
&val
) = 0 ;
653 virtual void SetSelection( long from
, long to
) = 0 ;
654 virtual void GetSelection( long* from
, long* to
) const = 0 ;
655 virtual void WriteText( const wxString
& str
) = 0 ;
657 virtual bool CanClipMaxLength() const { return false; }
658 virtual void SetMaxLength(unsigned long WXUNUSED(len
)) {}
660 virtual bool GetStyle( long position
, wxTextAttr
& style
);
661 virtual void SetStyle( long start
, long end
, const wxTextAttr
& style
) ;
662 virtual void Copy() ;
664 virtual void Paste() ;
665 virtual bool CanPaste() const ;
666 virtual void SetEditable( bool editable
) ;
667 virtual long GetLastPosition() const ;
668 virtual void Replace( long from
, long to
, const wxString
&str
) ;
669 virtual void Remove( long from
, long to
) ;
672 virtual bool HasOwnContextMenu() const
675 virtual bool SetupCursor( const wxPoint
& WXUNUSED(pt
) )
678 virtual void Clear() ;
679 virtual bool CanUndo() const;
680 virtual void Undo() ;
681 virtual bool CanRedo() const;
682 virtual void Redo() ;
683 virtual int GetNumberOfLines() const ;
684 virtual long XYToPosition(long x
, long y
) const;
685 virtual bool PositionToXY(long pos
, long *x
, long *y
) const ;
686 virtual void ShowPosition(long WXUNUSED(pos
)) ;
687 virtual int GetLineLength(long lineNo
) const ;
688 virtual wxString
GetLineText(long lineNo
) const ;
689 virtual void CheckSpelling(bool WXUNUSED(check
)) { }
691 virtual wxSize
GetBestSize() const { return wxDefaultSize
; }
693 virtual bool SetHint(const wxString
& WXUNUSED(hint
)) { return false; }
695 wxTextEntry
* const m_entry
;
697 wxDECLARE_NO_COPY_CLASS(wxTextWidgetImpl
);
700 // common interface for all implementations
701 class WXDLLIMPEXP_CORE wxComboWidgetImpl
705 wxComboWidgetImpl() {}
707 virtual ~wxComboWidgetImpl() {}
709 virtual int GetSelectedItem() const { return -1; }
710 virtual void SetSelectedItem(int WXUNUSED(item
)) {}
712 virtual int GetNumberOfItems() const { return -1; }
714 virtual void InsertItem(int WXUNUSED(pos
), const wxString
& WXUNUSED(item
)) {}
716 virtual void RemoveItem(int WXUNUSED(pos
)) {}
718 virtual void Clear() {}
719 virtual void Popup() {}
720 virtual void Dismiss() {}
722 virtual wxString
GetStringAtIndex(int WXUNUSED(pos
)) const { return wxEmptyString
; }
724 virtual int FindString(const wxString
& WXUNUSED(text
)) const { return -1; }
728 // common interface for buttons
735 virtual ~wxButtonImpl(){}
737 virtual void SetPressedBitmap( const wxBitmap
& bitmap
) = 0;
741 // common interface for search controls
744 class wxSearchWidgetImpl
747 wxSearchWidgetImpl(){}
748 virtual ~wxSearchWidgetImpl(){}
750 // search field options
751 virtual void ShowSearchButton( bool show
) = 0;
752 virtual bool IsSearchButtonVisible() const = 0;
754 virtual void ShowCancelButton( bool show
) = 0;
755 virtual bool IsCancelButtonVisible() const = 0;
757 virtual void SetSearchMenu( wxMenu
* menu
) = 0;
759 virtual void SetDescriptiveText(const wxString
& text
) = 0;
763 // toplevel window implementation class
766 class wxNonOwnedWindowImpl
: public wxObject
769 wxNonOwnedWindowImpl( wxNonOwnedWindow
* nonownedwnd
) : m_wxPeer(nonownedwnd
)
772 wxNonOwnedWindowImpl()
775 virtual ~wxNonOwnedWindowImpl()
779 virtual void WillBeDestroyed()
783 virtual void Create( wxWindow
* parent
, const wxPoint
& pos
, const wxSize
& size
,
784 long style
, long extraStyle
, const wxString
& name
) = 0;
787 virtual WXWindow
GetWXWindow() const = 0;
797 virtual bool Show(bool WXUNUSED(show
))
802 virtual bool ShowWithEffect(bool show
, wxShowEffect
WXUNUSED(effect
), unsigned WXUNUSED(timeout
))
807 virtual void Update()
811 virtual bool SetTransparent(wxByte
WXUNUSED(alpha
))
816 virtual bool SetBackgroundColour(const wxColour
& WXUNUSED(col
) )
821 virtual void SetExtraStyle( long WXUNUSED(exStyle
) )
825 virtual void SetWindowStyleFlag( long WXUNUSED(style
) )
829 virtual bool SetBackgroundStyle(wxBackgroundStyle
WXUNUSED(style
))
834 virtual bool CanSetTransparent()
839 virtual void GetContentArea( int &left
, int &top
, int &width
, int &height
) const = 0;
840 virtual void MoveWindow(int x
, int y
, int width
, int height
) = 0;
841 virtual void GetPosition( int &x
, int &y
) const = 0;
842 virtual void GetSize( int &width
, int &height
) const = 0;
844 virtual bool SetShape(const wxRegion
& WXUNUSED(region
))
849 virtual void SetTitle( const wxString
& title
, wxFontEncoding encoding
) = 0;
851 virtual bool IsMaximized() const = 0;
853 virtual bool IsIconized() const= 0;
855 virtual void Iconize( bool iconize
)= 0;
857 virtual void Maximize(bool maximize
) = 0;
859 virtual bool IsFullScreen() const= 0;
861 virtual void ShowWithoutActivating() { Show(true); }
863 virtual bool ShowFullScreen(bool show
, long style
)= 0;
865 virtual void RequestUserAttention(int flags
) = 0;
867 virtual void ScreenToWindow( int *x
, int *y
) = 0;
869 virtual void WindowToScreen( int *x
, int *y
) = 0;
871 virtual bool IsActive() = 0;
873 wxNonOwnedWindow
* GetWXPeer() { return m_wxPeer
; }
875 static wxNonOwnedWindowImpl
*
876 FindFromWXWindow(WXWindow window
);
878 static void RemoveAssociations( wxNonOwnedWindowImpl
* impl
);
880 static void Associate( WXWindow window
, wxNonOwnedWindowImpl
*impl
);
882 // static creation methods, must be implemented by all toolkits
884 static wxNonOwnedWindowImpl
* CreateNonOwnedWindow( wxNonOwnedWindow
* wxpeer
, wxWindow
* parent
, WXWindow native
) ;
886 static wxNonOwnedWindowImpl
* CreateNonOwnedWindow( wxNonOwnedWindow
* wxpeer
, wxWindow
* parent
, const wxPoint
& pos
, const wxSize
& size
,
887 long style
, long extraStyle
, const wxString
& name
) ;
889 virtual void SetModified(bool WXUNUSED(modified
)) { }
890 virtual bool IsModified() const { return false; }
892 virtual void SetRepresentedFilename(const wxString
& WXUNUSED(filename
)) { }
895 virtual CGFloat
GetWindowLevel() const { return 0.0; }
897 virtual CGWindowLevel
GetWindowLevel() const { return kCGNormalWindowLevel
; }
899 virtual void RestoreWindowLevel() {}
901 wxNonOwnedWindow
* m_wxPeer
;
902 DECLARE_ABSTRACT_CLASS(wxNonOwnedWindowImpl
)
907 //---------------------------------------------------------------------------
908 // cocoa bridging utilities
909 //---------------------------------------------------------------------------
911 bool wxMacInitCocoa();
913 class WXDLLIMPEXP_CORE wxMacAutoreleasePool
916 wxMacAutoreleasePool();
917 ~wxMacAutoreleasePool();
924 void wxMacCocoaRelease( void* obj
);
925 void wxMacCocoaAutorelease( void* obj
);
926 void* wxMacCocoaRetain( void* obj
);
930 // _WX_PRIVATE_CORE_H_