X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0698ed3ca89d0e7d8bf01df1d7e7973798b89768..c6f41dc81e858f59f036978a3256c48bc24abdb6:/include/wx/osx/carbon/private.h diff --git a/include/wx/osx/carbon/private.h b/include/wx/osx/carbon/private.h index 7beee9fa2d..071ddbe384 100644 --- a/include/wx/osx/carbon/private.h +++ b/include/wx/osx/carbon/private.h @@ -14,10 +14,6 @@ #ifndef _WX_PRIVATE_H_ #define _WX_PRIVATE_H_ -#include "wx/osx/core/private.h" - -#include - #if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5 typedef UInt32 URefCon; typedef SInt32 SRefCon; @@ -38,8 +34,6 @@ typedef SInt32 SRefCon; bool wxMacConvertEventToRecord( EventRef event , EventRecord *rec); #endif -// TODO REMOVE WXDLLIMPEXP_CORE wxNonOwnedWindow* wxFindWindowFromWXWindow( WXWindow inWindow ); - #endif // wxUSE_GUI // filefn.h @@ -285,7 +279,7 @@ enum { class WXDLLIMPEXP_CORE wxMacControl : public wxWidgetImpl { public : - wxMacControl( wxWindowMac* peer , bool isRootControl = false ); + wxMacControl( wxWindowMac* peer , bool isRootControl = false, bool isUserPane = false ); wxMacControl() ; virtual ~wxMacControl(); @@ -302,12 +296,12 @@ public : virtual bool IsVisible() const; virtual void Raise(); - + virtual void Lower(); virtual void ScrollRect( const wxRect *rect, int dx, int dy ); - virtual void GetContentArea( int &left , int &top , int &width , int &height ) const; + virtual void GetContentArea( int &left , int &top , int &width , int &height ) const; virtual void Move(int x, int y, int width, int height); virtual void GetPosition( int &x, int &y ) const; virtual void GetSize( int &width, int &height ) const; @@ -316,7 +310,7 @@ public : // where is in native window relative coordinates virtual void SetNeedsDisplay( const wxRect* where = NULL ); virtual bool GetNeedsDisplay() const; - + virtual bool CanFocus() const; // return true if successful virtual bool SetFocus(); @@ -324,7 +318,7 @@ public : void RemoveFromParent(); void Embed( wxWidgetImpl *parent ); - + void SetDefaultButton( bool isDefault ); void PerformClick(); void SetLabel( const wxString& title, wxFontEncoding encoding ); @@ -335,7 +329,9 @@ public : wxInt32 GetValue() const; void SetValue( wxInt32 v ); + wxBitmap GetBitmap() const; void SetBitmap( const wxBitmap& bitmap ); + void SetBitmapPosition( wxDirection dir ); void SetupTabs( const wxNotebook ¬ebook ); void GetBestRect( wxRect *r ) const; @@ -367,7 +363,7 @@ public : virtual wxInt32 GetMaximum() const; virtual wxInt32 GetMinimum() const; - + virtual void SetValueAndRange( SInt32 value , SInt32 minimum , SInt32 maximum ); virtual void SetRange( SInt32 minimum , SInt32 maximum ); @@ -431,6 +427,7 @@ public : virtual void SetFont( const wxFont & font , const wxColour& foreground , long windowStyle, bool ignoreBlack = true ); virtual void SetBackgroundColour( const wxColour& col ); + virtual bool SetBackgroundStyle(wxBackgroundStyle style); virtual ControlPartCode HandleKey( SInt16 keyCode, SInt16 charCode, EventModifiers modifiers ); void SetActionProc( ControlActionUPP actionProc ); SInt32 GetViewSize() const; @@ -449,7 +446,7 @@ public : virtual void GetFeatures( UInt32 *features ); - + // to be moved into a tab control class virtual OSStatus SetTabEnabled( SInt16 tabNo , bool enable ); @@ -564,6 +561,8 @@ public : OSStatus SetHeaderDesc( DataBrowserPropertyID property, DataBrowserListViewHeaderDesc *desc ); OSStatus SetDisclosureColumn( DataBrowserPropertyID property , Boolean expandableRows ); + + OSStatus GetItemPartBounds( DataBrowserItemID item, DataBrowserPropertyID property, DataBrowserPropertyPart part, Rect * bounds ); protected : static pascal void DataBrowserItemNotificationProc( @@ -638,7 +637,7 @@ public : } ; */ -class WXDLLIMPEXP_CORE wxMacDataItem +class WXDLLIMPEXP_CORE wxMacDataItem { public : wxMacDataItem(); @@ -815,7 +814,7 @@ protected : class WXDLLIMPEXP_CORE wxMacDataBrowserColumn : public wxListWidgetColumn { public : - wxMacDataBrowserColumn( DataBrowserPropertyID propertyId, DataBrowserPropertyType colType, bool editable ) + wxMacDataBrowserColumn( DataBrowserPropertyID propertyId, DataBrowserPropertyType colType, bool editable ) : m_property(propertyId), m_editable(editable), m_type( colType ) { } @@ -823,9 +822,9 @@ public : { } DataBrowserPropertyID GetProperty() const { return m_property ; } - + bool IsEditable() const { return m_editable; } - + DataBrowserPropertyType GetType() const { return m_type; } protected : @@ -842,11 +841,12 @@ class WXDLLIMPEXP_CORE wxMacDataBrowserCellValue : public wxListWidgetCellValue public : wxMacDataBrowserCellValue(DataBrowserItemDataRef data) : m_data(data) {} virtual ~wxMacDataBrowserCellValue() {} - - virtual void Set( CFStringRef value ); + + virtual void Set( CFStringRef value ); virtual void Set( const wxString& value ); virtual void Set( int value ) ; - + virtual void Check( bool check ); + virtual int GetIntValue() const ; virtual wxString GetStringValue() const ; protected : @@ -865,10 +865,10 @@ public: wxListWidgetColumn* InsertTextColumn( unsigned int pos, const wxString& title, bool editable = false, wxAlignment just = wxALIGN_LEFT , int defaultWidth = -1) ; - wxListWidgetColumn* InsertCheckColumn( unsigned int pos , const wxString& title, bool editable = false, + wxListWidgetColumn* InsertCheckColumn( unsigned int pos , const wxString& title, bool editable = false, wxAlignment just = wxALIGN_LEFT , int defaultWidth = -1) ; - wxMacDataBrowserColumn* DoInsertColumn( unsigned int pos, DataBrowserPropertyID property, + wxMacDataBrowserColumn* DoInsertColumn( unsigned int pos, DataBrowserPropertyID property, const wxString& title, bool editable, DataBrowserPropertyType colType, SInt16 just, int width ); // add and remove @@ -892,18 +892,21 @@ public: // accessing content virtual unsigned int ListGetCount() const; + virtual int DoListHitTest( const wxPoint& inpoint ) const; virtual void UpdateLine( unsigned int n, wxListWidgetColumn* col = NULL ); virtual void UpdateLineToEnd( unsigned int n) ; + // pointing back + + wxMacDataBrowserColumn* GetColumnFromProperty( DataBrowserPropertyID ); + +protected: virtual void ItemNotification( DataBrowserItemID itemID, DataBrowserItemNotification message, DataBrowserItemDataRef itemData); - // pointing back - - wxMacDataBrowserColumn* GetColumnFromProperty( DataBrowserPropertyID ); private: wxArrayMacDataBrowserColumns m_columns; int m_nextColumnId ; @@ -935,21 +938,6 @@ UPP Get##x() \ return sHandler; \ } -//--------------------------------------------------------------------------- -// wxMac string conversions -//--------------------------------------------------------------------------- - -void wxMacSetupConverters(); -void wxMacCleanupConverters(); - -// utils.cpp - -// filefn.cpp - -WXDLLIMPEXP_BASE wxString wxMacFSRefToPath( const FSRef *fsRef , CFStringRef additionalPathComponent = NULL ); -WXDLLIMPEXP_BASE OSStatus wxMacPathToFSRef( const wxString&path , FSRef *fsRef ); -WXDLLIMPEXP_BASE wxString wxMacHFSUniStrToString( ConstHFSUniStr255Param uniname ); - //--------------------------------------------------------------------------- // cocoa bridging utilities //--------------------------------------------------------------------------- @@ -979,7 +967,8 @@ const short kwxCursorSize = 11; const short kwxCursorSizeNESW = 12; const short kwxCursorSizeNWSE = 13; const short kwxCursorRoller = 14; -const short kwxCursorLast = kwxCursorRoller; +const short kwxCursorWatch = 15; +const short kwxCursorLast = kwxCursorWatch; // exposing our fallback cursor map @@ -995,53 +984,58 @@ class wxNonOwnedWindowCarbonImpl : public wxNonOwnedWindowImpl { public : wxNonOwnedWindowCarbonImpl( wxNonOwnedWindow* nonownedwnd) ; + wxNonOwnedWindowCarbonImpl(); virtual ~wxNonOwnedWindowCarbonImpl(); - - virtual void Destroy() ; + + virtual void WillBeDestroyed() ; void Create( wxWindow* parent, const wxPoint& pos, const wxSize& size, long style, long extraStyle, const wxString& name ) ; - + void Create( wxWindow* parent, WXWindow nativeWindow ); + WXWindow GetWXWindow() const; - void Raise(); + void Raise(); void Lower(); - bool Show(bool show); + bool Show(bool show); bool ShowWithEffect(bool show, wxShowEffect effect, unsigned timeout); - + void Update(); bool SetTransparent(wxByte alpha); bool SetBackgroundColour(const wxColour& col ); - void SetExtraStyle( long exStyle ); - bool SetBackgroundStyle(wxBackgroundStyle style); + void SetExtraStyle( long exStyle ); + bool SetBackgroundStyle(wxBackgroundStyle style); bool CanSetTransparent(); void MoveWindow(int x, int y, int width, int height); void GetPosition( int &x, int &y ) const; void GetSize( int &width, int &height ) const; - void GetContentArea( int &left , int &top , int &width , int &height ) const; + void GetContentArea( int &left , int &top , int &width , int &height ) const; bool SetShape(const wxRegion& region); virtual void SetTitle( const wxString& title, wxFontEncoding encoding ) ; - + virtual bool IsMaximized() const; - + virtual bool IsIconized() const; - + virtual void Iconize( bool iconize ); - + virtual void Maximize(bool maximize); - + virtual bool IsFullScreen() const; - + virtual bool ShowFullScreen(bool show, long style); + virtual void ShowWithoutActivating(); + virtual void RequestUserAttention(int flags); - + virtual void ScreenToWindow( int *x, int *y ); - + virtual void WindowToScreen( int *x, int *y ); - + virtual bool IsActive(); + bool MacGetUnifiedAppearance() const ; void MacChangeWindowAttributes( wxUint32 attributesToSet , wxUint32 attributesToClear ) ; @@ -1049,18 +1043,18 @@ public : void MacSetMetalAppearance( bool set ) ; bool MacGetMetalAppearance() const ; void MacSetUnifiedAppearance( bool set ); - + WXEVENTHANDLERREF MacGetEventHandler() { return m_macEventHandler ; } wxNonOwnedWindow* GetWXPeer() { return m_wxPeer; } protected : void MacInstallTopLevelWindowEventHandler(); - + WXEVENTHANDLERREF m_macEventHandler ; WindowRef m_macWindow; void * m_macFullScreenData ; - DECLARE_DYNAMIC_CLASS_NO_COPY(wxNonOwnedWindowCarbonImpl) -}; + DECLARE_DYNAMIC_CLASS_NO_COPY(wxNonOwnedWindowCarbonImpl) +}; #endif // wxUSE_GUI