ListBox Class Reference

#include <lstbox.hxx>

Inheritance diagram for ListBox:

Inheritance graph
[legend]
Collaboration diagram for ListBox:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ListBox (Window *pParent, WinBits nStyle=WB_BORDER)
 ListBox (Window *pParent, const ResId &rResId)
 ~ListBox ()
virtual void Draw (OutputDevice *pDev, const Point &rPos, const Size &rSize, ULONG nFlags)
virtual void Resize ()
virtual long PreNotify (NotifyEvent &rNEvt)
virtual void StateChanged (StateChangedType nType)
virtual void DataChanged (const DataChangedEvent &rDCEvt)
virtual void UserDraw (const UserDrawEvent &rUDEvt)
virtual void Select ()
virtual void DoubleClick ()
virtual void GetFocus ()
virtual void LoseFocus ()
virtual WindowGetPreferredKeyInputWindow ()
virtual const WallpaperGetDisplayBackground () const
virtual void SetPosSizePixel (long nX, long nY, long nWidth, long nHeight, USHORT nFlags=WINDOW_POSSIZE_ALL)
void SetPosSizePixel (const Point &rNewPos, const Size &rNewSize)
void SetDropDownSizePixel (const Size &rNewSize)
Rectangle GetDropDownPosSizePixel () const
void SetDropDownLineCount (USHORT nLines)
USHORT GetDropDownLineCount () const
void EnableAutoSize (BOOL bAuto)
BOOL IsAutoSizeEnabled () const
void EnableDDAutoWidth (BOOL b)
BOOL IsDDAutoWidthEnabled () const
virtual USHORT InsertEntry (const XubString &rStr, USHORT nPos=LISTBOX_APPEND)
virtual USHORT InsertEntry (const Image &rImage, USHORT nPos=LISTBOX_APPEND)
virtual USHORT InsertEntry (const XubString &rStr, const Image &rImage, USHORT nPos=LISTBOX_APPEND)
virtual void RemoveEntry (const XubString &rStr)
virtual void RemoveEntry (USHORT nPos)
virtual void Clear ()
virtual USHORT GetEntryPos (const XubString &rStr) const
virtual USHORT GetEntryPos (const void *pData) const
virtual XubString GetEntry (USHORT nPos) const
virtual USHORT GetEntryCount () const
virtual void SelectEntry (const XubString &rStr, BOOL bSelect=TRUE)
virtual void SelectEntryPos (USHORT nPos, BOOL bSelect=TRUE)
virtual USHORT GetSelectEntryCount () const
virtual XubString GetSelectEntry (USHORT nSelIndex=0) const
virtual USHORT GetSelectEntryPos (USHORT nSelIndex=0) const
virtual BOOL IsEntrySelected (const XubString &rStr) const
virtual BOOL IsEntryPosSelected (USHORT nPos) const
virtual void SetNoSelection ()
void SetEntryData (USHORT nPos, void *pNewData)
void * GetEntryData (USHORT nPos) const
void SetEntryFlags (USHORT nPos, long nFlags)
 this methods stores a combination of flags from the LISTBOX_ENTRY_FLAG_* defines at the given entry.
long GetEntryFlags (USHORT nPos) const
 this methods gets the current combination of flags from the LISTBOX_ENTRY_FLAG_* defines from the given entry.
