attempts to fix the proplist crash - fruitless

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7294 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-04-27 18:03:34 +00:00
parent 071bb1283a
commit b12ce2ff6d
8 changed files with 157 additions and 118 deletions

View File

@@ -236,11 +236,14 @@ class WXDLLEXPORT wxStringFormValidator: public wxPropertyFormValidator
class WXDLLEXPORT wxPropertyFormDialog: public wxDialog
{
DECLARE_CLASS(wxPropertyFormDialog)
public:
wxPropertyFormDialog(wxPropertyFormView *v, wxWindow *parent, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = "dialogBox");
public:
wxPropertyFormDialog(wxPropertyFormView *v = NULL,
wxWindow *parent = NULL,
const wxString& title = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE,
const wxString& name = _T("dialogBox"));
void OnCloseWindow(wxCloseEvent& event);
void OnDefaultAction(wxControl *item);
@@ -249,10 +252,11 @@ class WXDLLEXPORT wxPropertyFormDialog: public wxDialog
// Extend event processing to search the view's event table
virtual bool ProcessEvent(wxEvent& event);
private:
private:
wxPropertyFormView* m_view;
DECLARE_EVENT_TABLE()
DECLARE_EVENT_TABLE()
DECLARE_CLASS(wxPropertyFormDialog)
};
/*
@@ -261,11 +265,14 @@ DECLARE_EVENT_TABLE()
class WXDLLEXPORT wxPropertyFormPanel: public wxPanel
{
DECLARE_CLASS(wxPropertyFormPanel)
public:
wxPropertyFormPanel(wxPropertyFormView *v, wxWindow *parent, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "panel"):
wxPanel(parent, -1, pos, size, style, name)
public:
wxPropertyFormPanel(wxPropertyFormView *v = NULL,
wxWindow *parent = NULL,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = _T("panel"))
: wxPanel(parent, -1, pos, size, style, name)
{
m_view = v;
}
@@ -275,8 +282,10 @@ class WXDLLEXPORT wxPropertyFormPanel: public wxPanel
// Extend event processing to search the view's event table
virtual bool ProcessEvent(wxEvent& event);
private:
private:
wxPropertyFormView* m_view;
DECLARE_CLASS(wxPropertyFormPanel)
};
/*
@@ -285,12 +294,15 @@ class WXDLLEXPORT wxPropertyFormPanel: public wxPanel
class WXDLLEXPORT wxPropertyFormFrame: public wxFrame
{
DECLARE_CLASS(wxPropertyFormFrame)
public:
wxPropertyFormFrame(wxPropertyFormView *v, wxFrame *parent, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame"):
wxFrame(parent, -1, title, pos, size, style, name)
public:
wxPropertyFormFrame(wxPropertyFormView *v = NULL,
wxFrame *parent = NULL,
const wxString& title = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = _T("frame"))
: wxFrame(parent, -1, title, pos, size, style, name)
{
m_view = v;
m_propertyPanel = NULL;
@@ -302,11 +314,12 @@ class WXDLLEXPORT wxPropertyFormFrame: public wxFrame
virtual wxPanel *OnCreatePanel(wxFrame *parent, wxPropertyFormView *v);
inline virtual wxPanel *GetPropertyPanel(void) const { return m_propertyPanel; }
private:
private:
wxPropertyFormView* m_view;
wxPanel* m_propertyPanel;
DECLARE_EVENT_TABLE()
DECLARE_EVENT_TABLE()
DECLARE_CLASS(wxPropertyFormFrame)
};
#endif

View File

@@ -191,15 +191,22 @@ private:
class WXDLLEXPORT wxPropertyTextEdit: public wxTextCtrl
{
DECLARE_CLASS(wxPropertyTextEdit)
public:
wxPropertyTextEdit(wxPropertyListView *v, wxWindow *parent, const wxWindowID id,
const wxString& value, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "text");
void OnSetFocus(void);
void OnKillFocus(void);
public:
wxPropertyTextEdit(wxPropertyListView *v = NULL,
wxWindow *parent = NULL,
const wxWindowID id = -1,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = _T("text"));
void OnSetFocus();
void OnKillFocus();
wxPropertyListView* m_view;
DECLARE_CLASS(wxPropertyTextEdit)
};
#define wxPROP_ALLOW_TEXT_EDITING 1
@@ -272,11 +279,15 @@ class WXDLLEXPORT wxPropertyListValidator: public wxPropertyValidator
class WXDLLEXPORT wxPropertyListDialog: public wxDialog
{
DECLARE_CLASS(wxPropertyListDialog)
public:
wxPropertyListDialog(wxPropertyListView *v, wxWindow *parent, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = "dialogBox");
public:
wxPropertyListDialog(wxPropertyListView *v = NULL,
wxWindow *parent = NULL,
const wxString& title = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE,
const wxString& name = _T("dialogBox"));
void OnCloseWindow(wxCloseEvent& event);
void OnDefaultAction(wxControl *item);
void OnCancel(wxCommandEvent& event);
@@ -284,10 +295,11 @@ class WXDLLEXPORT wxPropertyListDialog: public wxDialog
// Extend event processing to search the view's event table
virtual bool ProcessEvent(wxEvent& event);
private:
private:
wxPropertyListView* m_view;
DECLARE_EVENT_TABLE()
DECLARE_CLASS(wxPropertyListDialog)
DECLARE_EVENT_TABLE()
};
/*
@@ -296,12 +308,14 @@ DECLARE_EVENT_TABLE()
class WXDLLEXPORT wxPropertyListPanel: public wxPanel
{
DECLARE_CLASS(wxPropertyListPanel)
public:
wxPropertyListPanel(wxPropertyListView *v, wxWindow *parent, const wxPoint& pos = wxDefaultPosition,
public:
wxPropertyListPanel(wxPropertyListView *v = NULL,
wxWindow *parent = NULL,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0, const wxString& name = "panel"):
wxPanel(parent, -1, pos, size, style, name)
long style = 0,
const wxString& name = _T("panel"))
: wxPanel(parent, -1, pos, size, style, name)
{
m_view = v;
}
@@ -317,10 +331,11 @@ class WXDLLEXPORT wxPropertyListPanel: public wxPanel
// Call Layout()
void OnSize(wxSizeEvent& event);
private:
private:
wxPropertyListView* m_view;
DECLARE_EVENT_TABLE()
DECLARE_EVENT_TABLE()
DECLARE_CLASS(wxPropertyListPanel)
};
/*
@@ -329,12 +344,15 @@ DECLARE_EVENT_TABLE()
class WXDLLEXPORT wxPropertyListFrame: public wxFrame
{
DECLARE_CLASS(wxPropertyListFrame)
public:
wxPropertyListFrame(wxPropertyListView *v, wxFrame *parent, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame"):
wxFrame(parent, -1, title, pos, size, style, name)
public:
wxPropertyListFrame(wxPropertyListView *v = NULL,
wxFrame *parent = NULL,
const wxString& title = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = _T("frame"))
: wxFrame(parent, -1, title, pos, size, style, name)
{
m_view = v;
m_propertyPanel = NULL;
@@ -347,11 +365,12 @@ class WXDLLEXPORT wxPropertyListFrame: public wxFrame
inline virtual wxPropertyListPanel *GetPropertyPanel(void) const { return m_propertyPanel; }
inline wxPropertyListView* GetView() const { return m_view; }
private:
private:
wxPropertyListView* m_view;
wxPropertyListPanel* m_propertyPanel;
DECLARE_EVENT_TABLE()
DECLARE_EVENT_TABLE()
DECLARE_CLASS(wxPropertyListFrame)
};
/*

View File

@@ -810,7 +810,7 @@ void MyPanel::OnPageChanging( wxNotebookEvent &event )
"page change from taking place - if you select\n"
"[No] the current page will stay the third one\n",
"Control sample",
wxICON_QUESTION | wxYES_NO) != wxYES )
wxICON_QUESTION | wxYES_NO, this) != wxYES )
{
event.Veto();

View File

@@ -1071,6 +1071,8 @@ void DnDFrame::OnLeftDown(wxMouseEvent &WXUNUSED(event) )
,wxCURSOR_PENCIL, // for copy
wxCURSOR_SPRAYCAN, // for move
wxCURSOR_QUESTION_ARROW // for nothing
#elif defined(__WXGTK__)
,wxICON(mondrian)
#endif
);

View File

@@ -588,6 +588,8 @@ void MyListCtrl::OnListKeyDown(wxListEvent& event)
void MyListCtrl::OnChar(wxKeyEvent& event)
{
wxLogMessage(_T("Got char event."));
event.Skip();
}
void MyListCtrl::LogEvent(const wxListEvent& event, const wxChar *eventName)

View File

@@ -245,6 +245,9 @@ void MyFrame::OnDeletePage(wxCommandEvent& WXUNUSED(event))
{
if (m_notebook->GetPageCount() > 0)
m_notebook->DeletePage( m_notebook->GetPageCount()-1 );
// VZ: this crashes wxGTK
//m_notebook->RemovePage( m_notebook->GetPageCount()-1 );
}
void MyFrame::OnNextPage(wxCommandEvent& WXUNUSED(event))

View File

@@ -284,7 +284,7 @@ void wxPropertyFormView::OnDoubleClick(wxControl *item)
* Property form dialog box
*/
IMPLEMENT_CLASS(wxPropertyFormDialog, wxDialog)
IMPLEMENT_DYNAMIC_CLASS(wxPropertyFormDialog, wxDialog)
BEGIN_EVENT_TABLE(wxPropertyFormDialog, wxDialog)
EVT_CLOSE(wxPropertyFormDialog::OnCloseWindow)
@@ -337,7 +337,7 @@ bool wxPropertyFormDialog::ProcessEvent(wxEvent& event)
* Property form panel
*/
IMPLEMENT_CLASS(wxPropertyFormPanel, wxPanel)
IMPLEMENT_DYNAMIC_CLASS(wxPropertyFormPanel, wxPanel)
void wxPropertyFormPanel::OnDefaultAction(wxControl *item)
{
@@ -362,7 +362,7 @@ bool wxPropertyFormPanel::ProcessEvent(wxEvent& event)
* Property frame
*/
IMPLEMENT_CLASS(wxPropertyFormFrame, wxFrame)
IMPLEMENT_DYNAMIC_CLASS(wxPropertyFormFrame, wxFrame)
BEGIN_EVENT_TABLE(wxPropertyFormFrame, wxFrame)
EVT_CLOSE(wxPropertyFormFrame::OnCloseWindow)

View File

@@ -72,7 +72,7 @@ static wxBitmap *GetCrossBitmap();
// Property text edit control
// ----------------------------------------------------------------------------
IMPLEMENT_CLASS(wxPropertyTextEdit, wxTextCtrl)
IMPLEMENT_DYNAMIC_CLASS(wxPropertyTextEdit, wxTextCtrl)
wxPropertyTextEdit::wxPropertyTextEdit(wxPropertyListView *v, wxWindow *parent,
const wxWindowID id, const wxString& value,
@@ -675,7 +675,7 @@ void wxPropertyListView::OnText(wxCommandEvent& event)
// Property dialog box
// ----------------------------------------------------------------------------
IMPLEMENT_CLASS(wxPropertyListDialog, wxDialog)
IMPLEMENT_DYNAMIC_CLASS(wxPropertyListDialog, wxDialog)
BEGIN_EVENT_TABLE(wxPropertyListDialog, wxDialog)
EVT_BUTTON(wxID_CANCEL, wxPropertyListDialog::OnCancel)
@@ -735,7 +735,7 @@ bool wxPropertyListDialog::ProcessEvent(wxEvent& event)
// Property panel
// ----------------------------------------------------------------------------
IMPLEMENT_CLASS(wxPropertyListPanel, wxPanel)
IMPLEMENT_DYNAMIC_CLASS(wxPropertyListPanel, wxPanel)
BEGIN_EVENT_TABLE(wxPropertyListPanel, wxPanel)
EVT_SIZE(wxPropertyListPanel::OnSize)
@@ -771,7 +771,7 @@ void wxPropertyListPanel::OnSize(wxSizeEvent& WXUNUSED(event))
// Property frame
// ----------------------------------------------------------------------------
IMPLEMENT_CLASS(wxPropertyListFrame, wxFrame)
IMPLEMENT_DYNAMIC_CLASS(wxPropertyListFrame, wxFrame)
BEGIN_EVENT_TABLE(wxPropertyListFrame, wxFrame)
EVT_CLOSE(wxPropertyListFrame::OnCloseWindow)