/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
class BitmapEx; class FontList; class VclSimpleEvent; class VirtualDevice;
/** Utility class storing the border line width, style and colors. The widths are defined in Twips.
*/ class ImpLineListData
{ private:
BorderWidthImpl const m_aWidthImpl;
Color ( * m_pColor1Fn )( Color );
Color ( * m_pColor2Fn )( Color );
Color ( * m_pColorDistFn )( Color, Color );
public:
ImpLineListData( BorderWidthImpl aWidthImpl,
SvxBorderLineStyle nStyle, tools::Long nMinWidth, Color ( *pColor1Fn )( Color ),
Color ( *pColor2Fn )( Color ), Color ( *pColorDistFn )( Color, Color ) ) :
m_aWidthImpl( aWidthImpl ),
m_pColor1Fn( pColor1Fn ),
m_pColor2Fn( pColor2Fn ),
m_pColorDistFn( pColorDistFn ),
m_nMinWidth( nMinWidth ),
m_nStyle( nStyle )
{
}
/** Returns the computed width of the line 1 in twips. */
tools::Long GetLine1ForWidth( tools::Long nWidth ) const { return m_aWidthImpl.GetLine1( nWidth ); }
/** Returns the computed width of the line 2 in twips. */
tools::Long GetLine2ForWidth( tools::Long nWidth ) const { return m_aWidthImpl.GetLine2( nWidth ); }
/** Returns the computed width of the gap in twips. */
tools::Long GetDistForWidth( tools::Long nWidth ) const { return m_aWidthImpl.GetGap( nWidth ); }
Allows selection of line styles and sizes. Note that before first insert, units and window size need to be set. Supported units are typographic point (pt) and millimeters (mm). For SourceUnit, pt, mm and twips are supported. All scalar numbers in 1/100 of the corresponding unit.
Line1 is the outer, Line2 the inner line, Distance is the distance between these two lines. If Line2 == 0, only Line1 will be shown. Defaults for source and target unit are FieldUnit::POINT.
SetColor() sets the line color.
Remarks
Contrary to a simple ListBox, user-specific data are not supported. If UpdateMode is disabled, no data should be read, no selections should be set, and the return code shall be ignore, as in these are not defined in this mode. Also the bit WinBit WB_SORT may not be set.
Allows select of FontStyle's. The parameter Fill points to a list of available font styles for the font.
Reproduced styles are always added - this could change in future, as potentially not all applications [Draw,Equation,FontWork] can properly handle synthetic fonts. On filling, the previous name will be retained if possible.
For DontKnow, the FontStyleBox should be filled with OUString(), so it will contain a list with the default attributes. The currently shown style probably needs to be reset by the application.
Allows selection of font sizes. The values are retrieved via GetValue() and set via SetValue(). The Fill parameter fills the ListBox with the available sizes for the passed font.
All sizes are in 1/10 typographic point (pt).
The passed FontList must be retained until the next fill call.
Additionally it supports a relative mod, which allows entering percentage values. This, eg., can be useful for template dialogs. This mode can only be enabled, but not disabled again.
For DontKnow the FontSizeBox should be filled FontMetric(), so it will contain a list with the standard sizes. Th currently shown size probably needs to be reset by the application.
inline Color sameColor( Color rMain )
{ return rMain;
}
inline Color sameDistColor( Color /*rMain*/, Color rDefault )
{ return rDefault;
}
class ValueSet;
class SVT_DLLPUBLIC SvtLineListBox final : public WeldToolbarPopup
{ public: typedef Color (*ColorFunc)(Color); typedef Color (*ColorDistFunc)(Color, Color);
// font size is in points, not pixels, e.g. see Window::[G]etPointFont void set_entry_font(const vcl::Font& rFont) { m_xComboBox->set_entry_font(rFont); }
vcl::Font get_entry_font() { return m_xComboBox->get_entry_font(); }
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.18Bemerkung:
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.