25 #include <bitmaps.hlst>
37 #define WHEEL_WIDTH 25
38 #define WHEEL_RADIUS ((WHEEL_WIDTH) >> 1 )
41 #define DEF_TIMEOUT 50
53 SAL_WARN_IF( !pParent,
"vcl",
"ImplWheelWindow::ImplWheelWindow(): Parent not set!" );
61 mnMaxWidth =
static_cast<sal_uLong>( 0.4 * hypot( static_cast<double>(aSize.Width()), aSize.Height() ) );
66 BitmapEx aBmp(SV_RESID_BITMAP_SCROLLMSK);
112 aPos.AdjustX( -(aSize.Width() >> 1) );
113 aPos.AdjustY( -(aSize.Height() >> 1) );
198 nCurTime =
static_cast<sal_uInt64
>(
MAX_TIME / pow( 10., fExp ) );
210 sal_uInt64 nMult = mnRepaintTime / nCurTime;
212 if( !( mnRepaintTime % nCurTime ) )
217 double fValX =
static_cast<double>(
mnActDeltaX) * nMult;
218 double fValY =
static_cast<double>(
mnActDeltaY) * nMult;
246 double fAngle =
basegfx::rad2deg(atan2(static_cast<double>(-nDistY), nDistX));
253 if( fAngle >= 22.5 && fAngle <= 67.5 )
255 else if( fAngle >= 67.5 && fAngle <= 112.5 )
257 else if( fAngle >= 112.5 && fAngle <= 157.5 )
259 else if( fAngle >= 157.5 && fAngle <= 202.5 )
261 else if( fAngle >= 202.5 && fAngle <= 247.5 )
263 else if( fAngle >= 247.5 && fAngle <= 292.5 )
265 else if( fAngle >= 292.5 && fAngle <= 337.5 )
272 if( fAngle >= 270. || fAngle <= 90. )
279 if( fAngle >= 0. && fAngle <= 180. )
353 if ( mnActDeltaX || mnActDeltaY )
370 ImplRecalcScrollValues();
374 if ( mnTimeout != mpTimer->GetTimeout() )
375 mpTimer->SetTimeout( mnTimeout );
#define LINK(Instance, Class, Member)
Point GetPointerPosPixel()
void DrawImage(const Point &rPos, const Image &rImage, DrawImageFlags nStyle=DrawImageFlags::NONE)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool ImplCallPreNotify(NotifyEvent &rEvt)
virtual ~ImplWheelWindow() override
void ImplCreateImageList()
constexpr std::enable_if_t< std::is_floating_point_v< F > &&std::is_integral_v< I >, I > saturating_cast(F f)
constexpr double rad2deg(double v)
Size GetSizePixel() const
virtual void MouseButtonUp(const MouseEvent &rMEvt)
std::unique_ptr< Timer > mpTimer
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
void SetWindowRegionPixel()
IMPL_LINK_NOARG(ImplWheelWindow, ImplScrollHdl, Timer *, void)
SAL_DLLPRIVATE PointerStyle ImplGetMousePointer() const
void ImplSetWheelMode(WheelMode nWheelMode)
ImplSVData * ImplGetSVData()
StartAutoScrollFlags mnAutoScrollFlags
ImplWheelWindow(vcl::Window *pParent)
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
vcl::Region CreateRegion(const Color &rColor, const tools::Rectangle &rRect) const
Create region of similar colors in a given rectangle.
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
vcl::Window * GetParent() const
virtual void SetPosSizePixel(const Point &rNewPos, const Size &rNewSize)
Bitmap GetBitmap(Color aTransparentReplaceColor) const
void SetPointer(PointerStyle)
void ImplRecalcScrollValues()
#define SAL_WARN_IF(condition, area, stream)
SAL_DLLPRIVATE Point ImplFrameToOutput(const Point &rPos)
void ImplDrawWheel(vcl::RenderContext &rRenderContext)
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_BLACK
const Point & GetPosPixel() const
Size GetOutputSizePixel() const
virtual void MouseMove(const MouseEvent &rMEvt)
Point OutputToScreenPixel(const Point &rPos) const
std::vector< Image > maImgList
virtual void Command(const CommandEvent &rCEvt)
virtual void MouseMove(const MouseEvent &rMEvt) override
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
void SetTitleType(FloatWinTitleType nTitle)
void ImplSetRegion(const Bitmap &rRegionBmp)
virtual void MouseButtonUp(const MouseEvent &rMEvt) override
ImplSVWinData * mpWinData
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)