dolphin/Externals/wxWidgets3/include/wx/cocoa/toolbar.h
Soren Jorvang d14efe561b Import r67258 of the wxWidgets trunk, which I expect will before
long become wxWidgets 2.9.2, which in turn is expected to be the
last 2.9 release before the 3.0 stable release.

Since the full wxWidgets distribution is rather large, I have
imported only the parts that we use, on a subdirectory basis:

art
include/wx/*.*
include/wx/aui
include/wx/cocoa
include/wx/generic
include/wx/gtk
include/wx/meta
include/wx/msw
include/wx/osx
include/wx/persist
include/wx/private
include/wx/protocol
include/wx/unix
src/aui
src/common
src/generic
src/gtk
src/msw
src/osx
src/unix


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7380 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-03-20 18:05:19 +00:00

121 lines
4.2 KiB
C++

/////////////////////////////////////////////////////////////////////////////
// Name: wx/cocoa/toolbar.h
// Purpose: wxToolBar
// Author: David Elliott
// Modified by:
// Created: 2003/08/17
// RCS-ID: $Id: toolbar.h 48095 2007-08-15 13:05:35Z VS $
// Copyright: (c) 2003 David Elliott
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __WX_COCOA_TOOLBAR_H__
#define __WX_COCOA_TOOLBAR_H__
#if wxUSE_TOOLBAR
// ========================================================================
// wxToolBar
// ========================================================================
#if defined(__LP64__) || defined(NS_BUILD_32_LIKE_64)
typedef struct CGPoint NSPoint;
#else
typedef struct _NSPoint NSPoint;
#endif
class wxToolBarTool;
class WXDLLIMPEXP_CORE wxToolBar : public wxToolBarBase
{
DECLARE_DYNAMIC_CLASS(wxToolBar)
// ------------------------------------------------------------------------
// initialization
// ------------------------------------------------------------------------
public:
wxToolBar() { Init(); }
wxToolBar( wxWindow *parent,
wxWindowID toolid,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxToolBarNameStr )
{
Init();
Create(parent, toolid, pos, size, style, name);
}
bool Create( wxWindow *parent,
wxWindowID toolid,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxToolBarNameStr );
virtual ~wxToolBar();
protected:
// common part of all ctors
void Init();
// ------------------------------------------------------------------------
// Cocoa
// ------------------------------------------------------------------------
protected:
virtual bool Cocoa_acceptsFirstMouse(bool &acceptsFirstMouse, WX_NSEvent theEvent);
virtual bool Cocoa_drawRect(const NSRect &rect);
virtual bool Cocoa_mouseDown(WX_NSEvent theEvent);
virtual bool Cocoa_mouseDragged(WX_NSEvent theEvent);
wxToolBarTool *CocoaFindToolForPosition(const NSPoint& pos) const;
void CocoaToolClickEnded();
// ------------------------------------------------------------------------
// Implementation
// ------------------------------------------------------------------------
public:
// override base class virtuals
virtual void SetMargins(int x, int y);
virtual void SetToolSeparation(int separation);
virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const;
virtual void SetToolShortHelp(int toolid, const wxString& helpString);
virtual void SetWindowStyleFlag( long style );
// implementation from now on
// --------------------------
void OnInternalIdle();
virtual bool Realize();
virtual wxSize DoGetBestSize() const;
void SetOwningFrame(wxFrame *owningFrame)
{ m_owningFrame = owningFrame; }
protected:
// implement base class pure virtuals
virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool);
virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool);
virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable);
virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle);
virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle);
virtual wxToolBarToolBase *CreateTool(int toolid,
const wxString& label,
const wxBitmap& bitmap1,
const wxBitmap& bitmap2,
wxItemKind kind,
wxObject *clientData,
const wxString& shortHelpString,
const wxString& longHelpString);
virtual wxToolBarToolBase *CreateTool(wxControl *control,
const wxString& label);
wxSize m_bestSize;
wxFrame *m_owningFrame;
wxToolBarTool *m_mouseDownTool;
};
#endif // wxUSE_TOOLBAR
#endif // __WX_COCOA_TOOLBAR_H__