LibreOffice Module svtools (master) 1
ctrlbox.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#pragma once
21
22#include <svtools/svtdllapi.h>
25#include <vcl/idle.hxx>
26#include <vcl/metric.hxx>
27#include <vcl/weld.hxx>
28
29#include <memory>
30
31namespace weld { class CustomWeld; }
32
33class BitmapEx;
34class BorderWidthImpl;
35class FontList;
36class VclSimpleEvent;
37class VirtualDevice;
38
43{
44private:
46
50
53
54public:
56 SvxBorderLineStyle nStyle, tools::Long nMinWidth, Color ( *pColor1Fn )( Color ),
57 Color ( *pColor2Fn )( Color ), Color ( *pColorDistFn )( Color, Color ) ) :
58 m_aWidthImpl( aWidthImpl ),
59 m_pColor1Fn( pColor1Fn ),
60 m_pColor2Fn( pColor2Fn ),
61 m_pColorDistFn( pColorDistFn ),
62 m_nMinWidth( nMinWidth ),
63 m_nStyle( nStyle )
64 {
65 }
66
68 tools::Long GetLine1ForWidth( tools::Long nWidth ) const { return m_aWidthImpl.GetLine1( nWidth ); }
69
71 tools::Long GetLine2ForWidth( tools::Long nWidth ) const { return m_aWidthImpl.GetLine2( nWidth ); }
72
74 tools::Long GetDistForWidth( tools::Long nWidth ) const { return m_aWidthImpl.GetGap( nWidth ); }
75
76 Color GetColorLine1( const Color& rMain ) const
77 {
78 return ( *m_pColor1Fn )( rMain );
79 }
80
81 Color GetColorLine2( const Color& rMain ) const
82 {
83 return ( *m_pColor2Fn )( rMain );
84 }
85
86 Color GetColorDist( const Color& rMain, const Color& rDefault ) const
87 {
88 return ( *m_pColorDistFn )( rMain, rDefault );
89 }
90
94};
95
96enum class SvxBorderLineStyle : sal_Int16;
97
98typedef ::std::vector< FontMetric > ImplFontList;
99
100/*************************************************************************
101
102class LineListBox
103
104Description
105
106Allows selection of line styles and sizes. Note that before first insert,
107units and window size need to be set. Supported units are typographic point
108(pt) and millimeters (mm). For SourceUnit, pt, mm and twips are supported.
109All scalar numbers in 1/100 of the corresponding unit.
110
111Line1 is the outer, Line2 the inner line, Distance is the distance between
112these two lines. If Line2 == 0, only Line1 will be shown. Defaults for
113source and target unit are FieldUnit::POINT.
114
115SetColor() sets the line color.
116
117Remarks
118
119Contrary to a simple ListBox, user-specific data are not supported.
120If UpdateMode is disabled, no data should be read, no selections
121should be set, and the return code shall be ignore, as in these are
122not defined in this mode. Also the bit WinBit WB_SORT may not be set.
123
124--------------------------------------------------------------------------
125
126class FontNameBox
127
128Description
129
130Allows selection of fonts. The ListBox will be filled using Fill parameter,
131which is pointer to an FontList object.
132
133Calling EnableWYSIWYG() enables rendering the font name in the currently
134selected font.
135
136See also
137
138FontList; FontStyleBox; FontSizeBox; FontNameMenu
139
140--------------------------------------------------------------------------
141
142class FontStyleBox
143
144Description
145
146Allows select of FontStyle's. The parameter Fill points to a list
147of available font styles for the font.
148
149Reproduced styles are always added - this could change in future, as
150potentially not all applications [Draw,Equation,FontWork] can properly
151handle synthetic fonts. On filling, the previous name will be retained
152if possible.
153
154For DontKnow, the FontStyleBox should be filled with OUString(),
155so it will contain a list with the default attributes. The currently
156shown style probably needs to be reset by the application.
157
158See also
159
160FontList; FontNameBox; FontSizeBox;
161
162--------------------------------------------------------------------------
163
164class FontSizeBox
165
166Description
167
168Allows selection of font sizes. The values are retrieved via GetValue()
169and set via SetValue(). The Fill parameter fills the ListBox with the
170available sizes for the passed font.
171
172All sizes are in 1/10 typographic point (pt).
173
174The passed FontList must be retained until the next fill call.
175
176Additionally it supports a relative mod, which allows entering
177percentage values. This, eg., can be useful for template dialogs.
178This mode can only be enabled, but not disabled again.
179
180For DontKnow the FontSizeBox should be filled FontMetric(), so it will
181contain a list with the standard sizes. Th currently shown size
182probably needs to be reset by the application.
183
184See also
185
186FontList; FontNameBox; FontStyleBox; FontSizeMenu
187
188*************************************************************************/
189
190inline Color sameColor( Color rMain )
191{
192 return rMain;
193}
194
195inline Color sameDistColor( Color /*rMain*/, Color rDefault )
196{
197 return rDefault;
198}
199
200class ValueSet;
201
203{
204public:
205 typedef Color (*ColorFunc)(Color);
206 typedef Color (*ColorDistFunc)(Color, Color);
207
208 SvtLineListBox(std::unique_ptr<weld::MenuButton> pControl);
210
211 static OUString GetLineStyleName(SvxBorderLineStyle eStyle);
212
215 {
216 m_nWidth = nWidth;
217 UpdateEntries();
218 UpdatePreview();
219 }
220
221 tools::Long GetWidth() const { return m_nWidth; }
222
224 void InsertEntry(const BorderWidthImpl& rWidthImpl,
225 SvxBorderLineStyle nStyle, tools::Long nMinWidth = 0,
226 ColorFunc pColor1Fn = &sameColor,
227 ColorFunc pColor2Fn = &sameColor,
228 ColorDistFunc pColorDistFn = &sameDistColor);
229
230 void SelectEntry( SvxBorderLineStyle nStyle );
231 SvxBorderLineStyle GetSelectEntryStyle() const;
232
233 void SetSourceUnit( FieldUnit eNewUnit ) { eSourceUnit = eNewUnit; }
234
235 void SetColor( const Color& rColor )
236 {
237 aColor = rColor;
238 UpdateEntries();
239 UpdatePreview();
240 }
241
242 const Color& GetColor() const { return aColor; }
243
244 void SetSelectHdl(const Link<SvtLineListBox&,void>& rLink) { maSelectHdl = rLink; }
245
246 void set_sensitive(bool bSensitive) { m_xControl->set_sensitive(bSensitive); }
247
248 virtual void GrabFocus() override;
249
250private:
251
252 SVT_DLLPRIVATE void ImpGetLine( tools::Long nLine1, tools::Long nLine2, tools::Long nDistance,
253 Color nColor1, Color nColor2, Color nColorDist,
254 SvxBorderLineStyle nStyle, BitmapEx& rBmp );
255
256 DECL_DLLPRIVATE_LINK(ValueSelectHdl, ValueSet*, void);
259 DECL_DLLPRIVATE_LINK(StyleUpdatedHdl, weld::Widget&, void);
260
261 void UpdateEntries();
262
263 void UpdatePreview();
264
265 SvtLineListBox( const SvtLineListBox& ) = delete;
266 SvtLineListBox& operator =( const SvtLineListBox& ) = delete;
267
268 std::unique_ptr<weld::MenuButton> m_xControl;
269 std::unique_ptr<weld::Button> m_xNoneButton;
270 std::unique_ptr<ValueSet> m_xLineSet;
271 std::unique_ptr<weld::CustomWeld> m_xLineSetWin;
272
273 std::vector<std::unique_ptr<ImpLineListData>> m_vLineList;
279};
280
282{
283public:
284 SvtCalendarBox(std::unique_ptr<weld::MenuButton> pControl, bool bUseLabel = true);
286
288
289 void set_date(const Date& rDate);
290 Date get_date() const { return m_xCalendar->get_date(); }
291
292 void set_label(const OUString& rLabel) { m_xControl->set_label(rLabel); }
293 OUString get_label() const { return m_xControl->get_label(); }
294
295 void set_sensitive(bool bSensitive) { m_xControl->set_sensitive(bSensitive); }
296 bool get_sensitive() const { return m_xControl->get_sensitive(); }
297 void set_visible(bool bSensitive) { m_xControl->set_visible(bSensitive); }
298 void show() { set_visible(true); }
299 void grab_focus() { m_xControl->grab_focus(); }
300
301 void connect_activated(const Link<SvtCalendarBox&, void>& rActivatedHdl) { m_aActivatedHdl = rActivatedHdl; }
302 void connect_selected(const Link<SvtCalendarBox&, void>& rSelectHdl) { m_aSelectHdl = rSelectHdl; }
303
304 void connect_focus_in(const Link<weld::Widget&, void>& rLink) { m_xControl->connect_focus_in(rLink); }
305 void connect_focus_out(const Link<weld::Widget&, void>& rLink) { m_xControl->connect_focus_out(rLink); }
306private:
309
311
312 std::unique_ptr<weld::MenuButton> m_xControl;
313 std::unique_ptr<weld::Builder> m_xBuilder;
314 std::unique_ptr<weld::Widget> m_xTopLevel;
315 std::unique_ptr<weld::Calendar> m_xCalendar;
316
319
320 void set_label_from_date();
321};
322
324{
325private:
326 std::unique_ptr<weld::ComboBox> m_xComboBox;
327 std::unique_ptr<ImplFontList> mpFontList;
332
333 SVT_DLLPRIVATE void ImplDestroyFontList();
334
337 DECL_DLLPRIVATE_LINK(SettingsChangedHdl, VclSimpleEvent&, void);
338 DECL_DLLPRIVATE_LINK(UpdateHdl, Timer*, void);
339
340 void LoadMRUEntries( const OUString& aFontMRUEntriesFile );
341 void SaveMRUEntries( const OUString& aFontMRUEntriesFile ) const;
342
343 OutputDevice& CachePreview(size_t nIndex, Point* pTopLeft);
344
345public:
346 FontNameBox(std::unique_ptr<weld::ComboBox> p);
347 ~FontNameBox();
348
349 void Fill( const FontList* pList );
350
351 void EnableWYSIWYG(bool bEnable);
352 bool IsWYSIWYGEnabled() const { return mbWYSIWYG; }
353
354 void connect_changed(const Link<weld::ComboBox&, void>& rLink) { m_xComboBox->connect_changed(rLink); }
355 void connect_focus_in(const Link<weld::Widget&, void>& rLink) { m_xComboBox->connect_focus_in(rLink); }
356 void connect_focus_out(const Link<weld::Widget&, void>& rLink) { m_xComboBox->connect_focus_out(rLink); }
357 void connect_key_press(const Link<const KeyEvent&, bool>& rLink) { m_xComboBox->connect_key_press(rLink); }
358 int get_active() const { return m_xComboBox->get_active(); }
359 OUString get_active_text() const { return m_xComboBox->get_active_text(); }
360 void set_active_or_entry_text(const OUString& rText);
361 void set_active(int nPos) { m_xComboBox->set_active(nPos); }
362 int get_count() const { return m_xComboBox->get_count(); }
363 OUString get_text(int nIndex) const { return m_xComboBox->get_text(nIndex); }
364 void set_sensitive(bool bSensitive) { m_xComboBox->set_sensitive(bSensitive); }
365 void save_value() { m_xComboBox->save_value(); }
366 OUString const& get_saved_value() const { return m_xComboBox->get_saved_value(); }
367 void select_entry_region(int nStartPos, int nEndPos) { m_xComboBox->select_entry_region(nStartPos, nEndPos); }
368 bool get_entry_selection_bounds(int& rStartPos, int& rEndPos) { return m_xComboBox->get_entry_selection_bounds(rStartPos, rEndPos); }
369 void clear() { m_xComboBox->clear(); }
370 void grab_focus() { m_xComboBox->grab_focus(); }
371 bool has_focus() const { return m_xComboBox->has_focus(); }
372 void connect_entry_activate(const Link<weld::ComboBox&, bool>& rLink) { m_xComboBox->connect_entry_activate(rLink); }
373 void connect_get_property_tree(const Link<tools::JsonWriter&, void>& rLink) { m_xComboBox->connect_get_property_tree(rLink); }
374 void set_entry_width_chars(int nWidth) { m_xComboBox->set_entry_width_chars(nWidth); }
375 void set_size_request(int nWidth, int nHeight) { m_xComboBox->set_size_request(nWidth, nHeight); }
376 int get_max_mru_count() const { return m_xComboBox->get_max_mru_count(); }
377 void set_max_mru_count(int nCount) { m_xComboBox->set_max_mru_count(nCount); }
378
379 // font size is in points, not pixels, e.g. see Window::[G]etPointFont
380 void set_entry_font(const vcl::Font& rFont) { m_xComboBox->set_entry_font(rFont); }
381 vcl::Font get_entry_font() { return m_xComboBox->get_entry_font(); }
382
383 void set_tooltip_text(const OUString& rTip) { m_xComboBox->set_tooltip_text(rTip); }
384
385private:
386 void InitFontMRUEntriesFile();
387
388 FontNameBox( const FontNameBox& ) = delete;
389 FontNameBox& operator =( const FontNameBox& ) = delete;
390};
391
393{
394 std::unique_ptr<weld::ComboBox> m_xComboBox;
395public:
396 FontStyleBox(std::unique_ptr<weld::ComboBox> p);
397
398 void Fill(std::u16string_view rName, const FontList* pList);
399
400 void connect_changed(const Link<weld::ComboBox&, void>& rLink) { m_xComboBox->connect_changed(rLink); }
401 OUString get_active_text() const { return m_xComboBox->get_active_text(); }
402 void set_active_text(const OUString& rText) { m_xComboBox->set_active_text(rText); }
403 void set_size_request(int nWidth, int nHeight) { m_xComboBox->set_size_request(nWidth, nHeight); }
404
405 void append_text(const OUString& rStr) { m_xComboBox->append_text(rStr); }
406 void set_sensitive(bool bSensitive) { m_xComboBox->set_sensitive(bSensitive); }
407 void save_value() { m_xComboBox->save_value(); }
408 OUString const& get_saved_value() const { return m_xComboBox->get_saved_value(); }
409 int get_count() const { return m_xComboBox->get_count(); }
410 int find_text(const OUString& rStr) const { return m_xComboBox->find_text(rStr); }
411private:
412 FontStyleBox(const FontStyleBox& ) = delete;
414};
415
417{
420 int nMin;
421 int nMax;
423 sal_uInt16 nDecimalDigits;
424 sal_uInt16 nRelMin;
425 sal_uInt16 nRelMax;
426 sal_uInt16 nRelStep;
436 std::unique_ptr<weld::ComboBox> m_xComboBox;
437
438 sal_uInt16 GetDecimalDigits() const { return nDecimalDigits; }
439 void SetDecimalDigits(sal_uInt16 nDigits) { nDecimalDigits = nDigits; }
440 FieldUnit GetUnit() const { return eUnit; }
441 void SetUnit(FieldUnit _eUnit) { eUnit = _eUnit; }
442 void SetRange(int nNewMin, int nNewMax) { nMin = nNewMin; nMax = nNewMax; }
443 void SetValue(int nNewValue, FieldUnit eInUnit);
444
445 void InsertValue(int i);
446
447 OUString format_number(int nValue) const;
448
450 DECL_DLLPRIVATE_LINK(ReformatHdl, weld::Widget&, void);
451public:
452 FontSizeBox(std::unique_ptr<weld::ComboBox> p);
453
454 void Fill(const FontList* pList);
455
456 void EnableRelativeMode(sal_uInt16 nMin, sal_uInt16 nMax, sal_uInt16 nStep = 5);
457 void EnablePtRelativeMode(short nMin, short nMax, short nStep = 10);
458 bool IsRelativeMode() const { return bRelativeMode; }
459 void SetRelative( bool bRelative );
460 bool IsRelative() const { return bRelative; }
461 void SetPtRelative( bool bPtRel )
462 {
463 bPtRelative = bPtRel;
464 SetRelative(true);
465 }
466 bool IsPtRelative() const { return bPtRelative; }
467
468 void connect_changed(const Link<weld::ComboBox&, void>& rLink) { m_aChangeHdl = rLink; }
469 void connect_focus_out(const Link<weld::Widget&, void>& rLink) { m_aFocusOutHdl = rLink; }
470 void connect_key_press(const Link<const KeyEvent&, bool>& rLink) { m_xComboBox->connect_key_press(rLink); }
471 OUString get_active_text() const { return m_xComboBox->get_active_text(); }
472 void set_active_or_entry_text(const OUString& rText);
473 void set_sensitive(bool bSensitive) { m_xComboBox->set_sensitive(bSensitive); }
474 void set_size_request(int nWidth, int nHeight) { m_xComboBox->set_size_request(nWidth, nHeight); }
475
476 int get_active() const { return m_xComboBox->get_active(); }
477 int get_value() const;
478 void set_value(int nValue);
479 void save_value() { nSavedValue = get_value(); }
480 int get_saved_value() const { return nSavedValue; }
481 bool get_value_changed_from_saved() const { return get_value() != get_saved_value(); }
482 int get_count() const { return m_xComboBox->get_count(); }
483 OUString get_text(int i) const { return m_xComboBox->get_text(i); }
484 void grab_focus() { m_xComboBox->grab_focus(); }
485 bool has_focus() const { return m_xComboBox->has_focus(); }
486 void connect_entry_activate(const Link<weld::ComboBox&, bool>& rLink) { m_xComboBox->connect_entry_activate(rLink); }
487 void disable_entry_completion() { m_xComboBox->set_entry_completion(false, false); }
488 void connect_get_property_tree(const Link<tools::JsonWriter&, void>& rLink) { m_xComboBox->connect_get_property_tree(rLink); }
489
490private:
491 FontSizeBox(const FontSizeBox&) = delete;
493};
494
495/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SvxBorderLineStyle
tools::Long GetLine2(tools::Long nWidth) const
Definition: ctrlbox.cxx:103
tools::Long GetGap(tools::Long nWidth) const
Definition: ctrlbox.cxx:117
tools::Long GetLine1(tools::Long nWidth) const
Definition: ctrlbox.cxx:85
void connect_entry_activate(const Link< weld::ComboBox &, bool > &rLink)
Definition: ctrlbox.hxx:372
bool has_focus() const
Definition: ctrlbox.hxx:371
OUString get_text(int nIndex) const
Definition: ctrlbox.hxx:363
std::unique_ptr< ImplFontList > mpFontList
Definition: ctrlbox.hxx:327
std::unique_ptr< weld::ComboBox > m_xComboBox
Definition: ctrlbox.hxx:326
void set_sensitive(bool bSensitive)
Definition: ctrlbox.hxx:364
void grab_focus()
Definition: ctrlbox.hxx:370
OUString maFontMRUEntriesFile
Definition: ctrlbox.hxx:330
OUString get_active_text() const
Definition: ctrlbox.hxx:359
int get_count() const
Definition: ctrlbox.hxx:362
void set_entry_font(const vcl::Font &rFont)
Definition: ctrlbox.hxx:380
bool IsWYSIWYGEnabled() const
Definition: ctrlbox.hxx:352
size_t mnPreviewProgress
Definition: ctrlbox.hxx:328
DECL_DLLPRIVATE_LINK(CustomRenderHdl, weld::ComboBox::render_args, void)
void clear()
Definition: ctrlbox.hxx:369
void connect_key_press(const Link< const KeyEvent &, bool > &rLink)
Definition: ctrlbox.hxx:357
DECL_DLLPRIVATE_LINK(SettingsChangedHdl, VclSimpleEvent &, void)
void set_active(int nPos)
Definition: ctrlbox.hxx:361
int get_max_mru_count() const
Definition: ctrlbox.hxx:376
DECL_DLLPRIVATE_LINK(CustomGetSizeHdl, OutputDevice &, Size)
int get_active() const
Definition: ctrlbox.hxx:358
void save_value()
Definition: ctrlbox.hxx:365
void set_tooltip_text(const OUString &rTip)
Definition: ctrlbox.hxx:383
void connect_focus_out(const Link< weld::Widget &, void > &rLink)
Definition: ctrlbox.hxx:356
void connect_focus_in(const Link< weld::Widget &, void > &rLink)
Definition: ctrlbox.hxx:355
vcl::Font get_entry_font()
Definition: ctrlbox.hxx:381
bool mbWYSIWYG
Definition: ctrlbox.hxx:329
void set_size_request(int nWidth, int nHeight)
Definition: ctrlbox.hxx:375
void set_entry_width_chars(int nWidth)
Definition: ctrlbox.hxx:374
void connect_changed(const Link< weld::ComboBox &, void > &rLink)
Definition: ctrlbox.hxx:354
bool get_entry_selection_bounds(int &rStartPos, int &rEndPos)
Definition: ctrlbox.hxx:368
void set_max_mru_count(int nCount)
Definition: ctrlbox.hxx:377
FontNameBox(const FontNameBox &)=delete
void select_entry_region(int nStartPos, int nEndPos)
Definition: ctrlbox.hxx:367
Idle maUpdateIdle
Definition: ctrlbox.hxx:331
void connect_get_property_tree(const Link< tools::JsonWriter &, void > &rLink)
Definition: ctrlbox.hxx:373
DECL_DLLPRIVATE_LINK(UpdateHdl, Timer *, void)
OUString const & get_saved_value() const
Definition: ctrlbox.hxx:366
void disable_entry_completion()
Definition: ctrlbox.hxx:487
bool bPtRelative
Definition: ctrlbox.hxx:432
void SetPtRelative(bool bPtRel)
Definition: ctrlbox.hxx:461
void grab_focus()
Definition: ctrlbox.hxx:484
int nSavedValue
Definition: ctrlbox.hxx:419
sal_uInt16 nRelStep
Definition: ctrlbox.hxx:426
sal_uInt16 nDecimalDigits
Definition: ctrlbox.hxx:423
OUString get_text(int i) const
Definition: ctrlbox.hxx:483
void set_sensitive(bool bSensitive)
Definition: ctrlbox.hxx:473
FieldUnit GetUnit() const
Definition: ctrlbox.hxx:440
sal_uInt16 nRelMax
Definition: ctrlbox.hxx:425
void connect_focus_out(const Link< weld::Widget &, void > &rLink)
Definition: ctrlbox.hxx:469
bool IsPtRelative() const
Definition: ctrlbox.hxx:466
int get_active() const
Definition: ctrlbox.hxx:476
void connect_get_property_tree(const Link< tools::JsonWriter &, void > &rLink)
Definition: ctrlbox.hxx:488
void set_size_request(int nWidth, int nHeight)
Definition: ctrlbox.hxx:474
void connect_entry_activate(const Link< weld::ComboBox &, bool > &rLink)
Definition: ctrlbox.hxx:486
void SetDecimalDigits(sal_uInt16 nDigits)
Definition: ctrlbox.hxx:439
void save_value()
Definition: ctrlbox.hxx:479
FontSizeBox & operator=(const FontSizeBox &)=delete
int get_saved_value() const
Definition: ctrlbox.hxx:480
void connect_key_press(const Link< const KeyEvent &, bool > &rLink)
Definition: ctrlbox.hxx:470
DECL_DLLPRIVATE_LINK(ModifyHdl, weld::ComboBox &, void)
bool get_value_changed_from_saved() const
Definition: ctrlbox.hxx:481
bool IsRelative() const
Definition: ctrlbox.hxx:460
bool has_focus() const
Definition: ctrlbox.hxx:485
bool bRelativeMode
Definition: ctrlbox.hxx:430
sal_uInt16 nRelMin
Definition: ctrlbox.hxx:424
const FontList * pFontList
Definition: ctrlbox.hxx:418
sal_uInt16 GetDecimalDigits() const
Definition: ctrlbox.hxx:438
void SetRange(int nNewMin, int nNewMax)
Definition: ctrlbox.hxx:442
FieldUnit eUnit
Definition: ctrlbox.hxx:422
Link< weld::ComboBox &, void > m_aChangeHdl
Definition: ctrlbox.hxx:434
Link< weld::Widget &, void > m_aFocusOutHdl
Definition: ctrlbox.hxx:435
short nPtRelMin
Definition: ctrlbox.hxx:427
bool bStdSize
Definition: ctrlbox.hxx:433
void connect_changed(const Link< weld::ComboBox &, void > &rLink)
Definition: ctrlbox.hxx:468
FontSizeBox(const FontSizeBox &)=delete
short nPtRelStep
Definition: ctrlbox.hxx:429
OUString get_active_text() const
Definition: ctrlbox.hxx:471
DECL_DLLPRIVATE_LINK(ReformatHdl, weld::Widget &, void)
int get_count() const
Definition: ctrlbox.hxx:482
bool bRelative
Definition: ctrlbox.hxx:431
short nPtRelMax
Definition: ctrlbox.hxx:428
bool IsRelativeMode() const
Definition: ctrlbox.hxx:458
std::unique_ptr< weld::ComboBox > m_xComboBox
Definition: ctrlbox.hxx:436
void SetUnit(FieldUnit _eUnit)
Definition: ctrlbox.hxx:441
std::unique_ptr< weld::ComboBox > m_xComboBox
Definition: ctrlbox.hxx:394
int find_text(const OUString &rStr) const
Definition: ctrlbox.hxx:410
void set_active_text(const OUString &rText)
Definition: ctrlbox.hxx:402
OUString get_active_text() const
Definition: ctrlbox.hxx:401
FontStyleBox & operator=(const FontStyleBox &)=delete
void set_sensitive(bool bSensitive)
Definition: ctrlbox.hxx:406
OUString const & get_saved_value() const
Definition: ctrlbox.hxx:408
void save_value()
Definition: ctrlbox.hxx:407
int get_count() const
Definition: ctrlbox.hxx:409
FontStyleBox(const FontStyleBox &)=delete
void append_text(const OUString &rStr)
Definition: ctrlbox.hxx:405
void connect_changed(const Link< weld::ComboBox &, void > &rLink)
Definition: ctrlbox.hxx:400
void set_size_request(int nWidth, int nHeight)
Definition: ctrlbox.hxx:403
Utility class storing the border line width, style and colors.
Definition: ctrlbox.hxx:43
Color GetColorLine2(const Color &rMain) const
Definition: ctrlbox.hxx:81
SvxBorderLineStyle GetStyle() const
Definition: ctrlbox.hxx:93
SvxBorderLineStyle m_nStyle
Definition: ctrlbox.hxx:52
tools::Long GetMinWidth() const
Returns the minimum width in twips.
Definition: ctrlbox.hxx:92
BorderWidthImpl const m_aWidthImpl
Definition: ctrlbox.hxx:45
tools::Long GetDistForWidth(tools::Long nWidth) const
Returns the computed width of the gap in twips.
Definition: ctrlbox.hxx:74
ImpLineListData(BorderWidthImpl aWidthImpl, SvxBorderLineStyle nStyle, tools::Long nMinWidth, Color(*pColor1Fn)(Color), Color(*pColor2Fn)(Color), Color(*pColorDistFn)(Color, Color))
Definition: ctrlbox.hxx:55
tools::Long GetLine2ForWidth(tools::Long nWidth) const
Returns the computed width of the line 2 in twips.
Definition: ctrlbox.hxx:71
Color(* m_pColor1Fn)(Color)
Definition: ctrlbox.hxx:47
Color GetColorLine1(const Color &rMain) const
Definition: ctrlbox.hxx:76
Color(* m_pColorDistFn)(Color, Color)
Definition: ctrlbox.hxx:49
tools::Long m_nMinWidth
Definition: ctrlbox.hxx:51
Color(* m_pColor2Fn)(Color)
Definition: ctrlbox.hxx:48
Color GetColorDist(const Color &rMain, const Color &rDefault) const
Definition: ctrlbox.hxx:86
tools::Long GetLine1ForWidth(tools::Long nWidth) const
Returns the computed width of the line 1 in twips.
Definition: ctrlbox.hxx:68
void set_sensitive(bool bSensitive)
Definition: ctrlbox.hxx:295
std::unique_ptr< weld::Builder > m_xBuilder
Definition: ctrlbox.hxx:313
OUString get_label() const
Definition: ctrlbox.hxx:293
std::unique_ptr< weld::Calendar > m_xCalendar
Definition: ctrlbox.hxx:315
Date get_date() const
Definition: ctrlbox.hxx:290
std::unique_ptr< weld::Widget > m_xTopLevel
Definition: ctrlbox.hxx:314
void connect_selected(const Link< SvtCalendarBox &, void > &rSelectHdl)
Definition: ctrlbox.hxx:302
Link< SvtCalendarBox &, void > m_aSelectHdl
Definition: ctrlbox.hxx:318
void connect_focus_in(const Link< weld::Widget &, void > &rLink)
Definition: ctrlbox.hxx:304
bool m_bUseLabel
Definition: ctrlbox.hxx:310
DECL_DLLPRIVATE_LINK(SelectHdl, weld::Calendar &, void)
void grab_focus()
Definition: ctrlbox.hxx:299
void connect_activated(const Link< SvtCalendarBox &, void > &rActivatedHdl)
Definition: ctrlbox.hxx:301
void set_visible(bool bSensitive)
Definition: ctrlbox.hxx:297
Link< SvtCalendarBox &, void > m_aActivatedHdl
Definition: ctrlbox.hxx:317
weld::MenuButton & get_button()
Definition: ctrlbox.hxx:287
std::unique_ptr< weld::MenuButton > m_xControl
Definition: ctrlbox.hxx:312
void set_label(const OUString &rLabel)
Definition: ctrlbox.hxx:292
DECL_DLLPRIVATE_LINK(ActivateHdl, weld::Calendar &, void)
void connect_focus_out(const Link< weld::Widget &, void > &rLink)
Definition: ctrlbox.hxx:305
bool get_sensitive() const
Definition: ctrlbox.hxx:296
void SetSourceUnit(FieldUnit eNewUnit)
Definition: ctrlbox.hxx:233
DECL_DLLPRIVATE_LINK(StyleUpdatedHdl, weld::Widget &, void)
tools::Long GetWidth() const
Definition: ctrlbox.hxx:221
FieldUnit eSourceUnit
Definition: ctrlbox.hxx:277
void SetWidth(tools::Long nWidth)
Set the width in Twips.
Definition: ctrlbox.hxx:214
tools::Long m_nWidth
Definition: ctrlbox.hxx:274
std::unique_ptr< ValueSet > m_xLineSet
Definition: ctrlbox.hxx:270
ScopedVclPtr< VirtualDevice > aVirDev
Definition: ctrlbox.hxx:275
std::unique_ptr< weld::MenuButton > m_xControl
Definition: ctrlbox.hxx:268
std::unique_ptr< weld::CustomWeld > m_xLineSetWin
Definition: ctrlbox.hxx:271
SvtLineListBox(const SvtLineListBox &)=delete
std::unique_ptr< weld::Button > m_xNoneButton
Definition: ctrlbox.hxx:269
Link< SvtLineListBox &, void > maSelectHdl
Definition: ctrlbox.hxx:278
DECL_DLLPRIVATE_LINK(ToggleHdl, weld::Toggleable &, void)
void SetSelectHdl(const Link< SvtLineListBox &, void > &rLink)
Definition: ctrlbox.hxx:244
DECL_DLLPRIVATE_LINK(ValueSelectHdl, ValueSet *, void)
std::vector< std::unique_ptr< ImpLineListData > > m_vLineList
Definition: ctrlbox.hxx:273
DECL_DLLPRIVATE_LINK(NoneHdl, weld::Button &, void)
void set_sensitive(bool bSensitive)
Definition: ctrlbox.hxx:246
const Color & GetColor() const
Definition: ctrlbox.hxx:242
void SetColor(const Color &rColor)
Definition: ctrlbox.hxx:235
virtual void GrabFocus()=0
std::tuple< vcl::RenderContext &, const tools::Rectangle &, bool, const OUString & > render_args
Color sameDistColor(Color, Color rDefault)
Definition: ctrlbox.hxx:195
::std::vector< FontMetric > ImplFontList
Definition: ctrlbox.hxx:98
Color sameColor(Color rMain)
Definition: ctrlbox.hxx:190
int nCount
virtual void SetValue(tools::Long nNew) override
FieldUnit
sal_Int32 nIndex
sal_uInt16 nPos
Fill
int i
long Long
#define SVT_DLLPUBLIC
Definition: svtdllapi.h:27
#define SVT_DLLPRIVATE
Definition: svtdllapi.h:29
Reference< XControl > m_xControl