Commited FRM's stockitem patch (empty stock items).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40978 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2006-09-03 12:23:04 +00:00
parent eae0338fcb
commit ee0a94cfc2
24 changed files with 534 additions and 207 deletions

View File

@@ -15,6 +15,7 @@
#include "wx/defs.h"
#include "wx/wxchar.h"
#include "wx/string.h"
#include "wx/accel.h"
// ----------------------------------------------------------------------------
// Helper functions for stock items handling:
@@ -27,15 +28,34 @@ WXDLLEXPORT bool wxIsStockID(wxWindowID id);
// given ID
WXDLLEXPORT bool wxIsStockLabel(wxWindowID id, const wxString& label);
enum wxStockLabelQueryFlag
{
wxSTOCK_NOFLAGS = 0,
wxSTOCK_WITH_MNEMONIC = 1,
wxSTOCK_WITH_ACCELERATOR = 2
};
// Returns label that should be used for given stock UI element (e.g. "&OK"
// for wxSTOCK_OK):
// for wxSTOCK_OK); if wxSTOCK_WITH_MNEMONIC is given, the & character
// is included; if wxSTOCK_WITH_ACCELERATOR is given, the stock accelerator
// for given ID is concatenated to the label using \t as separator
WXDLLEXPORT wxString wxGetStockLabel(wxWindowID id,
bool withCodes = true,
const wxString& accelerator = wxEmptyString);
long flags = wxSTOCK_WITH_MNEMONIC);
// Returns the accelerator that should be used for given stock UI element
// (e.g. "Ctrl+x" for wxSTOCK_EXIT)
WXDLLEXPORT wxAcceleratorEntry wxGetStockAccelerator(wxWindowID id);
#ifdef __WXGTK20__
#include <gdk/gdktypes.h>
// Translates stock ID to GTK+'s stock item string indentifier:
WXDLLEXPORT const char *wxGetStockGtkID(wxWindowID id);
// Returns stock accelerator modifier and key code for the given ID
WXDLLEXPORT bool wxGetStockGtkAccelerator(const char *id, GdkModifierType *mod, guint *key);
#endif
#endif // _WX_STOCKITEM_H_