- 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)
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}
{
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*?)
// 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
{
bool m_altDown;
bool m_metaDown;
+ int m_clickCount;
+
int m_wheelAxis;
int m_wheelRotation;
int m_wheelDelta;
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_leftDown = false;
- m_rightDown = false;
m_middleDown = false;
+ m_rightDown = false;
m_aux1Down = false;
m_aux2Down = false;
- m_x = 0;
- m_y = 0;
+
+ m_controlDown = false;
+ m_shiftDown = false;
+ m_altDown = false;
+ m_metaDown = false;
+
+ m_clickCount = -1;
+
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_clickCount = clickCount;
wxevent.SetTimestamp( cEvent.GetTicks() ) ;
// a control click is interpreted as a right click