wxRadioBox now generates the EVT_FOCUS_SET/KILL events (tests for this added
to the controls sample) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7196 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -43,24 +43,37 @@ extern const char *wxRadioBoxNameStr;
|
|||||||
class wxRadioBox: public wxControl
|
class wxRadioBox: public wxControl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxRadioBox();
|
wxRadioBox() { Init(); }
|
||||||
inline wxRadioBox( wxWindow *parent, wxWindowID id, const wxString& title,
|
wxRadioBox(wxWindow *parent,
|
||||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
wxWindowID id,
|
||||||
int n = 0, const wxString choices[] = (const wxString *) NULL,
|
const wxString& title,
|
||||||
int majorDim = 1, long style = wxRA_HORIZONTAL,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxValidator& val = wxDefaultValidator,
|
const wxSize& size = wxDefaultSize,
|
||||||
const wxString& name = wxRadioBoxNameStr )
|
int n = 0,
|
||||||
|
const wxString choices[] = (const wxString *) NULL,
|
||||||
|
int majorDim = 1,
|
||||||
|
long style = wxRA_HORIZONTAL,
|
||||||
|
const wxValidator& val = wxDefaultValidator,
|
||||||
|
const wxString& name = wxRadioBoxNameStr)
|
||||||
{
|
{
|
||||||
Create( parent, id, title, pos, size, n, choices, majorDim, style, val, name );
|
Init();
|
||||||
|
|
||||||
|
Create( parent, id, title, pos, size, n, choices, majorDim, style, val, name );
|
||||||
}
|
}
|
||||||
~wxRadioBox(void);
|
|
||||||
bool Create( wxWindow *parent, wxWindowID id, const wxString& title,
|
~wxRadioBox();
|
||||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
bool Create(wxWindow *parent,
|
||||||
int n = 0, const wxString choices[] = (const wxString *) NULL,
|
wxWindowID id,
|
||||||
int majorDim = 0, long style = wxRA_HORIZONTAL,
|
const wxString& title,
|
||||||
const wxValidator& val = wxDefaultValidator,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxString& name = wxRadioBoxNameStr );
|
const wxSize& size = wxDefaultSize,
|
||||||
|
int n = 0,
|
||||||
|
const wxString choices[] = (const wxString *) NULL,
|
||||||
|
int majorDim = 0,
|
||||||
|
long style = wxRA_HORIZONTAL,
|
||||||
|
const wxValidator& val = wxDefaultValidator,
|
||||||
|
const wxString& name = wxRadioBoxNameStr);
|
||||||
|
|
||||||
int FindString( const wxString& s) const;
|
int FindString( const wxString& s) const;
|
||||||
void SetSelection( int n );
|
void SetSelection( int n );
|
||||||
int GetSelection() const;
|
int GetSelection() const;
|
||||||
@@ -100,12 +113,20 @@ public:
|
|||||||
void ApplyToolTip( GtkTooltips *tips, const wxChar *tip );
|
void ApplyToolTip( GtkTooltips *tips, const wxChar *tip );
|
||||||
#endif // wxUSE_TOOLTIPS
|
#endif // wxUSE_TOOLTIPS
|
||||||
wxSize LayoutItems();
|
wxSize LayoutItems();
|
||||||
void DoSetSize( int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO );
|
|
||||||
|
virtual void DoSetSize( int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO );
|
||||||
|
virtual void OnInternalIdle();
|
||||||
|
|
||||||
bool m_alreadySent;
|
bool m_alreadySent;
|
||||||
|
bool m_hasFocus,
|
||||||
|
m_lostFocus;
|
||||||
int m_majorDim;
|
int m_majorDim;
|
||||||
wxList m_boxes;
|
wxList m_boxes;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// common part of all ctors
|
||||||
|
void Init();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_DYNAMIC_CLASS(wxRadioBox)
|
DECLARE_DYNAMIC_CLASS(wxRadioBox)
|
||||||
};
|
};
|
||||||
|
@@ -43,24 +43,37 @@ extern const char *wxRadioBoxNameStr;
|
|||||||
class wxRadioBox: public wxControl
|
class wxRadioBox: public wxControl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxRadioBox();
|
wxRadioBox() { Init(); }
|
||||||
inline wxRadioBox( wxWindow *parent, wxWindowID id, const wxString& title,
|
wxRadioBox(wxWindow *parent,
|
||||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
wxWindowID id,
|
||||||
int n = 0, const wxString choices[] = (const wxString *) NULL,
|
const wxString& title,
|
||||||
int majorDim = 1, long style = wxRA_HORIZONTAL,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxValidator& val = wxDefaultValidator,
|
const wxSize& size = wxDefaultSize,
|
||||||
const wxString& name = wxRadioBoxNameStr )
|
int n = 0,
|
||||||
|
const wxString choices[] = (const wxString *) NULL,
|
||||||
|
int majorDim = 1,
|
||||||
|
long style = wxRA_HORIZONTAL,
|
||||||
|
const wxValidator& val = wxDefaultValidator,
|
||||||
|
const wxString& name = wxRadioBoxNameStr)
|
||||||
{
|
{
|
||||||
Create( parent, id, title, pos, size, n, choices, majorDim, style, val, name );
|
Init();
|
||||||
|
|
||||||
|
Create( parent, id, title, pos, size, n, choices, majorDim, style, val, name );
|
||||||
}
|
}
|
||||||
~wxRadioBox(void);
|
|
||||||
bool Create( wxWindow *parent, wxWindowID id, const wxString& title,
|
~wxRadioBox();
|
||||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
bool Create(wxWindow *parent,
|
||||||
int n = 0, const wxString choices[] = (const wxString *) NULL,
|
wxWindowID id,
|
||||||
int majorDim = 0, long style = wxRA_HORIZONTAL,
|
const wxString& title,
|
||||||
const wxValidator& val = wxDefaultValidator,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxString& name = wxRadioBoxNameStr );
|
const wxSize& size = wxDefaultSize,
|
||||||
|
int n = 0,
|
||||||
|
const wxString choices[] = (const wxString *) NULL,
|
||||||
|
int majorDim = 0,
|
||||||
|
long style = wxRA_HORIZONTAL,
|
||||||
|
const wxValidator& val = wxDefaultValidator,
|
||||||
|
const wxString& name = wxRadioBoxNameStr);
|
||||||
|
|
||||||
int FindString( const wxString& s) const;
|
int FindString( const wxString& s) const;
|
||||||
void SetSelection( int n );
|
void SetSelection( int n );
|
||||||
int GetSelection() const;
|
int GetSelection() const;
|
||||||
@@ -100,12 +113,20 @@ public:
|
|||||||
void ApplyToolTip( GtkTooltips *tips, const wxChar *tip );
|
void ApplyToolTip( GtkTooltips *tips, const wxChar *tip );
|
||||||
#endif // wxUSE_TOOLTIPS
|
#endif // wxUSE_TOOLTIPS
|
||||||
wxSize LayoutItems();
|
wxSize LayoutItems();
|
||||||
void DoSetSize( int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO );
|
|
||||||
|
virtual void DoSetSize( int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO );
|
||||||
|
virtual void OnInternalIdle();
|
||||||
|
|
||||||
bool m_alreadySent;
|
bool m_alreadySent;
|
||||||
|
bool m_hasFocus,
|
||||||
|
m_lostFocus;
|
||||||
int m_majorDim;
|
int m_majorDim;
|
||||||
wxList m_boxes;
|
wxList m_boxes;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// common part of all ctors
|
||||||
|
void Init();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_DYNAMIC_CLASS(wxRadioBox)
|
DECLARE_DYNAMIC_CLASS(wxRadioBox)
|
||||||
};
|
};
|
||||||
|
@@ -209,6 +209,42 @@ private:
|
|||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// a radiobox which handles focus set/kill (for testing)
|
||||||
|
class MyRadioBox : public wxRadioBox
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
MyRadioBox(wxWindow *parent,
|
||||||
|
wxWindowID id,
|
||||||
|
const wxString& title = wxEmptyString,
|
||||||
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
|
const wxSize& size = wxDefaultSize,
|
||||||
|
int n = 0, const wxString choices[] = NULL,
|
||||||
|
int majorDim = 1,
|
||||||
|
long style = wxRA_HORIZONTAL,
|
||||||
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
|
const wxString& name = wxComboBoxNameStr)
|
||||||
|
: wxRadioBox(parent, id, title, pos, size, n, choices, majorDim,
|
||||||
|
style, validator, name) { }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void OnFocusGot(wxFocusEvent& event)
|
||||||
|
{
|
||||||
|
wxLogMessage(_T("MyRadioBox::OnFocusGot"));
|
||||||
|
|
||||||
|
event.Skip();
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnFocusLost(wxFocusEvent& event)
|
||||||
|
{
|
||||||
|
wxLogMessage(_T("MyRadioBox::OnFocusLost"));
|
||||||
|
|
||||||
|
event.Skip();
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
|
};
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// other
|
// other
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
@@ -421,6 +457,11 @@ BEGIN_EVENT_TABLE(MyComboBox, wxComboBox)
|
|||||||
EVT_KEY_UP(MyComboBox::OnKeyUp)
|
EVT_KEY_UP(MyComboBox::OnKeyUp)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
BEGIN_EVENT_TABLE(MyRadioBox, wxRadioBox)
|
||||||
|
EVT_SET_FOCUS(MyRadioBox::OnFocusGot)
|
||||||
|
EVT_KILL_FOCUS(MyRadioBox::OnFocusLost)
|
||||||
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// implementation
|
// implementation
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
@@ -593,7 +634,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
|
|||||||
};
|
};
|
||||||
|
|
||||||
panel = new wxPanel(m_notebook);
|
panel = new wxPanel(m_notebook);
|
||||||
(void)new wxRadioBox( panel, ID_RADIOBOX, "&That", wxPoint(10,160), wxSize(-1,-1), WXSIZEOF(choices2), choices2, 1, wxRA_SPECIFY_ROWS );
|
(void)new MyRadioBox( panel, ID_RADIOBOX, "&That", wxPoint(10,160), wxSize(-1,-1), WXSIZEOF(choices2), choices2, 1, wxRA_SPECIFY_ROWS );
|
||||||
m_radio = new wxRadioBox( panel, ID_RADIOBOX, "T&his", wxPoint(10,10), wxSize(-1,-1), WXSIZEOF(choices), choices, 1, wxRA_SPECIFY_COLS );
|
m_radio = new wxRadioBox( panel, ID_RADIOBOX, "T&his", wxPoint(10,10), wxSize(-1,-1), WXSIZEOF(choices), choices, 1, wxRA_SPECIFY_COLS );
|
||||||
|
|
||||||
#if wxUSE_TOOLTIPS
|
#if wxUSE_TOOLTIPS
|
||||||
|
@@ -114,14 +114,58 @@ static gint gtk_radiobox_keypress_callback( GtkWidget *widget, GdkEventKey *gdk_
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gint gtk_radiobutton_focus_in( GtkWidget *widget,
|
||||||
|
GdkEvent *WXUNUSED(event),
|
||||||
|
wxRadioBox *win )
|
||||||
|
{
|
||||||
|
if ( win->m_lostFocus )
|
||||||
|
{
|
||||||
|
// no, we didn't really lose it
|
||||||
|
win->m_lostFocus = FALSE;
|
||||||
|
}
|
||||||
|
else if ( !win->m_hasFocus )
|
||||||
|
{
|
||||||
|
win->m_hasFocus = TRUE;
|
||||||
|
|
||||||
|
wxFocusEvent event( wxEVT_SET_FOCUS, win->GetId() );
|
||||||
|
event.SetEventObject( win );
|
||||||
|
|
||||||
|
// never stop the signal emission, it seems to break the kbd handling
|
||||||
|
// inside the radiobox
|
||||||
|
(void)win->GetEventHandler()->ProcessEvent( event );
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static gint gtk_radiobutton_focus_out( GtkWidget *widget,
|
||||||
|
GdkEvent *WXUNUSED(event),
|
||||||
|
wxRadioBox *win )
|
||||||
|
{
|
||||||
|
wxASSERT_MSG( win->m_hasFocus, _T("got focus out without any focus in?") );
|
||||||
|
|
||||||
|
// we might have lost the focus, but may be not - it may have just gone to
|
||||||
|
// another button in the same radiobox, so we'll check for it in the next
|
||||||
|
// idle iteration (leave m_hasFocus == TRUE for now)
|
||||||
|
win->m_lostFocus = TRUE;
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// wxRadioBox
|
// wxRadioBox
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxRadioBox,wxControl)
|
IMPLEMENT_DYNAMIC_CLASS(wxRadioBox,wxControl)
|
||||||
|
|
||||||
wxRadioBox::wxRadioBox()
|
void wxRadioBox::Init()
|
||||||
{
|
{
|
||||||
|
m_alreadySent = FALSE;
|
||||||
|
m_needParent = TRUE;
|
||||||
|
m_acceptsFocus = TRUE;
|
||||||
|
|
||||||
|
m_hasFocus =
|
||||||
|
m_lostFocus = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
|
bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
|
||||||
@@ -130,10 +174,6 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
|
|||||||
long style, const wxValidator& validator,
|
long style, const wxValidator& validator,
|
||||||
const wxString &name )
|
const wxString &name )
|
||||||
{
|
{
|
||||||
m_alreadySent = FALSE;
|
|
||||||
m_needParent = TRUE;
|
|
||||||
m_acceptsFocus = TRUE;
|
|
||||||
|
|
||||||
if (!PreCreation( parent, pos, size ) ||
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
!CreateBase( parent, id, pos, size, style, validator, name ))
|
!CreateBase( parent, id, pos, size, style, validator, name ))
|
||||||
{
|
{
|
||||||
@@ -175,6 +215,12 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
|
|||||||
gtk_signal_connect( GTK_OBJECT(m_radio), "clicked",
|
gtk_signal_connect( GTK_OBJECT(m_radio), "clicked",
|
||||||
GTK_SIGNAL_FUNC(gtk_radiobutton_clicked_callback), (gpointer*)this );
|
GTK_SIGNAL_FUNC(gtk_radiobutton_clicked_callback), (gpointer*)this );
|
||||||
|
|
||||||
|
gtk_signal_connect( GTK_OBJECT(m_radio), "focus_in_event",
|
||||||
|
GTK_SIGNAL_FUNC(gtk_radiobutton_focus_in), (gpointer)this );
|
||||||
|
|
||||||
|
gtk_signal_connect( GTK_OBJECT(m_radio), "focus_out_event",
|
||||||
|
GTK_SIGNAL_FUNC(gtk_radiobutton_focus_out), (gpointer)this );
|
||||||
|
|
||||||
gtk_pizza_put( GTK_PIZZA(m_parent->m_wxwindow),
|
gtk_pizza_put( GTK_PIZZA(m_parent->m_wxwindow),
|
||||||
GTK_WIDGET(m_radio),
|
GTK_WIDGET(m_radio),
|
||||||
m_x+10, m_y+10+(i*24), 10, 10 );
|
m_x+10, m_y+10+(i*24), 10, 10 );
|
||||||
@@ -665,4 +711,19 @@ bool wxRadioBox::IsOwnGtkWindow( GdkWindow *window )
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
void wxRadioBox::OnInternalIdle()
|
||||||
|
{
|
||||||
|
if ( m_lostFocus )
|
||||||
|
{
|
||||||
|
m_hasFocus = FALSE;
|
||||||
|
m_lostFocus = FALSE;
|
||||||
|
|
||||||
|
wxFocusEvent event( wxEVT_KILL_FOCUS, GetId() );
|
||||||
|
event.SetEventObject( this );
|
||||||
|
|
||||||
|
(void)GetEventHandler()->ProcessEvent( event );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_RADIOBOX
|
||||||
|
|
||||||
|
@@ -114,14 +114,58 @@ static gint gtk_radiobox_keypress_callback( GtkWidget *widget, GdkEventKey *gdk_
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gint gtk_radiobutton_focus_in( GtkWidget *widget,
|
||||||
|
GdkEvent *WXUNUSED(event),
|
||||||
|
wxRadioBox *win )
|
||||||
|
{
|
||||||
|
if ( win->m_lostFocus )
|
||||||
|
{
|
||||||
|
// no, we didn't really lose it
|
||||||
|
win->m_lostFocus = FALSE;
|
||||||
|
}
|
||||||
|
else if ( !win->m_hasFocus )
|
||||||
|
{
|
||||||
|
win->m_hasFocus = TRUE;
|
||||||
|
|
||||||
|
wxFocusEvent event( wxEVT_SET_FOCUS, win->GetId() );
|
||||||
|
event.SetEventObject( win );
|
||||||
|
|
||||||
|
// never stop the signal emission, it seems to break the kbd handling
|
||||||
|
// inside the radiobox
|
||||||
|
(void)win->GetEventHandler()->ProcessEvent( event );
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static gint gtk_radiobutton_focus_out( GtkWidget *widget,
|
||||||
|
GdkEvent *WXUNUSED(event),
|
||||||
|
wxRadioBox *win )
|
||||||
|
{
|
||||||
|
wxASSERT_MSG( win->m_hasFocus, _T("got focus out without any focus in?") );
|
||||||
|
|
||||||
|
// we might have lost the focus, but may be not - it may have just gone to
|
||||||
|
// another button in the same radiobox, so we'll check for it in the next
|
||||||
|
// idle iteration (leave m_hasFocus == TRUE for now)
|
||||||
|
win->m_lostFocus = TRUE;
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// wxRadioBox
|
// wxRadioBox
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxRadioBox,wxControl)
|
IMPLEMENT_DYNAMIC_CLASS(wxRadioBox,wxControl)
|
||||||
|
|
||||||
wxRadioBox::wxRadioBox()
|
void wxRadioBox::Init()
|
||||||
{
|
{
|
||||||
|
m_alreadySent = FALSE;
|
||||||
|
m_needParent = TRUE;
|
||||||
|
m_acceptsFocus = TRUE;
|
||||||
|
|
||||||
|
m_hasFocus =
|
||||||
|
m_lostFocus = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
|
bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
|
||||||
@@ -130,10 +174,6 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
|
|||||||
long style, const wxValidator& validator,
|
long style, const wxValidator& validator,
|
||||||
const wxString &name )
|
const wxString &name )
|
||||||
{
|
{
|
||||||
m_alreadySent = FALSE;
|
|
||||||
m_needParent = TRUE;
|
|
||||||
m_acceptsFocus = TRUE;
|
|
||||||
|
|
||||||
if (!PreCreation( parent, pos, size ) ||
|
if (!PreCreation( parent, pos, size ) ||
|
||||||
!CreateBase( parent, id, pos, size, style, validator, name ))
|
!CreateBase( parent, id, pos, size, style, validator, name ))
|
||||||
{
|
{
|
||||||
@@ -175,6 +215,12 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
|
|||||||
gtk_signal_connect( GTK_OBJECT(m_radio), "clicked",
|
gtk_signal_connect( GTK_OBJECT(m_radio), "clicked",
|
||||||
GTK_SIGNAL_FUNC(gtk_radiobutton_clicked_callback), (gpointer*)this );
|
GTK_SIGNAL_FUNC(gtk_radiobutton_clicked_callback), (gpointer*)this );
|
||||||
|
|
||||||
|
gtk_signal_connect( GTK_OBJECT(m_radio), "focus_in_event",
|
||||||
|
GTK_SIGNAL_FUNC(gtk_radiobutton_focus_in), (gpointer)this );
|
||||||
|
|
||||||
|
gtk_signal_connect( GTK_OBJECT(m_radio), "focus_out_event",
|
||||||
|
GTK_SIGNAL_FUNC(gtk_radiobutton_focus_out), (gpointer)this );
|
||||||
|
|
||||||
gtk_pizza_put( GTK_PIZZA(m_parent->m_wxwindow),
|
gtk_pizza_put( GTK_PIZZA(m_parent->m_wxwindow),
|
||||||
GTK_WIDGET(m_radio),
|
GTK_WIDGET(m_radio),
|
||||||
m_x+10, m_y+10+(i*24), 10, 10 );
|
m_x+10, m_y+10+(i*24), 10, 10 );
|
||||||
@@ -665,4 +711,19 @@ bool wxRadioBox::IsOwnGtkWindow( GdkWindow *window )
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
void wxRadioBox::OnInternalIdle()
|
||||||
|
{
|
||||||
|
if ( m_lostFocus )
|
||||||
|
{
|
||||||
|
m_hasFocus = FALSE;
|
||||||
|
m_lostFocus = FALSE;
|
||||||
|
|
||||||
|
wxFocusEvent event( wxEVT_KILL_FOCUS, GetId() );
|
||||||
|
event.SetEventObject( this );
|
||||||
|
|
||||||
|
(void)GetEventHandler()->ProcessEvent( event );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_RADIOBOX
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user