* Created a new wxObject method: wxObject::CopyObject(wxObject&)
and wxObject::Clone() uses it. * Added some CopyObject to events. * Reenable the idle loop in wxEvtHandler::ProcessThreadEvent(...) * Some correctness in wxSocket. Major bugs remaining: - it seems there is a mutex problem when it works too quickly - all threads aren't destroyed ... git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2358 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -290,7 +290,7 @@ public:
|
||||
// exists only for optimization purposes
|
||||
bool IsCommandEvent() const { return m_isCommandEvent; }
|
||||
|
||||
wxObject *Clone() const;
|
||||
void CopyObject(wxObject& object_dest) const;
|
||||
|
||||
public:
|
||||
bool m_skipped;
|
||||
@@ -366,6 +366,8 @@ public:
|
||||
void SetInt(int i) { m_commandInt = i; }
|
||||
long GetInt() const { return m_commandInt ; }
|
||||
|
||||
void CopyObject(wxObject& obj) const;
|
||||
|
||||
public:
|
||||
wxString m_commandString; // String event argument
|
||||
int m_commandInt;
|
||||
@@ -545,6 +547,8 @@ public:
|
||||
// Get Y position
|
||||
long GetY() const { return m_y; }
|
||||
|
||||
void CopyObject(wxObject& obj) const;
|
||||
|
||||
public:
|
||||
long m_x;
|
||||
long m_y;
|
||||
@@ -594,6 +598,8 @@ public:
|
||||
// Get Y position
|
||||
long GetY() const { return m_y; }
|
||||
|
||||
void CopyObject(wxObject& obj) const;
|
||||
|
||||
public:
|
||||
long m_x;
|
||||
long m_y;
|
||||
@@ -622,6 +628,8 @@ public:
|
||||
{ m_eventType = wxEVT_SIZE; m_id = id; }
|
||||
|
||||
wxSize GetSize() const { return m_size; }
|
||||
|
||||
void CopyObject(wxObject& obj) const;
|
||||
};
|
||||
|
||||
// Move event class
|
||||
@@ -643,6 +651,8 @@ public:
|
||||
{ m_eventType = wxEVT_MOVE; m_id = id; }
|
||||
|
||||
wxPoint GetPosition() const { return m_pos; }
|
||||
|
||||
void CopyObject(wxObject& obj) const;
|
||||
};
|
||||
|
||||
// Paint event class
|
||||
@@ -676,6 +686,8 @@ public:
|
||||
wxEraseEvent(int Id = 0, wxDC *dc = (wxDC *) NULL)
|
||||
{ m_eventType = wxEVT_ERASE_BACKGROUND; m_id = Id; m_dc = dc; }
|
||||
wxDC *GetDC() const { return m_dc; }
|
||||
|
||||
void CopyObject(wxObject& obj) const;
|
||||
};
|
||||
|
||||
// Focus event class
|
||||
@@ -708,6 +720,8 @@ public:
|
||||
{ m_eventType = type; m_active = active; m_id = Id; }
|
||||
bool GetActive() const { return m_active; }
|
||||
|
||||
void CopyObject(wxObject& obj) const;
|
||||
|
||||
private:
|
||||
bool m_active;
|
||||
};
|
||||
@@ -740,13 +754,14 @@ class WXDLLEXPORT wxMenuEvent : public wxEvent
|
||||
DECLARE_DYNAMIC_CLASS(wxMenuEvent)
|
||||
|
||||
public:
|
||||
wxMenuEvent(wxEventType type = wxEVT_NULL, int id = 0)
|
||||
{ m_eventType = type; m_menuId = id; }
|
||||
wxMenuEvent(wxEventType type = wxEVT_NULL, int id = 0)
|
||||
{ m_eventType = type; m_menuId = id; }
|
||||
|
||||
int GetMenuId() const { return m_menuId; }
|
||||
int GetMenuId() const { return m_menuId; }
|
||||
|
||||
void CopyObject(wxObject& obj) const;
|
||||
private:
|
||||
int m_menuId;
|
||||
int m_menuId;
|
||||
};
|
||||
|
||||
// Window close or session close event class
|
||||
@@ -797,6 +812,8 @@ public:
|
||||
bool GetForce() const { return m_force; }
|
||||
#endif
|
||||
|
||||
void CopyObject(wxObject& obj) const;
|
||||
|
||||
protected:
|
||||
bool m_loggingOff;
|
||||
bool m_veto, m_canVeto;
|
||||
@@ -822,6 +839,8 @@ public:
|
||||
void SetShow(bool show) { m_show = show; }
|
||||
bool GetShow() const { return m_show; }
|
||||
|
||||
void CopyObject(wxObject& obj) const;
|
||||
|
||||
protected:
|
||||
bool m_show;
|
||||
};
|
||||
|
Reference in New Issue
Block a user