35 bool bUpperIn,
bool bLowerIn,
bool bUpperEnabled,
bool bLowerEnabled,
74 bool bNativeOK =
false;
142 bool bNativeOK =
false;
158 bool bUpperIn,
bool bLowerIn,
bool bUpperEnabled,
bool bLowerEnabled,
159 bool bHorz,
bool bMirrorHorz)
161 bool bNativeOK =
false;
186 ImplGetSpinbuttonValue(pWindow, rUpperRect, rLowerRect,
187 bUpperIn, bLowerIn, bUpperEnabled, bLowerEnabled,
191 bNativeOK = ImplDrawNativeSpinfield(rRenderContext, pWindow, aValue);
193 bNativeOK = ImplDrawNativeSpinbuttons(rRenderContext, aValue);
200 rUpperRect, rLowerRect,
201 bUpperIn, bLowerIn, bUpperEnabled, bLowerEnabled,
207 bool bUpperIn,
bool bLowerIn,
bool bUpperEnabled,
bool bLowerEnabled,
208 bool bHorz,
bool bMirrorHorz)
261 if (std::abs( nTempSize1-nTempSize2 ) == 1)
263 if (nTempSize1 > nTempSize2)
270 if (std::abs(nTempSize1 - nTempSize2) == 1)
272 if (nTempSize1 > nTempSize2)
341 Edit(
nType), maRepeatTimer(
"SpinField maRepeatTimer")
553 if (
pData->GetDelta() < 0)
614 bUpperEnabled, bLowerEnabled);
659 if ( !(aSize.
Height() & 0x01) )
662 bool bNativeRegionOK =
false;
691 aContentUp.
Move(-aPoint.
X(), -aPoint.
Y());
692 aContentDown.
Move(-aPoint.
X(), -aPoint.
Y());
698 rSpinUpArea = aContentUp;
699 rSpinDownArea = aContentDown;
723 bool bSubEditPositioned =
false;
739 aControlValue, aBound, aContent) &&
745 aContent.
Move(-aPoint.
X(), -aPoint.
Y());
749 bSubEditPositioned =
true;
764 if (!bSubEditPositioned)
965 pTimer->SetTimeout( GetSettings().GetMouseSettings().GetButtonRepeat() );
994 aDD.
Move(aPos.
X(), aPos.
Y());
995 aUp.
Move(aPos.
X(), aPos.
Y());
997 aDown.
Move(aPos.
X(), aPos.
Y());
999 Color aButtonTextColor;
const StyleSettings & GetStyleSettings() const
CommandEventId GetCommand() const
const CommandWheelData * GetWheelData() const
std::optional< vcl::ControlLayoutData > mxLayoutData
bool ImplCallEventListenersAndHandler(VclEventId nEvent, std::function< void()> const &callHandler)
this calls both our event listeners, and a specified handler
void SetLayoutDataParent(const Control *pParent) const
virtual bool EventNotify(NotifyEvent &rNEvt) override
virtual void Resize() override
virtual void EnableRTL(bool bEnable=true) override
void AppendLayoutData(const Control &rSubControl) const
DataChangedEventType GetType() const
AllSettingsFlags GetFlags() const
tools::Rectangle DrawButton(const tools::Rectangle &rRect, DrawButtonFlags nStyle)
void DrawSymbol(const tools::Rectangle &rRect, SymbolType eType, const Color &rColor, DrawSymbolFlags nStyle=DrawSymbolFlags::NONE)
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle)
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects.
virtual Size CalcSize(sal_Int32 nChars) const
virtual bool PreNotify(NotifyEvent &rNEvt) override
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
Edit * GetSubEdit() const
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
SAL_DLLPRIVATE bool ImplUseNativeBorder(vcl::RenderContext const &rRenderContext, WinBits nStyle) const
virtual void MouseButtonUp(const MouseEvent &rMEvt) override
void SetSubEdit(Edit *pEdit)
virtual Size CalcMinimumSizeForText(const OUString &rString) const
virtual bool IsReadOnly() const
virtual void FillLayoutData() const override
virtual void Draw(OutputDevice *pDev, const Point &rPos, SystemTextColorFlags nFlags) override
virtual void StateChanged(StateChangedType nType) override
virtual OUString GetText() const override
const vcl::KeyCode & GetKeyCode() const
bool IsEnterWindow() const
bool IsLeaveWindow() const
sal_uInt16 GetButtons() const
const Point & GetPosPixel() const
bool IsModifierChanged() const
static sal_Int32 GetButtonStartRepeat()
const KeyEvent * GetKeyEvent() const
const CommandEvent * GetCommandEvent() const
const MouseEvent * GetMouseEvent() const
NotifyEventType GetType() const
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
virtual void SetSettings(const AllSettings &rSettings)
vcl::Region GetClipRegion() const
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
bool GetNativeControlRegion(ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue, tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion) const
Query the native control's actual drawing region (including adornment)
bool DrawNativeControl(ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue, const OUString &aCaption, const Color &rBackgroundColor=COL_AUTO)
Request rendering of a particular control and/or part.
OutDevType GetOutDevType() const
const AllSettings & GetSettings() const
bool IsNativeControlSupported(ControlType nType, ControlPart nPart) const
Query the platform layer for control support.
virtual vcl::Window * GetOwnerWindow() const
Get the vcl::Window that this OutputDevice belongs to, if any.
constexpr tools::Long Y() const
constexpr tools::Long X() const
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
tools::Long AdjustWidth(tools::Long n)
constexpr tools::Long Width() const
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
SAL_DLLPRIVATE void ImplInitSpinFieldData()
virtual void StateChanged(StateChangedType nType) override
Link< SpinField &, void > maUpHdlLink
Link< SpinField &, void > maDownHdlLink
virtual FactoryFunction GetUITestFactory() const override
virtual void MouseButtonUp(const MouseEvent &rMEvt) override
virtual bool EventNotify(NotifyEvent &rNEvt) override
virtual void FillLayoutData() const override
virtual Size GetOptimalSize() const override
virtual Size CalcMinimumSizeForText(const OUString &rString) const override
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
virtual bool ShowDropDown(bool bShow)
SAL_DLLPRIVATE void SetLowerEnabled(bool bEnabled)
SAL_DLLPRIVATE bool IsLowerEnabled() const
virtual ~SpinField() override
virtual bool PreNotify(NotifyEvent &rNEvt) override
SpinField(vcl::Window *pParent, WinBits nWinStyle, WindowType nType=WindowType::SPINFIELD)
virtual void Draw(OutputDevice *pDev, const Point &rPos, SystemTextColorFlags nFlags) override
virtual void MouseMove(const MouseEvent &rMEvt) override
SAL_DLLPRIVATE void ImplCalcButtonAreas(const OutputDevice *pDev, const Size &rOutSz, tools::Rectangle &rDDArea, tools::Rectangle &rSpinUpArea, tools::Rectangle &rSpinDownArea)
virtual Size CalcSize(sal_Int32 nChars) const override
virtual Size CalcMinimumSize() const override
SAL_DLLPRIVATE bool IsUpperEnabled() const
tools::Rectangle maUpperRect
tools::Rectangle * ImplFindPartRect(const Point &rPt)
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle)
tools::Rectangle maLowerRect
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
tools::Rectangle maDropDownRect
SAL_DLLPRIVATE void SetUpperEnabled(bool bEnabled)
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects.
virtual void Resize() override
sal_Int32 GetScrollBarSize() const
const Color & GetButtonTextColor() const
sal_Int32 GetSpinSize() const
void SetTimeout(sal_uInt64 nTimeoutMs)
void SetInvokeHandler(const Link< Timer *, void > &rLink)
virtual void Start(bool bStartTimer=true) override
Schedules the task for execution.
A thin wrapper around rtl::Reference to implement the acquire and dispose semantics we want for refer...
void set(reference_type *pBody)
sal_uInt16 GetCode() const
sal_uInt16 GetModifier() const
Point OutputToScreenPixel(const Point &rPos) const
bool IsNativeWidgetEnabled() const
void SetControlForeground()
bool HasChildPathFocus(bool bSystemWindow=false) const
WindowType GetType() const
bool SupportsDoubleBuffering() const
Can the widget derived from this Window do the double-buffering via RenderContext properly?
virtual void SetSizePixel(const Size &rNewSize)
tools::Long CalcZoom(tools::Long n) const
vcl::Window * GetWindow(GetWindowType nType) const
const Color & GetControlForeground() const
void SetControlBackground()
bool GetNativeControlRegion(ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue, tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion) const
Query the native control's actual drawing region (including adornment)
Point GetLastPointerPosPixel()
void Enable(bool bEnable=true, bool bChild=true)
const Fraction & GetZoom() const
const AllSettings & GetSettings() const
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)
bool IsNativeControlSupported(ControlType nType, ControlPart nPart) const
Query the platform layer for control support.
vcl::Font GetControlFont() const
::OutputDevice const * GetOutDev() const
void SetZoom(const Fraction &rZoom)
virtual void MouseMove(const MouseEvent &rMEvt)
tools::Long GetDrawPixel(::OutputDevice const *pDev, tools::Long nPixels) const
virtual Size GetSizePixel() const
Size GetOutputSizePixel() const
Point GetPointerPosPixel()
const Color & GetControlBackground() const
void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
virtual void SetPosPixel(const Point &rNewPos)
Point ScreenToOutputPixel(const Point &rPos) const
void SetCompoundControl(bool bCompound)
SAL_DLLPRIVATE void CompatStateChanged(StateChangedType nStateChange)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
std::function< std::unique_ptr< UIObject >(vcl::Window *)> FactoryFunction
constexpr sal_uInt16 KEY_MOD2
constexpr sal_uInt16 KEY_PAGEDOWN
constexpr sal_uInt16 KEY_UP
constexpr sal_uInt16 KEY_DOWN
constexpr sal_uInt16 KEY_PAGEUP
#define LINK(Instance, Class, Member)
#define SAL_WARN_IF(condition, area, stream)
std::unique_ptr< sal_Int32[]> pData
void ImplDrawSpinButton(vcl::RenderContext &rRenderContext, vcl::Window *pWindow, const tools::Rectangle &rUpperRect, const tools::Rectangle &rLowerRect, bool bUpperIn, bool bLowerIn, bool bUpperEnabled, bool bLowerEnabled, bool bHorz, bool bMirrorHorz)
void ImplDrawUpDownButtons(vcl::RenderContext &rRenderContext, const tools::Rectangle &rUpperRect, const tools::Rectangle &rLowerRect, bool bUpperIn, bool bLowerIn, bool bUpperEnabled, bool bLowerEnabled, bool bHorz, bool bMirrorHorz)
IMPL_LINK(SpinField, ImplTimeout, Timer *, pTimer, void)
ImplSVData * ImplGetSVData()
WinBits const WB_DROPDOWN
WinBits const WB_NOBORDER