new stock buttons API

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28967 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2004-08-30 14:42:51 +00:00
parent 598ddd96f4
commit 5f7bcb48fd
40 changed files with 497 additions and 829 deletions

View File

@@ -23,6 +23,7 @@
#include "wx/scrolwin.h"
#endif
#include "wx/stockitem.h"
#include "wx/os2/private.h"
#define BUTTON_HEIGHT_FROM_CHAR_HEIGHT(cy) (11*EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy)/10)
@@ -43,7 +44,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl)
bool wxButton::Create(
wxWindow* pParent
, wxWindowID vId
, const wxString& rsLabel
, const wxString& rsLbl
, const wxPoint& rPos
, const wxSize& rSize
, long lStyle
@@ -51,6 +52,9 @@ bool wxButton::Create(
, const wxString& rsName
)
{
wxString rsLabel(rsLbl);
if (rsLabel.empty() && wxIsStockID(vId))
rsLabel = wxGetStockLabel(vId);
wxString sLabel = ::wxPMTextToLabel(rsLabel);