git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22571
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// Define an array of process pointers used by MyFrame
class MyPipedProcess;
// Define an array of process pointers used by MyFrame
class MyPipedProcess;
-WX_DEFINE_ARRAY(MyPipedProcess *, MyProcessesArray);
+WX_DEFINE_ARRAY_NO_PTR(MyPipedProcess *, MyProcessesArray);
// Define a new frame type: this is going to be our main frame
class MyFrame : public wxFrame
// Define a new frame type: this is going to be our main frame
class MyFrame : public wxFrame
// structure describing a registry key/value
class TreeNode : public wxTreeItemData
{
// structure describing a registry key/value
class TreeNode : public wxTreeItemData
{
- WX_DEFINE_ARRAY(TreeNode *, TreeChildren);
+ WX_DEFINE_ARRAY_NO_PTR(TreeNode *, TreeChildren);
public:
RegTreeCtrl *m_pTree; // must be !NULL
TreeNode *m_pParent; // NULL only for the root node
public:
RegTreeCtrl *m_pTree; // must be !NULL
TreeNode *m_pParent; // NULL only for the root node
void RegTreeCtrl::DeleteSelected()
{
long lCurrent = GetSelection(),
void RegTreeCtrl::DeleteSelected()
{
long lCurrent = GetSelection(),
- lParent = GetParent(lCurrent);
+ lParent = GetItemParent(lCurrent);
if ( lParent == 0 ) {
wxLogError(wxT("Can't delete root key."));
if ( lParent == 0 ) {
wxLogError(wxT("Can't delete root key."));
wxYield();
// Get the data
wxYield();
// Get the data
- wxFileOutputStream sout( wxT("test.url") );
+ wxFile fileTest(wxT("test.url"));
+ wxFileOutputStream sout(fileTest);
if (!sout.Ok())
{
m_text->AppendText(_("Error: couldn't open file for output\n"));
if (!sout.Ok())
{
m_text->AppendText(_("Error: couldn't open file for output\n"));
-WX_DEFINE_ARRAY(wxThread *, wxArrayThread);
+WX_DEFINE_ARRAY_NO_PTR(wxThread *, wxArrayThread);
// Define a new application type
class MyApp : public wxApp
// Define a new application type
class MyApp : public wxApp
void OnCheckOrRadioBox(wxCommandEvent& event);
void OnCheckOrRadioBox(wxCommandEvent& event);
- void OnSpinBtn(wxCommandEvent& event);
- void OnSpinBtnUp(wxCommandEvent& event);
- void OnSpinBtnDown(wxCommandEvent& event);
- void OnSpinCtrl(wxCommandEvent& event);
+ void OnSpinBtn(wxSpinEvent& event);
+ void OnSpinBtnUp(wxSpinEvent& event);
+ void OnSpinBtnDown(wxSpinEvent& event);
+ void OnSpinCtrl(wxSpinEvent& event);
void OnUpdateUIValueButton(wxUpdateUIEvent& event);
void OnUpdateUIMinMaxButton(wxUpdateUIEvent& event);
void OnUpdateUIValueButton(wxUpdateUIEvent& event);
void OnUpdateUIMinMaxButton(wxUpdateUIEvent& event);
event.SetText( wxString::Format(_T("%d"), m_spinbtn->GetValue()));
}
event.SetText( wxString::Format(_T("%d"), m_spinbtn->GetValue()));
}
-void SpinBtnWidgetsPage::OnSpinBtn(wxCommandEvent& event)
+void SpinBtnWidgetsPage::OnSpinBtn(wxSpinEvent& event)
{
int value = event.GetInt();
{
int value = event.GetInt();
wxLogMessage(_T("Spin button value changed, now %d"), value);
}
wxLogMessage(_T("Spin button value changed, now %d"), value);
}
-void SpinBtnWidgetsPage::OnSpinBtnUp(wxCommandEvent& event)
+void SpinBtnWidgetsPage::OnSpinBtnUp(wxSpinEvent& event)
{
wxLogMessage( _T("Spin button value incremented, will be %ld (was %d)"),
event.GetInt(), m_spinbtn->GetValue() );
}
{
wxLogMessage( _T("Spin button value incremented, will be %ld (was %d)"),
event.GetInt(), m_spinbtn->GetValue() );
}
-void SpinBtnWidgetsPage::OnSpinBtnDown(wxCommandEvent& event)
+void SpinBtnWidgetsPage::OnSpinBtnDown(wxSpinEvent& event)
{
wxLogMessage( _T("Spin button value decremented, will be %ld (was %d)"),
event.GetInt(), m_spinbtn->GetValue() );
}
{
wxLogMessage( _T("Spin button value decremented, will be %ld (was %d)"),
event.GetInt(), m_spinbtn->GetValue() );
}
-void SpinBtnWidgetsPage::OnSpinCtrl(wxCommandEvent& event)
+void SpinBtnWidgetsPage::OnSpinCtrl(wxSpinEvent& event)
{
if (!m_spinctrl)
return;
{
if (!m_spinctrl)
return;
-WX_DEFINE_ARRAY(WidgetsPage *, ArrayWidgetsPage);
+WX_DEFINE_ARRAY_NO_PTR(WidgetsPage *, ArrayWidgetsPage);
// ----------------------------------------------------------------------------
// misc macros
// ----------------------------------------------------------------------------
// misc macros