1. wxSpinButton fixed: it now sends EVT_SPIN_UP/DOWN messages (and unnecessary
old code which didn't send them anyhow removed). It also allows to veto the changes, but this feature is not portable and as such is not documented. 2. wxBitmapBuuton doesn't lose its bitmap any more 3. wxImage::ConvertToBitmap() doesn't crash if image is !Ok() but just returns wxNullBitmap. 4. wxProgressDialog looks much nicer under Windows and its estimated/elapsed/ remaining time fields actually show some non random numbers now 5. MDI client window doesn't flicker because wxMDIParentFrame doesn't position it at (0, 0) first before moving it to correct location 6. other minor fixes... git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3181 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -89,31 +89,28 @@ protected:
|
||||
// the wxSpinButton event
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxSpinEvent : public wxScrollEvent
|
||||
class WXDLLEXPORT wxSpinEvent : public wxNotifyEvent
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxSpinEvent)
|
||||
|
||||
public:
|
||||
wxSpinEvent(wxEventType commandType = wxEVT_NULL, int id = 0)
|
||||
: wxScrollEvent(commandType, id)
|
||||
: wxNotifyEvent(commandType, id)
|
||||
{
|
||||
}
|
||||
|
||||
// get the current value of the control
|
||||
int GetPosition() const { return m_commandInt; }
|
||||
void SetPosition(int pos) { m_commandInt = pos; }
|
||||
};
|
||||
|
||||
typedef void (wxEvtHandler::*wxSpinEventFunction)(wxSpinEvent&);
|
||||
|
||||
// macros for handling spin events
|
||||
#define EVT_SPIN_UP(id, func) { wxEVT_SCROLL_LINEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func }
|
||||
#define EVT_SPIN_DOWN(id, func) { wxEVT_SCROLL_LINEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func }
|
||||
#define EVT_SPIN_UP(id, func) { wxEVT_SCROLL_LINEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func },
|
||||
#define EVT_SPIN_DOWN(id, func) { wxEVT_SCROLL_LINEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func },
|
||||
|
||||
#define EVT_SPIN(id, func) \
|
||||
{ wxEVT_SCROLL_TOP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func },\
|
||||
{ wxEVT_SCROLL_BOTTOM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func },\
|
||||
{ wxEVT_SCROLL_LINEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func },\
|
||||
{ wxEVT_SCROLL_LINEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func },\
|
||||
{ wxEVT_SCROLL_PAGEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func },\
|
||||
{ wxEVT_SCROLL_PAGEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func },\
|
||||
{ wxEVT_SCROLL_THUMBTRACK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func },
|
||||
#define EVT_SPIN(id, func) { wxEVT_SCROLL_THUMBTRACK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func },
|
||||
|
||||
#endif // wxUSE_SPINBTN
|
||||
|
||||
|
Reference in New Issue
Block a user