More fixes for !wxUSE_TIMER, !wxUSE_IMAGE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22768 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -23,7 +23,9 @@
|
|||||||
|
|
||||||
#include "wx/region.h"
|
#include "wx/region.h"
|
||||||
#include "wx/bitmap.h"
|
#include "wx/bitmap.h"
|
||||||
|
#if wxUSE_IMAGE
|
||||||
#include "wx/image.h"
|
#include "wx/image.h"
|
||||||
|
#endif
|
||||||
#include "wx/dcmemory.h"
|
#include "wx/dcmemory.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -52,6 +54,7 @@ bool wxRegion::Union(const wxBitmap& bmp,
|
|||||||
const wxColour& transColour,
|
const wxColour& transColour,
|
||||||
int tolerance)
|
int tolerance)
|
||||||
{
|
{
|
||||||
|
#if wxUSE_IMAGE
|
||||||
unsigned char loR, loG, loB;
|
unsigned char loR, loG, loB;
|
||||||
unsigned char hiR, hiG, hiB;
|
unsigned char hiR, hiG, hiB;
|
||||||
|
|
||||||
@@ -114,6 +117,10 @@ bool wxRegion::Union(const wxBitmap& bmp,
|
|||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#else
|
||||||
|
// No wxImage support
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
@@ -311,6 +311,19 @@ wxRendererGeneric::DrawSplitterSash(wxWindow *win,
|
|||||||
offset = 3;
|
offset = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We need to erase any droppings left behind on
|
||||||
|
// the splitter background
|
||||||
|
if ( win->HasFlag(wxSP_3DBORDER) )
|
||||||
|
{
|
||||||
|
wxPen pen(win->GetBackgroundColour());
|
||||||
|
dc.SetPen(pen);
|
||||||
|
|
||||||
|
dc.DrawLine(2, 2, size.x - 2, 2);
|
||||||
|
dc.DrawLine(2, h - 2, size.x - 2, h - 2);
|
||||||
|
|
||||||
|
dc.SetPen(wxNullPen);
|
||||||
|
}
|
||||||
|
|
||||||
// from left to right
|
// from left to right
|
||||||
if ( win->HasFlag(wxSP_3D) )
|
if ( win->HasFlag(wxSP_3D) )
|
||||||
{
|
{
|
||||||
|
@@ -40,7 +40,9 @@
|
|||||||
|
|
||||||
#include "wx/scrolwin.h"
|
#include "wx/scrolwin.h"
|
||||||
#include "wx/panel.h"
|
#include "wx/panel.h"
|
||||||
|
#if wxUSE_TIMER
|
||||||
#include "wx/timer.h"
|
#include "wx/timer.h"
|
||||||
|
#endif
|
||||||
#include "wx/sizer.h"
|
#include "wx/sizer.h"
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
@@ -91,6 +93,7 @@ private:
|
|||||||
DECLARE_NO_COPY_CLASS(wxScrollHelperEvtHandler)
|
DECLARE_NO_COPY_CLASS(wxScrollHelperEvtHandler)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if wxUSE_TIMER
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxAutoScrollTimer: the timer used to generate a stream of scroll events when
|
// wxAutoScrollTimer: the timer used to generate a stream of scroll events when
|
||||||
// a captured mouse is held outside the window
|
// a captured mouse is held outside the window
|
||||||
@@ -175,6 +178,7 @@ void wxAutoScrollTimer::Notify()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxScrollHelperEvtHandler
|
// wxScrollHelperEvtHandler
|
||||||
@@ -1072,11 +1076,13 @@ bool wxScrollHelper::SendAutoScrollEvents(wxScrollWinEvent& event) const
|
|||||||
|
|
||||||
void wxScrollHelper::StopAutoScrolling()
|
void wxScrollHelper::StopAutoScrolling()
|
||||||
{
|
{
|
||||||
|
#if wxUSE_TIMER
|
||||||
if ( m_timerAutoScroll )
|
if ( m_timerAutoScroll )
|
||||||
{
|
{
|
||||||
delete m_timerAutoScroll;
|
delete m_timerAutoScroll;
|
||||||
m_timerAutoScroll = (wxTimer *)NULL;
|
m_timerAutoScroll = (wxTimer *)NULL;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxScrollHelper::HandleOnMouseEnter(wxMouseEvent& event)
|
void wxScrollHelper::HandleOnMouseEnter(wxMouseEvent& event)
|
||||||
@@ -1138,6 +1144,7 @@ void wxScrollHelper::HandleOnMouseLeave(wxMouseEvent& event)
|
|||||||
if ( !m_targetWindow->HasScrollbar(orient) )
|
if ( !m_targetWindow->HasScrollbar(orient) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
#if wxUSE_TIMER
|
||||||
delete m_timerAutoScroll;
|
delete m_timerAutoScroll;
|
||||||
m_timerAutoScroll = new wxAutoScrollTimer
|
m_timerAutoScroll = new wxAutoScrollTimer
|
||||||
(
|
(
|
||||||
@@ -1148,6 +1155,7 @@ void wxScrollHelper::HandleOnMouseLeave(wxMouseEvent& event)
|
|||||||
orient
|
orient
|
||||||
);
|
);
|
||||||
m_timerAutoScroll->Start(50); // FIXME: make configurable
|
m_timerAutoScroll->Start(50); // FIXME: make configurable
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user