void SetTopEntry (USHORT nPos)
void SetTopEntryStr (const XubString &rStr)
USHORT GetTopEntry () const
void SaveValue ()
USHORT GetSavedValue () const
void SetSeparatorPos (USHORT n)
void SetSeparatorPos ()
USHORT GetSeparatorPos () const
BOOL IsTravelSelect () const
BOOL IsInDropDown () const
void ToggleDropDown ()
void EnableMultiSelection (BOOL bMulti, BOOL bStackSelection)
void EnableMultiSelection (BOOL bMulti)
BOOL IsMultiSelectionEnabled () const
void SetReadOnly (BOOL bReadOnly=TRUE)
BOOL IsReadOnly () const
long CalcWindowSizePixel (USHORT nLines) const
Rectangle GetBoundingRectangle (USHORT nItem) const
void SetUserItemSize (const Size &rSz)
const Size & GetUserItemSize () const
void EnableUserDraw (BOOL bUserDraw)
BOOL IsUserDrawEnabled () const
void DrawEntry (const UserDrawEvent &rEvt, BOOL bDrawImage, BOOL bDrawText, BOOL bDrawTextAtImagePos=FALSE)
void SetSelectHdl (const Link &rLink)
const Link & GetSelectHdl () const
void SetDoubleClickHdl (const Link &rLink)
const Link & GetDoubleClickHdl () const
Size CalcMinimumSize () const
virtual Size GetOptimalSize (WindowSizeType eType) const
Size CalcAdjustedSize (const Size &rPrefSize) const
Size CalcSize (USHORT nColumns, USHORT nLines) const
void GetMaxVisColumnsAndLines (USHORT &rnCols, USHORT &rnLines) const
void SetMRUEntries (const XubString &rEntries, xub_Unicode cSep= ';')
XubString GetMRUEntries (xub_Unicode cSep= ';') const
void SetMaxMRUCount (USHORT n)
USHORT GetMaxMRUCount () const
USHORT GetDisplayLineCount () const
void EnableMirroring ()
long GetIndexForPoint (const Point &rPoint, USHORT &rPos) const

Protected Member Functions

SAL_DLLPRIVATE void ImplInit (Window *pParent, WinBits nStyle)
SAL_DLLPRIVATE WinBits ImplInitStyle (WinBits nStyle)
SAL_DLLPRIVATE void ImplLoadRes (const ResId &rResId)
BOOL IsDropDownBox () const
 ListBox (WindowType nType)
virtual void FillLayoutData () const

Private Member Functions

SAL_DLLPRIVATE void ImplInitListBoxData ()
 DECL_DLLPRIVATE_LINK (ImplSelectHdl, void *)
 DECL_DLLPRIVATE_LINK (ImplScrollHdl, void *)
 DECL_DLLPRIVATE_LINK (ImplCancelHdl, void *)
 DECL_DLLPRIVATE_LINK (ImplDoubleClickHdl, void *)
 DECL_DLLPRIVATE_LINK (ImplClickBtnHdl, void *)
 DECL_DLLPRIVATE_LINK (ImplPopupModeEndHdl, void *)
 DECL_DLLPRIVATE_LINK (ImplSelectionChangedHdl, void *)
 DECL_DLLPRIVATE_LINK (ImplUserDrawHdl, UserDrawEvent *)

Private Attributes

ImplListBoxmpImplLB
ImplListBoxFloatingWindowmpFloatWin
ImplWinmpImplWin
ImplBtnmpBtn
USHORT mnDDHeight
USHORT mnSaveValue
BOOL mbDDAutoSize
Link maSelectHdl
Link maDoubleClickHdl
USHORT mnLineCount


Detailed Description

Definition at line 45 of file lstbox.hxx.


Constructor & Destructor Documentation

ListBox::ListBox ( WindowType  nType  )  [protected]

Definition at line 51 of file lstbox.cxx.

References ImplInitListBoxData().

ListBox::ListBox ( Window pParent,
WinBits  nStyle = WB_BORDER 
)

Definition at line 58 of file lstbox.cxx.

References ImplInit(), and ImplInitListBoxData().

ListBox::ListBox ( Window pParent,
const ResId &  rResId 
)

ListBox::~ListBox (  ) 


Member Function Documentation

void ListBox::ImplInitListBoxData (  )  [private]

Definition at line 99 of file lstbox.cxx.

