LibreOffice Module vcl (master)  1
button.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #ifndef INCLUDED_VCL_BUTTON_HXX
21 #define INCLUDED_VCL_BUTTON_HXX
22 
23 #include <tools/solar.h>
24 #include <vcl/dllapi.h>
25 #include <vcl/image.hxx>
26 #include <vcl/ctrl.hxx>
27 #include <vcl/vclenum.hxx>
28 #include <memory>
29 #include <vector>
30 
31 namespace com { namespace sun { namespace star { namespace frame { struct FeatureStateEvent; } } } }
32 template <class T> class VclPtr;
33 
34 class Color;
36 enum class DrawButtonFlags;
37 
39 {
40 private:
41  std::unique_ptr<ImplCommonButtonData> mpButtonData;
43 
45  OUString maCommand;
46 
47  Button (const Button &) = delete;
48  Button & operator= (const Button &) = delete;
49 public:
50  SAL_DLLPRIVATE DrawButtonFlags ImplGetButtonState() const;
51  SAL_DLLPRIVATE DrawButtonFlags& ImplGetButtonState();
52  SAL_DLLPRIVATE DrawTextFlags ImplGetTextStyle( WinBits nWinStyle, DrawFlags nDrawFlags );
53  SAL_DLLPRIVATE void ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos, Size& rSize,
54  sal_uLong nImageSep,
55  DrawTextFlags nTextStyle, tools::Rectangle *pSymbolRect=nullptr, bool bAddImageSep = false );
56  SAL_DLLPRIVATE void ImplSetFocusRect( const tools::Rectangle &rFocusRect );
57  SAL_DLLPRIVATE const tools::Rectangle& ImplGetFocusRect() const;
58  SAL_DLLPRIVATE void ImplSetSymbolAlign( SymbolAlign eAlign );
60  SAL_DLLPRIVATE long ImplGetSeparatorX() const;
61  SAL_DLLPRIVATE void ImplSetSeparatorX( long nX );
62 
63 protected:
64  explicit Button( WindowType nType );
65 
66 public:
67  virtual ~Button() override;
68  virtual void dispose() override;
69 
70  virtual void Click();
71 
72  void SetClickHdl( const Link<Button*,void>& rLink ) { maClickHdl = rLink; }
73  const Link<Button*,void>& GetClickHdl() const { return maClickHdl; }
74 
76  void SetCommandHandler(const OUString& aCommand);
77  OUString const & GetCommand() const { return maCommand; }
78 
79  static OUString GetStandardText( StandardButtonType eButton );
80 
81  void SetModeImage( const Image& rImage );
82  Image const & GetModeImage( ) const;
83  bool HasImage() const;
84  void SetImageAlign( ImageAlign eAlign );
85  ImageAlign GetImageAlign() const;
86 
87  bool IsSmallSymbol() const;
88  void SetSmallSymbol();
89  virtual bool set_property(const OString &rKey, const OUString &rValue) override;
90 
92  virtual void statusChanged(const css::frame::FeatureStateEvent& rEvent);
93 
94  virtual FactoryFunction GetUITestFactory() const override;
95 
96 protected:
97 
99  DECL_STATIC_LINK(Button, dispatchCommandHandler, Button*, void);
100 };
101 
103 {
104  NONE = 0x0000,
105  Toolbox = 0x0001,
106  MenuButton = 0x0002, //visual down arrow
107  SplitMenuButton = 0x0003, //visual down arrow and separator line
108 };
109 
111 {
112 public:
113  SAL_DLLPRIVATE void ImplSetDefButton( bool bSet );
114  SAL_DLLPRIVATE void ImplDrawPushButtonFrame(vcl::RenderContext& rRenderContext, tools::Rectangle& rRect, DrawButtonFlags nStyle);
115  SAL_DLLPRIVATE static bool ImplHitTestPushButton(vcl::Window const * pDev, const Point& rPos);
116  SAL_DLLPRIVATE bool ImplIsDefButton() const;
117 
118  explicit PushButton( vcl::Window* pParent, WinBits nStyle = 0 );
119 
120  virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
121  virtual void Tracking( const TrackingEvent& rTEvt ) override;
122  virtual void KeyInput( const KeyEvent& rKEvt ) override;
123  virtual void KeyUp( const KeyEvent& rKEvt ) override;
124  virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
125  virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) override;
126  virtual void Resize() override;
127  virtual void GetFocus() override;
128  virtual void LoseFocus() override;
129  virtual void StateChanged( StateChangedType nType ) override;
130  virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
131  virtual bool PreNotify( NotifyEvent& rNEvt ) override;
132 
133  void Toggle();
134 
135  void SetSymbol( SymbolType eSymbol );
136  SymbolType GetSymbol() const { return meSymbol; }
137  void SetSymbolAlign( SymbolAlign eAlign );
138 
139  void SetDropDown( PushButtonDropdownStyle nStyle );
140 
141  void SetState( TriState eState );
142  TriState GetState() const { return meState; }
143  virtual void statusChanged(const css::frame::FeatureStateEvent& rEvent) override;
144 
145  void Check( bool bCheck = true );
146  bool IsChecked() const;
147 
148  void SetPressed( bool bPressed );
149  bool IsPressed() const { return mbPressed; }
150 
151  void EndSelection();
152 
153  Size CalcMinimumSize() const;
154  virtual Size GetOptimalSize() const override;
155 
156  virtual bool set_property(const OString &rKey, const OUString &rValue) override;
157  virtual void ShowFocus(const tools::Rectangle& rRect) override;
158 
159  void setAction(bool bIsAction)
160  {
161  mbIsAction = bIsAction;
162  }
163 
164  bool isAction() const
165  {
166  return mbIsAction;
167  }
168 
169 protected:
172 
173  SAL_DLLPRIVATE void ImplInitPushButtonData();
174  SAL_DLLPRIVATE static WinBits ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nStyle );
175  SAL_DLLPRIVATE void ImplInitSettings( bool bBackground );
176  SAL_DLLPRIVATE void ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFlags,
177  const tools::Rectangle& rRect, bool bMenuBtnSep,
178  DrawButtonFlags nButtonFlags);
179  SAL_DLLPRIVATE void ImplDrawPushButton(vcl::RenderContext& rRenderContext);
181  SAL_DLLPRIVATE DrawTextFlags ImplGetTextStyle( DrawFlags nDrawFlags ) const;
182  SAL_DLLPRIVATE bool IsSymbol() const { return ( (meSymbol != SymbolType::DONTKNOW) && (meSymbol != SymbolType::IMAGE) ); }
183 
184  PushButton( const PushButton & ) = delete;
185  PushButton& operator=( const PushButton & )
186  = delete;
187 
188  SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle );
189 
191  using Window::ImplInit;
192 
193  explicit PushButton( WindowType nType );
194 
195  virtual void FillLayoutData() const override;
196  virtual const vcl::Font&
197  GetCanonicalFont( const StyleSettings& _rStyle ) const override;
198  virtual const Color&
199  GetCanonicalTextColor( const StyleSettings& _rStyle ) const override;
200 
201 private:
204  bool mbPressed;
206 };
207 
208 inline void PushButton::Check( bool bCheck )
209 {
210  SetState( bCheck ? TRISTATE_TRUE : TRISTATE_FALSE );
211 }
212 
213 inline bool PushButton::IsChecked() const
214 {
215  return (GetState() == TRISTATE_TRUE);
216 }
217 
219 {
220 protected:
221  using PushButton::ImplInit;
222 private:
223  SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle );
224 
225  OKButton (const OKButton &) = delete;
226  OKButton & operator= (const OKButton &) = delete;
227 
228 public:
229  explicit OKButton( vcl::Window* pParent, WinBits nStyle = WB_DEFBUTTON );
230 
231  virtual void Click() override;
232 };
233 
235 {
236 protected:
237  using PushButton::ImplInit;
238 private:
239  SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle );
240 
241  CancelButton (const CancelButton &) = delete;
242  CancelButton & operator= (const CancelButton &) = delete;
243 
244 public:
245  explicit CancelButton( vcl::Window* pParent, WinBits nStyle = 0 );
246 
247  virtual void Click() override;
248 };
249 
251 {
252 public:
253  explicit CloseButton(vcl::Window* pParent, WinBits nStyle = 0);
254 };
255 
257 {
258 protected:
259  using PushButton::ImplInit;
260 private:
261  SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle );
262 
263  HelpButton( const HelpButton & ) = delete;
264  HelpButton & operator= ( const HelpButton & ) = delete;
265 
266  virtual void StateChanged( StateChangedType nStateChange ) override;
267 
268 public:
269  explicit HelpButton( vcl::Window* pParent, WinBits nStyle = 0 );
270 
271  virtual void Click() override;
272 };
273 
275 {
276 private:
277  friend class VclBuilder;
278 
279  std::shared_ptr< std::vector< VclPtr< RadioButton > > > m_xGroup;
283  bool mbChecked;
287  SAL_DLLPRIVATE void ImplInitRadioButtonData();
288  SAL_DLLPRIVATE WinBits ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nStyle );
289  SAL_DLLPRIVATE void ImplInitSettings( bool bBackground );
290  SAL_DLLPRIVATE void ImplDrawRadioButtonState(vcl::RenderContext& rRenderContext);
291  SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags,
292  const Point& rPos, const Size& rSize,
293  const Size& rImageSize, tools::Rectangle& rStateRect,
294  tools::Rectangle& rMouseRect );
295  SAL_DLLPRIVATE void ImplDrawRadioButton(vcl::RenderContext& rRenderContext );
296  SAL_DLLPRIVATE void ImplUncheckAllOther( const bool bSetStyle = true);
297  SAL_DLLPRIVATE Size ImplGetRadioImageSize() const;
298  SAL_DLLPRIVATE long ImplGetImageToTextDistance() const;
299 
300  RadioButton(const RadioButton &) = delete;
301  RadioButton& operator= (const RadioButton &) = delete;
302 
303 protected:
305  using Window::ImplInit;
306  SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle );
307 
308 public:
309  SAL_DLLPRIVATE void ImplCallClick( bool bGrabFocus = false, GetFocusFlags nFocusFlags = GetFocusFlags::NONE );
310  SAL_DLLPRIVATE void ImplSetMinimumNWFSize();
311 
312 protected:
313  virtual void FillLayoutData() const override;
314  virtual const vcl::Font&
315  GetCanonicalFont( const StyleSettings& _rStyle ) const override;
316  virtual const Color&
317  GetCanonicalTextColor( const StyleSettings& _rStyle ) const override;
318 
319 public:
320  explicit RadioButton( vcl::Window* pParent, WinBits nWinStyle = 0 );
321  virtual ~RadioButton() override;
322  virtual void dispose() override;
323 
324  virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
325  virtual void Tracking( const TrackingEvent& rTEvt ) override;
326  virtual void KeyInput( const KeyEvent& rKEvt ) override;
327  virtual void KeyUp( const KeyEvent& rKEvt ) override;
328  virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
329  virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) override;
330  virtual void Resize() override;
331  virtual void GetFocus() override;
332  virtual void LoseFocus() override;
333  virtual void StateChanged( StateChangedType nType ) override;
334  virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
335  virtual bool PreNotify( NotifyEvent& rNEvt ) override;
336 
337  void Toggle();
338 
339  bool IsStateChanged() const { return mbStateChanged; }
340 
341  void EnableRadioCheck( bool bRadioCheck ) { mbRadioCheck = bRadioCheck; }
342  bool IsRadioCheckEnabled() const { return mbRadioCheck; }
343 
344  void SetModeRadioImage( const Image& rImage );
345 
346  void SetState( bool bCheck );
347  void Check( bool bCheck = true );
348  bool IsChecked() const { return mbChecked; }
349 
350  static Image GetRadioImage( const AllSettings& rSettings, DrawButtonFlags nFlags );
351 
352  Size CalcMinimumSize() const;
353  virtual Size GetOptimalSize() const override;
354 
355  void SetToggleHdl( const Link<RadioButton&,void>& rLink ) { maToggleHdl = rLink; }
356 
370  std::vector<VclPtr<RadioButton> > GetRadioButtonGroup(bool bIncludeThis = true) const;
371 
372  virtual bool set_property(const OString &rKey, const OUString &rValue) override;
373 
374  /*
375  * Group this RadioButton with another
376  */
377  void group(RadioButton &rOther);
378  virtual void ShowFocus(const tools::Rectangle& rRect) override;
379 
380  virtual FactoryFunction GetUITestFactory() const override;
381 };
382 
384 {
385 private:
392  // when mbLegacyNoTextAlign is set then the old behaviour where
393  // the WB_LEFT, WB_RIGHT & WB_CENTER affect the image placement
394  // occurs, otherwise the image ( checkbox box ) is placed
395  // to the left or right ( depending on RTL or LTR settings )
397  SAL_DLLPRIVATE void ImplInitCheckBoxData();
398  SAL_DLLPRIVATE static WinBits ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nStyle );
399  SAL_DLLPRIVATE void ImplInitSettings( bool bBackground );
400  SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags,
401  const Point& rPos, const Size& rSize,
402  const Size& rImageSize, tools::Rectangle& rStateRect,
403  tools::Rectangle& rMouseRect );
404  SAL_DLLPRIVATE void ImplDrawCheckBox(vcl::RenderContext& rRenderContext );
405  SAL_DLLPRIVATE long ImplGetImageToTextDistance() const;
406  SAL_DLLPRIVATE Size ImplGetCheckImageSize() const;
407 
408  CheckBox(const CheckBox &) = delete;
409  CheckBox& operator= (const CheckBox &) = delete;
410 
411 protected:
413  using Window::ImplInit;
414  SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle );
415  virtual void FillLayoutData() const override;
416  virtual const vcl::Font& GetCanonicalFont( const StyleSettings& _rStyle ) const override;
417  virtual const Color& GetCanonicalTextColor( const StyleSettings& _rStyle ) const override;
418 
419  virtual void ImplDrawCheckBoxState(vcl::RenderContext& rRenderContext);
420  SAL_DLLPRIVATE const tools::Rectangle& GetStateRect() const { return maStateRect; }
421  SAL_DLLPRIVATE const tools::Rectangle& GetMouseRect() const { return maMouseRect; }
422 
423 public:
424  SAL_DLLPRIVATE void ImplCheck();
425  SAL_DLLPRIVATE void ImplSetMinimumNWFSize();
426 public:
427  explicit CheckBox( vcl::Window* pParent, WinBits nStyle = 0 );
428 
429  virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
430  virtual void Tracking( const TrackingEvent& rTEvt ) override;
431  virtual void KeyInput( const KeyEvent& rKEvt ) override;
432  virtual void KeyUp( const KeyEvent& rKEvt ) override;
433  virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
434  virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) override;
435  virtual void Resize() override;
436  virtual void GetFocus() override;
437  virtual void LoseFocus() override;
438  virtual void StateChanged( StateChangedType nType ) override;
439  virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
440  virtual bool PreNotify( NotifyEvent& rNEvt ) override;
441 
442  void Toggle();
443 
444  void SetState( TriState eState );
445  TriState GetState() const { return meState; }
446 
447  void Check( bool bCheck = true );
448  bool IsChecked() const;
449 
450  void EnableTriState( bool bTriState = true );
451  bool IsTriStateEnabled() const { return mbTriState; }
452 
453  void SaveValue() { meSaveValue = GetState(); }
454  TriState GetSavedValue() const { return meSaveValue; }
455  bool IsValueChangedFromSaved() const { return meSaveValue != GetState(); }
456 
457  static Image GetCheckImage( const AllSettings& rSettings, DrawButtonFlags nFlags );
458 
459  Size CalcMinimumSize( long nMaxWidth = 0 ) const;
460  virtual Size GetOptimalSize() const override;
461 
462  void SetToggleHdl( const Link<CheckBox&,void>& rLink ) { maToggleHdl = rLink; }
463  void SetLegacyNoTextAlign( bool bVal ) { mbLegacyNoTextAlign = bVal; }
464 
465  virtual bool set_property(const OString &rKey, const OUString &rValue) override;
466  virtual void ShowFocus(const tools::Rectangle& rRect) override;
467 
468  virtual FactoryFunction GetUITestFactory() const override;
469 };
470 
471 inline void CheckBox::Check( bool bCheck )
472 {
473  SetState( bCheck ? TRISTATE_TRUE : TRISTATE_FALSE );
474 }
475 
476 inline bool CheckBox::IsChecked() const
477 {
478  return (GetState() == TRISTATE_TRUE);
479 }
480 
482 {
483 protected:
485 
486 private:
487  SAL_DLLPRIVATE void ImplInitStyle();
488 
489  ImageButton( const ImageButton & ) = delete;
490  ImageButton & operator= ( const ImageButton & ) = delete;
491 
492 public:
493  ImageButton( vcl::Window* pParent, WinBits nStyle = 0 );
494 };
495 
497 {
498  ImageRadioButton( const ImageRadioButton & ) = delete;
499  ImageRadioButton & operator= ( const ImageRadioButton & ) = delete;
500 
501 public:
502  explicit ImageRadioButton( vcl::Window* pParent );
503 };
504 
506 {
507  TriStateBox( const TriStateBox & ) = delete;
508  TriStateBox & operator= ( const TriStateBox & ) = delete;
509 
510 public:
511  explicit TriStateBox( vcl::Window* pParent, WinBits nStyle );
512 };
513 
515 {
516 protected:
517  SAL_DLLPRIVATE virtual void ImplDrawCheckBoxState(vcl::RenderContext& rRenderContext) override;
518 
519 public:
520  explicit DisclosureButton( vcl::Window* pParent );
521 
522  virtual void KeyInput( const KeyEvent& rKEvt ) override;
523 };
524 
525 #endif // INCLUDED_VCL_BUTTON_HXX
526 
527 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::shared_ptr< std::vector< VclPtr< RadioButton > > > m_xGroup
Definition: button.hxx:279
bool mbIsAction
Definition: button.hxx:205
StandardButtonType
void SaveValue()
Definition: button.hxx:453
void EnableRadioCheck(bool bRadioCheck)
Definition: button.hxx:341
TriState meState
Definition: button.hxx:203
bool mbIsActive
Definition: button.hxx:171
virtual FactoryFunction GetUITestFactory() const
Definition: window.cxx:3766
void SetClickHdl(const Link< Button *, void > &rLink)
Definition: button.hxx:72
tools::Rectangle maStateRect
Definition: button.hxx:386
ImageAlign
virtual void MouseButtonDown(const MouseEvent &rMEvt)
Definition: mouse.cxx:412
void Check(bool bCheck=true)
Definition: button.hxx:208
SymbolAlign
A thin wrapper around rtl::Reference to implement the acquire and dispose semantics we want for refer...
Definition: button.hxx:32
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
tools::Rectangle maStateRect
Definition: button.hxx:280
sal_uIntPtr sal_uLong
Link< CheckBox &, void > maToggleHdl
Definition: button.hxx:391
virtual void StateChanged(StateChangedType nStateChange) override
Definition: ctrl.cxx:260
SAL_DLLPRIVATE const tools::Rectangle & GetStateRect() const
Definition: button.hxx:420
bool IsRadioCheckEnabled() const
Definition: button.hxx:342
virtual void FillLayoutData() const
Definition: ctrl.cxx:80
bool mbRadioCheck
Definition: button.hxx:284
std::function< std::unique_ptr< UIObject >vcl::Window *)> FactoryFunction
PushButtonDropdownStyle
Definition: button.hxx:102
tools::Rectangle maMouseRect
Definition: button.hxx:387
DrawButtonFlags
Definition: decoview.hxx:78
virtual bool set_property(const OString &rKey, const OUString &rValue) override
Definition: button.cxx:542
virtual const Color & GetCanonicalTextColor(const StyleSettings &_rStyle) const
Definition: ctrl.cxx:413
void SetState(TriState eState)
Definition: button.cxx:3485
TRISTATE_TRUE
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
Definition: button.cxx:104
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle)
Definition: button.cxx:608
void setAction(bool bIsAction)
Definition: button.hxx:159
bool IsStateChanged() const
Definition: button.hxx:339
CheckBox & operator=(const CheckBox &)=delete
StateChangedType
Definition: window.hxx:309
TriState GetState() const
Definition: button.hxx:142
virtual void KeyInput(const KeyEvent &rKEvt) override
Definition: button.cxx:3195
sal_Int64 WinBits
bool mbTriState
Definition: button.hxx:390
FUNC_TYPE const nType
WinBits const WB_DEFBUTTON
SymbolType
Definition: vclenum.hxx:73
Link< RadioButton &, void > maToggleHdl
Definition: button.hxx:286
Image maImage
Definition: button.hxx:282
OUString maCommand
Command URL (like .uno:Save) in case the button should handle it.
Definition: button.hxx:45
virtual void Tracking(const TrackingEvent &rTEvt)
Definition: window.cxx:1895
Link< Button *, void > maClickHdl
Definition: button.hxx:42
bool IsChecked() const
Definition: button.hxx:348
virtual void Click()
Definition: button.cxx:120
bool isAction() const
Definition: button.hxx:164
SAL_DLLPRIVATE DrawTextFlags ImplGetTextStyle(WinBits nWinStyle, DrawFlags nDrawFlags)
Definition: button.cxx:200
SymbolType meSymbol
Definition: button.hxx:202
PushButtonDropdownStyle mnDDStyle
Definition: button.hxx:170
TriState GetState() const
Definition: button.hxx:445
PushButton & operator=(const PushButton &)=delete
RadioButton & operator=(const RadioButton &)=delete
virtual void Draw(::OutputDevice *pDev, const Point &rPos, const Size &rSize, DrawFlags nFlags)
Definition: window.cxx:1792
GetFocusFlags
Definition: window.hxx:331
bool mbLegacyNoTextAlign
Definition: button.hxx:396
virtual bool PreNotify(NotifyEvent &rNEvt)
Definition: event.cxx:51
DrawFlags
Definition: window.hxx:352
bool IsChecked() const
Definition: button.hxx:213
Control & operator=(const Control &)=delete
bool IsTriStateEnabled() const
Definition: button.hxx:451
void SetLegacyNoTextAlign(bool bVal)
Definition: button.hxx:463
std::unique_ptr< ImplCommonButtonData > mpButtonData
Definition: button.hxx:41
virtual FactoryFunction GetUITestFactory() const override
Definition: button.cxx:575
TRISTATE_FALSE
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:304
bool IsChecked() const
Definition: button.hxx:476
void SetToggleHdl(const Link< CheckBox &, void > &rLink)
Definition: button.hxx:462
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
Definition: ctrl.cxx:59
Button & operator=(const Button &)=delete
DrawTextFlags
Definition: outdev.hxx:144
TriState meState
Definition: button.hxx:388
virtual bool set_property(const OString &rKey, const OUString &rValue)
Definition: window2.cxx:1425
static SAL_DLLPRIVATE WinBits ImplInitStyle(const vcl::Window *pPrevWindow, WinBits nStyle)
Definition: button.cxx:619
void Check(bool bCheck=true)
Definition: button.hxx:471
virtual void LoseFocus()
Definition: window.cxx:1818
virtual void ShowFocus(const tools::Rectangle &rRect)
Definition: window2.cxx:49
bool IsValueChangedFromSaved() const
Definition: button.hxx:455
virtual void KeyInput(const KeyEvent &rKEvt)
Definition: window.cxx:1767
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle, SystemParentData *pSystemParentData)
Definition: window.cxx:930
virtual Size GetOptimalSize() const override
Definition: ctrl.cxx:374
virtual void StateChanged(StateChangedType nType) override
Definition: button.cxx:1395
virtual void ImplDrawCheckBoxState(vcl::RenderContext &rRenderContext)
Definition: button.cxx:2964
virtual void Resize() override
Definition: ctrl.cxx:74
WindowType
Definition: ctrl.hxx:33
virtual void GetFocus()
Definition: window.cxx:1804
bool mbStateChanged
Definition: button.hxx:285
virtual const vcl::Font & GetCanonicalFont(const StyleSettings &_rStyle) const
Definition: ctrl.cxx:408
TriState GetSavedValue() const
Definition: button.hxx:454
Definition: image.hxx:51
bool mbChecked
Definition: button.hxx:283
void SetState(TriState eState)
Definition: button.cxx:1548
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)
Definition: paint.cxx:1010
SAL_DLLPRIVATE bool IsSymbol() const
Definition: button.hxx:182
SAL_DLLPRIVATE const tools::Rectangle & GetMouseRect() const
Definition: button.hxx:421
virtual void KeyUp(const KeyEvent &rKEvt)
Definition: window.cxx:1785
OUString const & GetCommand() const
Definition: button.hxx:77
void ImplInitSettings()
Definition: ctrl.cxx:428
virtual void statusChanged(const css::frame::FeatureStateEvent &rEvent)
Sets the button state according to the FeatureStateEvent emitted by a Uno state change.
Definition: button.cxx:570
bool IsPressed() const
Definition: button.hxx:149
bool mbPressed
Definition: button.hxx:204
tools::Rectangle maMouseRect
Definition: button.hxx:281
TriState
void SetToggleHdl(const Link< RadioButton &, void > &rLink)
Definition: button.hxx:355
tuple group
TriState meSaveValue
Definition: button.hxx:389
SymbolType GetSymbol() const
Definition: button.hxx:136
virtual void DataChanged(const DataChangedEvent &rDCEvt)
Definition: event.cxx:35
const Link< Button *, void > & GetClickHdl() const
Definition: button.hxx:73