wxMac: wxUniversal integration steps
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10832 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -294,6 +294,28 @@ protected:
|
|||||||
#include "wx/qt/frame.h"
|
#include "wx/qt/frame.h"
|
||||||
#elif defined(__WXMAC__)
|
#elif defined(__WXMAC__)
|
||||||
#include "wx/mac/frame.h"
|
#include "wx/mac/frame.h"
|
||||||
|
#ifndef __WXUNIVERSAL__
|
||||||
|
|
||||||
|
class WXDLLEXPORT wxFrame : public wxFrameMac
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// construction
|
||||||
|
wxFrame() { Init(); }
|
||||||
|
wxFrame(wxWindow *parent,
|
||||||
|
wxWindowID id,
|
||||||
|
const wxString& title,
|
||||||
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
|
const wxSize& size = wxDefaultSize,
|
||||||
|
long style = wxDEFAULT_FRAME_STYLE,
|
||||||
|
const wxString& name = wxFrameNameStr)
|
||||||
|
{
|
||||||
|
Init();
|
||||||
|
Create(parent, id, title, pos, size, style, name);
|
||||||
|
}
|
||||||
|
DECLARE_DYNAMIC_CLASS(wxFrame)
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
#elif defined(__WXPM__)
|
#elif defined(__WXPM__)
|
||||||
#include "wx/os2/frame.h"
|
#include "wx/os2/frame.h"
|
||||||
#elif defined(__WXSTUBS__)
|
#elif defined(__WXSTUBS__)
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
#include "wx/event.h"
|
#include "wx/event.h"
|
||||||
|
|
||||||
class WXDLLEXPORT wxFrame;
|
class WXDLLEXPORT wxFrame;
|
||||||
class WXDLLEXPORT wxWindow;
|
class WXDLLEXPORT wxWindowMac;
|
||||||
class WXDLLEXPORT wxApp ;
|
class WXDLLEXPORT wxApp ;
|
||||||
class WXDLLEXPORT wxKeyEvent;
|
class WXDLLEXPORT wxKeyEvent;
|
||||||
class WXDLLEXPORT wxLog;
|
class WXDLLEXPORT wxLog;
|
||||||
@@ -67,7 +67,7 @@ class WXDLLEXPORT wxApp: public wxAppBase
|
|||||||
|
|
||||||
// Send idle event to window and all subwindows
|
// Send idle event to window and all subwindows
|
||||||
// Returns TRUE if more idle time is requested.
|
// Returns TRUE if more idle time is requested.
|
||||||
bool SendIdleEvents(wxWindow* win);
|
bool SendIdleEvents(wxWindowMac* win);
|
||||||
|
|
||||||
// Windows only, but for compatibility...
|
// Windows only, but for compatibility...
|
||||||
inline void SetAuto3D(bool flag) { m_auto3D = flag; }
|
inline void SetAuto3D(bool flag) { m_auto3D = flag; }
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: frame.h
|
// Name: frame.h
|
||||||
// Purpose: wxFrame class
|
// Purpose: wxFrameMac class
|
||||||
// Author: AUTHOR
|
// Author: AUTHOR
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: ??/??/98
|
// Created: ??/??/98
|
||||||
@@ -28,14 +28,14 @@ class WXDLLEXPORT wxMenuBar;
|
|||||||
class WXDLLEXPORT wxStatusBar;
|
class WXDLLEXPORT wxStatusBar;
|
||||||
class WXDLLEXPORT wxMacToolTip ;
|
class WXDLLEXPORT wxMacToolTip ;
|
||||||
|
|
||||||
class WXDLLEXPORT wxFrame: public wxFrameBase {
|
class WXDLLEXPORT wxFrameMac: public wxFrameBase {
|
||||||
|
|
||||||
DECLARE_DYNAMIC_CLASS(wxFrame)
|
DECLARE_DYNAMIC_CLASS(wxFrameMac)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// construction
|
// construction
|
||||||
wxFrame() { Init(); }
|
wxFrameMac() { Init(); }
|
||||||
wxFrame(wxWindow *parent,
|
wxFrameMac(wxWindow *parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxString& title,
|
const wxString& title,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
@@ -56,7 +56,7 @@ public:
|
|||||||
long style = wxDEFAULT_FRAME_STYLE,
|
long style = wxDEFAULT_FRAME_STYLE,
|
||||||
const wxString& name = wxFrameNameStr);
|
const wxString& name = wxFrameNameStr);
|
||||||
|
|
||||||
virtual ~wxFrame();
|
virtual ~wxFrameMac();
|
||||||
|
|
||||||
// implement base class pure virtuals
|
// implement base class pure virtuals
|
||||||
virtual void Maximize(bool maximize = TRUE);
|
virtual void Maximize(bool maximize = TRUE);
|
||||||
|
@@ -183,7 +183,7 @@
|
|||||||
|
|
||||||
// Recommended setting: 1 (always)
|
// Recommended setting: 1 (always)
|
||||||
#define wxUSE_LOGWINDOW 1
|
#define wxUSE_LOGWINDOW 1
|
||||||
|
#define wxUSE_LOG_DIALOG 0
|
||||||
// Recommended setting: 1 (always)
|
// Recommended setting: 1 (always)
|
||||||
#define wxUSE_LOGGUI 1
|
#define wxUSE_LOGGUI 1
|
||||||
|
|
||||||
@@ -701,7 +701,7 @@
|
|||||||
// 0 for no interprocess comms
|
// 0 for no interprocess comms
|
||||||
#define wxUSE_HELP 1
|
#define wxUSE_HELP 1
|
||||||
// 0 for no help facility
|
// 0 for no help facility
|
||||||
#define wxUSE_MS_HTML_HELP 0
|
#define wxUSE_WXHTML_HELP 1
|
||||||
// 0 for no MS HTML Help
|
// 0 for no MS HTML Help
|
||||||
#define wxUSE_RESOURCES 1
|
#define wxUSE_RESOURCES 1
|
||||||
// 0 for no wxGetResource/wxWriteResource
|
// 0 for no wxGetResource/wxWriteResource
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: window.h
|
// Name: window.h
|
||||||
// Purpose: wxWindow class
|
// Purpose: wxWindowMac class
|
||||||
// Author: AUTHOR
|
// Author: AUTHOR
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: ??/??/98
|
// Created: ??/??/98
|
||||||
@@ -34,9 +34,9 @@ enum
|
|||||||
wxKEY_CTRL = 2
|
wxKEY_CTRL = 2
|
||||||
};
|
};
|
||||||
|
|
||||||
class WXDLLEXPORT wxWindow: public wxWindowBase
|
class WXDLLEXPORT wxWindowMac: public wxWindowBase
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxWindow);
|
DECLARE_DYNAMIC_CLASS(wxWindowMac);
|
||||||
|
|
||||||
friend class wxDC;
|
friend class wxDC;
|
||||||
friend class wxPaintDC;
|
friend class wxPaintDC;
|
||||||
@@ -47,14 +47,14 @@ public:
|
|||||||
SInt16 m_macWindowBackgroundTheme ;
|
SInt16 m_macWindowBackgroundTheme ;
|
||||||
WindowRef m_macWindow ;
|
WindowRef m_macWindow ;
|
||||||
ControlHandle m_macRootControl ;
|
ControlHandle m_macRootControl ;
|
||||||
wxWindow* m_macFocus ;
|
wxWindowMac* m_macFocus ;
|
||||||
bool m_macHasReceivedFirstActivate ;
|
bool m_macHasReceivedFirstActivate ;
|
||||||
} MacWindowData ;
|
} MacWindowData ;
|
||||||
|
|
||||||
|
|
||||||
wxWindow() { Init(); }
|
wxWindowMac() { Init(); }
|
||||||
|
|
||||||
wxWindow(wxWindow *parent,
|
wxWindowMac(wxWindowMac *parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
@@ -65,9 +65,9 @@ public:
|
|||||||
Create(parent, id, pos, size, style, name);
|
Create(parent, id, pos, size, style, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~wxWindow();
|
virtual ~wxWindowMac();
|
||||||
|
|
||||||
bool Create(wxWindow *parent,
|
bool Create(wxWindowMac *parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
@@ -134,7 +134,7 @@ public:
|
|||||||
|
|
||||||
// event handlers
|
// event handlers
|
||||||
// Handle a control command
|
// Handle a control command
|
||||||
virtual void OnCommand(wxWindow& win, wxCommandEvent& event);
|
virtual void OnCommand(wxWindowMac& win, wxCommandEvent& event);
|
||||||
|
|
||||||
// Override to define new behaviour for default action (e.g. double
|
// Override to define new behaviour for default action (e.g. double
|
||||||
// clicking on a listbox)
|
// clicking on a listbox)
|
||||||
@@ -154,8 +154,8 @@ public:
|
|||||||
|
|
||||||
// Native resource loading (implemented in src/msw/nativdlg.cpp)
|
// Native resource loading (implemented in src/msw/nativdlg.cpp)
|
||||||
// FIXME: should they really be all virtual?
|
// FIXME: should they really be all virtual?
|
||||||
wxWindow* GetWindowChild1(wxWindowID id);
|
wxWindowMac* GetWindowChild1(wxWindowID id);
|
||||||
wxWindow* GetWindowChild(wxWindowID id);
|
wxWindowMac* GetWindowChild(wxWindowID id);
|
||||||
|
|
||||||
// implementation from now on
|
// implementation from now on
|
||||||
// --------------------------
|
// --------------------------
|
||||||
@@ -194,8 +194,8 @@ public:
|
|||||||
// a toolbar that it manages itself).
|
// a toolbar that it manages itself).
|
||||||
virtual void AdjustForParentClientOrigin(int& x, int& y, int sizeFlags);
|
virtual void AdjustForParentClientOrigin(int& x, int& y, int sizeFlags);
|
||||||
|
|
||||||
wxWindow *FindItem(long id) const;
|
wxWindowMac *FindItem(long id) const;
|
||||||
wxWindow *FindItemByHWND(WXHWND hWnd, bool controlOnly = FALSE) const;
|
wxWindowMac *FindItemByHWND(WXHWND hWnd, bool controlOnly = FALSE) const;
|
||||||
|
|
||||||
// Make a Windows extended style from the given wxWindows window style
|
// Make a Windows extended style from the given wxWindows window style
|
||||||
static WXDWORD MakeExtendedStyle(long style,
|
static WXDWORD MakeExtendedStyle(long style,
|
||||||
@@ -228,7 +228,7 @@ public :
|
|||||||
const wxSize& size,
|
const wxSize& size,
|
||||||
long style,
|
long style,
|
||||||
const wxString& name ) ;
|
const wxString& name ) ;
|
||||||
static bool MacGetWindowFromPoint( const wxPoint &point , wxWindow** outWin ) ;
|
static bool MacGetWindowFromPoint( const wxPoint &point , wxWindowMac** outWin ) ;
|
||||||
virtual void MacActivate( EventRecord *ev , bool inIsActivating ) ;
|
virtual void MacActivate( EventRecord *ev , bool inIsActivating ) ;
|
||||||
virtual void MacUpdate( EventRecord *ev ) ;
|
virtual void MacUpdate( EventRecord *ev ) ;
|
||||||
virtual void MacUpdateImmediately() ;
|
virtual void MacUpdateImmediately() ;
|
||||||
@@ -264,18 +264,18 @@ public :
|
|||||||
bool MacSetupFocusClientPort() ;
|
bool MacSetupFocusClientPort() ;
|
||||||
bool MacSetupDrawingClientPort() ;
|
bool MacSetupDrawingClientPort() ;
|
||||||
*/
|
*/
|
||||||
virtual bool MacSetPortFocusParams( const Point & localOrigin, const Rect & clipRect, WindowRef window , wxWindow* rootwin ) ;
|
virtual bool MacSetPortFocusParams( const Point & localOrigin, const Rect & clipRect, WindowRef window , wxWindowMac* rootwin ) ;
|
||||||
virtual bool MacSetPortDrawingParams( const Point & localOrigin, const Rect & clipRect, WindowRef window , wxWindow* rootwin ) ;
|
virtual bool MacSetPortDrawingParams( const Point & localOrigin, const Rect & clipRect, WindowRef window , wxWindowMac* rootwin ) ;
|
||||||
|
|
||||||
virtual void MacGetPortParams(Point* localOrigin, Rect* clipRect, WindowRef *window , wxWindow** rootwin ) ;
|
virtual void MacGetPortParams(Point* localOrigin, Rect* clipRect, WindowRef *window , wxWindowMac** rootwin ) ;
|
||||||
virtual void MacGetPortClientParams(Point* localOrigin, Rect* clipRect, WindowRef *window , wxWindow** rootwin) ;
|
virtual void MacGetPortClientParams(Point* localOrigin, Rect* clipRect, WindowRef *window , wxWindowMac** rootwin) ;
|
||||||
virtual void MacDoGetPortClientParams(Point* localOrigin, Rect* clipRect, WindowRef *window , wxWindow** rootwin) ;
|
virtual void MacDoGetPortClientParams(Point* localOrigin, Rect* clipRect, WindowRef *window , wxWindowMac** rootwin) ;
|
||||||
MacWindowData* MacGetWindowData() { return m_macWindowData ; }
|
MacWindowData* MacGetWindowData() { return m_macWindowData ; }
|
||||||
static WindowRef MacGetWindowInUpdate() { return s_macWindowInUpdate ; }
|
static WindowRef MacGetWindowInUpdate() { return s_macWindowInUpdate ; }
|
||||||
bool MacIsWindowScrollbar( const wxScrollBar* sb ) { return (m_hScrollBar == sb || m_vScrollBar == sb) ; }
|
bool MacIsWindowScrollbar( const wxScrollBar* sb ) { return (m_hScrollBar == sb || m_vScrollBar == sb) ; }
|
||||||
static wxWindow* s_lastMouseWindow ;
|
static wxWindowMac* s_lastMouseWindow ;
|
||||||
private:
|
private:
|
||||||
virtual bool MacGetWindowFromPointSub( const wxPoint &point , wxWindow** outWin ) ;
|
virtual bool MacGetWindowFromPointSub( const wxPoint &point , wxWindowMac** outWin ) ;
|
||||||
protected:
|
protected:
|
||||||
MacWindowData* m_macWindowData ;
|
MacWindowData* m_macWindowData ;
|
||||||
static WindowRef s_macWindowInUpdate ;
|
static WindowRef s_macWindowInUpdate ;
|
||||||
@@ -332,21 +332,21 @@ private:
|
|||||||
// common part of all ctors
|
// common part of all ctors
|
||||||
void Init();
|
void Init();
|
||||||
|
|
||||||
DECLARE_NO_COPY_CLASS(wxWindow)
|
DECLARE_NO_COPY_CLASS(wxWindowMac)
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
// associate mac windows with wx counterparts
|
// associate mac windows with wx counterparts
|
||||||
|
|
||||||
wxWindow* wxFindWinFromMacWindow( WindowRef inWindow ) ;
|
wxWindowMac* wxFindWinFromMacWindow( WindowRef inWindow ) ;
|
||||||
void wxAssociateWinWithMacWindow(WindowRef inWindow, wxWindow *win) ;
|
void wxAssociateWinWithMacWindow(WindowRef inWindow, wxWindowMac *win) ;
|
||||||
void wxRemoveMacWindowAssociation(wxWindow *win) ;
|
void wxRemoveMacWindowAssociation(wxWindowMac *win) ;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
class wxMacFocusHelper
|
class wxMacFocusHelper
|
||||||
{
|
{
|
||||||
public :
|
public :
|
||||||
wxMacFocusHelper( wxWindow * theWindow ) ;
|
wxMacFocusHelper( wxWindowMac * theWindow ) ;
|
||||||
~wxMacFocusHelper() ;
|
~wxMacFocusHelper() ;
|
||||||
bool Ok() { return m_ok ; }
|
bool Ok() { return m_ok ; }
|
||||||
|
|
||||||
@@ -360,7 +360,7 @@ private :
|
|||||||
class wxMacDrawingHelper
|
class wxMacDrawingHelper
|
||||||
{
|
{
|
||||||
public :
|
public :
|
||||||
wxMacDrawingHelper( wxWindow * theWindow ) ;
|
wxMacDrawingHelper( wxWindowMac * theWindow ) ;
|
||||||
~wxMacDrawingHelper() ;
|
~wxMacDrawingHelper() ;
|
||||||
bool Ok() { return m_ok ; }
|
bool Ok() { return m_ok ; }
|
||||||
|
|
||||||
@@ -374,7 +374,7 @@ private :
|
|||||||
class wxMacFocusClientHelper
|
class wxMacFocusClientHelper
|
||||||
{
|
{
|
||||||
public :
|
public :
|
||||||
wxMacFocusClientHelper( wxWindow * theWindow ) ;
|
wxMacFocusClientHelper( wxWindowMac * theWindow ) ;
|
||||||
~wxMacFocusClientHelper() ;
|
~wxMacFocusClientHelper() ;
|
||||||
bool Ok() { return m_ok ; }
|
bool Ok() { return m_ok ; }
|
||||||
|
|
||||||
@@ -387,7 +387,7 @@ private :
|
|||||||
class wxMacDrawingClientHelper
|
class wxMacDrawingClientHelper
|
||||||
{
|
{
|
||||||
public :
|
public :
|
||||||
wxMacDrawingClientHelper( wxWindow * theWindow ) ;
|
wxMacDrawingClientHelper( wxWindowMac * theWindow ) ;
|
||||||
~wxMacDrawingClientHelper() ;
|
~wxMacDrawingClientHelper() ;
|
||||||
bool Ok() { return m_ok ; }
|
bool Ok() { return m_ok ; }
|
||||||
|
|
||||||
|
@@ -26,6 +26,8 @@
|
|||||||
#define wxFrameNative wxFrameGTK
|
#define wxFrameNative wxFrameGTK
|
||||||
#elif defined(__WXMGL__)
|
#elif defined(__WXMGL__)
|
||||||
#define wxFrameNative wxFrameMGL
|
#define wxFrameNative wxFrameMGL
|
||||||
|
#elif defined(__WXMAC__)
|
||||||
|
#define wxFrameNative wxFrameMac
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class wxFrame : public wxFrameNative
|
class wxFrame : public wxFrameNative
|
||||||
|
@@ -142,8 +142,11 @@ private:
|
|||||||
#endif // wxUSE_ACCEL
|
#endif // wxUSE_ACCEL
|
||||||
|
|
||||||
// it calls out OnDismiss()
|
// it calls out OnDismiss()
|
||||||
|
#ifdef __WXMAC__
|
||||||
|
friend class wxPopupMenuWindow;
|
||||||
|
#else
|
||||||
friend wxPopupMenuWindow;
|
friend wxPopupMenuWindow;
|
||||||
|
#endif
|
||||||
DECLARE_DYNAMIC_CLASS(wxMenu)
|
DECLARE_DYNAMIC_CLASS(wxMenu)
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -275,7 +278,11 @@ private:
|
|||||||
bool m_shouldShowMenu;
|
bool m_shouldShowMenu;
|
||||||
|
|
||||||
// it calls out ProcessMouseEvent()
|
// it calls out ProcessMouseEvent()
|
||||||
|
#ifdef __WXMAC__
|
||||||
|
friend class wxPopupMenuWindow;
|
||||||
|
#else
|
||||||
friend wxPopupMenuWindow;
|
friend wxPopupMenuWindow;
|
||||||
|
#endif
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
DECLARE_DYNAMIC_CLASS(wxMenuBar)
|
DECLARE_DYNAMIC_CLASS(wxMenuBar)
|
||||||
|
@@ -220,6 +220,7 @@ public:
|
|||||||
int step = 1,
|
int step = 1,
|
||||||
int flags = 0) = 0;
|
int flags = 0) = 0;
|
||||||
|
|
||||||
|
#if wxUSE_MENUS
|
||||||
// draw a menu bar item
|
// draw a menu bar item
|
||||||
virtual void DrawMenuBarItem(wxDC& dc,
|
virtual void DrawMenuBarItem(wxDC& dc,
|
||||||
const wxRect& rect,
|
const wxRect& rect,
|
||||||
@@ -243,7 +244,7 @@ public:
|
|||||||
virtual void DrawMenuSeparator(wxDC& dc,
|
virtual void DrawMenuSeparator(wxDC& dc,
|
||||||
wxCoord y,
|
wxCoord y,
|
||||||
const wxMenuGeometryInfo& geomInfo) = 0;
|
const wxMenuGeometryInfo& geomInfo) = 0;
|
||||||
|
#endif
|
||||||
// misc functions
|
// misc functions
|
||||||
// --------------
|
// --------------
|
||||||
|
|
||||||
@@ -334,6 +335,7 @@ public:
|
|||||||
// get the size of one progress bar step (in horz and vertical directions)
|
// get the size of one progress bar step (in horz and vertical directions)
|
||||||
virtual wxSize GetProgressBarStep() const = 0;
|
virtual wxSize GetProgressBarStep() const = 0;
|
||||||
|
|
||||||
|
#if wxUSE_MENUS
|
||||||
// get the size of rectangle to use in the menubar for the given text rect
|
// get the size of rectangle to use in the menubar for the given text rect
|
||||||
virtual wxSize GetMenuBarItemSize(const wxSize& sizeText) const = 0;
|
virtual wxSize GetMenuBarItemSize(const wxSize& sizeText) const = 0;
|
||||||
|
|
||||||
@@ -344,7 +346,7 @@ public:
|
|||||||
// the returned pointer must be deleted by the caller
|
// the returned pointer must be deleted by the caller
|
||||||
virtual wxMenuGeometryInfo *GetMenuGeometry(wxWindow *win,
|
virtual wxMenuGeometryInfo *GetMenuGeometry(wxWindow *win,
|
||||||
const wxMenu& menu) const = 0;
|
const wxMenu& menu) const = 0;
|
||||||
|
#endif
|
||||||
// virtual dtor for any base class
|
// virtual dtor for any base class
|
||||||
virtual ~wxRenderer();
|
virtual ~wxRenderer();
|
||||||
|
|
||||||
@@ -546,6 +548,7 @@ public:
|
|||||||
int flags = 0)
|
int flags = 0)
|
||||||
{ m_renderer->DrawSliderTicks(dc, rect, sizeThumb, orient,
|
{ m_renderer->DrawSliderTicks(dc, rect, sizeThumb, orient,
|
||||||
start, end, start, flags); }
|
start, end, start, flags); }
|
||||||
|
#if wxUSE_MENUS
|
||||||
|
|
||||||
virtual void DrawMenuBarItem(wxDC& dc,
|
virtual void DrawMenuBarItem(wxDC& dc,
|
||||||
const wxRect& rect,
|
const wxRect& rect,
|
||||||
@@ -567,7 +570,7 @@ public:
|
|||||||
wxCoord y,
|
wxCoord y,
|
||||||
const wxMenuGeometryInfo& geomInfo)
|
const wxMenuGeometryInfo& geomInfo)
|
||||||
{ m_renderer->DrawMenuSeparator(dc, y, geomInfo); }
|
{ m_renderer->DrawMenuSeparator(dc, y, geomInfo); }
|
||||||
|
#endif
|
||||||
virtual void GetComboBitmaps(wxBitmap *bmpNormal,
|
virtual void GetComboBitmaps(wxBitmap *bmpNormal,
|
||||||
wxBitmap *bmpPressed,
|
wxBitmap *bmpPressed,
|
||||||
wxBitmap *bmpDisabled)
|
wxBitmap *bmpDisabled)
|
||||||
@@ -628,12 +631,13 @@ public:
|
|||||||
{ return m_renderer->GetSliderThumbSize(rect, orient); }
|
{ return m_renderer->GetSliderThumbSize(rect, orient); }
|
||||||
virtual wxSize GetProgressBarStep() const
|
virtual wxSize GetProgressBarStep() const
|
||||||
{ return m_renderer->GetProgressBarStep(); }
|
{ return m_renderer->GetProgressBarStep(); }
|
||||||
|
#if wxUSE_MENUS
|
||||||
virtual wxSize GetMenuBarItemSize(const wxSize& sizeText) const
|
virtual wxSize GetMenuBarItemSize(const wxSize& sizeText) const
|
||||||
{ return m_renderer->GetMenuBarItemSize(sizeText); }
|
{ return m_renderer->GetMenuBarItemSize(sizeText); }
|
||||||
virtual wxMenuGeometryInfo *GetMenuGeometry(wxWindow *win,
|
virtual wxMenuGeometryInfo *GetMenuGeometry(wxWindow *win,
|
||||||
const wxMenu& menu) const
|
const wxMenu& menu) const
|
||||||
{ return m_renderer->GetMenuGeometry(win, menu); }
|
{ return m_renderer->GetMenuGeometry(win, menu); }
|
||||||
|
#endif
|
||||||
protected:
|
protected:
|
||||||
wxRenderer *m_renderer;
|
wxRenderer *m_renderer;
|
||||||
};
|
};
|
||||||
|
@@ -15,6 +15,161 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// undef everything
|
// undef everything
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
#ifdef __WXMAC__
|
||||||
|
|
||||||
|
#define wxUSE_GUI 1
|
||||||
|
#define WXWIN_COMPATIBILITY 0
|
||||||
|
#define wxICON_IS_BITMAP 0
|
||||||
|
#define wxFONT_SIZE_COMPATIBILITY 0
|
||||||
|
#define wxDIALOG_UNIT_COMPATIBILITY 0
|
||||||
|
#define wxUSE_DEBUG_CONTEXT 0
|
||||||
|
#define wxUSE_MEMORY_TRACING 0
|
||||||
|
#define wxUSE_GLOBAL_MEMORY_OPERATORS 0
|
||||||
|
#define wxUSE_DEBUG_NEW_ALWAYS 0
|
||||||
|
#define wxUSE_ON_FATAL_EXCEPTION 0
|
||||||
|
|
||||||
|
#define wxUSE_UNICODE 0
|
||||||
|
#define wxUSE_WCHAR_T 0
|
||||||
|
#define wxUSE_LOG 1
|
||||||
|
#define wxUSE_LOGGUI 1
|
||||||
|
#define wxUSE_LOGWINDOW 1
|
||||||
|
#define wxUSE_LOG_DIALOG 0
|
||||||
|
#define wxUSE_THREADS 0
|
||||||
|
#define wxUSE_STREAMS 0
|
||||||
|
#define wxUSE_STD_IOSTREAM 0
|
||||||
|
#define wxUSE_SERIAL 0
|
||||||
|
#define wxUSE_LONGLONG 1
|
||||||
|
#define wxUSE_TIMER 1
|
||||||
|
#define wxUSE_STOPWATCH 1
|
||||||
|
#define wxUSE_TIMEDATE 0
|
||||||
|
#define wxUSE_DATETIME 1
|
||||||
|
#define wxUSE_CONFIG 0
|
||||||
|
#define wxUSE_CONFIG_NATIVE 0
|
||||||
|
#define wxUSE_DIALUP_MANAGER 0
|
||||||
|
#define wxUSE_DYNLIB_CLASS 0
|
||||||
|
#define wxUSE_SOCKETS 0
|
||||||
|
#define wxUSE_FILESYSTEM 0
|
||||||
|
#define wxUSE_FS_ZIP 0
|
||||||
|
#define wxUSE_FS_INET 0
|
||||||
|
#define wxUSE_ZIPSTREAM 0
|
||||||
|
#define wxUSE_ZLIB 0
|
||||||
|
#define wxUSE_FILESYSTEM 0
|
||||||
|
#define wxUSE_FS_ZIP 0
|
||||||
|
#define wxUSE_FS_INET 0
|
||||||
|
#define wxUSE_ZIPSTREAM 0
|
||||||
|
#define wxUSE_ZLIB 0
|
||||||
|
#define wxUSE_APPLE_IEEE 0
|
||||||
|
#define wxUSE_FILE 1
|
||||||
|
#define wxUSE_FFILE 1
|
||||||
|
#define wxUSE_TEXTFILE 0
|
||||||
|
#define wxUSE_INTL 0
|
||||||
|
#define wxUSE_MENUS 0 // was 1
|
||||||
|
#define wxUSE_TOOLBAR 0
|
||||||
|
#define wxUSE_TOOLBAR_NATIVE 0
|
||||||
|
#define wxUSE_TOOLBAR_SIMPLE 0
|
||||||
|
#define wxUSE_NOTEBOOK 1
|
||||||
|
#define wxUSE_FONTMAP 0
|
||||||
|
#define wxUSE_MIMETYPE 0
|
||||||
|
#define wxUSE_IMAGE 1
|
||||||
|
|
||||||
|
#define wxUSE_CONTROLS 1
|
||||||
|
#define wxUSE_POPUPWIN 1
|
||||||
|
#define wxUSE_BUTTON 1
|
||||||
|
#define wxUSE_BMPBUTTON 1
|
||||||
|
#define wxUSE_CALENDARCTRL 0
|
||||||
|
#define wxUSE_CARET 1
|
||||||
|
#define wxUSE_CHECKBOX 1
|
||||||
|
#define wxUSE_CHECKLISTBOX 1
|
||||||
|
#define wxUSE_CHOICE 0
|
||||||
|
#define wxUSE_COMBOBOX 0 // was 1
|
||||||
|
#define wxUSE_GAUGE 1
|
||||||
|
#define wxUSE_IMAGLIST 1
|
||||||
|
#define wxUSE_LISTBOX 1
|
||||||
|
#define wxUSE_LISTCTRL 0
|
||||||
|
#define wxUSE_RADIOBOX 1
|
||||||
|
#define wxUSE_RADIOBTN 1
|
||||||
|
#define wxUSE_SASH 0
|
||||||
|
#define wxUSE_SCROLLBAR 1
|
||||||
|
#define wxUSE_SLIDER 1
|
||||||
|
#define wxUSE_SPINBTN 1
|
||||||
|
#define wxUSE_SPINCTRL 1
|
||||||
|
#define wxUSE_STATBOX 1
|
||||||
|
#define wxUSE_STATLINE 1
|
||||||
|
#define wxUSE_STATTEXT 1
|
||||||
|
#define wxUSE_STATBMP 1
|
||||||
|
#define wxUSE_STATUSBAR 0
|
||||||
|
#define wxUSE_TEXTCTRL 1
|
||||||
|
#define wxUSE_TOOLTIPS 0
|
||||||
|
#define wxUSE_TREECTRL 0
|
||||||
|
|
||||||
|
#define wxUSE_NATIVE_STATUSBAR 0
|
||||||
|
#define wxUSE_BUTTONBAR 0
|
||||||
|
#define wxUSE_GRID 0
|
||||||
|
#define wxUSE_NEW_GRID 0
|
||||||
|
#define wxUSE_VALIDATORS 0
|
||||||
|
#define wxUSE_ACCEL 1
|
||||||
|
#define wxUSE_GENERIC_DIALOGS_IN_MSW 0
|
||||||
|
#define wxUSE_COMMON_DIALOGS 0
|
||||||
|
#define wxUSE_TEXTDLG 0
|
||||||
|
#define wxUSE_PROGRESSDLG 0
|
||||||
|
#define wxUSE_BUSYINFO 0
|
||||||
|
#define wxUSE_DIRDLG 0
|
||||||
|
#define wxUSE_FONTDLG 0
|
||||||
|
#define wxUSE_FILEDLG 0
|
||||||
|
#define wxUSE_TEXTDLG 0
|
||||||
|
#define wxUSE_CHOICEDLG 0
|
||||||
|
#define wxUSE_NUMBERDLG 0
|
||||||
|
#define wxUSE_STARTUP_TIPS 0
|
||||||
|
#define wxUSE_MSGDLG 1
|
||||||
|
#define wxUSE_SPLITTER 1
|
||||||
|
#define wxUSE_TAB_DIALOG 0
|
||||||
|
|
||||||
|
#define wxUSE_METAFILE 0
|
||||||
|
#define wxUSE_ENH_METAFILE 0
|
||||||
|
#define wxUSE_WIN_METAFILES_ALWAYS 0
|
||||||
|
#define wxUSE_DOC_VIEW_ARCHITECTURE 0
|
||||||
|
#define wxUSE_MDI_ARCHITECTURE 0
|
||||||
|
#define wxUSE_PRINTING_ARCHITECTURE 0
|
||||||
|
#define wxUSE_HTML 0
|
||||||
|
#define wxUSE_PLOT 0
|
||||||
|
#define wxUSE_GLCANVAS 0
|
||||||
|
#define wxUSE_TREELAYOUT 0
|
||||||
|
#define wxUSE_IPC 0
|
||||||
|
#define wxUSE_HELP 0
|
||||||
|
#define wxUSE_MS_HTML_HELP 0
|
||||||
|
#define wxUSE_RESOURCES 0
|
||||||
|
#define wxUSE_CONSTRAINTS 1
|
||||||
|
#define wxUSE_CLIPBOARD 0
|
||||||
|
#define wxUSE_DATAOBJ 1
|
||||||
|
#define wxUSE_SPLINES 0
|
||||||
|
#define wxUSE_DRAG_AND_DROP 0
|
||||||
|
#define wxUSE_XPM_IN_MSW 1
|
||||||
|
#define wxUSE_XPM 1
|
||||||
|
#define wxUSE_IMAGE_LOADING_IN_MSW 1
|
||||||
|
#define wxUSE_RESOURCE_LOADING_IN_MSW 0
|
||||||
|
#define wxUSE_WX_RESOURCES 0
|
||||||
|
#define wxUSE_POSTSCRIPT 0
|
||||||
|
#define wxUSE_AFM_FOR_POSTSCRIPT 0
|
||||||
|
#define wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 0
|
||||||
|
#define wxUSE_ODBC 0
|
||||||
|
#define wxODBC_FWD_ONLY_CURSORS 0
|
||||||
|
#define wxODBC_BACKWARD_COMPATABILITY 0
|
||||||
|
#define REMOVE_UNUSED_ARG 1
|
||||||
|
#define wxUSE_IOSTREAMH 0
|
||||||
|
#define wxUSE_LIBPNG 0
|
||||||
|
#define wxUSE_LIBJPEG 0
|
||||||
|
#define wxUSE_LIBTIFF 0
|
||||||
|
#define wxUSE_GIF 0
|
||||||
|
#define wxUSE_PNM 0
|
||||||
|
#define wxUSE_PCX 0
|
||||||
|
#define wxUSE_MFC 0
|
||||||
|
#define wxUSE_OLE 0
|
||||||
|
#define wxUSE_CTL3D 0
|
||||||
|
#define wxUSE_ITSY_BITSY 0
|
||||||
|
#define wxUSE_DYNAMIC_CLASSES 1
|
||||||
|
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
#define wxUSE_GUI 1
|
#define wxUSE_GUI 1
|
||||||
#define WXWIN_COMPATIBILITY 0
|
#define WXWIN_COMPATIBILITY 0
|
||||||
@@ -163,4 +318,6 @@
|
|||||||
#define wxUSE_ITSY_BITSY 0
|
#define wxUSE_ITSY_BITSY 0
|
||||||
#define wxUSE_DYNAMIC_CLASSES 1
|
#define wxUSE_DYNAMIC_CLASSES 1
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // _WX_UNIV_SETUP_H_
|
#endif // _WX_UNIV_SETUP_H_
|
||||||
|
@@ -69,8 +69,11 @@ private:
|
|||||||
|
|
||||||
// the current theme
|
// the current theme
|
||||||
static wxTheme *ms_theme;
|
static wxTheme *ms_theme;
|
||||||
|
#ifdef __MWERKS__
|
||||||
|
friend class wxThemeInfo;
|
||||||
|
#else
|
||||||
friend wxThemeInfo;
|
friend wxThemeInfo;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -61,6 +61,8 @@ enum
|
|||||||
#define wxWindowNative wxWindowGTK
|
#define wxWindowNative wxWindowGTK
|
||||||
#elif defined(__WXMGL__)
|
#elif defined(__WXMGL__)
|
||||||
#define wxWindowNative wxWindowMGL
|
#define wxWindowNative wxWindowMGL
|
||||||
|
#elif defined(__WXMAC__)
|
||||||
|
#define wxWindowNative wxWindowMac
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class WXDLLEXPORT wxWindow : public wxWindowNative
|
class WXDLLEXPORT wxWindow : public wxWindowNative
|
||||||
|
@@ -973,6 +973,12 @@ private:
|
|||||||
#elif defined(__WXQT__)
|
#elif defined(__WXQT__)
|
||||||
#include "wx/qt/window.h"
|
#include "wx/qt/window.h"
|
||||||
#elif defined(__WXMAC__)
|
#elif defined(__WXMAC__)
|
||||||
|
#ifdef __WXUNIVERSAL__
|
||||||
|
#define wxWindowNative wxWindowMac
|
||||||
|
#else // !wxUniv
|
||||||
|
#define wxWindowMac wxWindow
|
||||||
|
#define sm_classwxWindowMac sm_classwxWindow
|
||||||
|
#endif // wxUniv
|
||||||
#include "wx/mac/window.h"
|
#include "wx/mac/window.h"
|
||||||
#elif defined(__WXPM__)
|
#elif defined(__WXPM__)
|
||||||
#include "wx/os2/window.h"
|
#include "wx/os2/window.h"
|
||||||
|
46
include/wx/wx_cwu_d.h
Normal file
46
include/wx/wx_cwu_d.h
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: wx_cw_d.h
|
||||||
|
// Purpose: wxWindows definitions for CodeWarrior builds (Debug)
|
||||||
|
// Author: Stefan Csomor
|
||||||
|
// Modified by:
|
||||||
|
// Created: 12/10/98
|
||||||
|
// RCS-ID: $Id$
|
||||||
|
// Copyright: (c) Stefan Csomor
|
||||||
|
// Licence: wxWindows licence
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifndef _WX_CW__
|
||||||
|
#define _WX_CW__
|
||||||
|
|
||||||
|
#if __MWERKS__ >= 0x2400
|
||||||
|
#pragma old_argmatch on
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if __option(profile)
|
||||||
|
#error "profiling is not supported in debug versions"
|
||||||
|
#else
|
||||||
|
#ifdef __cplusplus
|
||||||
|
#if __POWERPC__
|
||||||
|
#include <wx_PPCu++_d.mch>
|
||||||
|
#elif __INTEL__
|
||||||
|
#include <wx_x86u++_d.mch>
|
||||||
|
#elif __CFM68K__
|
||||||
|
#include <wx_cfmu++_d.mch>
|
||||||
|
#else
|
||||||
|
#include <wx_68ku++_d.mch>
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#if __POWERPC__
|
||||||
|
#include <wx_PPCu_d.mch>
|
||||||
|
#elif __INTEL__
|
||||||
|
#include <wx_x86u_d.mch>
|
||||||
|
#elif __CFM68K__
|
||||||
|
#include <wx_cfmu_d.mch>
|
||||||
|
#else
|
||||||
|
#include <wx_68ku_d.mch>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
// _WX_CW__
|
@@ -568,6 +568,10 @@ WXDLLEXPORT wxChar * wxStrdup(const wxChar *psz);
|
|||||||
WXDLLEXPORT int wxStricmp(const wxChar *psz1, const wxChar *psz2);
|
WXDLLEXPORT int wxStricmp(const wxChar *psz1, const wxChar *psz2);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef wxStrnicmp
|
||||||
|
WXDLLEXPORT int wxStrnicmp(const wxChar *psz1, const wxChar *psz2, size_t len);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef wxStrtok
|
#ifndef wxStrtok
|
||||||
WXDLLEXPORT wxChar * wxStrtok(wxChar *psz, const wxChar *delim, wxChar **save_ptr);
|
WXDLLEXPORT wxChar * wxStrtok(wxChar *psz, const wxChar *delim, wxChar **save_ptr);
|
||||||
#endif
|
#endif
|
||||||
|
25
include/wx_cwu_d.pch
Normal file
25
include/wx_cwu_d.pch
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
#if __option (profile)
|
||||||
|
#error "profiling is not supported for debug targets"
|
||||||
|
#else
|
||||||
|
#if __POWERPC__
|
||||||
|
#pragma precompile_target "wx_PPCu_d.mch"
|
||||||
|
#elif __INTEL__
|
||||||
|
#pragma precompile_target "wx_x86u_d.mch"
|
||||||
|
#elif __CFM68K__
|
||||||
|
#pragma precompile_target "wx_cfmu_d.mch"
|
||||||
|
#else
|
||||||
|
#pragma precompile_target "wx_68ku_d.mch"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#pragma once on
|
||||||
|
#undef WX_PRECOMP
|
||||||
|
#define __WXUNIVERSAL__ 1
|
||||||
|
#define __WXDEBUG__ 1
|
||||||
|
#define wxUSE_GUI 1
|
||||||
|
#define OLDP2C 1
|
||||||
|
#include "wx/wx_cw_cm.h"
|
||||||
|
#ifdef __WXMSW__
|
||||||
|
#include <windows.h>
|
||||||
|
#include "wx/msw/winundef.h"
|
||||||
|
#endif
|
24
include/wx_cwu_d.pch++
Normal file
24
include/wx_cwu_d.pch++
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
#if __option (profile)
|
||||||
|
#error "profiling is not supported for debug targets"
|
||||||
|
#else
|
||||||
|
#if __POWERPC__
|
||||||
|
#pragma precompile_target "wx_PPCu++_d.mch"
|
||||||
|
#elif __INTEL__
|
||||||
|
#pragma precompile_target "wx_x86u++_d.mch"
|
||||||
|
#elif __CFM68K__
|
||||||
|
#pragma precompile_target "wx_cfmu++_d.mch"
|
||||||
|
#else
|
||||||
|
#pragma precompile_target "wx_68ku++_d.mch"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#pragma once on
|
||||||
|
#define WX_PRECOMP
|
||||||
|
#define __WXUNIVERSAL__ 1
|
||||||
|
#define __WXDEBUG__ 1
|
||||||
|
#define wxUSE_GUI 1
|
||||||
|
#define OLDP2C 1
|
||||||
|
#include "wx/wx_cw_cm.h"
|
||||||
|
#ifdef WX_PRECOMP
|
||||||
|
#include "wx/wxprec.h"
|
||||||
|
#endif
|
@@ -168,6 +168,19 @@ int WXDLLEXPORT wxStricmp(const wxChar *psz1, const wxChar *psz2)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef wxStricmp
|
||||||
|
int WXDLLEXPORT wxStrnicmp(const wxChar *s1, const wxChar *s2, size_t n)
|
||||||
|
{
|
||||||
|
register wxChar c1, c2;
|
||||||
|
while (n && ((c1 = wxTolower(*s1)) == (c2 = wxTolower(*s2)) ) && c1) n--, s1++, s2++;
|
||||||
|
if (n) {
|
||||||
|
if (c1 < c2) return -1;
|
||||||
|
if (c1 > c2) return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef wxStrtok
|
#ifndef wxStrtok
|
||||||
WXDLLEXPORT wxChar * wxStrtok(wxChar *psz, const wxChar *delim, wxChar **save_ptr)
|
WXDLLEXPORT wxChar * wxStrtok(wxChar *psz, const wxChar *delim, wxChar **save_ptr)
|
||||||
{
|
{
|
||||||
|
Binary file not shown.
@@ -48,7 +48,7 @@ wxWindowDC::wxWindowDC()
|
|||||||
wxWindowDC::wxWindowDC(wxWindow *the_canvas)
|
wxWindowDC::wxWindowDC(wxWindow *the_canvas)
|
||||||
{
|
{
|
||||||
WindowRef windowref ;
|
WindowRef windowref ;
|
||||||
wxWindow* rootwindow ;
|
wxWindowMac* rootwindow ;
|
||||||
|
|
||||||
// this time it is really the full window
|
// this time it is really the full window
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@ wxClientDC::wxClientDC()
|
|||||||
wxClientDC::wxClientDC(wxWindow *window)
|
wxClientDC::wxClientDC(wxWindow *window)
|
||||||
{
|
{
|
||||||
WindowRef windowref ;
|
WindowRef windowref ;
|
||||||
wxWindow* rootwindow ;
|
wxWindowMac* rootwindow ;
|
||||||
|
|
||||||
window->MacGetPortClientParams(&m_macLocalOrigin, &m_macClipRect , &windowref , &rootwindow );
|
window->MacGetPortClientParams(&m_macLocalOrigin, &m_macClipRect , &windowref , &rootwindow );
|
||||||
m_macPort = UMAGetWindowPort( windowref ) ;
|
m_macPort = UMAGetWindowPort( windowref ) ;
|
||||||
@@ -106,7 +106,7 @@ wxPaintDC::wxPaintDC()
|
|||||||
wxPaintDC::wxPaintDC(wxWindow *window)
|
wxPaintDC::wxPaintDC(wxWindow *window)
|
||||||
{
|
{
|
||||||
WindowRef windowref ;
|
WindowRef windowref ;
|
||||||
wxWindow* rootwindow ;
|
wxWindowMac* rootwindow ;
|
||||||
|
|
||||||
window->MacGetPortClientParams(&m_macLocalOrigin, &m_macClipRect , &windowref , &rootwindow );
|
window->MacGetPortClientParams(&m_macLocalOrigin, &m_macClipRect , &windowref , &rootwindow );
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: frame.cpp
|
// Name: frame.cpp
|
||||||
// Purpose: wxFrame
|
// Purpose: wxFrameMac
|
||||||
// Author: AUTHOR
|
// Author: AUTHOR
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: ??/??/98
|
// Created: ??/??/98
|
||||||
@@ -29,22 +29,25 @@ extern wxList wxModelessWindows;
|
|||||||
extern wxList wxPendingDelete;
|
extern wxList wxPendingDelete;
|
||||||
|
|
||||||
#if !USE_SHARED_LIBRARY
|
#if !USE_SHARED_LIBRARY
|
||||||
BEGIN_EVENT_TABLE(wxFrame, wxFrameBase)
|
BEGIN_EVENT_TABLE(wxFrameMac, wxFrameBase)
|
||||||
// EVT_SIZE(wxFrame::OnSize)
|
// EVT_SIZE(wxFrameMac::OnSize)
|
||||||
EVT_ACTIVATE(wxFrame::OnActivate)
|
EVT_ACTIVATE(wxFrameMac::OnActivate)
|
||||||
// EVT_MENU_HIGHLIGHT_ALL(wxFrame::OnMenuHighlight)
|
// EVT_MENU_HIGHLIGHT_ALL(wxFrameMac::OnMenuHighlight)
|
||||||
EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged)
|
EVT_SYS_COLOUR_CHANGED(wxFrameMac::OnSysColourChanged)
|
||||||
// EVT_IDLE(wxFrame::OnIdle)
|
// EVT_IDLE(wxFrameMac::OnIdle)
|
||||||
// EVT_CLOSE(wxFrame::OnCloseWindow)
|
// EVT_CLOSE(wxFrameMac::OnCloseWindow)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxWindow)
|
IMPLEMENT_DYNAMIC_CLASS(wxFrameMac, wxWindow)
|
||||||
|
#endif
|
||||||
|
#ifndef __WXUNIVERSAL__
|
||||||
|
IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxFrameMac)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if wxUSE_NATIVE_STATUSBAR
|
#if wxUSE_NATIVE_STATUSBAR
|
||||||
bool wxFrame::m_useNativeStatusBar = TRUE;
|
bool wxFrameMac::m_useNativeStatusBar = TRUE;
|
||||||
#else
|
#else
|
||||||
bool wxFrame::m_useNativeStatusBar = FALSE;
|
bool wxFrameMac::m_useNativeStatusBar = FALSE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define WX_MAC_STATUSBAR_HEIGHT 15
|
#define WX_MAC_STATUSBAR_HEIGHT 15
|
||||||
@@ -52,7 +55,7 @@ bool wxFrame::m_useNativeStatusBar = FALSE;
|
|||||||
// creation/destruction
|
// creation/destruction
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
void wxFrame::Init()
|
void wxFrameMac::Init()
|
||||||
{
|
{
|
||||||
m_frameMenuBar = NULL;
|
m_frameMenuBar = NULL;
|
||||||
|
|
||||||
@@ -69,7 +72,7 @@ void wxFrame::Init()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPoint wxFrame::GetClientAreaOrigin() const
|
wxPoint wxFrameMac::GetClientAreaOrigin() const
|
||||||
{
|
{
|
||||||
// on mac we are at position -1,-1 with the control
|
// on mac we are at position -1,-1 with the control
|
||||||
wxPoint pt(0, 0);
|
wxPoint pt(0, 0);
|
||||||
@@ -94,7 +97,7 @@ wxPoint wxFrame::GetClientAreaOrigin() const
|
|||||||
return pt;
|
return pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxFrame::Create(wxWindow *parent,
|
bool wxFrameMac::Create(wxWindow *parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxString& title,
|
const wxString& title,
|
||||||
const wxPoint& pos,
|
const wxPoint& pos,
|
||||||
@@ -123,7 +126,7 @@ bool wxFrame::Create(wxWindow *parent,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFrame::~wxFrame()
|
wxFrameMac::~wxFrameMac()
|
||||||
{
|
{
|
||||||
m_isBeingDeleted = TRUE;
|
m_isBeingDeleted = TRUE;
|
||||||
wxTopLevelWindows.DeleteObject(this);
|
wxTopLevelWindows.DeleteObject(this);
|
||||||
@@ -146,7 +149,7 @@ wxFrame::~wxFrame()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool wxFrame::Enable(bool enable)
|
bool wxFrameMac::Enable(bool enable)
|
||||||
{
|
{
|
||||||
if ( !wxWindow::Enable(enable) )
|
if ( !wxWindow::Enable(enable) )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -162,40 +165,40 @@ bool wxFrame::Enable(bool enable)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
// Equivalent to maximize/restore in Windows
|
// Equivalent to maximize/restore in Windows
|
||||||
void wxFrame::Maximize(bool maximize)
|
void wxFrameMac::Maximize(bool maximize)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxFrame::IsIconized() const
|
bool wxFrameMac::IsIconized() const
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFrame::Iconize(bool iconize)
|
void wxFrameMac::Iconize(bool iconize)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
// Is the frame maximized?
|
// Is the frame maximized?
|
||||||
bool wxFrame::IsMaximized(void) const
|
bool wxFrameMac::IsMaximized(void) const
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFrame::Restore()
|
void wxFrameMac::Restore()
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFrame::SetIcon(const wxIcon& icon)
|
void wxFrameMac::SetIcon(const wxIcon& icon)
|
||||||
{
|
{
|
||||||
wxFrameBase::SetIcon(icon);
|
wxFrameBase::SetIcon(icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxStatusBar *wxFrame::OnCreateStatusBar(int number, long style, wxWindowID id,
|
wxStatusBar *wxFrameMac::OnCreateStatusBar(int number, long style, wxWindowID id,
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
wxStatusBar *statusBar = NULL;
|
wxStatusBar *statusBar = NULL;
|
||||||
@@ -207,7 +210,7 @@ wxStatusBar *wxFrame::OnCreateStatusBar(int number, long style, wxWindowID id,
|
|||||||
return statusBar;
|
return statusBar;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFrame::PositionStatusBar()
|
void wxFrameMac::PositionStatusBar()
|
||||||
{
|
{
|
||||||
if (m_frameStatusBar )
|
if (m_frameStatusBar )
|
||||||
{
|
{
|
||||||
@@ -222,7 +225,7 @@ void wxFrame::PositionStatusBar()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFrame::SetMenuBar(wxMenuBar *menuBar)
|
void wxFrameMac::SetMenuBar(wxMenuBar *menuBar)
|
||||||
{
|
{
|
||||||
if (!menuBar)
|
if (!menuBar)
|
||||||
{
|
{
|
||||||
@@ -231,12 +234,12 @@ void wxFrame::SetMenuBar(wxMenuBar *menuBar)
|
|||||||
|
|
||||||
m_frameMenuBar = menuBar;
|
m_frameMenuBar = menuBar;
|
||||||
// m_frameMenuBar->MacInstallMenuBar() ;
|
// m_frameMenuBar->MacInstallMenuBar() ;
|
||||||
m_frameMenuBar->Attach(this);
|
m_frameMenuBar->Attach((wxFrame *)this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Responds to colour changes, and passes event on to children.
|
// Responds to colour changes, and passes event on to children.
|
||||||
void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event)
|
void wxFrameMac::OnSysColourChanged(wxSysColourChangedEvent& event)
|
||||||
{
|
{
|
||||||
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE));
|
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE));
|
||||||
Refresh();
|
Refresh();
|
||||||
@@ -255,7 +258,7 @@ void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event)
|
|||||||
|
|
||||||
// Default activation behaviour - set the focus for the first child
|
// Default activation behaviour - set the focus for the first child
|
||||||
// subwindow found.
|
// subwindow found.
|
||||||
void wxFrame::OnActivate(wxActivateEvent& event)
|
void wxFrameMac::OnActivate(wxActivateEvent& event)
|
||||||
{
|
{
|
||||||
if ( !event.GetActive() )
|
if ( !event.GetActive() )
|
||||||
{
|
{
|
||||||
@@ -307,7 +310,7 @@ void wxFrame::OnActivate(wxActivateEvent& event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFrame::DoGetClientSize(int *x, int *y) const
|
void wxFrameMac::DoGetClientSize(int *x, int *y) const
|
||||||
{
|
{
|
||||||
wxWindow::DoGetClientSize( x , y ) ;
|
wxWindow::DoGetClientSize( x , y ) ;
|
||||||
|
|
||||||
@@ -325,7 +328,7 @@ void wxFrame::DoGetClientSize(int *x, int *y) const
|
|||||||
*x -= pt.x;
|
*x -= pt.x;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFrame::DoSetClientSize(int clientwidth, int clientheight)
|
void wxFrameMac::DoSetClientSize(int clientwidth, int clientheight)
|
||||||
{
|
{
|
||||||
int currentclientwidth , currentclientheight ;
|
int currentclientwidth , currentclientheight ;
|
||||||
int currentwidth , currentheight ;
|
int currentwidth , currentheight ;
|
||||||
@@ -345,7 +348,7 @@ void wxFrame::DoSetClientSize(int clientwidth, int clientheight)
|
|||||||
|
|
||||||
|
|
||||||
#if wxUSE_TOOLBAR
|
#if wxUSE_TOOLBAR
|
||||||
wxToolBar* wxFrame::CreateToolBar(long style, wxWindowID id, const wxString& name)
|
wxToolBar* wxFrameMac::CreateToolBar(long style, wxWindowID id, const wxString& name)
|
||||||
{
|
{
|
||||||
if ( wxFrameBase::CreateToolBar(style, id, name) )
|
if ( wxFrameBase::CreateToolBar(style, id, name) )
|
||||||
{
|
{
|
||||||
@@ -355,7 +358,7 @@ wxToolBar* wxFrame::CreateToolBar(long style, wxWindowID id, const wxString& nam
|
|||||||
return m_frameToolBar;
|
return m_frameToolBar;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFrame::PositionToolBar()
|
void wxFrameMac::PositionToolBar()
|
||||||
{
|
{
|
||||||
int cw, ch;
|
int cw, ch;
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -48,7 +48,7 @@ wxWindowDC::wxWindowDC()
|
|||||||
wxWindowDC::wxWindowDC(wxWindow *the_canvas)
|
wxWindowDC::wxWindowDC(wxWindow *the_canvas)
|
||||||
{
|
{
|
||||||
WindowRef windowref ;
|
WindowRef windowref ;
|
||||||
wxWindow* rootwindow ;
|
wxWindowMac* rootwindow ;
|
||||||
|
|
||||||
// this time it is really the full window
|
// this time it is really the full window
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@ wxClientDC::wxClientDC()
|
|||||||
wxClientDC::wxClientDC(wxWindow *window)
|
wxClientDC::wxClientDC(wxWindow *window)
|
||||||
{
|
{
|
||||||
WindowRef windowref ;
|
WindowRef windowref ;
|
||||||
wxWindow* rootwindow ;
|
wxWindowMac* rootwindow ;
|
||||||
|
|
||||||
window->MacGetPortClientParams(&m_macLocalOrigin, &m_macClipRect , &windowref , &rootwindow );
|
window->MacGetPortClientParams(&m_macLocalOrigin, &m_macClipRect , &windowref , &rootwindow );
|
||||||
m_macPort = UMAGetWindowPort( windowref ) ;
|
m_macPort = UMAGetWindowPort( windowref ) ;
|
||||||
@@ -106,7 +106,7 @@ wxPaintDC::wxPaintDC()
|
|||||||
wxPaintDC::wxPaintDC(wxWindow *window)
|
wxPaintDC::wxPaintDC(wxWindow *window)
|
||||||
{
|
{
|
||||||
WindowRef windowref ;
|
WindowRef windowref ;
|
||||||
wxWindow* rootwindow ;
|
wxWindowMac* rootwindow ;
|
||||||
|
|
||||||
window->MacGetPortClientParams(&m_macLocalOrigin, &m_macClipRect , &windowref , &rootwindow );
|
window->MacGetPortClientParams(&m_macLocalOrigin, &m_macClipRect , &windowref , &rootwindow );
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: frame.cpp
|
// Name: frame.cpp
|
||||||
// Purpose: wxFrame
|
// Purpose: wxFrameMac
|
||||||
// Author: AUTHOR
|
// Author: AUTHOR
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: ??/??/98
|
// Created: ??/??/98
|
||||||
@@ -29,22 +29,25 @@ extern wxList wxModelessWindows;
|
|||||||
extern wxList wxPendingDelete;
|
extern wxList wxPendingDelete;
|
||||||
|
|
||||||
#if !USE_SHARED_LIBRARY
|
#if !USE_SHARED_LIBRARY
|
||||||
BEGIN_EVENT_TABLE(wxFrame, wxFrameBase)
|
BEGIN_EVENT_TABLE(wxFrameMac, wxFrameBase)
|
||||||
// EVT_SIZE(wxFrame::OnSize)
|
// EVT_SIZE(wxFrameMac::OnSize)
|
||||||
EVT_ACTIVATE(wxFrame::OnActivate)
|
EVT_ACTIVATE(wxFrameMac::OnActivate)
|
||||||
// EVT_MENU_HIGHLIGHT_ALL(wxFrame::OnMenuHighlight)
|
// EVT_MENU_HIGHLIGHT_ALL(wxFrameMac::OnMenuHighlight)
|
||||||
EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged)
|
EVT_SYS_COLOUR_CHANGED(wxFrameMac::OnSysColourChanged)
|
||||||
// EVT_IDLE(wxFrame::OnIdle)
|
// EVT_IDLE(wxFrameMac::OnIdle)
|
||||||
// EVT_CLOSE(wxFrame::OnCloseWindow)
|
// EVT_CLOSE(wxFrameMac::OnCloseWindow)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxWindow)
|
IMPLEMENT_DYNAMIC_CLASS(wxFrameMac, wxWindow)
|
||||||
|
#endif
|
||||||
|
#ifndef __WXUNIVERSAL__
|
||||||
|
IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxFrameMac)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if wxUSE_NATIVE_STATUSBAR
|
#if wxUSE_NATIVE_STATUSBAR
|
||||||
bool wxFrame::m_useNativeStatusBar = TRUE;
|
bool wxFrameMac::m_useNativeStatusBar = TRUE;
|
||||||
#else
|
#else
|
||||||
bool wxFrame::m_useNativeStatusBar = FALSE;
|
bool wxFrameMac::m_useNativeStatusBar = FALSE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define WX_MAC_STATUSBAR_HEIGHT 15
|
#define WX_MAC_STATUSBAR_HEIGHT 15
|
||||||
@@ -52,7 +55,7 @@ bool wxFrame::m_useNativeStatusBar = FALSE;
|
|||||||
// creation/destruction
|
// creation/destruction
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
void wxFrame::Init()
|
void wxFrameMac::Init()
|
||||||
{
|
{
|
||||||
m_frameMenuBar = NULL;
|
m_frameMenuBar = NULL;
|
||||||
|
|
||||||
@@ -69,7 +72,7 @@ void wxFrame::Init()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPoint wxFrame::GetClientAreaOrigin() const
|
wxPoint wxFrameMac::GetClientAreaOrigin() const
|
||||||
{
|
{
|
||||||
// on mac we are at position -1,-1 with the control
|
// on mac we are at position -1,-1 with the control
|
||||||
wxPoint pt(0, 0);
|
wxPoint pt(0, 0);
|
||||||
@@ -94,7 +97,7 @@ wxPoint wxFrame::GetClientAreaOrigin() const
|
|||||||
return pt;
|
return pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxFrame::Create(wxWindow *parent,
|
bool wxFrameMac::Create(wxWindow *parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxString& title,
|
const wxString& title,
|
||||||
const wxPoint& pos,
|
const wxPoint& pos,
|
||||||
@@ -123,7 +126,7 @@ bool wxFrame::Create(wxWindow *parent,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFrame::~wxFrame()
|
wxFrameMac::~wxFrameMac()
|
||||||
{
|
{
|
||||||
m_isBeingDeleted = TRUE;
|
m_isBeingDeleted = TRUE;
|
||||||
wxTopLevelWindows.DeleteObject(this);
|
wxTopLevelWindows.DeleteObject(this);
|
||||||
@@ -146,7 +149,7 @@ wxFrame::~wxFrame()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool wxFrame::Enable(bool enable)
|
bool wxFrameMac::Enable(bool enable)
|
||||||
{
|
{
|
||||||
if ( !wxWindow::Enable(enable) )
|
if ( !wxWindow::Enable(enable) )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -162,40 +165,40 @@ bool wxFrame::Enable(bool enable)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
// Equivalent to maximize/restore in Windows
|
// Equivalent to maximize/restore in Windows
|
||||||
void wxFrame::Maximize(bool maximize)
|
void wxFrameMac::Maximize(bool maximize)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxFrame::IsIconized() const
|
bool wxFrameMac::IsIconized() const
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFrame::Iconize(bool iconize)
|
void wxFrameMac::Iconize(bool iconize)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
// Is the frame maximized?
|
// Is the frame maximized?
|
||||||
bool wxFrame::IsMaximized(void) const
|
bool wxFrameMac::IsMaximized(void) const
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFrame::Restore()
|
void wxFrameMac::Restore()
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFrame::SetIcon(const wxIcon& icon)
|
void wxFrameMac::SetIcon(const wxIcon& icon)
|
||||||
{
|
{
|
||||||
wxFrameBase::SetIcon(icon);
|
wxFrameBase::SetIcon(icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxStatusBar *wxFrame::OnCreateStatusBar(int number, long style, wxWindowID id,
|
wxStatusBar *wxFrameMac::OnCreateStatusBar(int number, long style, wxWindowID id,
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
wxStatusBar *statusBar = NULL;
|
wxStatusBar *statusBar = NULL;
|
||||||
@@ -207,7 +210,7 @@ wxStatusBar *wxFrame::OnCreateStatusBar(int number, long style, wxWindowID id,
|
|||||||
return statusBar;
|
return statusBar;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFrame::PositionStatusBar()
|
void wxFrameMac::PositionStatusBar()
|
||||||
{
|
{
|
||||||
if (m_frameStatusBar )
|
if (m_frameStatusBar )
|
||||||
{
|
{
|
||||||
@@ -222,7 +225,7 @@ void wxFrame::PositionStatusBar()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFrame::SetMenuBar(wxMenuBar *menuBar)
|
void wxFrameMac::SetMenuBar(wxMenuBar *menuBar)
|
||||||
{
|
{
|
||||||
if (!menuBar)
|
if (!menuBar)
|
||||||
{
|
{
|
||||||
@@ -231,12 +234,12 @@ void wxFrame::SetMenuBar(wxMenuBar *menuBar)
|
|||||||
|
|
||||||
m_frameMenuBar = menuBar;
|
m_frameMenuBar = menuBar;
|
||||||
// m_frameMenuBar->MacInstallMenuBar() ;
|
// m_frameMenuBar->MacInstallMenuBar() ;
|
||||||
m_frameMenuBar->Attach(this);
|
m_frameMenuBar->Attach((wxFrame *)this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Responds to colour changes, and passes event on to children.
|
// Responds to colour changes, and passes event on to children.
|
||||||
void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event)
|
void wxFrameMac::OnSysColourChanged(wxSysColourChangedEvent& event)
|
||||||
{
|
{
|
||||||
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE));
|
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE));
|
||||||
Refresh();
|
Refresh();
|
||||||
@@ -255,7 +258,7 @@ void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event)
|
|||||||
|
|
||||||
// Default activation behaviour - set the focus for the first child
|
// Default activation behaviour - set the focus for the first child
|
||||||
// subwindow found.
|
// subwindow found.
|
||||||
void wxFrame::OnActivate(wxActivateEvent& event)
|
void wxFrameMac::OnActivate(wxActivateEvent& event)
|
||||||
{
|
{
|
||||||
if ( !event.GetActive() )
|
if ( !event.GetActive() )
|
||||||
{
|
{
|
||||||
@@ -307,7 +310,7 @@ void wxFrame::OnActivate(wxActivateEvent& event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFrame::DoGetClientSize(int *x, int *y) const
|
void wxFrameMac::DoGetClientSize(int *x, int *y) const
|
||||||
{
|
{
|
||||||
wxWindow::DoGetClientSize( x , y ) ;
|
wxWindow::DoGetClientSize( x , y ) ;
|
||||||
|
|
||||||
@@ -325,7 +328,7 @@ void wxFrame::DoGetClientSize(int *x, int *y) const
|
|||||||
*x -= pt.x;
|
*x -= pt.x;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFrame::DoSetClientSize(int clientwidth, int clientheight)
|
void wxFrameMac::DoSetClientSize(int clientwidth, int clientheight)
|
||||||
{
|
{
|
||||||
int currentclientwidth , currentclientheight ;
|
int currentclientwidth , currentclientheight ;
|
||||||
int currentwidth , currentheight ;
|
int currentwidth , currentheight ;
|
||||||
@@ -345,7 +348,7 @@ void wxFrame::DoSetClientSize(int clientwidth, int clientheight)
|
|||||||
|
|
||||||
|
|
||||||
#if wxUSE_TOOLBAR
|
#if wxUSE_TOOLBAR
|
||||||
wxToolBar* wxFrame::CreateToolBar(long style, wxWindowID id, const wxString& name)
|
wxToolBar* wxFrameMac::CreateToolBar(long style, wxWindowID id, const wxString& name)
|
||||||
{
|
{
|
||||||
if ( wxFrameBase::CreateToolBar(style, id, name) )
|
if ( wxFrameBase::CreateToolBar(style, id, name) )
|
||||||
{
|
{
|
||||||
@@ -355,7 +358,7 @@ wxToolBar* wxFrame::CreateToolBar(long style, wxWindowID id, const wxString& nam
|
|||||||
return m_frameToolBar;
|
return m_frameToolBar;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFrame::PositionToolBar()
|
void wxFrameMac::PositionToolBar()
|
||||||
{
|
{
|
||||||
int cw, ch;
|
int cw, ch;
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
BIN
src/makemac6.mcp
BIN
src/makemac6.mcp
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -75,13 +75,21 @@ void wxFrame::OnSize(wxSizeEvent& event)
|
|||||||
{
|
{
|
||||||
#if wxUSE_MENUS
|
#if wxUSE_MENUS
|
||||||
PositionMenuBar();
|
PositionMenuBar();
|
||||||
|
<<<<<<< framuniv.cpp
|
||||||
|
#endif
|
||||||
|
=======
|
||||||
#endif // wxUSE_WAVE
|
#endif // wxUSE_WAVE
|
||||||
|
|
||||||
|
>>>>>>> 1.4
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<<<<<<< framuniv.cpp
|
||||||
|
#if wxUSE_MENUS
|
||||||
|
=======
|
||||||
#if wxUSE_MENUS
|
#if wxUSE_MENUS
|
||||||
|
|
||||||
|
>>>>>>> 1.4
|
||||||
void wxFrame::PositionMenuBar()
|
void wxFrame::PositionMenuBar()
|
||||||
{
|
{
|
||||||
if ( m_frameMenuBar )
|
if ( m_frameMenuBar )
|
||||||
@@ -92,9 +100,14 @@ void wxFrame::PositionMenuBar()
|
|||||||
GetClientSize().x, -1);
|
GetClientSize().x, -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
<<<<<<< framuniv.cpp
|
||||||
|
#endif // wxUSE_MENUS
|
||||||
|
|
||||||
|
=======
|
||||||
|
|
||||||
#endif // wxUSE_MENUS
|
#endif // wxUSE_MENUS
|
||||||
|
|
||||||
|
>>>>>>> 1.4
|
||||||
wxPoint wxFrame::GetClientAreaOrigin() const
|
wxPoint wxFrame::GetClientAreaOrigin() const
|
||||||
{
|
{
|
||||||
wxPoint pt = wxFrameNative::GetClientAreaOrigin();
|
wxPoint pt = wxFrameNative::GetClientAreaOrigin();
|
||||||
|
@@ -186,6 +186,7 @@ public:
|
|||||||
// we don't have the ticks in GTK version
|
// we don't have the ticks in GTK version
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxUSE_MENUS
|
||||||
virtual void DrawMenuBarItem(wxDC& dc,
|
virtual void DrawMenuBarItem(wxDC& dc,
|
||||||
const wxRect& rect,
|
const wxRect& rect,
|
||||||
const wxString& label,
|
const wxString& label,
|
||||||
@@ -202,7 +203,7 @@ public:
|
|||||||
virtual void DrawMenuSeparator(wxDC& dc,
|
virtual void DrawMenuSeparator(wxDC& dc,
|
||||||
wxCoord y,
|
wxCoord y,
|
||||||
const wxMenuGeometryInfo& geomInfo);
|
const wxMenuGeometryInfo& geomInfo);
|
||||||
|
#endif
|
||||||
virtual void GetComboBitmaps(wxBitmap *bmpNormal,
|
virtual void GetComboBitmaps(wxBitmap *bmpNormal,
|
||||||
wxBitmap *bmpPressed,
|
wxBitmap *bmpPressed,
|
||||||
wxBitmap *bmpDisabled);
|
wxBitmap *bmpDisabled);
|
||||||
@@ -248,11 +249,12 @@ public:
|
|||||||
virtual wxSize GetSliderThumbSize(const wxRect& rect,
|
virtual wxSize GetSliderThumbSize(const wxRect& rect,
|
||||||
wxOrientation orient) const;
|
wxOrientation orient) const;
|
||||||
virtual wxSize GetProgressBarStep() const { return wxSize(16, 32); }
|
virtual wxSize GetProgressBarStep() const { return wxSize(16, 32); }
|
||||||
|
#if wxUSE_MENUS
|
||||||
|
|
||||||
virtual wxSize GetMenuBarItemSize(const wxSize& sizeText) const;
|
virtual wxSize GetMenuBarItemSize(const wxSize& sizeText) const;
|
||||||
virtual wxMenuGeometryInfo *GetMenuGeometry(wxWindow *win,
|
virtual wxMenuGeometryInfo *GetMenuGeometry(wxWindow *win,
|
||||||
const wxMenu& menu) const;
|
const wxMenu& menu) const;
|
||||||
|
#endif
|
||||||
// helpers for "wxBitmap wxColourScheme::Get()"
|
// helpers for "wxBitmap wxColourScheme::Get()"
|
||||||
void DrawCheckBitmap(wxDC& dc, const wxRect& rect);
|
void DrawCheckBitmap(wxDC& dc, const wxRect& rect);
|
||||||
void DrawUncheckBitmap(wxDC& dc, const wxRect& rect, bool isPressed);
|
void DrawUncheckBitmap(wxDC& dc, const wxRect& rect, bool isPressed);
|
||||||
@@ -1745,6 +1747,7 @@ void wxGTKRenderer::DrawSliderThumb(wxDC& dc,
|
|||||||
DrawShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight);
|
DrawShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxUSE_MENUS
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// menu and menubar
|
// menu and menubar
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -1789,7 +1792,7 @@ wxMenuGeometryInfo *wxGTKRenderer::GetMenuGeometry(wxWindow *win,
|
|||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// combobox
|
// combobox
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -236,6 +236,7 @@ public:
|
|||||||
int end,
|
int end,
|
||||||
int step = 1,
|
int step = 1,
|
||||||
int flags = 0);
|
int flags = 0);
|
||||||
|
#if wxUSE_MENUS
|
||||||
|
|
||||||
virtual void DrawMenuBarItem(wxDC& dc,
|
virtual void DrawMenuBarItem(wxDC& dc,
|
||||||
const wxRect& rect,
|
const wxRect& rect,
|
||||||
@@ -253,7 +254,7 @@ public:
|
|||||||
virtual void DrawMenuSeparator(wxDC& dc,
|
virtual void DrawMenuSeparator(wxDC& dc,
|
||||||
wxCoord y,
|
wxCoord y,
|
||||||
const wxMenuGeometryInfo& geomInfo);
|
const wxMenuGeometryInfo& geomInfo);
|
||||||
|
#endif
|
||||||
virtual void GetComboBitmaps(wxBitmap *bmpNormal,
|
virtual void GetComboBitmaps(wxBitmap *bmpNormal,
|
||||||
wxBitmap *bmpPressed,
|
wxBitmap *bmpPressed,
|
||||||
wxBitmap *bmpDisabled);
|
wxBitmap *bmpDisabled);
|
||||||
@@ -299,10 +300,11 @@ public:
|
|||||||
wxOrientation orient) const;
|
wxOrientation orient) const;
|
||||||
virtual wxSize GetProgressBarStep() const { return wxSize(16, 32); }
|
virtual wxSize GetProgressBarStep() const { return wxSize(16, 32); }
|
||||||
|
|
||||||
|
#if wxUSE_MENUS
|
||||||
virtual wxSize GetMenuBarItemSize(const wxSize& sizeText) const;
|
virtual wxSize GetMenuBarItemSize(const wxSize& sizeText) const;
|
||||||
virtual wxMenuGeometryInfo *GetMenuGeometry(wxWindow *win,
|
virtual wxMenuGeometryInfo *GetMenuGeometry(wxWindow *win,
|
||||||
const wxMenu& menu) const;
|
const wxMenu& menu) const;
|
||||||
|
#endif
|
||||||
protected:
|
protected:
|
||||||
// helper of DrawLabel() and DrawCheckOrRadioButton()
|
// helper of DrawLabel() and DrawCheckOrRadioButton()
|
||||||
void DoDrawLabel(wxDC& dc,
|
void DoDrawLabel(wxDC& dc,
|
||||||
@@ -2408,6 +2410,7 @@ void wxWin32Renderer::DrawSliderTicks(wxDC& dc,
|
|||||||
DrawLine(dc, x2, y1, x2, y2, orient == wxVERTICAL);
|
DrawLine(dc, x2, y1, x2, y2, orient == wxVERTICAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxUSE_MENUS
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// menu and menubar
|
// menu and menubar
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -2677,6 +2680,9 @@ wxMenuGeometryInfo *wxWin32Renderer::GetMenuGeometry(wxWindow *win,
|
|||||||
|
|
||||||
return gi;
|
return gi;
|
||||||
}
|
}
|
||||||
|
<<<<<<< win32.cpp
|
||||||
|
#endif
|
||||||
|
=======
|
||||||
|
|
||||||
#else // !wxUSE_MENUS
|
#else // !wxUSE_MENUS
|
||||||
|
|
||||||
@@ -2719,6 +2725,7 @@ wxWin32Renderer::GetMenuGeometry(wxWindow *WXUNUSED(win),
|
|||||||
|
|
||||||
#endif // wxUSE_MENUS/!wxUSE_MENUS
|
#endif // wxUSE_MENUS/!wxUSE_MENUS
|
||||||
|
|
||||||
|
>>>>>>> 1.5
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// combobox
|
// combobox
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Binary file not shown.
Reference in New Issue
Block a user