36 bool bUpperIn,
bool bLowerIn,
bool bUpperEnabled,
bool bLowerEnabled,
75 bool bNativeOK =
false;
143 bool bNativeOK =
false;
159 bool bUpperIn,
bool bLowerIn,
bool bUpperEnabled,
bool bLowerEnabled,
160 bool bHorz,
bool bMirrorHorz)
162 bool bNativeOK =
false;
170 case WindowType::EDIT:
171 case WindowType::MULTILINEEDIT:
172 case WindowType::PATTERNFIELD:
173 case WindowType::METRICFIELD:
174 case WindowType::CURRENCYFIELD:
175 case WindowType::DATEFIELD:
176 case WindowType::TIMEFIELD:
177 case WindowType::SPINFIELD:
178 case WindowType::FORMATTEDFIELD:
187 ImplGetSpinbuttonValue(pWindow, rUpperRect, rLowerRect,
188 bUpperIn, bLowerIn, bUpperEnabled, bLowerEnabled,
192 bNativeOK = ImplDrawNativeSpinfield(rRenderContext, pWindow, aValue);
194 bNativeOK = ImplDrawNativeSpinbuttons(rRenderContext, aValue);
201 rUpperRect, rLowerRect,
202 bUpperIn, bLowerIn, bUpperEnabled, bLowerEnabled,
208 bool bUpperIn,
bool bLowerIn,
bool bUpperEnabled,
bool bLowerEnabled,
209 bool bHorz,
bool bMirrorHorz)
262 if (std::abs( nTempSize1-nTempSize2 ) == 1)
264 if (nTempSize1 > nTempSize2)
271 if (std::abs(nTempSize1 - nTempSize2) == 1)
273 if (nTempSize1 > nTempSize2)
633 if ( !(aSize.
Height() & 0x01) )
636 bool bNativeRegionOK =
false;
665 aContentUp.
Move(-aPoint.X(), -aPoint.Y());
666 aContentDown.
Move(-aPoint.X(), -aPoint.Y());
672 rSpinUpArea = aContentUp;
673 rSpinDownArea = aContentDown;
697 bool bSubEditPositioned =
false;
713 aControlValue, aBound, aContent) &&
719 aContent.
Move(-aPoint.X(), -aPoint.Y());
723 bSubEditPositioned =
true;
738 if (!bSubEditPositioned)
945 pTimer->SetTimeout( GetSettings().GetMouseSettings().GetButtonRepeat() );
974 aDD.
Move(aPos.X(), aPos.Y());
975 aUp.
Move(aPos.X(), aPos.Y());
977 aDown.
Move(aPos.X(), aPos.Y());
979 Color aButtonTextColor;
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
#define LINK(Instance, Class, Member)
vcl::Region GetClipRegion() const
OutDevType GetOutDevType() const
virtual void EnableRTL(bool bEnable=true) override
bool ImplCallEventListenersAndHandler(VclEventId nEvent, std::function< void()> const &callHandler)
this calls both our event listeners, and a specified handler
Point GetPointerPosPixel()
IMPL_LINK(SpinField, ImplTimeout, Timer *, pTimer, void)
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
void setWidth(tools::Long nWidth)
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)
const CommandEvent * GetCommandEvent() const
std::unique_ptr< ContentProperties > pData
Edit * GetSubEdit() const
A thin wrapper around rtl::Reference to implement the acquire and dispose semantics we want for refer...
virtual Size GetOptimalSize() const override
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)
virtual Size CalcMinimumSizeForText(const OUString &rString) const
const StyleSettings & GetStyleSettings() const
std::function< std::unique_ptr< UIObject >vcl::Window *)> FactoryFunction
virtual Size GetSizePixel() const
virtual void SetSizePixel(const Size &rNewSize)
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
virtual void MouseButtonUp(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 CompatStateChanged(StateChangedType nStateChange)
sal_uInt16 GetCode() const
DataChangedEventType GetType() const
const KeyEvent * GetKeyEvent() const
SAL_DLLPRIVATE void ImplCalcButtonAreas(OutputDevice *pDev, const Size &rOutSz, tools::Rectangle &rDDArea, tools::Rectangle &rSpinUpArea, tools::Rectangle &rSpinDownArea)
void AppendLayoutData(const Control &rSubControl) const
virtual void SetSettings(const AllSettings &rSettings)
const Color & GetControlBackground() const
const CommandWheelData * GetWheelData() const
tools::Rectangle * ImplFindPartRect(const Point &rPt)
tools::Rectangle DrawButton(const tools::Rectangle &rRect, DrawButtonFlags nStyle)
virtual void Draw(OutputDevice *pDev, const Point &rPos, DrawFlags nFlags) override
bool HasChildPathFocus(bool bSystemWindow=false) const
bool IsNativeControlSupported(ControlType nType, ControlPart nPart) const
Query the platform layer for control support.
constexpr sal_uInt16 KEY_UP
const Fraction & GetZoom() const
virtual void FillLayoutData() const override
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
void Enable(bool bEnable=true, bool bChild=true)
sal_uInt16 GetButtons() const
bool IsEnterWindow() const
tools::Rectangle maDropDownRect
tools::Rectangle maLowerRect
Link< SpinField &, void > maDownHdlLink
virtual ~SpinField() override
AllSettingsFlags GetFlags() const
constexpr sal_uInt16 KEY_PAGEUP
virtual void MouseMove(const MouseEvent &rMEvt) override
void SetCompoundControl(bool bCompound)
virtual void Draw(OutputDevice *pDev, const Point &rPos, DrawFlags nFlags) override
sal_uInt16 GetModifier() const
virtual void MouseButtonUp(const MouseEvent &rMEvt) override
virtual bool ShowDropDown(bool bShow)
virtual FactoryFunction GetUITestFactory() const override
const Color & GetControlForeground() const
SAL_DLLPRIVATE bool ImplUseNativeBorder(vcl::RenderContext const &rRenderContext, WinBits nStyle)
constexpr sal_uInt16 KEY_DOWN
ImplSVData * ImplGetSVData()
virtual bool EventNotify(NotifyEvent &rNEvt) override
virtual bool PreNotify(NotifyEvent &rNEvt)
bool IsLeaveWindow() const
bool IsNativeWidgetEnabled() const
virtual void StateChanged(StateChangedType nType) override
void SetControlBackground()
void SetControlForeground()
CommandWheelMode GetMode() const
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
virtual OUString GetText() const override
tools::Long Width() const
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
CommandEventId GetCommand() const
void SetZoom(const Fraction &rZoom)
virtual void FillLayoutData() const override
constexpr sal_uInt16 KEY_PAGEDOWN
virtual void Start() override
Activates the timer task.
MouseNotifyEvent GetType() const
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.
void SetSubEdit(Edit *pEdit)
WinBits const WB_DROPDOWN
const AllSettings & GetSettings() const
Size GetOutputSizePixel() const
tools::Long GetScrollBarSize() const
constexpr sal_uInt16 KEY_MOD2
void SetTimeout(sal_uInt64 nTimeoutMs)
Point ScreenToOutputPixel(const Point &rPos) const
virtual Size CalcSize(sal_Int32 nChars) const override
WinBits const WB_NOBORDER
vcl::Window * GetWindow(GetWindowType nType) const
SAL_DLLPRIVATE void ImplInitSpinFieldData()
Point LogicToPixel(const Point &rLogicPt) const
virtual Size CalcSize(sal_Int32 nChars) const
bool IsModifierChanged() const
const vcl::KeyCode & GetKeyCode() const
static SAL_DLLPRIVATE void ImplInvalidateOutermostBorder(vcl::Window *pWin)
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle)
virtual void Resize() override
Link< SpinField &, void > maUpHdlLink
const Color & GetButtonTextColor() const
#define SAL_WARN_IF(condition, area, stream)
SpinField(vcl::Window *pParent, WinBits nWinStyle, WindowType nType=WindowType::SPINFIELD)
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
const MouseEvent * GetMouseEvent() const
std::unique_ptr< vcl::ImplControlData > mpControlData
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
tools::Long AdjustWidth(tools::Long n)
virtual Size CalcMinimumSize() const override
tools::Long Height() const
virtual void Resize() override
tools::Long CalcZoom(tools::Long n) const
tools::Long GetDrawPixel(::OutputDevice const *pDev, tools::Long nPixels) const
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_BLACK
void SetInvokeHandler(const Link< Timer *, void > &rLink)
const Point & GetPosPixel() const
void set(reference_type *pBody)
virtual bool PreNotify(NotifyEvent &rNEvt) override
tools::Long GetSpinSize() const
WindowType GetType() const
virtual vcl::Region GetActiveClipRegion() const override
tools::Long GetDelta() const
virtual void MouseMove(const MouseEvent &rMEvt)
void DrawSymbol(const tools::Rectangle &rRect, SymbolType eType, const Color &rColor, DrawSymbolFlags nStyle=DrawSymbolFlags::NONE)
Point OutputToScreenPixel(const Point &rPos) const
virtual bool IsReadOnly() const
Point GetLastPointerPosPixel()
virtual Size CalcMinimumSizeForText(const OUString &rString) const override
vcl::Font GetControlFont() const
void Push(PushFlags nFlags=PushFlags::ALL)
bool SupportsDoubleBuffering() const
Can the widget derived from this Window do the double-buffering via RenderContext properly...
virtual void SetPosPixel(const Point &rNewPos)
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle)
tools::Rectangle maUpperRect
virtual void StateChanged(StateChangedType nType) override
void SetLayoutDataParent(const Control *pParent) const
virtual bool EventNotify(NotifyEvent &rNEvt) override
static sal_uLong GetButtonStartRepeat()
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)