]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/radiobox.cpp
scope added for keyboard handler
[wxWidgets.git] / src / motif / radiobox.cpp
index 98368633fc2cb61c6c1f1701dbeaff2880ba0e54..365fe2b3360af51fdf576b29b8f9137c91eb007e 100644 (file)
@@ -9,7 +9,7 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "radiobox.h"
 #endif
 
@@ -102,7 +102,8 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
     if (label1 != "")
     {
         wxXmString text(label1);
-        (void)XtVaCreateManagedWidget( label1.c_str(),
+        m_labelWidget = (WXWidget)
+            XtVaCreateManagedWidget( label1.c_str(),
 #if wxUSE_GADGETS
                                        style & wxCOLOURED ? xmLabelWidgetClass
                                                           : xmLabelGadgetClass,
@@ -167,7 +168,6 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
     XtManageChild (radioBoxWidget);
     XtManageChild ((Widget)m_mainWidget);
 
-    SetCanAddEventHandler(TRUE);
     AttachWidget (parent, m_mainWidget, NULL, pos.x, pos.y, size.x, size.y);
 
     ChangeBackgroundColour();
@@ -377,14 +377,14 @@ void wxRadioBox::ChangeBackgroundColour()
 {
     wxWindow::ChangeBackgroundColour();
 
-    int selectPixel = wxBLACK->AllocColour(wxGetDisplay());
+    int selectPixel = wxBLACK->AllocColour(XtDisplay((Widget)m_mainWidget));
 
     int i;
     for (i = 0; i < m_noItems; i++)
     {
         WXWidget radioButton = m_radioButtons[i];
 
-        DoChangeBackgroundColour(radioButton, m_backgroundColour, TRUE);
+        wxDoChangeBackgroundColour(radioButton, m_backgroundColour, TRUE);
 
         XtVaSetValues ((Widget) radioButton,
           XmNselectColor, selectPixel,
@@ -401,7 +401,7 @@ void wxRadioBox::ChangeForegroundColour()
     {
         WXWidget radioButton = m_radioButtons[i];
 
-        DoChangeForegroundColour(radioButton, m_foregroundColour);
+        wxDoChangeForegroundColour(radioButton, m_foregroundColour);
     }
 }