#pragma hdrstop
#endif
+#if wxUSE_CHOICEDLG
+
#ifndef WX_PRECOMP
#include <stdio.h>
#include "wx/utils.h"
for ( int i = 0; i < n; i++ )
{
- (*choices)[i] = aChoices[i];
+ (*choices)[i] = aChoices[i];
}
return n;
return res;
}
-#ifdef WXWIN_COMPATIBILITY_2
+#if WXWIN_COMPATIBILITY_2
// Overloaded for backward compatibility
wxString wxGetSingleChoice( const wxString& message,
const wxString& caption,
return res;
}
-#ifdef WXWIN_COMPATIBILITY_2
+#if WXWIN_COMPATIBILITY_2
// Overloaded for backward compatibility
int wxGetSingleChoiceIndex( const wxString& message,
const wxString& caption,
return res;
}
-#ifdef WXWIN_COMPATIBILITY_2
+#if WXWIN_COMPATIBILITY_2
// Overloaded for backward compatibility
void *wxGetSingleChoiceData( const wxString& message,
const wxString& caption,
const wxString& message,
const wxString& caption,
int n, const wxString *choices,
- long WXUNUSED(styleDlg), // FIXME: why unused?
+ long styleDlg,
const wxPoint& pos,
long styleLbox)
{
#endif
// 4) buttons
- topsizer->Add( CreateButtonSizer( wxOK|wxCANCEL ), 0, wxCENTRE | wxALL, 10 );
+ topsizer->Add( CreateButtonSizer( styleDlg & (wxOK|wxCANCEL) ), 0, wxCENTRE | wxALL, 10 );
SetAutoLayout( TRUE );
SetSizer( topsizer );
Create(parent, message, caption, n, choices, clientData, style);
}
-#ifdef WXWIN_COMPATIBILITY_2
+#if WXWIN_COMPATIBILITY_2
wxSingleChoiceDialog::wxSingleChoiceDialog(wxWindow *parent,
const wxString& message,
{
m_selection = m_listbox->GetSelection();
m_stringSelection = m_listbox->GetStringSelection();
- // TODO!
-#ifndef __WXMOTIF__
if ( m_listbox->HasClientUntypedData() )
SetClientData(m_listbox->GetClientData(m_selection));
-#endif
EndModal(wxID_OK);
}
m_selection = m_listbox->GetSelection();
m_stringSelection = m_listbox->GetStringSelection();
- // TODO!
-#ifndef __WXMOTIF__
if ( m_listbox->HasClientUntypedData() )
SetClientData(m_listbox->GetClientData(m_selection));
-#endif
EndModal(wxID_OK);
}
bool wxMultiChoiceDialog::TransferDataFromWindow()
{
- // VZ: I hate to do it but I can't fix wxMotif right now (FIXME)
-#ifdef __WXMOTIF__
- #define IsSelected Selected
-#endif
-
m_selections.Empty();
size_t count = m_listbox->GetCount();
for ( size_t n = 0; n < count; n++ )
return TRUE;
}
+
+#endif // wxUSE_CHOICEDLG