References LISTBOX_ENTRY_NOTFOUND, mbDDAutoSize, mnDDHeight, mnLineCount, mnSaveValue, mpBtn, mpFloatWin, mpImplLB, and mpImplWin.

Referenced by ListBox().

ListBox::DECL_DLLPRIVATE_LINK ( ImplSelectHdl  ,
void *   
) [private]

ListBox::DECL_DLLPRIVATE_LINK ( ImplScrollHdl  ,
void *   
) [private]

ListBox::DECL_DLLPRIVATE_LINK ( ImplCancelHdl  ,
void *   
) [private]

ListBox::DECL_DLLPRIVATE_LINK ( ImplDoubleClickHdl  ,
void *   
) [private]

ListBox::DECL_DLLPRIVATE_LINK ( ImplClickBtnHdl  ,
void *   
) [private]

ListBox::DECL_DLLPRIVATE_LINK ( ImplPopupModeEndHdl  ,
void *   
) [private]

ListBox::DECL_DLLPRIVATE_LINK ( ImplSelectionChangedHdl  ,
void *   
) [private]

ListBox::DECL_DLLPRIVATE_LINK ( ImplUserDrawHdl  ,
UserDrawEvent  
) [private]

void ListBox::ImplInit ( Window pParent,
WinBits  nStyle 
) [protected]

WinBits ListBox::ImplInitStyle ( WinBits  nStyle  )  [protected]

Definition at line 187 of file lstbox.cxx.

References WB_GROUP, WB_NOGROUP, WB_NOTABSTOP, and WB_TABSTOP.

Referenced by ImplInit(), and StateChanged().

void ListBox::ImplLoadRes ( const ResId &  rResId  )  [protected]

Reimplemented from Window.

Definition at line 198 of file lstbox.cxx.

References Window::ImplLoadRes(), InsertEntry(), LISTBOX_APPEND, SelectEntryPos(), and SetEntryData().

Referenced by ListBox(), and MultiListBox::MultiListBox().

BOOL ListBox::IsDropDownBox (  )  const [inline, protected]

void ListBox::FillLayoutData (  )  const [protected, virtual]

void ListBox::Draw ( OutputDevice pDev,
const Point &  rPos,
const Size &  rSize,
ULONG  nFlags 
) [virtual]

void ListBox::Resize (  )  [virtual]

long ListBox::PreNotify ( NotifyEvent rNEvt  )  [virtual]

void ListBox::StateChanged ( StateChangedType  nType  )  [virtual]

void ListBox::DataChanged ( const DataChangedEvent rDCEvt  )  [virtual]

void ListBox::UserDraw ( const UserDrawEvent rUDEvt  )  [virtual]

Definition at line 1425 of file lstbox.cxx.

Referenced by IMPL_LINK().

void ListBox::Select (  )  [virtual]

Definition at line 995 of file lstbox.cxx.

References Control::ImplCallEventListenersAndHandler(), maSelectHdl, and VCLEVENT_LISTBOX_SELECT.

Referenced by IMPL_LINK().

void ListBox::DoubleClick (  )  [virtual]

void ListBox::GetFocus (  )  [virtual]

Reimplemented from Control.

Definition at line 502 of file lstbox.cxx.

References Control::GetFocus(), Window::GrabFocus(), IsDropDownBox(), mpImplLB, and mpImplWin.

void ListBox::LoseFocus (  )  [virtual]

Reimplemented from Control.

Definition at line 532 of file lstbox.cxx.

References Window::HideFocus(), IsDropDownBox(), Control::LoseFocus(), mpImplLB, and mpImplWin.

Window * ListBox::GetPreferredKeyInputWindow (  )  [virtual]

const Wallpaper & ListBox::GetDisplayBackground (  )  const [virtual]

Reimplemented from Window.

Definition at line 1563 of file lstbox.cxx.

References ImplListBox::GetDisplayBackground(), and mpImplLB.

