git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49528
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
- Added support for drop down toolbar buttons (Tim Kosse).
- Added support for labels for toolbar controls (Vince Harron).
- Added wxMessageDialog::SetMessage() and SetExtendedMessage().
- Added support for drop down toolbar buttons (Tim Kosse).
- Added support for labels for toolbar controls (Vince Harron).
- Added wxMessageDialog::SetMessage() and SetExtendedMessage().
+- Added wxMouseEvent::GetClickCount() (Julian Scheid)
- Added wxBG_STYLE_TRANSPARENT background style (Julian Scheid)
- Added XRCSIZERITEM() macro for obtaining sizers from XRC (Brian Vanderburg II)
- New and improved wxFileCtrl (Diaa Sami and Marcin Wojdyr)
- Added wxBG_STYLE_TRANSPARENT background style (Julian Scheid)
- Added XRCSIZERITEM() macro for obtaining sizers from XRC (Brian Vanderburg II)
- New and improved wxFileCtrl (Diaa Sami and Marcin Wojdyr)
for the same events for the middle and the right buttons respectively.
for the same events for the middle and the right buttons respectively.
+\membersection{wxMouseEvent::GetClickCount}\label{wxmouseeventgetclickcount}
+
+\constfunc{int}{GetClickCount}{\void}
+
+Returns the number of mouse clicks for this event: $1$ for a simple click, $2$
+for a double-click, $3$ for a triple-click and so on.
+
+Currently this function is implemented only in wxMac and returns $-1$ for the
+other platforms (you can still distinguish simple clicks from double-clicks as
+they generate different kinds of events however).
+
+\newsince{2.9.0}
+
+
\membersection{wxMouseEvent::GetPosition}\label{wxmouseeventgetposition}
\constfunc{wxPoint}{GetPosition}{\void}
\membersection{wxMouseEvent::GetPosition}\label{wxmouseeventgetposition}
\constfunc{wxPoint}{GetPosition}{\void}
{
public:
wxMouseEvent(wxEventType mouseType = wxEVT_NULL);
{
public:
wxMouseEvent(wxEventType mouseType = wxEVT_NULL);
- wxMouseEvent(const wxMouseEvent& event) : wxEvent(event)
+ wxMouseEvent(const wxMouseEvent& event) : wxEvent(event)
{ Assign(event); }
// Was it a button event? (*doesn't* mean: is any button *down*?)
{ Assign(event); }
// Was it a button event? (*doesn't* mean: is any button *down*?)
// True if the mouse is just leaving the window
bool Leaving() const { return (m_eventType == wxEVT_LEAVE_WINDOW); }
// True if the mouse is just leaving the window
bool Leaving() const { return (m_eventType == wxEVT_LEAVE_WINDOW); }
+ // Returns the number of mouse clicks associated with this event.
+ int GetClickCount() const { return m_clickCount; }
+
+
// Find the position of the event
void GetPosition(wxCoord *xpos, wxCoord *ypos) const
{
// Find the position of the event
void GetPosition(wxCoord *xpos, wxCoord *ypos) const
{
bool m_altDown;
bool m_metaDown;
bool m_altDown;
bool m_metaDown;
int m_wheelAxis;
int m_wheelRotation;
int m_wheelDelta;
int m_wheelAxis;
int m_wheelRotation;
int m_wheelDelta;
wxMouseEvent::wxMouseEvent(wxEventType commandType)
{
m_eventType = commandType;
wxMouseEvent::wxMouseEvent(wxEventType commandType)
{
m_eventType = commandType;
- m_metaDown = false;
- m_altDown = false;
- m_controlDown = false;
- m_shiftDown = false;
+
+ m_x = 0;
+ m_y = 0;
+
m_aux1Down = false;
m_aux2Down = false;
m_aux1Down = false;
m_aux2Down = false;
+
+ m_controlDown = false;
+ m_shiftDown = false;
+ m_altDown = false;
+ m_metaDown = false;
+
+ m_clickCount = -1;
+
m_wheelRotation = 0;
m_wheelDelta = 0;
m_linesPerAction = 0;
m_wheelRotation = 0;
m_wheelDelta = 0;
m_linesPerAction = 0;
wxevent.m_controlDown = modifiers & controlKey;
wxevent.m_altDown = modifiers & optionKey;
wxevent.m_metaDown = modifiers & cmdKey;
wxevent.m_controlDown = modifiers & controlKey;
wxevent.m_altDown = modifiers & optionKey;
wxevent.m_metaDown = modifiers & cmdKey;
+ wxevent.m_clickCount = clickCount;
wxevent.SetTimestamp( cEvent.GetTicks() ) ;
// a control click is interpreted as a right click
wxevent.SetTimestamp( cEvent.GetTicks() ) ;
// a control click is interpreted as a right click