projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
No changes, just silence some MSVC 11 static analyzer warnings.
[wxWidgets.git]
/
src
/
cocoa
/
checkbox.mm
diff --git
a/src/cocoa/checkbox.mm
b/src/cocoa/checkbox.mm
index dccffa0053262cfc3d605e8278179e595b970598..373a1c4b338b2378072558ae9bbb7a41b3a9c62e 100644
(file)
--- a/
src/cocoa/checkbox.mm
+++ b/
src/cocoa/checkbox.mm
@@
-6,7
+6,7
@@
// Created: 2003/03/16
// RCS-ID: $Id$
// Copyright: (c) 2003 David Elliott
// Created: 2003/03/16
// RCS-ID: $Id$
// Copyright: (c) 2003 David Elliott
-// Licence: wxWi
dget
s licence
+// Licence: wxWi
ndow
s licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
/////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
@@
-26,7
+26,6
@@
#import <AppKit/NSButton.h>
#import <Foundation/NSString.h>
#import <AppKit/NSButton.h>
#import <Foundation/NSString.h>
-IMPLEMENT_DYNAMIC_CLASS(wxCheckBox, wxControl)
BEGIN_EVENT_TABLE(wxCheckBox, wxCheckBoxBase)
END_EVENT_TABLE()
WX_IMPLEMENT_COCOA_OWNER(wxCheckBox,NSButton,NSControl,NSView)
BEGIN_EVENT_TABLE(wxCheckBox, wxCheckBoxBase)
END_EVENT_TABLE()
WX_IMPLEMENT_COCOA_OWNER(wxCheckBox,NSButton,NSControl,NSView)
@@
-47,7
+46,7
@@
bool wxCheckBox::Create(wxWindow *parent, wxWindowID winid,
[m_cocoaNSView release];
[GetNSButton() setButtonType: NSSwitchButton];
[GetNSButton() setAllowsMixedState: Is3State()];
[m_cocoaNSView release];
[GetNSButton() setButtonType: NSSwitchButton];
[GetNSButton() setAllowsMixedState: Is3State()];
-
[GetNSButton() setTitle:wxNSStringWithWxString(wxStripMenuCodes(label))]
;
+
CocoaSetLabelForObject(label, GetNSButton())
;
[GetNSControl() sizeToFit];
if(m_parent)
[GetNSControl() sizeToFit];
if(m_parent)
@@
-140,6
+139,14
@@
void wxCheckBox::Cocoa_wxNSButtonAction(void)
void wxCheckBox::SetLabel(const wxString& s)
{
wxAutoNSAutoreleasePool pool;
void wxCheckBox::SetLabel(const wxString& s)
{
wxAutoNSAutoreleasePool pool;
-
[GetNSButton() setTitle:wxNSStringWithWxString(s)]
;
+
CocoaSetLabelForObject(s, GetNSButton())
;
}
}
-#endif
+
+wxString wxCheckBox::GetLabel() const
+{
+ wxAutoNSAutoreleasePool pool;
+ return wxStringWithNSString([GetNSButton() title]);
+
+}
+
+#endif // wxUSE_CHECKBOX