void ListBox::SetPosSizePixel ( long  nX,
long  nY,
long  nWidth,
long  nHeight,
USHORT  nFlags = WINDOW_POSSIZE_ALL 
) [virtual]

void ListBox::SetPosSizePixel ( const Point &  rNewPos,
const Size &  rNewSize 
) [inline, virtual]

Reimplemented from Window.

Definition at line 107 of file lstbox.hxx.

References Window::SetPosSizePixel().

void ListBox::SetDropDownSizePixel ( const Size &  rNewSize  )  [inline]

Rectangle ListBox::GetDropDownPosSizePixel (  )  const

Definition at line 1556 of file lstbox.cxx.

References Window::GetWindowExtentsRelative(), and mpFloatWin.

void ListBox::SetDropDownLineCount ( USHORT  nLines  ) 

USHORT ListBox::GetDropDownLineCount (  )  const

void ListBox::EnableAutoSize ( BOOL  bAuto  ) 

BOOL ListBox::IsAutoSizeEnabled (  )  const [inline]

Definition at line 118 of file lstbox.hxx.

Referenced by SetPosSizePixel().

void ListBox::EnableDDAutoWidth ( BOOL  b  ) 

Definition at line 589 of file lstbox.cxx.

References mpFloatWin, and ImplListBoxFloatingWindow::SetAutoWidth().

BOOL ListBox::IsDDAutoWidthEnabled (  )  const

Definition at line 597 of file lstbox.cxx.

References ImplListBoxFloatingWindow::IsAutoWidth(), and mpFloatWin.

USHORT ListBox::InsertEntry ( const XubString &  rStr,
USHORT  nPos = LISTBOX_APPEND 
) [virtual]

USHORT ListBox::InsertEntry ( const Image rImage,
USHORT  nPos = LISTBOX_APPEND 
) [virtual]

USHORT ListBox::InsertEntry ( const XubString &  rStr,
const Image rImage,
USHORT  nPos = LISTBOX_APPEND 
) [virtual]

void ListBox::RemoveEntry ( const XubString &  rStr  )  [virtual]

Definition at line 1070 of file lstbox.cxx.

References GetEntryPos().

Referenced by DbgWindow::InsertLine().

void ListBox::RemoveEntry ( USHORT  nPos  )  [virtual]

void ListBox::Clear (  )  [virtual]

USHORT ListBox::GetEntryPos ( const XubString &  rStr  )  const [virtual]

USHORT ListBox::GetEntryPos ( const void *  pData  )  const [virtual]

XubString ListBox::GetEntry ( USHORT  nPos  )  const [virtual]

USHORT ListBox::GetEntryCount (  )  const [virtual]

void ListBox::SelectEntry ( const XubString &  rStr,
BOOL  bSelect = TRUE 
) [virtual]

Definition at line 1161 of file lstbox.cxx.

References GetEntryPos(), and SelectEntryPos().

void ListBox::SelectEntryPos ( USHORT  nPos,
BOOL  bSelect = TRUE 
) [virtual]

USHORT ListBox::GetSelectEntryCount (  )  const [virtual]

XubString ListBox::GetSelectEntry ( USHORT  nSelIndex = 0  )  const [virtual]

Definition at line 1119 of file lstbox.cxx.

References GetEntry(), and GetSelectEntryPos().

Referenced by Draw(), and IMPL_LINK().

USHORT ListBox::GetSelectEntryPos ( USHORT  nSelIndex = 0  )  const [virtual]

BOOL ListBox::IsEntrySelected ( const XubString &  rStr  )  const [virtual]

Definition at line 1147 of file lstbox.cxx.

References GetEntryPos(), and IsEntryPosSelected().

BOOL ListBox::IsEntryPosSelected ( USHORT  nPos  )  const [virtual]

void ListBox::SetNoSelection (  )  [virtual]

void ListBox::SetEntryData ( USHORT  nPos,
void *  pNewData 
)

