projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add wxCALL_FOR_EACH() macro.
[wxWidgets.git]
/
src
/
osx
/
checkbox_osx.cpp
diff --git
a/src/osx/checkbox_osx.cpp
b/src/osx/checkbox_osx.cpp
index 1c4142f17d0f338d35546508c9415fca29a9ef97..e45c547eabb633ef3f5ea8758a4357cfba1d3970 100644
(file)
--- a/
src/osx/checkbox_osx.cpp
+++ b/
src/osx/checkbox_osx.cpp
@@
-1,5
+1,5
@@
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// Name: src/osx/c
arbon/checkbo
x.cpp
+// Name: src/osx/c
heckbox_os
x.cpp
// Purpose: wxCheckBox
// Author: Stefan Csomor
// Modified by:
// Purpose: wxCheckBox
// Author: Stefan Csomor
// Modified by:
@@
-27,9
+27,9
@@
bool wxCheckBox::Create(wxWindow *parent,
long style,
const wxValidator& validator,
const wxString& name)
long style,
const wxValidator& validator,
const wxString& name)
-{
-
m_macIsUserPane = false
;
-
+{
+
DontCreatePeer()
;
+
if ( !wxCheckBoxBase::Create(parent, id, pos, size, style, validator, name) )
return false;
if ( !wxCheckBoxBase::Create(parent, id, pos, size, style, validator, name) )
return false;
@@
-89,7
+89,7
@@
bool wxCheckBox::OSXHandleClicked( double WXUNUSED(timestampsec) )
{
wxCheckBoxState origState ;
{
wxCheckBoxState origState ;
-
newState =
origState = Get3StateValue();
+ origState = Get3StateValue();
switch (origState)
{
switch (origState)
{
@@
-110,14
+110,24
@@
bool wxCheckBox::OSXHandleClicked( double WXUNUSED(timestampsec) )
default:
break;
}
default:
break;
}
+
if (newState == origState)
sendEvent = false;
if (newState == origState)
sendEvent = false;
+ else
+ Set3StateValue( newState );
}
}
-
+ else
+ {
+ // in case we cannot avoid this user state change natively (eg cocoa) we intercept it here
+ if ( newState == wxCHK_UNDETERMINED && !Is3rdStateAllowedForUser() )
+ {
+ newState = wxCHK_CHECKED;
+ Set3StateValue( newState );
+ }
+ }
+
if (sendEvent)
{
if (sendEvent)
{
- Set3StateValue( newState );
-
wxCommandEvent event( wxEVT_COMMAND_CHECKBOX_CLICKED, m_windowId );
event.SetInt( newState );
event.SetEventObject( this );
wxCommandEvent event( wxEVT_COMMAND_CHECKBOX_CLICKED, m_windowId );
event.SetInt( newState );
event.SetEventObject( this );