2014-08-23 21:50:11 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/qt/toolbar.h
|
2014-08-28 23:37:46 -04:00
|
|
|
// Author: Sean D'Epagnier, Mariano Reingart
|
|
|
|
// Copyright: (c) 2010 wxWidgets dev team
|
2014-08-23 21:50:11 -04:00
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2016-08-25 11:56:00 -04:00
|
|
|
class QToolBar;
|
2014-08-23 21:50:11 -04:00
|
|
|
|
|
|
|
#ifndef _WX_QT_TOOLBAR_H_
|
|
|
|
#define _WX_QT_TOOLBAR_H_
|
|
|
|
|
2015-10-25 13:00:05 -04:00
|
|
|
class QActionGroup;
|
2014-08-23 21:50:11 -04:00
|
|
|
class wxQtToolBar;
|
|
|
|
|
|
|
|
class WXDLLIMPEXP_CORE wxToolBar : public wxToolBarBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
wxToolBar() { Init(); }
|
|
|
|
wxToolBar(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
2014-11-07 09:59:33 -05:00
|
|
|
long style = wxTB_DEFAULT_STYLE | wxNO_BORDER,
|
2014-08-23 21:50:11 -04:00
|
|
|
const wxString& name = wxToolBarNameStr)
|
|
|
|
{
|
|
|
|
Init();
|
|
|
|
|
|
|
|
Create(parent, id, pos, size, style, name);
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual ~wxToolBar();
|
|
|
|
|
|
|
|
bool Create(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
2014-11-07 09:59:33 -05:00
|
|
|
long style = wxTB_DEFAULT_STYLE | wxNO_BORDER,
|
2014-08-23 21:50:11 -04:00
|
|
|
const wxString& name = wxToolBarNameStr);
|
|
|
|
|
2017-11-05 16:56:57 -05:00
|
|
|
virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const wxOVERRIDE;
|
2016-08-25 11:56:00 -04:00
|
|
|
virtual QToolBar *GetQToolBar() const { return m_qtToolBar; }
|
2014-08-23 21:50:11 -04:00
|
|
|
|
2017-11-05 16:56:57 -05:00
|
|
|
virtual void SetWindowStyleFlag( long style ) wxOVERRIDE;
|
2014-08-23 21:50:11 -04:00
|
|
|
virtual bool Realize() wxOVERRIDE;
|
|
|
|
|
|
|
|
virtual wxToolBarToolBase *CreateTool(int toolid,
|
|
|
|
const wxString& label,
|
|
|
|
const wxBitmap& bmpNormal,
|
|
|
|
const wxBitmap& bmpDisabled,
|
|
|
|
wxItemKind kind,
|
|
|
|
wxObject *clientData,
|
|
|
|
const wxString& shortHelp,
|
2017-11-05 16:56:57 -05:00
|
|
|
const wxString& longHelp) wxOVERRIDE;
|
2014-08-23 21:50:11 -04:00
|
|
|
|
|
|
|
virtual wxToolBarToolBase *CreateTool(wxControl *control,
|
2017-11-05 16:56:57 -05:00
|
|
|
const wxString& label) wxOVERRIDE;
|
|
|
|
QWidget *GetHandle() const wxOVERRIDE;
|
|
|
|
|
2014-08-23 21:50:11 -04:00
|
|
|
protected:
|
|
|
|
|
|
|
|
QActionGroup* GetActionGroup(size_t pos);
|
2017-11-05 16:56:57 -05:00
|
|
|
virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool) wxOVERRIDE;
|
|
|
|
virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool) wxOVERRIDE;
|
|
|
|
virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable) wxOVERRIDE;
|
|
|
|
virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle) wxOVERRIDE;
|
|
|
|
virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle) wxOVERRIDE;
|
2014-08-23 21:50:11 -04:00
|
|
|
|
|
|
|
private:
|
2017-07-14 10:40:09 -04:00
|
|
|
void Init();
|
|
|
|
|
2016-08-25 11:56:00 -04:00
|
|
|
long GetButtonStyle();
|
2014-08-23 21:50:11 -04:00
|
|
|
|
|
|
|
QToolBar *m_qtToolBar;
|
|
|
|
|
2015-04-23 07:49:01 -04:00
|
|
|
wxDECLARE_DYNAMIC_CLASS(wxToolBar);
|
2014-08-23 21:50:11 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _WX_QT_TOOLBAR_H_
|