projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't define __STRICT_ANSI__, we should build both with and without it.
[wxWidgets.git]
/
include
/
wx
/
gtk
/
menuitem.h
diff --git
a/include/wx/gtk/menuitem.h
b/include/wx/gtk/menuitem.h
index ce936fa4ac3f7fac2550f7519d5c97592ad8b630..c17ad03a97804da3f4510d24d368194af77b5c39 100644
(file)
--- a/
include/wx/gtk/menuitem.h
+++ b/
include/wx/gtk/menuitem.h
@@
-1,18
+1,13
@@
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
-// Name: menuitem.h
+// Name:
wx/gtk/
menuitem.h
// Purpose: wxMenuItem class
// Author: Robert Roebling
// Purpose: wxMenuItem class
// Author: Robert Roebling
-// RCS-ID: $Id$
// Copyright: (c) 1998 Robert Roebling
// Copyright: (c) 1998 Robert Roebling
-// Licence: wxWindows licen
s
e
+// Licence: wxWindows licen
c
e
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
-#ifndef __GTKMENUITEMH__
-#define __GTKMENUITEMH__
-
-#ifdef __GNUG__
-#pragma interface
-#endif
+#ifndef _WX_GTKMENUITEM_H_
+#define _WX_GTKMENUITEM_H_
#include "wx/bitmap.h"
#include "wx/bitmap.h"
@@
-20,63
+15,47
@@
// wxMenuItem
//-----------------------------------------------------------------------------
// wxMenuItem
//-----------------------------------------------------------------------------
-class wxMenuItem : public wxMenuItemBase
+class
WXDLLIMPEXP_CORE
wxMenuItem : public wxMenuItemBase
{
public:
{
public:
- wxMenuItem(wxMenu *parentMenu =
(wxMenu *)
NULL,
+ wxMenuItem(wxMenu *parentMenu = NULL,
int id = wxID_SEPARATOR,
const wxString& text = wxEmptyString,
const wxString& help = wxEmptyString,
wxItemKind kind = wxITEM_NORMAL,
int id = wxID_SEPARATOR,
const wxString& text = wxEmptyString,
const wxString& help = wxEmptyString,
wxItemKind kind = wxITEM_NORMAL,
- wxMenu *subMenu =
(wxMenu *)
NULL);
- ~wxMenuItem();
+ wxMenu *subMenu = NULL);
+
virtual
~wxMenuItem();
// implement base class virtuals
// implement base class virtuals
- virtual void Set
Text
( const wxString& str );
- virtual void Enable( bool enable =
TRUE
);
- virtual void Check( bool check =
TRUE
);
+ virtual void Set
ItemLabel
( const wxString& str );
+ virtual void Enable( bool enable =
true
);
+ virtual void Check( bool check =
true
);
virtual bool IsChecked() const;
virtual bool IsChecked() const;
- virtual void SetBitmap(const wxBitmap& bitmap)
{ m_bitmap = bitmap; }
+ virtual void SetBitmap(const wxBitmap& bitmap)
;
virtual const wxBitmap& GetBitmap() const { return m_bitmap; }
virtual const wxBitmap& GetBitmap() const { return m_bitmap; }
-#if wxUSE_ACCEL
- virtual wxAcceleratorEntry *GetAccel() const;
-#endif // wxUSE_ACCEL
-
// implementation
// implementation
- void SetMenuItem(GtkWidget *menuItem)
{ m_menuItem = menuItem; }
+ void SetMenuItem(GtkWidget *menuItem)
;
GtkWidget *GetMenuItem() const { return m_menuItem; }
GtkWidget *GetMenuItem() const { return m_menuItem; }
- GtkWidget *GetLabelWidget() const { return m_labelWidget; }
- void SetLabelWidget(GtkWidget *labelWidget) { m_labelWidget = labelWidget; }
- wxString GetFactoryPath() const;
-
- wxString GetHotKey() const { return m_hotKey; }
+ void SetGtkLabel();
+#if WXWIN_COMPATIBILITY_2_8
// compatibility only, don't use in new code
// compatibility only, don't use in new code
+ wxDEPRECATED_CONSTRUCTOR(
wxMenuItem(wxMenu *parentMenu,
int id,
const wxString& text,
const wxString& help,
bool isCheckable,
wxMenuItem(wxMenu *parentMenu,
int id,
const wxString& text,
const wxString& help,
bool isCheckable,
- wxMenu *subMenu = (wxMenu *)NULL);
+ wxMenu *subMenu = NULL)
+ );
+#endif
private:
private:
- // common part of all ctors
- void Init();
-
- // DoSetText() transforms the accel mnemonics in our label from MSW/wxWin
- // style to GTK+ and is called from ctor and SetText()
- void DoSetText(const wxString& text);
-
- wxString m_hotKey;
wxBitmap m_bitmap; // Bitmap for menuitem, if any
wxBitmap m_bitmap; // Bitmap for menuitem, if any
-
GtkWidget *m_menuItem; // GtkMenuItem
GtkWidget *m_menuItem; // GtkMenuItem
- GtkWidget* m_labelWidget; // Label widget
DECLARE_DYNAMIC_CLASS(wxMenuItem)
};
DECLARE_DYNAMIC_CLASS(wxMenuItem)
};
-
-#endif
- //__GTKMENUITEMH__
+#endif // _WX_GTKMENUITEM_H_