void * ListBox::GetEntryData ( USHORT  nPos  )  const

void ListBox::SetEntryFlags ( USHORT  nPos,
long  nFlags 
)

this methods stores a combination of flags from the LISTBOX_ENTRY_FLAG_* defines at the given entry.

See description of the possible LISTBOX_ENTRY_FLAG_* flags for details. Do not use these flags for user data as they are reserved to change the internal behaviour of the ListBox implementation for specific entries.

Definition at line 1190 of file lstbox.cxx.

References ImplListBox::GetEntryList(), ImplEntryList::GetMRUCount(), mpImplLB, and ImplListBox::SetEntryFlags().

long ListBox::GetEntryFlags ( USHORT  nPos  )  const

this methods gets the current combination of flags from the LISTBOX_ENTRY_FLAG_* defines from the given entry.

See description of the possible LISTBOX_ENTRY_FLAG_* flags for details.

Definition at line 1197 of file lstbox.cxx.

References ImplEntryList::GetEntryFlags(), ImplListBox::GetEntryList(), ImplEntryList::GetMRUCount(), and mpImplLB.

void ListBox::SetTopEntry ( USHORT  nPos  ) 

void ListBox::SetTopEntryStr ( const XubString &  rStr  ) 

USHORT ListBox::GetTopEntry (  )  const

void ListBox::SaveValue (  )  [inline]

Reimplemented in MultiListBox.

Definition at line 171 of file lstbox.hxx.

USHORT ListBox::GetSavedValue (  )  const [inline]

Definition at line 172 of file lstbox.hxx.

void ListBox::SetSeparatorPos ( USHORT  n  ) 

Definition at line 1491 of file lstbox.cxx.

References mpImplLB, and ImplListBox::SetSeparatorPos().

void ListBox::SetSeparatorPos (  ) 

Definition at line 1498 of file lstbox.cxx.

References LISTBOX_ENTRY_NOTFOUND, mpImplLB, and ImplListBox::SetSeparatorPos().

USHORT ListBox::GetSeparatorPos (  )  const

Definition at line 1505 of file lstbox.cxx.

References ImplListBox::GetSeparatorPos(), and mpImplLB.

BOOL ListBox::IsTravelSelect (  )  const

Definition at line 1221 of file lstbox.cxx.

References ImplListBox::IsTravelSelect(), and mpImplLB.

Referenced by IMPL_LINK().

BOOL ListBox::IsInDropDown (  )  const

Definition at line 1228 of file lstbox.cxx.

References FloatingWindow::IsInPopupMode(), and mpFloatWin.

Referenced by IMPL_LINK(), and PreNotify().

void ListBox::ToggleDropDown (  ) 

void ListBox::EnableMultiSelection ( BOOL  bMulti,
BOOL  bStackSelection 
)

void ListBox::EnableMultiSelection ( BOOL  bMulti  ) 

Definition at line 1250 of file lstbox.cxx.

References EnableMultiSelection().

BOOL ListBox::IsMultiSelectionEnabled (  )  const

Definition at line 1273 of file lstbox.cxx.

References ImplListBox::IsMultiSelectionEnabled(), and mpImplLB.

Referenced by IMPL_LINK().

void ListBox::SetReadOnly ( BOOL  bReadOnly = TRUE  ) 

BOOL ListBox::IsReadOnly (  )  const

Definition at line 1484 of file lstbox.cxx.

References ImplListBox::IsReadOnly(), and mpImplLB.

Referenced by StateChanged().

long ListBox::CalcWindowSizePixel ( USHORT  nLines  )  const

Definition at line 1235 of file lstbox.cxx.

References ImplListBox::GetEntryHeight(), and mpImplLB.

Rectangle ListBox::GetBoundingRectangle ( USHORT  nItem  )  const

void ListBox::SetUserItemSize ( const Size &  rSz  ) 

const Size & ListBox::GetUserItemSize (  )  const

