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:
Stefan Csomor
2001-07-04 20:11:26 +00:00
parent db73732184
commit e766c8a9ad
31 changed files with 774 additions and 422 deletions

View File

@@ -26,6 +26,8 @@
#define wxFrameNative wxFrameGTK
#elif defined(__WXMGL__)
#define wxFrameNative wxFrameMGL
#elif defined(__WXMAC__)
#define wxFrameNative wxFrameMac
#endif
class wxFrame : public wxFrameNative

View File

@@ -142,8 +142,11 @@ private:
#endif // wxUSE_ACCEL
// it calls out OnDismiss()
#ifdef __WXMAC__
friend class wxPopupMenuWindow;
#else
friend wxPopupMenuWindow;
#endif
DECLARE_DYNAMIC_CLASS(wxMenu)
};
@@ -275,7 +278,11 @@ private:
bool m_shouldShowMenu;
// it calls out ProcessMouseEvent()
#ifdef __WXMAC__
friend class wxPopupMenuWindow;
#else
friend wxPopupMenuWindow;
#endif
DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxMenuBar)

View File

@@ -220,6 +220,7 @@ public:
int step = 1,
int flags = 0) = 0;
#if wxUSE_MENUS
// draw a menu bar item
virtual void DrawMenuBarItem(wxDC& dc,
const wxRect& rect,
@@ -243,7 +244,7 @@ public:
virtual void DrawMenuSeparator(wxDC& dc,
wxCoord y,
const wxMenuGeometryInfo& geomInfo) = 0;
#endif
// misc functions
// --------------
@@ -334,6 +335,7 @@ public:
// get the size of one progress bar step (in horz and vertical directions)
virtual wxSize GetProgressBarStep() const = 0;
#if wxUSE_MENUS
// get the size of rectangle to use in the menubar for the given text rect
virtual wxSize GetMenuBarItemSize(const wxSize& sizeText) const = 0;
@@ -344,7 +346,7 @@ public:
// the returned pointer must be deleted by the caller
virtual wxMenuGeometryInfo *GetMenuGeometry(wxWindow *win,
const wxMenu& menu) const = 0;
#endif
// virtual dtor for any base class
virtual ~wxRenderer();
@@ -546,6 +548,7 @@ public:
int flags = 0)
{ m_renderer->DrawSliderTicks(dc, rect, sizeThumb, orient,
start, end, start, flags); }
#if wxUSE_MENUS
virtual void DrawMenuBarItem(wxDC& dc,
const wxRect& rect,
@@ -567,7 +570,7 @@ public:
wxCoord y,
const wxMenuGeometryInfo& geomInfo)
{ m_renderer->DrawMenuSeparator(dc, y, geomInfo); }
#endif
virtual void GetComboBitmaps(wxBitmap *bmpNormal,
wxBitmap *bmpPressed,
wxBitmap *bmpDisabled)
@@ -628,12 +631,13 @@ public:
{ return m_renderer->GetSliderThumbSize(rect, orient); }
virtual wxSize GetProgressBarStep() const
{ return m_renderer->GetProgressBarStep(); }
#if wxUSE_MENUS
virtual wxSize GetMenuBarItemSize(const wxSize& sizeText) const
{ return m_renderer->GetMenuBarItemSize(sizeText); }
virtual wxMenuGeometryInfo *GetMenuGeometry(wxWindow *win,
const wxMenu& menu) const
{ return m_renderer->GetMenuGeometry(win, menu); }
#endif
protected:
wxRenderer *m_renderer;
};

View File

@@ -15,6 +15,161 @@
// ----------------------------------------------------------------------------
// 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 WXWIN_COMPATIBILITY 0
@@ -163,4 +318,6 @@
#define wxUSE_ITSY_BITSY 0
#define wxUSE_DYNAMIC_CLASSES 1
#endif
#endif // _WX_UNIV_SETUP_H_

View File

@@ -69,8 +69,11 @@ private:
// the current theme
static wxTheme *ms_theme;
#ifdef __MWERKS__
friend class wxThemeInfo;
#else
friend wxThemeInfo;
#endif
};
// ----------------------------------------------------------------------------

View File

@@ -61,6 +61,8 @@ enum
#define wxWindowNative wxWindowGTK
#elif defined(__WXMGL__)
#define wxWindowNative wxWindowMGL
#elif defined(__WXMAC__)
#define wxWindowNative wxWindowMac
#endif
class WXDLLEXPORT wxWindow : public wxWindowNative