wxWidgets/include/wx/qt/menu.h
Sean D'Epagnier 35bc8f449b Improve build and widget storage
There are no longer any qt headers included in wx/qt headers.
Applications do not need to link with qt librarys anymore, only wxqt libraries.
wxWindow and derived widgets only contain one pointer to their qtwidget, no longer
  carrying both base and derived pointers in parallel as was before.
2017-11-06 02:05:40 +01:00

64 lines
1.6 KiB
C++

/////////////////////////////////////////////////////////////////////////////
// Name: wx/qt/menu.h
// Author: Peter Most, Mariano Reingart
// Copyright: (c) 2010 wxWidgets dev team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_QT_MENU_H_
#define _WX_QT_MENU_H_
class QMenu;
class QMenuBar;
class WXDLLIMPEXP_CORE wxMenu : public wxMenuBase
{
public:
wxMenu(long style = 0);
wxMenu(const wxString& title, long style = 0);
virtual QMenu *GetHandle() const;
protected:
virtual wxMenuItem *DoAppend(wxMenuItem *item);
virtual wxMenuItem *DoInsert(size_t pos, wxMenuItem *item);
virtual wxMenuItem *DoRemove(wxMenuItem *item);
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);
virtual bool Append(wxMenu *menu, const wxString& title);
virtual bool Insert(size_t pos, wxMenu *menu, const wxString& title);
virtual wxMenu *Remove(size_t pos);
virtual void EnableTop(size_t pos, bool enable);
virtual void SetMenuLabel(size_t pos, const wxString& label);
virtual wxString GetMenuLabel(size_t pos) const;
QMenuBar *GetQMenuBar() const { return m_qtMenuBar; }
virtual QWidget *GetHandle() const;
virtual void Attach(wxFrame *frame);
virtual void Detach();
private:
QMenuBar *m_qtMenuBar;
wxDECLARE_DYNAMIC_CLASS(wxMenuBar);
};
#endif // _WX_QT_MENU_H_