void ListBox::EnableUserDraw ( BOOL  bUserDraw  ) 

BOOL ListBox::IsUserDrawEnabled (  )  const

void ListBox::DrawEntry ( const UserDrawEvent rEvt,
BOOL  bDrawImage,
BOOL  bDrawText,
BOOL  bDrawTextAtImagePos = FALSE 
)

void ListBox::SetSelectHdl ( const Link &  rLink  )  [inline]

Definition at line 200 of file lstbox.hxx.

const Link& ListBox::GetSelectHdl (  )  const [inline]

Definition at line 201 of file lstbox.hxx.

void ListBox::SetDoubleClickHdl ( const Link &  rLink  )  [inline]

Definition at line 202 of file lstbox.hxx.

const Link& ListBox::GetDoubleClickHdl (  )  const [inline]

Definition at line 203 of file lstbox.hxx.

Size ListBox::CalcMinimumSize (  )  const

Size ListBox::GetOptimalSize ( WindowSizeType  eType  )  const [virtual]

Reimplemented from Control.

Definition at line 1318 of file lstbox.cxx.

References CalcMinimumSize(), Control::GetOptimalSize(), and WINDOWSIZE_MINIMUM.

Size ListBox::CalcAdjustedSize ( const Size &  rPrefSize  )  const

Definition at line 1330 of file lstbox.cxx.

References CalcSize(), Window::CalcWindowSize(), IsDropDownBox(), and mnDDHeight.

Size ListBox::CalcSize ( USHORT  nColumns,
USHORT  nLines 
) const

void ListBox::GetMaxVisColumnsAndLines ( USHORT &  rnCols,
USHORT &  rnLines 
) const

void ListBox::SetMRUEntries ( const XubString &  rEntries,
xub_Unicode  cSep = ';' 
)

Definition at line 1512 of file lstbox.cxx.

References mpImplLB, and ImplListBox::SetMRUEntries().

XubString ListBox::GetMRUEntries ( xub_Unicode  cSep = ';'  )  const

Definition at line 1519 of file lstbox.cxx.

References ImplListBox::GetMRUEntries(), and mpImplLB.

void ListBox::SetMaxMRUCount ( USHORT  n  ) 

Definition at line 1526 of file lstbox.cxx.

References mpImplLB, and ImplListBox::SetMaxMRUCount().

USHORT ListBox::GetMaxMRUCount (  )  const

Definition at line 1533 of file lstbox.cxx.

References ImplListBox::GetMaxMRUCount(), and mpImplLB.

USHORT ListBox::GetDisplayLineCount (  )  const

Definition at line 1540 of file lstbox.cxx.

References ImplListBox::GetDisplayLineCount(), and mpImplLB.

void ListBox::EnableMirroring (  ) 

Definition at line 1549 of file lstbox.cxx.

References ImplListBox::EnableMirroring(), and mpImplLB.

long ListBox::GetIndexForPoint ( const Point &  rPoint,
USHORT &  rPos 
) const


Member Data Documentation

ImplBtn* ListBox::mpBtn [private]

USHORT ListBox::mnDDHeight [private]

USHORT ListBox::mnSaveValue [private]

Definition at line 53 of file lstbox.hxx.

Referenced by ImplInitListBoxData().

BOOL ListBox::mbDDAutoSize [private]

Definition at line 54 of file lstbox.hxx.

Referenced by EnableAutoSize(), and ImplInitListBoxData().

Link ListBox::maSelectHdl [private]

Definition at line 55 of file lstbox.hxx.

Referenced by Select().

Link ListBox::maDoubleClickHdl [private]

Definition at line 56 of file lstbox.hxx.

Referenced by DoubleClick().

USHORT ListBox::mnLineCount [private]


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

Generated on Thu Apr 29 14:00:28 2010 for ooo-build Module vcl (ooo/OOO320_m15) by  doxygen 1.5.6