new native toolbar implementation (turned off by default, not supporting embedded controls yet)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34942 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -59,6 +59,10 @@ public:
|
||||
// implementation only from now on
|
||||
// -------------------------------
|
||||
|
||||
// get the origin of the client area (which may be different from (0, 0)
|
||||
// if the frame has a toolbar) in client coordinates
|
||||
virtual wxPoint GetClientAreaOrigin() const;
|
||||
|
||||
// override some more virtuals
|
||||
virtual bool Enable(bool enable = TRUE) ;
|
||||
|
||||
@@ -73,6 +77,7 @@ public:
|
||||
const wxString& name = wxToolBarNameStr);
|
||||
|
||||
virtual void PositionToolBar();
|
||||
virtual void SetToolBar(wxToolBar *toolbar);
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
||||
// Status bar
|
||||
|
@@ -33,7 +33,6 @@ class WXDLLEXPORT wxToolBar: public wxToolBarBase
|
||||
|
||||
wxToolBar() { Init(); }
|
||||
|
||||
|
||||
inline wxToolBar(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
long style = wxNO_BORDER|wxTB_HORIZONTAL,
|
||||
@@ -48,9 +47,14 @@ class WXDLLEXPORT wxToolBar: public wxToolBarBase
|
||||
long style = wxNO_BORDER|wxTB_HORIZONTAL,
|
||||
const wxString& name = wxToolBarNameStr);
|
||||
|
||||
virtual void SetWindowStyleFlag(long style);
|
||||
|
||||
// override/implement base class virtuals
|
||||
virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const;
|
||||
|
||||
virtual bool Show(bool show = true);
|
||||
virtual bool IsShown() const;
|
||||
virtual void DoGetSize(int *width, int *height) const;
|
||||
virtual bool Realize();
|
||||
|
||||
virtual void SetToolBitmapSize(const wxSize& size);
|
||||
@@ -64,6 +68,12 @@ class WXDLLEXPORT wxToolBar: public wxToolBarBase
|
||||
void OnPaint(wxPaintEvent& event) ;
|
||||
void OnMouse(wxMouseEvent& event) ;
|
||||
virtual void MacSuperChangedPosition() ;
|
||||
|
||||
#if wxMAC_USE_NATIVE_TOOLBAR
|
||||
bool MacInstallNativeToolbar(bool usesNative);
|
||||
bool MacWantsNativeToolbar();
|
||||
bool MacTopLevelHasNativeToolbar(bool *ownToolbarInstalled) const;
|
||||
#endif
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
@@ -87,6 +97,10 @@ protected:
|
||||
virtual wxToolBarToolBase *CreateTool(wxControl *control);
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
#if wxMAC_USE_NATIVE_TOOLBAR
|
||||
bool m_macUsesNativeToolbar ;
|
||||
void* m_macHIToolbarRef ;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
@@ -1098,6 +1098,11 @@
|
||||
// Set to 0 for no libmspack
|
||||
#define wxUSE_LIBMSPACK 0
|
||||
|
||||
// native toolbar does not support embedding controls yet, please test by setting to 1
|
||||
#define wxMAC_USE_NATIVE_TOOLBAR 0
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
// _WX_SETUP_H_
|
||||
|
Reference in New Issue
Block a user