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::sun::star::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 DrawTextFlags ImplGetTextStyle( WinBits nWinStyle, DrawFlags nDrawFlags );
51  SAL_DLLPRIVATE void ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos, Size& rSize,
52  sal_uLong nImageSep,
53  DrawTextFlags nTextStyle, tools::Rectangle *pSymbolRect=nullptr, bool bAddImageSep = false );
54  SAL_DLLPRIVATE void ImplSetFocusRect( const tools::Rectangle &rFocusRect );
55  SAL_DLLPRIVATE const tools::Rectangle& ImplGetFocusRect() const;
56  SAL_DLLPRIVATE void ImplSetSymbolAlign( SymbolAlign eAlign );
58  SAL_DLLPRIVATE long ImplGetSeparatorX() const;
59  SAL_DLLPRIVATE void ImplSetSeparatorX( long nX );
60 
61 protected:
62  explicit Button( WindowType nType );
63 
64 public:
65  virtual ~Button() override;
66  virtual void dispose() override;
67 
68  virtual void Click();
69 
70  void SetClickHdl( const Link<Button*,void>& rLink ) { maClickHdl = rLink; }
71  const Link<Button*,void>& GetClickHdl() const { return maClickHdl; }
72 
74  void SetCommandHandler(const OUString& aCommand);
75  OUString const & GetCommand() const { return maCommand; }
76 
77  void SetModeImage( const Image& rImage );
78  Image const & GetModeImage( ) const;
79  bool HasImage() const;
80  void SetImageAlign( ImageAlign eAlign );
81  ImageAlign GetImageAlign() const;
82  DrawButtonFlags GetButtonState() const;
83  DrawButtonFlags& GetButtonState();
84 
85 
86  bool IsSmallSymbol() const;
87  void SetSmallSymbol();
88  virtual bool set_property(const OString &rKey, const OUString &rValue) override;
89 
91  virtual void statusChanged(const css::frame::FeatureStateEvent& rEvent);
92 
93  virtual FactoryFunction GetUITestFactory() const override;
94 
95  virtual void DumpAsPropertyTree(tools::JsonWriter&) override;
96 
97 protected:
98 
100  DECL_STATIC_LINK(Button, dispatchCommandHandler, Button*, void);
101 };
102 
104 {
105  NONE = 0x0000,
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, 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 private:
221  friend class VclBuilder;
222 
223  std::shared_ptr< std::vector< VclPtr< RadioButton > > > m_xGroup;
227  bool mbChecked;
232  SAL_DLLPRIVATE void ImplInitRadioButtonData();
233  SAL_DLLPRIVATE WinBits ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nStyle );
234  SAL_DLLPRIVATE void ImplInitSettings( bool bBackground );
235  SAL_DLLPRIVATE void ImplDrawRadioButtonState(vcl::RenderContext& rRenderContext);
236  SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags,
237  const Point& rPos, const Size& rSize,
238  const Size& rImageSize, tools::Rectangle& rStateRect,
239  tools::Rectangle& rMouseRect );
240  SAL_DLLPRIVATE void ImplDrawRadioButton(vcl::RenderContext& rRenderContext );
241  SAL_DLLPRIVATE void ImplUncheckAllOther();
242  SAL_DLLPRIVATE Size ImplGetRadioImageSize() const;
243  SAL_DLLPRIVATE long ImplGetImageToTextDistance() const;
244 
245  RadioButton(const RadioButton &) = delete;
246  RadioButton& operator= (const RadioButton &) = delete;
247 
248 protected:
250  using Window::ImplInit;
251  SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle );
252 
253 public:
254  SAL_DLLPRIVATE void ImplCallClick( bool bGrabFocus = false, GetFocusFlags nFocusFlags = GetFocusFlags::NONE );
255 
256 protected:
257  virtual void FillLayoutData() const override;
258  virtual const vcl::Font&
259  GetCanonicalFont( const StyleSettings& _rStyle ) const override;
260  virtual const Color&
261  GetCanonicalTextColor( const StyleSettings& _rStyle ) const override;
262  void ImplAdjustNWFSizes() override;
263 
264 public:
265  /*
266  bUsesExplicitGroup of true means that group() is used to set what radiobuttons are part of a group
267  while false means that contiguous radiobuttons are considered part of a group where WB_GROUP designates
268  the start of the group and all contiguous radiobuttons without WB_GROUP set form the rest of the group.
269 
270  true is fairly straightforward, false leads to trick situations and is the legacy case
271  */
272  explicit RadioButton(vcl::Window* pParent, bool bUsesExplicitGroup = true, WinBits nWinStyle = 0);
273  virtual ~RadioButton() override;
274  virtual void dispose() override;
275 
276  virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
277  virtual void Tracking( const TrackingEvent& rTEvt ) override;
278  virtual void KeyInput( const KeyEvent& rKEvt ) override;
279  virtual void KeyUp( const KeyEvent& rKEvt ) override;
280  virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
281  virtual void Draw( OutputDevice* pDev, const Point& rPos, DrawFlags nFlags ) override;
282  virtual void Resize() override;
283  virtual void GetFocus() override;
284  virtual void LoseFocus() override;
285  virtual void StateChanged( StateChangedType nType ) override;
286  virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
287  virtual bool PreNotify( NotifyEvent& rNEvt ) override;
288 
289  void Toggle();
290 
291  bool IsStateChanged() const { return mbStateChanged; }
292 
293  void EnableRadioCheck( bool bRadioCheck ) { mbRadioCheck = bRadioCheck; }
294  bool IsRadioCheckEnabled() const { return mbRadioCheck; }
295 
296  void SetModeRadioImage( const Image& rImage );
297 
298  void SetState( bool bCheck );
299  void Check( bool bCheck = true );
300  bool IsChecked() const { return mbChecked; }
301 
302  static Image GetRadioImage( const AllSettings& rSettings, DrawButtonFlags nFlags );
303 
304  Size CalcMinimumSize( long nMaxWidth = 0 ) const;
305  virtual Size GetOptimalSize() const override;
306 
307  void SetToggleHdl( const Link<RadioButton&,void>& rLink ) { maToggleHdl = rLink; }
308 
322  std::vector<VclPtr<RadioButton> > GetRadioButtonGroup(bool bIncludeThis = true) const;
323 
324  virtual bool set_property(const OString &rKey, const OUString &rValue) override;
325 
326  /*
327  * Group this RadioButton with another
328  */
329  void group(RadioButton &rOther);
330  virtual void ShowFocus(const tools::Rectangle& rRect) override;
331 
333  void DumpAsPropertyTree(tools::JsonWriter&) override;
334 
335  virtual FactoryFunction GetUITestFactory() const override;
336 };
337 
339 {
340 private:
347  // when mbLegacyNoTextAlign is set then the old behaviour where
348  // the WB_LEFT, WB_RIGHT & WB_CENTER affect the image placement
349  // occurs, otherwise the image ( checkbox box ) is placed
350  // to the left or right ( depending on RTL or LTR settings )
352  SAL_DLLPRIVATE void ImplInitCheckBoxData();
353  SAL_DLLPRIVATE static WinBits ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nStyle );
354  SAL_DLLPRIVATE void ImplInitSettings( bool bBackground );
355  SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags,
356  const Point& rPos, const Size& rSize,
357  const Size& rImageSize, tools::Rectangle& rStateRect,
358  tools::Rectangle& rMouseRect );
359  SAL_DLLPRIVATE void ImplDrawCheckBox(vcl::RenderContext& rRenderContext );
360  SAL_DLLPRIVATE long ImplGetImageToTextDistance() const;
361  SAL_DLLPRIVATE Size ImplGetCheckImageSize() const;
362 
363  CheckBox(const CheckBox &) = delete;
364  CheckBox& operator= (const CheckBox &) = delete;
365 
366 protected:
368  using Window::ImplInit;
369  SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle );
370  virtual void FillLayoutData() const override;
371  virtual const vcl::Font& GetCanonicalFont( const StyleSettings& _rStyle ) const override;
372  virtual const Color& GetCanonicalTextColor( const StyleSettings& _rStyle ) const override;
373  void ImplAdjustNWFSizes() override;
374 
375  virtual void ImplDrawCheckBoxState(vcl::RenderContext& rRenderContext);
376  SAL_DLLPRIVATE const tools::Rectangle& GetStateRect() const { return maStateRect; }
377  SAL_DLLPRIVATE const tools::Rectangle& GetMouseRect() const { return maMouseRect; }
378 
379 public:
380  SAL_DLLPRIVATE void ImplCheck();
381 public:
382  explicit CheckBox( vcl::Window* pParent, WinBits nStyle = 0 );
383 
384  virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
385  virtual void Tracking( const TrackingEvent& rTEvt ) override;
386  virtual void KeyInput( const KeyEvent& rKEvt ) override;
387  virtual void KeyUp( const KeyEvent& rKEvt ) override;
388  virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
389  virtual void Draw( OutputDevice* pDev, const Point& rPos, DrawFlags nFlags ) override;
390  virtual void Resize() override;
391  virtual void GetFocus() override;
392  virtual void LoseFocus() override;
393  virtual void StateChanged( StateChangedType nType ) override;
394  virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
395  virtual bool PreNotify( NotifyEvent& rNEvt ) override;
396 
397  void Toggle();
398 
399  void SetState( TriState eState );
400  TriState GetState() const { return meState; }
401 
402  void Check( bool bCheck = true );
403  bool IsChecked() const;
404 
405  void EnableTriState( bool bTriState = true );
406  bool IsTriStateEnabled() const { return mbTriState; }
407 
408  void SaveValue() { meSaveValue = GetState(); }
409  TriState GetSavedValue() const { return meSaveValue; }
410  bool IsValueChangedFromSaved() const { return meSaveValue != GetState(); }
411 
412  static Image GetCheckImage( const AllSettings& rSettings, DrawButtonFlags nFlags );
413 
414  Size CalcMinimumSize( long nMaxWidth = 0 ) const;
415  virtual Size GetOptimalSize() const override;
416 
417  void SetToggleHdl( const Link<CheckBox&,void>& rLink ) { maToggleHdl = rLink; }
418  void SetLegacyNoTextAlign( bool bVal ) { mbLegacyNoTextAlign = bVal; }
419 
420  virtual bool set_property(const OString &rKey, const OUString &rValue) override;
421  virtual void ShowFocus(const tools::Rectangle& rRect) override;
422 
424  void DumpAsPropertyTree(tools::JsonWriter&) override;
425 
426  virtual FactoryFunction GetUITestFactory() const override;
427 };
428 
429 inline void CheckBox::Check( bool bCheck )
430 {
431  SetState( bCheck ? TRISTATE_TRUE : TRISTATE_FALSE );
432 }
433 
434 inline bool CheckBox::IsChecked() const
435 {
436  return (GetState() == TRISTATE_TRUE);
437 }
438 
440 {
441 protected:
443 
444 private:
445  SAL_DLLPRIVATE void ImplInitStyle();
446 
447  ImageButton( const ImageButton & ) = delete;
448  ImageButton & operator= ( const ImageButton & ) = delete;
449 
450 public:
451  ImageButton( vcl::Window* pParent, WinBits nStyle = 0 );
452 };
453 
454 #endif // INCLUDED_VCL_BUTTON_HXX
455 
456 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::shared_ptr< std::vector< VclPtr< RadioButton > > > m_xGroup
Definition: button.hxx:223
bool mbIsAction
Definition: button.hxx:205
void SaveValue()
Definition: button.hxx:408
void EnableRadioCheck(bool bRadioCheck)
Definition: button.hxx:293
TriState meState
Definition: button.hxx:203
bool mbIsActive
Definition: button.hxx:171
virtual FactoryFunction GetUITestFactory() const
Definition: window.cxx:3910
void SetClickHdl(const Link< Button *, void > &rLink)
Definition: button.hxx:70
tools::Rectangle maStateRect
Definition: button.hxx:341
ImageAlign
virtual void MouseButtonDown(const MouseEvent &rMEvt)
Definition: mouse.cxx:414
virtual void ImplAdjustNWFSizes()
Definition: window3.cxx:38
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:224
sal_uIntPtr sal_uLong
Link< CheckBox &, void > maToggleHdl
Definition: button.hxx:346
virtual void StateChanged(StateChangedType nStateChange) override
Definition: ctrl.cxx:260
SAL_DLLPRIVATE const tools::Rectangle & GetStateRect() const
Definition: button.hxx:376
bool IsRadioCheckEnabled() const
Definition: button.hxx:294
virtual void FillLayoutData() const
Definition: ctrl.cxx:80
bool mbRadioCheck
Definition: button.hxx:228
std::function< std::unique_ptr< UIObject >vcl::Window *)> FactoryFunction
PushButtonDropdownStyle
Definition: button.hxx:103
tools::Rectangle maMouseRect
Definition: button.hxx:342
DrawButtonFlags
Definition: decoview.hxx:68
virtual bool set_property(const OString &rKey, const OUString &rValue) override
Definition: button.cxx:518
virtual const Color & GetCanonicalTextColor(const StyleSettings &_rStyle) const
Definition: ctrl.cxx:413
void SetState(TriState eState)
Definition: button.cxx:3436
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:106
void setAction(bool bIsAction)
Definition: button.hxx:159
bool IsStateChanged() const
Definition: button.hxx:291
StateChangedType
Definition: window.hxx:310
TriState GetState() const
Definition: button.hxx:142
sal_Int64 WinBits
bool mbTriState
Definition: button.hxx:345
virtual void DumpAsPropertyTree(tools::JsonWriter &)
Dumps itself and potentially its children to a property tree, to be written easily to JSON...
Definition: window.cxx:3380
SymbolType
Definition: vclenum.hxx:73
Link< RadioButton &, void > maToggleHdl
Definition: button.hxx:231
Creates a hierarchy of vcl::Windows (widgets) from a .ui file for dialogs, sidebar, etc.
Definition: builder.hxx:64
Image maImage
Definition: button.hxx:226
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:1927
Link< Button *, void > maClickHdl
Definition: button.hxx:42
bool IsChecked() const
Definition: button.hxx:300
bool isAction() const
Definition: button.hxx:164
SAL_DLLPRIVATE DrawTextFlags ImplGetTextStyle(WinBits nWinStyle, DrawFlags nDrawFlags)
Definition: button.cxx:171
SymbolType meSymbol
Definition: button.hxx:202
PushButtonDropdownStyle mnDDStyle
Definition: button.hxx:170
TriState GetState() const
Definition: button.hxx:400
PushButton & operator=(const PushButton &)=delete
GetFocusFlags
Definition: window.hxx:332
bool mbLegacyNoTextAlign
Definition: button.hxx:351
virtual bool PreNotify(NotifyEvent &rNEvt)
Definition: event.cxx:51
DrawFlags
Definition: window.hxx:353
bool IsChecked() const
Definition: button.hxx:213
Control & operator=(const Control &)=delete
bool IsTriStateEnabled() const
Definition: button.hxx:406
void SetLegacyNoTextAlign(bool bVal)
Definition: button.hxx:418
std::unique_ptr< ImplCommonButtonData > mpButtonData
Definition: button.hxx:41
virtual FactoryFunction GetUITestFactory() const override
Definition: button.cxx:551
TRISTATE_FALSE
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:302
bool IsChecked() const
Definition: button.hxx:434
virtual void Draw(::OutputDevice *pDev, const Point &rPos, DrawFlags nFlags)
Definition: window.cxx:1824
void SetToggleHdl(const Link< CheckBox &, void > &rLink)
Definition: button.hxx:417
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:142
TriState meState
Definition: button.hxx:343
virtual bool set_property(const OString &rKey, const OUString &rValue)
Definition: window2.cxx:1431
static SAL_DLLPRIVATE WinBits ImplInitStyle(const vcl::Window *pPrevWindow, WinBits nStyle)
Definition: button.cxx:601
void Check(bool bCheck=true)
Definition: button.hxx:429
virtual void LoseFocus()
Definition: window.cxx:1850
bool mbUsesExplicitGroup
Definition: button.hxx:230
virtual void ShowFocus(const tools::Rectangle &rRect)
Definition: window2.cxx:49
bool IsValueChangedFromSaved() const
Definition: button.hxx:410
virtual void KeyInput(const KeyEvent &rKEvt)
Definition: window.cxx:1800
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle, SystemParentData *pSystemParentData)
Definition: window.cxx:936
virtual Size GetOptimalSize() const override
Definition: ctrl.cxx:374
virtual void Resize() override
Definition: ctrl.cxx:74
WindowType
Definition: ctrl.hxx:33
virtual void GetFocus()
Definition: window.cxx:1836
bool mbStateChanged
Definition: button.hxx:229
virtual const vcl::Font & GetCanonicalFont(const StyleSettings &_rStyle) const
Definition: ctrl.cxx:408
TriState GetSavedValue() const
Definition: button.hxx:409
virtual void DumpAsPropertyTree(tools::JsonWriter &) override
Dumps itself and potentially its children to a property tree, to be written easily to JSON...
Definition: button.cxx:556
Definition: image.hxx:40
bool mbChecked
Definition: button.hxx:227
void SetState(TriState eState)
Definition: button.cxx:1505
QPRO_FUNC_TYPE nType
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)
Definition: paint.cxx:1019
SAL_DLLPRIVATE bool IsSymbol() const
Definition: button.hxx:182
SAL_DLLPRIVATE const tools::Rectangle & GetMouseRect() const
Definition: button.hxx:377
virtual void KeyUp(const KeyEvent &rKEvt)
Definition: window.cxx:1817
OUString const & GetCommand() const
Definition: button.hxx:75
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:546
bool IsPressed() const
Definition: button.hxx:149
bool mbPressed
Definition: button.hxx:204
tools::Rectangle maMouseRect
Definition: button.hxx:225
TriState
void SetToggleHdl(const Link< RadioButton &, void > &rLink)
Definition: button.hxx:307
tuple group
TriState meSaveValue
Definition: button.hxx:344
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:71