LibreOffice Module svtools (master) 1
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
SvtLineListBox Class Referencefinal

#include <ctrlbox.hxx>

Inheritance diagram for SvtLineListBox:
[legend]
Collaboration diagram for SvtLineListBox:
[legend]

Public Types

typedef Color(* ColorFunc) (Color)
 
typedef Color(* ColorDistFunc) (Color, Color)
 

Public Member Functions

 SvtLineListBox (std::unique_ptr< weld::MenuButton > pControl)
 
 ~SvtLineListBox ()
 
void SetWidth (tools::Long nWidth)
 Set the width in Twips. More...
 
tools::Long GetWidth () const
 
void InsertEntry (const BorderWidthImpl &rWidthImpl, SvxBorderLineStyle nStyle, tools::Long nMinWidth=0, ColorFunc pColor1Fn=&sameColor, ColorFunc pColor2Fn=&sameColor, ColorDistFunc pColorDistFn=&sameDistColor)
 Insert a listbox entry with all widths in Twips. More...
 
void SelectEntry (SvxBorderLineStyle nStyle)
 
SvxBorderLineStyle GetSelectEntryStyle () const
 
void SetSourceUnit (FieldUnit eNewUnit)
 
void SetColor (const Color &rColor)
 
const ColorGetColor () const
 
void SetSelectHdl (const Link< SvtLineListBox &, void > &rLink)
 
void set_sensitive (bool bSensitive)
 
virtual void GrabFocus () override
 
- Public Member Functions inherited from WeldToolbarPopup
 WeldToolbarPopup (css::uno::Reference< css::frame::XFrame > xFrame, weld::Widget *pParent, const OUString &rUIFile, const OUString &rId)
 
virtual ~WeldToolbarPopup ()
 
weld::ContainergetTopLevel ()
 
weld::ContainergetContainer ()
 
void AddStatusListener (const OUString &rCommandURL)
 
virtual void statusChanged (const css::frame::FeatureStateEvent &Event)
 
virtual void GrabFocus ()=0
 

Static Public Member Functions

static OUString GetLineStyleName (SvxBorderLineStyle eStyle)
 

Private Member Functions

SVT_DLLPRIVATE void ImpGetLine (tools::Long nLine1, tools::Long nLine2, tools::Long nDistance, Color nColor1, Color nColor2, Color nColorDist, SvxBorderLineStyle nStyle, BitmapEx &rBmp)
 
 DECL_DLLPRIVATE_LINK (ValueSelectHdl, ValueSet *, void)
 
 DECL_DLLPRIVATE_LINK (ToggleHdl, weld::Toggleable &, void)
 
 DECL_DLLPRIVATE_LINK (NoneHdl, weld::Button &, void)
 
 DECL_DLLPRIVATE_LINK (StyleUpdatedHdl, weld::Widget &, void)
 
void UpdateEntries ()
 
void UpdatePreview ()
 
 SvtLineListBox (const SvtLineListBox &)=delete
 
SvtLineListBoxoperator= (const SvtLineListBox &)=delete
 

Private Attributes

std::unique_ptr< weld::MenuButtonm_xControl
 
std::unique_ptr< weld::Buttonm_xNoneButton
 
std::unique_ptr< ValueSetm_xLineSet
 
std::unique_ptr< weld::CustomWeldm_xLineSetWin
 
std::vector< std::unique_ptr< ImpLineListData > > m_vLineList
 
tools::Long m_nWidth
 
ScopedVclPtr< VirtualDeviceaVirDev
 
Color aColor
 
FieldUnit eSourceUnit
 
Link< SvtLineListBox &, void > maSelectHdl
 

Additional Inherited Members

- Protected Attributes inherited from WeldToolbarPopup
std::unique_ptr< weld::Builderm_xBuilder
 
std::unique_ptr< weld::Containerm_xTopLevel
 
std::unique_ptr< weld::Containerm_xContainer
 
css::uno::Reference< css::frame::XFrame > m_xFrame
 
rtl::Reference< svt::FrameStatusListenerm_xStatusListener
 

Detailed Description

Definition at line 202 of file ctrlbox.hxx.

Member Typedef Documentation

◆ ColorDistFunc

typedef Color(* SvtLineListBox::ColorDistFunc) (Color, Color)

Definition at line 206 of file ctrlbox.hxx.

◆ ColorFunc

typedef Color(* SvtLineListBox::ColorFunc) (Color)

Definition at line 205 of file ctrlbox.hxx.

Constructor & Destructor Documentation

◆ SvtLineListBox() [1/2]

SvtLineListBox::SvtLineListBox ( std::unique_ptr< weld::MenuButton pControl)

◆ ~SvtLineListBox()

SvtLineListBox::~SvtLineListBox ( )

Definition at line 1465 of file ctrlbox.cxx.

◆ SvtLineListBox() [2/2]

SvtLineListBox::SvtLineListBox ( const SvtLineListBox )
privatedelete

Member Function Documentation

◆ DECL_DLLPRIVATE_LINK() [1/4]

SvtLineListBox::DECL_DLLPRIVATE_LINK ( NoneHdl  ,
weld::Button ,
void   
)
private

◆ DECL_DLLPRIVATE_LINK() [2/4]

SvtLineListBox::DECL_DLLPRIVATE_LINK ( StyleUpdatedHdl  ,
weld::Widget ,
void   
)
private

◆ DECL_DLLPRIVATE_LINK() [3/4]

SvtLineListBox::DECL_DLLPRIVATE_LINK ( ToggleHdl  ,
weld::Toggleable ,
void   
)
private

◆ DECL_DLLPRIVATE_LINK() [4/4]

