projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add doc for wxGraphicsContext.Create(), which is a lightweight context with no target...
[wxWidgets.git]
/
src
/
osx
/
radiobut_osx.cpp
diff --git
a/src/osx/radiobut_osx.cpp
b/src/osx/radiobut_osx.cpp
index f091b9e039512cd52bbc025899df006905144c1d..6c511bc8e0416292089d7fc94c3f313b45ab9692 100644
(file)
--- a/
src/osx/radiobut_osx.cpp
+++ b/
src/osx/radiobut_osx.cpp
@@
-1,10
+1,10
@@
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// Name: radiobut.cpp
+// Name:
src/osx/
radiobut.cpp
// Purpose: wxRadioButton
// Author: AUTHOR
// Modified by: JS Lair (99/11/15) adding the cyclic group notion for radiobox
// Created: ??/??/98
// Purpose: wxRadioButton
// Author: AUTHOR
// Modified by: JS Lair (99/11/15) adding the cyclic group notion for radiobox
// Created: ??/??/98
-// RCS-ID: $Id
: radiobut.cpp 54129 2008-06-11 19:30:52Z SC
$
+// RCS-ID: $Id$
// Copyright: (c) AUTHOR
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Copyright: (c) AUTHOR
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@@
-16,9
+16,6
@@
#include "wx/radiobut.h"
#include "wx/osx/private.h"
#include "wx/radiobut.h"
#include "wx/osx/private.h"
-IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl)
-
-
bool wxRadioButton::Create( wxWindow *parent,
wxWindowID id,
const wxString& label,
bool wxRadioButton::Create( wxWindow *parent,
wxWindowID id,
const wxString& label,
@@
-27,15
+24,15
@@
bool wxRadioButton::Create( wxWindow *parent,
long style,
const wxValidator& validator,
const wxString& name )
long style,
const wxValidator& validator,
const wxString& name )
-{
-
m_macIsUserPane = false
;
-
+{
+
DontCreatePeer()
;
+
if ( !wxControl::Create( parent, id, pos, size, style, validator, name ) )
return false;
m_labelOrig = m_label = label;
if ( !wxControl::Create( parent, id, pos, size, style, validator, name ) )
return false;
m_labelOrig = m_label = label;
-
m_peer = wxWidgetImpl::CreateRadioButton( this, parent, id, label, pos, size, style, GetExtraStyle()
);
+
SetPeer(wxWidgetImpl::CreateRadioButton( this, parent, id, label, pos, size, style, GetExtraStyle() )
);
MacPostControlCreate( pos, size );
MacPostControlCreate( pos, size );
@@
-77,10
+74,10
@@
wxRadioButton::~wxRadioButton()
void wxRadioButton::SetValue(bool val)
{
wxRadioButton *cycle;
void wxRadioButton::SetValue(bool val)
{
wxRadioButton *cycle;
- if (
m_peer
->GetValue() == val)
+ if (
GetPeer()
->GetValue() == val)
return;
return;
-
m_peer
->SetValue( val );
+
GetPeer()
->SetValue( val );
if (val)
{
cycle = this->NextInCycle();
if (val)
{
cycle = this->NextInCycle();
@@
-97,7
+94,7
@@
void wxRadioButton::SetValue(bool val)
bool wxRadioButton::GetValue() const
{
bool wxRadioButton::GetValue() const
{
- return
m_peer->GetValue()
;
+ return
GetPeer()->GetValue() != 0
;
}
void wxRadioButton::Command(wxCommandEvent& event)
}
void wxRadioButton::Command(wxCommandEvent& event)
@@
-106,11
+103,14
@@
void wxRadioButton::Command(wxCommandEvent& event)
ProcessCommand( event );
}
ProcessCommand( event );
}
-bool wxRadioButton::
HandleClicked( double timestampsec
)
+bool wxRadioButton::
OSXHandleClicked( double WXUNUSED(timestampsec)
)
{
{
- // if already set -> no action
- if (GetValue())
- return true;
+ if ( !GetPeer()->ButtonClickDidStateChange() )
+ {
+ // if already set -> no action
+ if (GetValue())
+ return true;
+ }
wxRadioButton *cycle;
cycle = this->NextInCycle();
wxRadioButton *cycle;
cycle = this->NextInCycle();
@@
-127,7
+127,7
@@
bool wxRadioButton::HandleClicked( double timestampsec )
SetValue( true );
SetValue( true );
- wxCommandEvent event2( wxEVT_
COMMAND_RADIOBUTTON_SELECTED
, m_windowId );
+ wxCommandEvent event2( wxEVT_
RADIOBUTTON
, m_windowId );
event2.SetEventObject( this );
event2.SetInt( true );
ProcessCommand( event2 );
event2.SetEventObject( this );
event2.SetInt( true );
ProcessCommand( event2 );
@@
-157,7
+157,7
@@
wxRadioButton *wxRadioButton::AddInCycle(wxRadioButton *cycle)
}
void wxRadioButton::RemoveFromCycle()
}
void wxRadioButton::RemoveFromCycle()
-{
+{
if ((m_cycle == NULL) || (m_cycle == this))
return;
if ((m_cycle == NULL) || (m_cycle == this))
return;