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 // platform specific Clang analyzer support
36 #ifndef NS_RETURNS_RETAINED
37 # if WX_HAS_CLANG_FEATURE(attribute_ns_returns_retained)
38 # define NS_RETURNS_RETAINED __attribute__((ns_returns_retained))
40 # define NS_RETURNS_RETAINED
44 #ifndef CF_RETURNS_RETAINED
45 # if WX_HAS_CLANG_FEATURE(attribute_cf_returns_retained)
46 # define CF_RETURNS_RETAINED __attribute__((cf_returns_retained))
48 # define CF_RETURNS_RETAINED
52 #if ( !wxUSE_GUI && !wxOSX_USE_IPHONE ) || wxOSX_USE_COCOA_OR_CARBON
54 // Carbon functions are currently still used in wxOSX/Cocoa too (including
55 // wxBase part of it).
56 #include <Carbon/Carbon.h>
58 WXDLLIMPEXP_BASE
long UMAGetSystemVersion() ;
60 void WXDLLIMPEXP_CORE
wxMacStringToPascal( const wxString
&from
, unsigned char * to
);
61 wxString WXDLLIMPEXP_CORE
wxMacMakeStringFromPascal( const unsigned char * from
);
63 WXDLLIMPEXP_BASE wxString
wxMacFSRefToPath( const FSRef
*fsRef
, CFStringRef additionalPathComponent
= NULL
);
64 WXDLLIMPEXP_BASE OSStatus
wxMacPathToFSRef( const wxString
&path
, FSRef
*fsRef
);
65 WXDLLIMPEXP_BASE wxString
wxMacHFSUniStrToString( ConstHFSUniStr255Param uniname
);
67 // keycode utils from app.cpp
69 WXDLLIMPEXP_BASE CGKeyCode
wxCharCodeWXToOSX(wxKeyCode code
);
70 WXDLLIMPEXP_BASE
long wxMacTranslateKey(unsigned char key
, unsigned char code
);
77 #include <CoreGraphics/CoreGraphics.h>
79 #include <ApplicationServices/ApplicationServices.h>
82 #include "wx/bitmap.h"
83 #include "wx/window.h"
85 class WXDLLIMPEXP_CORE wxMacCGContextStateSaver
87 wxDECLARE_NO_COPY_CLASS(wxMacCGContextStateSaver
);
90 wxMacCGContextStateSaver( CGContextRef cg
)
93 CGContextSaveGState( cg
);
95 ~wxMacCGContextStateSaver()
97 CGContextRestoreGState( m_cg
);
103 class WXDLLIMPEXP_CORE wxDeferredObjectDeleter
: public wxObject
106 wxDeferredObjectDeleter( wxObject
* obj
) : m_obj(obj
)
109 virtual ~wxDeferredObjectDeleter()
119 WXDLLIMPEXP_CORE CGImageRef
wxMacCreateCGImageFromBitmap( const wxBitmap
& bitmap
);
121 WXDLLIMPEXP_CORE CGDataProviderRef
wxMacCGDataProviderCreateWithCFData( CFDataRef data
);
122 WXDLLIMPEXP_CORE CGDataConsumerRef
wxMacCGDataConsumerCreateWithCFData( CFMutableDataRef data
);
123 WXDLLIMPEXP_CORE CGDataProviderRef
wxMacCGDataProviderCreateWithMemoryBuffer( const wxMemoryBuffer
& buf
);
125 CGColorSpaceRef WXDLLIMPEXP_CORE
wxMacGetGenericRGBColorSpace(void);
129 extern wxWindow
* g_MacLastWindow
;
130 class wxNonOwnedWindow
;
132 // temporary typedef so that no additional casts are necessary within carbon code at the moment
141 WXDLLIMPEXP_CORE wxWindowMac
* wxFindWindowFromWXWidget(WXWidget inControl
);
144 typedef wxMacControl wxWidgetImplType
;
146 typedef wxWidgetImpl wxWidgetImplType
;
150 class wxMenuItemImpl
: public wxObject
153 wxMenuItemImpl( wxMenuItem
* peer
) : m_peer(peer
)
157 virtual ~wxMenuItemImpl() ;
158 virtual void SetBitmap( const wxBitmap
& bitmap
) = 0;
159 virtual void Enable( bool enable
) = 0;
160 virtual void Check( bool check
) = 0;
161 virtual void SetLabel( const wxString
& text
, wxAcceleratorEntry
*entry
) = 0;
162 virtual void Hide( bool hide
= true ) = 0;
164 virtual void * GetHMenuItem() = 0;
166 wxMenuItem
* GetWXPeer() { return m_peer
; }
168 static wxMenuItemImpl
* Create( wxMenuItem
* peer
, wxMenu
*pParentMenu
,
170 const wxString
& text
,
171 wxAcceleratorEntry
*entry
,
172 const wxString
& strHelp
,
176 // handle OS specific menu items if they weren't handled during normal processing
177 virtual bool DoDefault() { return false; }
181 DECLARE_ABSTRACT_CLASS(wxMenuItemImpl
)
184 class wxMenuImpl
: public wxObject
187 wxMenuImpl( wxMenu
* peer
) : m_peer(peer
)
191 virtual ~wxMenuImpl() ;
192 virtual void InsertOrAppend(wxMenuItem
*pItem
, size_t pos
) = 0;
193 virtual void Remove( wxMenuItem
*pItem
) = 0;
195 virtual void MakeRoot() = 0;
197 virtual void SetTitle( const wxString
& text
) = 0;
199 virtual WXHMENU
GetHMenu() = 0;
201 wxMenu
* GetWXPeer() { return m_peer
; }
203 virtual void PopUp( wxWindow
*win
, int x
, int y
) = 0;
205 static wxMenuImpl
* Create( wxMenu
* peer
, const wxString
& title
);
206 static wxMenuImpl
* CreateRootMenu( wxMenu
* peer
);
210 DECLARE_ABSTRACT_CLASS(wxMenuItemImpl
)
215 class WXDLLIMPEXP_CORE wxWidgetImpl
: public wxObject
218 wxWidgetImpl( wxWindowMac
* peer
, bool isRootControl
= false, bool isUserPane
= false );
220 virtual ~wxWidgetImpl();
224 bool IsRootControl() const { return m_isRootControl
; }
226 bool IsUserPane() const { return m_isUserPane
; }
228 wxWindowMac
* GetWXPeer() const { return m_wxPeer
; }
230 bool IsOk() const { return GetWXWidget() != NULL
; }
232 // not only the control itself, but also all its parents must be visible
233 // in order for this function to return true
234 virtual bool IsVisible() const = 0;
235 // set the visibility of this widget (maybe latent)
236 virtual void SetVisibility( bool visible
) = 0;
238 virtual bool ShowWithEffect(bool WXUNUSED(show
),
239 wxShowEffect
WXUNUSED(effect
),
240 unsigned WXUNUSED(timeout
))
245 virtual void Raise() = 0;
247 virtual void Lower() = 0;
249 virtual void ScrollRect( const wxRect
*rect
, int dx
, int dy
) = 0;
251 virtual WXWidget
GetWXWidget() const = 0;
253 virtual void SetBackgroundColour( const wxColour
& col
) = 0;
254 virtual bool SetBackgroundStyle(wxBackgroundStyle style
) = 0;
256 // all coordinates in native parent widget relative coordinates
257 virtual void GetContentArea( int &left
, int &top
, int &width
, int &height
) const = 0;
258 virtual void Move(int x
, int y
, int width
, int height
) = 0;
259 virtual void GetPosition( int &x
, int &y
) const = 0;
260 virtual void GetSize( int &width
, int &height
) const = 0;
261 virtual void SetControlSize( wxWindowVariant variant
) = 0;
262 virtual float GetContentScaleFactor() const
267 // the native coordinates may have an 'aura' for shadows etc, if this is the case the layout
268 // inset indicates on which insets the real control is drawn
269 virtual void GetLayoutInset(int &left
, int &top
, int &right
, int &bottom
) const
271 left
= top
= right
= bottom
= 0;
274 // native view coordinates are topleft to bottom right (flipped regarding CoreGraphics origin)
275 virtual bool IsFlipped() const { return true; }
277 virtual void SetNeedsDisplay( const wxRect
* where
= NULL
) = 0;
278 virtual bool GetNeedsDisplay() const = 0;
280 virtual bool NeedsFocusRect() const;
281 virtual void SetNeedsFocusRect( bool needs
);
283 virtual bool NeedsFrame() const;
284 virtual void SetNeedsFrame( bool needs
);
286 virtual void SetDrawingEnabled(bool enabled
);
288 virtual bool CanFocus() const = 0;
289 // return true if successful
290 virtual bool SetFocus() = 0;
291 virtual bool HasFocus() const = 0;
293 virtual void RemoveFromParent() = 0;
294 virtual void Embed( wxWidgetImpl
*parent
) = 0;
296 virtual void SetDefaultButton( bool isDefault
) = 0;
297 virtual void PerformClick() = 0;
298 virtual void SetLabel( const wxString
& title
, wxFontEncoding encoding
) = 0;
299 #if wxUSE_MARKUP && wxOSX_USE_COCOA
300 virtual void SetLabelMarkup( const wxString
& WXUNUSED(markup
) ) { }
303 virtual void SetCursor( const wxCursor
& cursor
) = 0;
304 virtual void CaptureMouse() = 0;
305 virtual void ReleaseMouse() = 0;
307 virtual void SetDropTarget( wxDropTarget
* WXUNUSED(dropTarget
) ) {}
309 virtual wxInt32
GetValue() const = 0;
310 virtual void SetValue( wxInt32 v
) = 0;
311 virtual wxBitmap
GetBitmap() const = 0;
312 virtual void SetBitmap( const wxBitmap
& bitmap
) = 0;
313 virtual void SetBitmapPosition( wxDirection dir
) = 0;
314 virtual void SetupTabs( const wxNotebook
¬ebook
) =0;
315 virtual void GetBestRect( wxRect
*r
) const = 0;
316 virtual bool IsEnabled() const = 0;
317 virtual void Enable( bool enable
) = 0;
318 virtual void SetMinimum( wxInt32 v
) = 0;
319 virtual void SetMaximum( wxInt32 v
) = 0;
320 virtual wxInt32
GetMinimum() const = 0;
321 virtual wxInt32
GetMaximum() const = 0;
322 virtual void PulseGauge() = 0;
323 virtual void SetScrollThumb( wxInt32 value
, wxInt32 thumbSize
) = 0;
325 virtual void SetFont( const wxFont
& font
, const wxColour
& foreground
, long windowStyle
, bool ignoreBlack
= true ) = 0;
327 virtual void SetToolTip(wxToolTip
* WXUNUSED(tooltip
)) { }
329 // is the clicked event sent AFTER the state already changed, so no additional
330 // state changing logic is required from the outside
331 virtual bool ButtonClickDidStateChange() = 0;
333 virtual void InstallEventHandler( WXWidget control
= NULL
) = 0;
335 // Mechanism used to keep track of whether a change should send an event
336 // Do SendEvents(false) when starting actions that would trigger programmatic events
337 // and SendEvents(true) at the end of the block.
338 virtual void SendEvents(bool shouldSendEvents
) { m_shouldSendEvents
= shouldSendEvents
; }
339 virtual bool ShouldSendEvents() { return m_shouldSendEvents
; }
341 // static methods for associating native controls and their implementations
344 FindFromWXWidget(WXWidget control
);
346 static void RemoveAssociations( wxWidgetImpl
* impl
);
348 static void Associate( WXWidget control
, wxWidgetImpl
*impl
);
350 static WXWidget
FindFocus();
352 // static creation methods, must be implemented by all toolkits
354 static wxWidgetImplType
* CreateUserPane( wxWindowMac
* wxpeer
,
361 static wxWidgetImplType
* CreateContentView( wxNonOwnedWindow
* now
) ;
363 static wxWidgetImplType
* CreateButton( wxWindowMac
* wxpeer
,
366 const wxString
& label
,
372 static wxWidgetImplType
* CreateDisclosureTriangle( wxWindowMac
* wxpeer
,
375 const wxString
& label
,
381 static wxWidgetImplType
* CreateStaticLine( wxWindowMac
* wxpeer
,
389 static wxWidgetImplType
* CreateGroupBox( wxWindowMac
* wxpeer
,
392 const wxString
& label
,
398 static wxWidgetImplType
* CreateStaticText( wxWindowMac
* wxpeer
,
401 const wxString
& label
,
407 static wxWidgetImplType
* CreateTextControl( wxTextCtrl
* wxpeer
,
410 const wxString
& content
,
416 static wxWidgetImplType
* CreateSearchControl( wxSearchCtrl
* wxpeer
,
419 const wxString
& content
,
425 static wxWidgetImplType
* CreateCheckBox( wxWindowMac
* wxpeer
,
428 const wxString
& label
,
434 static wxWidgetImplType
* CreateRadioButton( wxWindowMac
* wxpeer
,
437 const wxString
& label
,
443 static wxWidgetImplType
* CreateToggleButton( wxWindowMac
* wxpeer
,
446 const wxString
& label
,
452 static wxWidgetImplType
* CreateBitmapToggleButton( wxWindowMac
* wxpeer
,
455 const wxBitmap
& bitmap
,
461 static wxWidgetImplType
* CreateBitmapButton( wxWindowMac
* wxpeer
,
464 const wxBitmap
& bitmap
,
470 static wxWidgetImplType
* CreateTabView( wxWindowMac
* wxpeer
,
478 static wxWidgetImplType
* CreateGauge( wxWindowMac
* wxpeer
,
489 static wxWidgetImplType
* CreateSlider( wxWindowMac
* wxpeer
,
500 static wxWidgetImplType
* CreateSpinButton( wxWindowMac
* wxpeer
,
511 static wxWidgetImplType
* CreateScrollBar( wxWindowMac
* wxpeer
,
519 static wxWidgetImplType
* CreateChoice( wxWindowMac
* wxpeer
,
528 static wxWidgetImplType
* CreateListBox( wxWindowMac
* wxpeer
,
537 static wxWidgetImplType
* CreateComboBox( wxComboBox
* wxpeer
,
547 // converts from Toplevel-Content relative to local
548 static void Convert( wxPoint
*pt
, wxWidgetImpl
*from
, wxWidgetImpl
*to
);
550 bool m_isRootControl
;
552 wxWindowMac
* m_wxPeer
;
553 bool m_needsFocusRect
;
555 bool m_shouldSendEvents
;
557 DECLARE_ABSTRACT_CLASS(wxWidgetImpl
)
561 // the interface to be implemented eg by a listbox
564 class WXDLLIMPEXP_CORE wxListWidgetColumn
567 virtual ~wxListWidgetColumn() {}
570 class WXDLLIMPEXP_CORE wxListWidgetCellValue
573 wxListWidgetCellValue() {}
574 virtual ~wxListWidgetCellValue() {}
576 virtual void Set( CFStringRef value
) = 0;
577 virtual void Set( const wxString
& value
) = 0;
578 virtual void Set( int value
) = 0;
579 virtual void Check( bool check
);
581 virtual bool IsChecked() const;
582 virtual int GetIntValue() const = 0;
583 virtual wxString
GetStringValue() const = 0;
586 class WXDLLIMPEXP_CORE wxListWidgetImpl
589 wxListWidgetImpl() {}
590 virtual ~wxListWidgetImpl() { }
592 virtual wxListWidgetColumn
* InsertTextColumn( unsigned pos
, const wxString
& title
, bool editable
= false,
593 wxAlignment just
= wxALIGN_LEFT
, int defaultWidth
= -1) = 0 ;
594 virtual wxListWidgetColumn
* InsertCheckColumn( unsigned pos
, const wxString
& title
, bool editable
= false,
595 wxAlignment just
= wxALIGN_LEFT
, int defaultWidth
= -1) = 0 ;
599 // TODO will be replaced
600 virtual void ListDelete( unsigned int n
) = 0;
601 virtual void ListInsert( unsigned int n
) = 0;
602 virtual void ListClear() = 0;
606 virtual void ListDeselectAll() = 0;
607 virtual void ListSetSelection( unsigned int n
, bool select
, bool multi
) = 0;
608 virtual int ListGetSelection() const = 0;
609 virtual int ListGetSelections( wxArrayInt
& aSelections
) const = 0;
610 virtual bool ListIsSelected( unsigned int n
) const = 0;
614 virtual void ListScrollTo( unsigned int n
) = 0;
615 virtual void UpdateLine( unsigned int n
, wxListWidgetColumn
* col
= NULL
) = 0;
616 virtual void UpdateLineToEnd( unsigned int n
) = 0;
620 virtual unsigned int ListGetCount() const = 0;
622 virtual int DoListHitTest( const wxPoint
& inpoint
) const = 0;
626 // interface to be implemented by a textcontrol
629 class WXDLLIMPEXP_FWD_CORE wxTextAttr
;
630 class WXDLLIMPEXP_FWD_CORE wxTextEntry
;
632 // common interface for all implementations
633 class WXDLLIMPEXP_CORE wxTextWidgetImpl
637 // Any widgets implementing this interface must be associated with a
638 // wxTextEntry so instead of requiring the derived classes to implement
639 // another (pure) virtual function, just take the pointer to this entry in
640 // our ctor and implement GetTextEntry() ourselves.
641 wxTextWidgetImpl(wxTextEntry
*entry
) : m_entry(entry
) {}
643 virtual ~wxTextWidgetImpl() {}
645 wxTextEntry
*GetTextEntry() const { return m_entry
; }
647 virtual bool CanFocus() const { return true; }
649 virtual wxString
GetStringValue() const = 0 ;
650 virtual void SetStringValue( const wxString
&val
) = 0 ;
651 virtual void SetSelection( long from
, long to
) = 0 ;
652 virtual void GetSelection( long* from
, long* to
) const = 0 ;
653 virtual void WriteText( const wxString
& str
) = 0 ;
655 virtual bool CanClipMaxLength() const { return false; }
656 virtual void SetMaxLength(unsigned long WXUNUSED(len
)) {}
658 virtual bool GetStyle( long position
, wxTextAttr
& style
);
659 virtual void SetStyle( long start
, long end
, const wxTextAttr
& style
) ;
660 virtual void Copy() ;
662 virtual void Paste() ;
663 virtual bool CanPaste() const ;
664 virtual void SetEditable( bool editable
) ;
665 virtual long GetLastPosition() const ;
666 virtual void Replace( long from
, long to
, const wxString
&str
) ;
667 virtual void Remove( long from
, long to
) ;
670 virtual bool HasOwnContextMenu() const
673 virtual bool SetupCursor( const wxPoint
& WXUNUSED(pt
) )
676 virtual void Clear() ;
677 virtual bool CanUndo() const;
678 virtual void Undo() ;
679 virtual bool CanRedo() const;
680 virtual void Redo() ;
681 virtual int GetNumberOfLines() const ;
682 virtual long XYToPosition(long x
, long y
) const;
683 virtual bool PositionToXY(long pos
, long *x
, long *y
) const ;
684 virtual void ShowPosition(long WXUNUSED(pos
)) ;
685 virtual int GetLineLength(long lineNo
) const ;
686 virtual wxString
GetLineText(long lineNo
) const ;
687 virtual void CheckSpelling(bool WXUNUSED(check
)) { }
689 virtual wxSize
GetBestSize() const { return wxDefaultSize
; }
691 virtual bool SetHint(const wxString
& WXUNUSED(hint
)) { return false; }
693 wxTextEntry
* const m_entry
;
695 wxDECLARE_NO_COPY_CLASS(wxTextWidgetImpl
);
698 // common interface for all implementations
699 class WXDLLIMPEXP_CORE wxComboWidgetImpl
703 wxComboWidgetImpl() {}
705 virtual ~wxComboWidgetImpl() {}
707 virtual int GetSelectedItem() const { return -1; }
708 virtual void SetSelectedItem(int WXUNUSED(item
)) {}
710 virtual int GetNumberOfItems() const { return -1; }
712 virtual void InsertItem(int WXUNUSED(pos
), const wxString
& WXUNUSED(item
)) {}
714 virtual void RemoveItem(int WXUNUSED(pos
)) {}
716 virtual void Clear() {}
717 virtual void Popup() {}
718 virtual void Dismiss() {}
720 virtual wxString
GetStringAtIndex(int WXUNUSED(pos
)) const { return wxEmptyString
; }
722 virtual int FindString(const wxString
& WXUNUSED(text
)) const { return -1; }
726 // common interface for buttons
733 virtual ~wxButtonImpl(){}
735 virtual void SetPressedBitmap( const wxBitmap
& bitmap
) = 0;
739 // common interface for search controls
742 class wxSearchWidgetImpl
745 wxSearchWidgetImpl(){}
746 virtual ~wxSearchWidgetImpl(){}
748 // search field options
749 virtual void ShowSearchButton( bool show
) = 0;
750 virtual bool IsSearchButtonVisible() const = 0;
752 virtual void ShowCancelButton( bool show
) = 0;
753 virtual bool IsCancelButtonVisible() const = 0;
755 virtual void SetSearchMenu( wxMenu
* menu
) = 0;
757 virtual void SetDescriptiveText(const wxString
& text
) = 0;
761 // toplevel window implementation class
764 class wxNonOwnedWindowImpl
: public wxObject
767 wxNonOwnedWindowImpl( wxNonOwnedWindow
* nonownedwnd
) : m_wxPeer(nonownedwnd
)
770 wxNonOwnedWindowImpl()
773 virtual ~wxNonOwnedWindowImpl()
777 virtual void WillBeDestroyed()
781 virtual void Create( wxWindow
* parent
, const wxPoint
& pos
, const wxSize
& size
,
782 long style
, long extraStyle
, const wxString
& name
) = 0;
785 virtual WXWindow
GetWXWindow() const = 0;
795 virtual bool Show(bool WXUNUSED(show
))
800 virtual bool ShowWithEffect(bool show
, wxShowEffect
WXUNUSED(effect
), unsigned WXUNUSED(timeout
))
805 virtual void Update()
809 virtual bool SetTransparent(wxByte
WXUNUSED(alpha
))
814 virtual bool SetBackgroundColour(const wxColour
& WXUNUSED(col
) )
819 virtual void SetExtraStyle( long WXUNUSED(exStyle
) )
823 virtual void SetWindowStyleFlag( long WXUNUSED(style
) )
827 virtual bool SetBackgroundStyle(wxBackgroundStyle
WXUNUSED(style
))
832 virtual bool CanSetTransparent()
837 virtual void GetContentArea( int &left
, int &top
, int &width
, int &height
) const = 0;
838 virtual void MoveWindow(int x
, int y
, int width
, int height
) = 0;
839 virtual void GetPosition( int &x
, int &y
) const = 0;
840 virtual void GetSize( int &width
, int &height
) const = 0;
842 virtual bool SetShape(const wxRegion
& WXUNUSED(region
))
847 virtual void SetTitle( const wxString
& title
, wxFontEncoding encoding
) = 0;
849 virtual bool IsMaximized() const = 0;
851 virtual bool IsIconized() const= 0;
853 virtual void Iconize( bool iconize
)= 0;
855 virtual void Maximize(bool maximize
) = 0;
857 virtual bool IsFullScreen() const= 0;
859 virtual void ShowWithoutActivating() { Show(true); }
861 virtual bool ShowFullScreen(bool show
, long style
)= 0;
863 virtual void RequestUserAttention(int flags
) = 0;
865 virtual void ScreenToWindow( int *x
, int *y
) = 0;
867 virtual void WindowToScreen( int *x
, int *y
) = 0;
869 virtual bool IsActive() = 0;
871 wxNonOwnedWindow
* GetWXPeer() { return m_wxPeer
; }
873 static wxNonOwnedWindowImpl
*
874 FindFromWXWindow(WXWindow window
);
876 static void RemoveAssociations( wxNonOwnedWindowImpl
* impl
);
878 static void Associate( WXWindow window
, wxNonOwnedWindowImpl
*impl
);
880 // static creation methods, must be implemented by all toolkits
882 static wxNonOwnedWindowImpl
* CreateNonOwnedWindow( wxNonOwnedWindow
* wxpeer
, wxWindow
* parent
, WXWindow native
) ;
884 static wxNonOwnedWindowImpl
* CreateNonOwnedWindow( wxNonOwnedWindow
* wxpeer
, wxWindow
* parent
, const wxPoint
& pos
, const wxSize
& size
,
885 long style
, long extraStyle
, const wxString
& name
) ;
887 virtual void SetModified(bool WXUNUSED(modified
)) { }
888 virtual bool IsModified() const { return false; }
890 virtual void SetRepresentedFilename(const wxString
& WXUNUSED(filename
)) { }
893 virtual CGFloat
GetWindowLevel() const { return 0.0; }
895 virtual CGWindowLevel
GetWindowLevel() const { return kCGNormalWindowLevel
; }
897 virtual void RestoreWindowLevel() {}
899 wxNonOwnedWindow
* m_wxPeer
;
900 DECLARE_ABSTRACT_CLASS(wxNonOwnedWindowImpl
)
905 //---------------------------------------------------------------------------
906 // cocoa bridging utilities
907 //---------------------------------------------------------------------------
909 bool wxMacInitCocoa();
911 class WXDLLIMPEXP_CORE wxMacAutoreleasePool
914 wxMacAutoreleasePool();
915 ~wxMacAutoreleasePool();
922 void wxMacCocoaRelease( void* obj
);
923 void wxMacCocoaAutorelease( void* obj
);
924 void* wxMacCocoaRetain( void* obj
);
928 // _WX_PRIVATE_CORE_H_