SvtLineListBox::DECL_DLLPRIVATE_LINK ( ValueSelectHdl  ,
ValueSet ,
void   
)
private

◆ GetColor()

const Color & SvtLineListBox::GetColor ( ) const
inline

Definition at line 242 of file ctrlbox.hxx.

◆ GetLineStyleName()

OUString SvtLineListBox::GetLineStyleName ( SvxBorderLineStyle  eStyle)
static

Definition at line 1469 of file ctrlbox.cxx.

References first, i, SAL_N_ELEMENTS, and SvtResId().

Referenced by SvtLineListBox(), UpdateEntries(), and UpdatePreview().

◆ GetSelectEntryStyle()

SvxBorderLineStyle SvtLineListBox::GetSelectEntryStyle ( ) const

Definition at line 1329 of file ctrlbox.cxx.

References m_xLineSet, and nId.

Referenced by GrabFocus(), UpdateEntries(), and UpdatePreview().

◆ GetWidth()

tools::Long SvtLineListBox::GetWidth ( ) const
inline

Definition at line 221 of file ctrlbox.hxx.

◆ GrabFocus()

void SvtLineListBox::GrabFocus ( )
overridevirtual

Implements WeldToolbarPopup.

Definition at line 1439 of file ctrlbox.cxx.

References GetSelectEntryStyle(), m_xLineSet, and m_xNoneButton.

◆ ImpGetLine()

void SvtLineListBox::ImpGetLine ( tools::Long  nLine1,
tools::Long  nLine2,
tools::Long  nDistance,
Color  nColor1,
Color  nColor2,
Color  nColorDist,
SvxBorderLineStyle  nStyle,
BitmapEx rBmp 
)
private

◆ InsertEntry()

void SvtLineListBox::InsertEntry ( const BorderWidthImpl rWidthImpl,
SvxBorderLineStyle  nStyle,
tools::Long  nMinWidth = 0,
ColorFunc  pColor1Fn = &sameColor,
ColorFunc  pColor2Fn = &sameColor,
ColorDistFunc  pColorDistFn = &sameDistColor 
)

Insert a listbox entry with all widths in Twips.

Definition at line 1492 of file ctrlbox.cxx.

References m_vLineList.

◆ operator=()

SvtLineListBox & SvtLineListBox::operator= ( const SvtLineListBox )
privatedelete

◆ SelectEntry()

void SvtLineListBox::SelectEntry ( SvxBorderLineStyle  nStyle)

Definition at line 1483 of file ctrlbox.cxx.

References m_xLineSet, and UpdatePreview().

◆ set_sensitive()

void SvtLineListBox::set_sensitive ( bool  bSensitive)
inline

Definition at line 246 of file ctrlbox.hxx.

References m_xControl.

◆ SetColor()

void SvtLineListBox::SetColor ( const Color rColor)
inline

Definition at line 235 of file ctrlbox.hxx.

◆ SetSelectHdl()

void SvtLineListBox::SetSelectHdl ( const Link< SvtLineListBox &, void > &  rLink)
inline

Definition at line 244 of file ctrlbox.hxx.

◆ SetSourceUnit()

void SvtLineListBox::SetSourceUnit ( FieldUnit  eNewUnit)
inline

Definition at line 233 of file ctrlbox.hxx.

◆ SetWidth()

void SvtLineListBox::SetWidth ( tools::Long  nWidth)
inline

Set the width in Twips.

Definition at line 214 of file ctrlbox.hxx.

◆ UpdateEntries()

void SvtLineListBox::UpdateEntries ( )
private

◆ UpdatePreview()

void SvtLineListBox::UpdatePreview ( )
private

Member Data Documentation

◆ aColor

Color SvtLineListBox::aColor
private

Definition at line 276 of file ctrlbox.hxx.

Referenced by UpdateEntries().

◆ aVirDev

ScopedVclPtr<VirtualDevice> SvtLineListBox::aVirDev
private

Definition at line 275 of file ctrlbox.hxx.

Referenced by ImpGetLine(), SvtLineListBox(), and UpdatePreview().

◆ eSourceUnit

FieldUnit SvtLineListBox::eSourceUnit
private

Definition at line 277 of file ctrlbox.hxx.

Referenced by ImpGetLine(), and SvtLineListBox().

◆ m_nWidth

tools::Long SvtLineListBox::m_nWidth
private

Definition at line 274 of file ctrlbox.hxx.

Referenced by UpdateEntries().

◆ m_vLineList

std::vector<std::unique_ptr<ImpLineListData> > SvtLineListBox::m_vLineList
private

Definition at line 273 of file ctrlbox.hxx.

Referenced by InsertEntry(), and UpdateEntries().

◆ m_xControl

std::unique_ptr<weld::MenuButton> SvtLineListBox::m_xControl
private

Definition at line 268 of file ctrlbox.hxx.

Referenced by ImpGetLine(), SvtLineListBox(), and UpdatePreview().

◆ m_xLineSet

std::unique_ptr<ValueSet> SvtLineListBox::m_xLineSet
private

◆ m_xLineSetWin

std::unique_ptr<weld::CustomWeld> SvtLineListBox::m_xLineSetWin
private

Definition at line 271 of file ctrlbox.hxx.

◆ m_xNoneButton

std::unique_ptr<weld::Button> SvtLineListBox::m_xNoneButton
private

Definition at line 269 of file ctrlbox.hxx.

Referenced by GrabFocus(), and SvtLineListBox().

◆ maSelectHdl

Link<SvtLineListBox&,void> SvtLineListBox::maSelectHdl
private

Definition at line 278 of file ctrlbox.hxx.


The documentation for this class was generated from the following files: