2014-08-24 01:50:11 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/qt/menu.h
|
2014-08-29 03:37:46 +00:00
|
|
|
// Author: Peter Most, Mariano Reingart
|
|
|
|
// Copyright: (c) 2010 wxWidgets dev team
|
2014-08-24 01:50:11 +00:00
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_QT_MENU_H_
|
|
|
|
#define _WX_QT_MENU_H_
|
|
|
|
|
2016-08-25 15:56:00 +00:00
|
|
|
class QMenu;
|
|
|
|
class QMenuBar;
|
2014-08-24 01:50:11 +00:00
|
|
|
|
|
|
|
class WXDLLIMPEXP_CORE wxMenu : public wxMenuBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxMenu(long style = 0);
|
|
|
|
wxMenu(const wxString& title, long style = 0);
|
|
|
|
|
|
|
|
virtual QMenu *GetHandle() const;
|
|
|
|
|
|
|
|
protected:
|
2019-01-18 13:25:27 +00:00
|
|
|
virtual wxMenuItem *DoAppend(wxMenuItem *item) wxOVERRIDE;
|
|
|
|
virtual wxMenuItem *DoInsert(size_t pos, wxMenuItem *item) wxOVERRIDE;
|
|
|
|
virtual wxMenuItem *DoRemove(wxMenuItem *item) wxOVERRIDE;
|
2014-08-24 01:50:11 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
QMenu *m_qtMenu;
|
|
|
|
|
|
|
|
wxDECLARE_DYNAMIC_CLASS(wxMenu);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class WXDLLIMPEXP_CORE wxMenuBar : public wxMenuBarBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxMenuBar();
|
|
|
|
wxMenuBar(long style);
|
|
|
|
wxMenuBar(size_t n, wxMenu *menus[], const wxString titles[], long style = 0);
|
|
|
|
|
2019-01-18 13:25:27 +00:00
|
|
|
virtual bool Append(wxMenu *menu, const wxString& title) wxOVERRIDE;
|
|
|
|
virtual bool Insert(size_t pos, wxMenu *menu, const wxString& title) wxOVERRIDE;
|
|
|
|
virtual wxMenu *Remove(size_t pos) wxOVERRIDE;
|
2014-08-24 01:50:11 +00:00
|
|
|
|
2019-01-18 13:25:27 +00:00
|
|
|
virtual void EnableTop(size_t pos, bool enable) wxOVERRIDE;
|
2018-11-21 12:58:23 +00:00
|
|
|
virtual bool IsEnabledTop(size_t pos) const wxOVERRIDE;
|
2014-08-24 01:50:11 +00:00
|
|
|
|
2019-01-18 13:25:27 +00:00
|
|
|
virtual void SetMenuLabel(size_t pos, const wxString& label) wxOVERRIDE;
|
|
|
|
virtual wxString GetMenuLabel(size_t pos) const wxOVERRIDE;
|
2014-08-24 01:50:11 +00:00
|
|
|
|
2016-08-25 15:56:00 +00:00
|
|
|
QMenuBar *GetQMenuBar() const { return m_qtMenuBar; }
|
2019-01-18 13:25:27 +00:00
|
|
|
virtual QWidget *GetHandle() const wxOVERRIDE;
|
2014-08-24 01:50:11 +00:00
|
|
|
|
2019-01-18 13:25:27 +00:00
|
|
|
virtual void Attach(wxFrame *frame) wxOVERRIDE;
|
|
|
|
virtual void Detach() wxOVERRIDE;
|
2014-08-24 01:50:11 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
QMenuBar *m_qtMenuBar;
|
|
|
|
|
|
|
|
wxDECLARE_DYNAMIC_CLASS(wxMenuBar);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _WX_QT_MENU_H_
|