Files
libreoffice/include/svx/fontlb.hxx

103 lines
4.2 KiB
C++
Raw Normal View History

2010-10-27 13:11:31 +01:00
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
re-base on ALv2 code. Includes: Patch contributed by Christian Lippka impress212: #i113063# patch: dubios self assign in svx/source/dialog/framelink.cxx http://svn.apache.org/viewvc?view=revision&revision=1167619 Patches contributed by Mathias Bauer gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 cws mba34issues01: #i117712#: fix several resource errors introduced by IAccessible2 implementation http://svn.apache.org/viewvc?view=revision&revision=1172343 cws mba34issues01: #i117719#: use correct resource ID http://svn.apache.org/viewvc?view=revision&revision=1172351 Patch contributed by Andre Fischer Do not add targets for junit tests when junit is disabled. http://svn.apache.org/viewvc?view=revision&revision=1241508 Patches contributed by Armin Le-Grand #118804# corrected GraphicExporter behaviour on shortcut when pixel graphic is requested http://svn.apache.org/viewvc?view=revision&revision=1240195 fix for #118525#: Using primitives for chart sub-geometry visualisation http://svn.apache.org/viewvc?view=revision&revision=1226879 #118485# - Styles for OLEs are not saved. http://svn.apache.org/viewvc?view=revision&revision=1182166 #118524: apply patch, followup fixes to 118485 http://svn.apache.org/viewvc?view=revision&revision=1186077 13f79535-47bb-0310-9956-ffa450edef68 Patch contributed by Regina Henschel linecap: Reintegrating finished LineCap feature http://svn.apache.org/viewvc?view=revision&revision=1232507 Patch contributed by Wang Lei (leiw) #i118760# split the first table cell vertically, then undo&redo, the Presentation app will crash http://svn.apache.org/viewvc?view=revision&revision=1301361 cleanup globlmn hacks, undo dependent fixmes.
2012-11-21 22:06:52 +00:00
/*
* 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 .
*/
2000-09-18 16:07:07 +00:00
#ifndef INCLUDED_SVX_FONTLB_HXX
#define INCLUDED_SVX_FONTLB_HXX
2000-09-18 16:07:07 +00:00
#include <svtools/svtabbx.hxx>
#include <svtools/svlbitm.hxx>
2000-09-18 16:07:07 +00:00
#include <vcl/virdev.hxx>
#include <svx/svxdllapi.h>
2000-09-18 16:07:07 +00:00
2002-07-23 09:52:55 +00:00
/** A list box string item which stores its text and font. */
class SAL_WARN_UNUSED SvLBoxFontString : public SvLBoxString
2000-09-18 16:07:07 +00:00
{
2002-07-23 09:52:55 +00:00
private:
vcl::Font maFont; /// The font used by this item.
2002-07-23 09:52:55 +00:00
bool mbUseColor; /// true = use font color, false = default listbox color.
2000-09-18 16:07:07 +00:00
public:
2002-07-23 09:52:55 +00:00
SvLBoxFontString();
SvLBoxFontString(
SvTreeListEntry* pEntry,
2002-07-23 09:52:55 +00:00
sal_uInt16 nFlags,
const OUString& rString,
const vcl::Font& rFont,
2002-07-23 09:52:55 +00:00
const Color* pColor = NULL );
2000-09-18 16:07:07 +00:00
2002-07-23 09:52:55 +00:00
virtual ~SvLBoxFontString();
2000-09-18 16:07:07 +00:00
2002-07-23 09:52:55 +00:00
/** Creates a new empty list box item. */
virtual SvLBoxItem* Create() const SAL_OVERRIDE;
2000-09-18 16:07:07 +00:00
void InitViewData( SvTreeListBox*,SvTreeListEntry*,SvViewDataItem* ) SAL_OVERRIDE;
2000-09-18 16:07:07 +00:00
2002-07-23 09:52:55 +00:00
/** Paints this entry to the specified position, using the own font settings. */
virtual void Paint(const Point& rPos, SvTreeListBox& rOutDev, vcl::RenderContext& rRenderContext,
const SvViewDataEntry* pView, const SvTreeListEntry& rEntry) SAL_OVERRIDE;
2002-07-23 09:52:55 +00:00
};
2000-09-18 16:07:07 +00:00
2000-09-18 16:07:07 +00:00
2002-07-23 09:52:55 +00:00
/** A list box supporting formatted string entries. */
class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxFontListBox : public SvTabListBox
2002-07-23 09:52:55 +00:00
{
private:
vcl::Font maStdFont; /// Used for entries without specific font.
2000-09-18 16:07:07 +00:00
2002-07-23 09:52:55 +00:00
// The following members are used to store additional parameters for InitEntry().
vcl::Font maEntryFont; /// Current entry font used in InitEntry().
2002-07-23 09:52:55 +00:00
const Color* mpEntryColor; /// Current entry color used in InitEntry().
bool mbUseFont; /// true = Use maEntryFont/mpEntryColor in InitEntry().
2000-09-18 16:07:07 +00:00
2002-07-23 09:52:55 +00:00
public:
SvxFontListBox(vcl::Window* pParent, WinBits nStyle = WB_BORDER);
2002-07-23 09:52:55 +00:00
/** Inserts a list entry and sets the font used for this entry.
@param pColor The font color. NULL = use default listbox text color. */
void InsertFontEntry(
const OUString& rString, const vcl::Font& rFont, const Color* pColor = NULL );
2002-07-23 09:52:55 +00:00
/** Selects/deselects an entry specified by its position in the list box. */
void SelectEntryPos( sal_uLong nPos, bool bSelect = true );
2002-07-23 09:52:55 +00:00
/** Removes a selection. */
void SetNoSelection();
/** Returns the position of the entry currently selected or TREELIST_APPEND.
*/
sal_uLong GetSelectEntryPos() const;
2002-07-23 09:52:55 +00:00
protected:
/** Initializes a new SvLBoxFontString entry.
@descr Uses current value of maEntryFont to set the entry font (if mbUseFont is true). */
virtual void InitEntry(
SvTreeListEntry* pEntry,
const OUString& rEntryText,
2002-07-23 09:52:55 +00:00
const Image& rCollImg,
const Image& rExpImg,
SvLBoxButtonKind eButtonKind) SAL_OVERRIDE;
2000-09-18 16:07:07 +00:00
};
#endif
2002-07-23 09:52:55 +00:00
2010-10-27 13:11:31 +01:00
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */