10#ifndef __GUILISTBOX__H_
11#define __GUILISTBOX__H_
13#include "GUIScrollView.h"
14#include "eC_TList_doubleLinked.h"
17#include "GUIColorPropertyObserver.h"
143 const eC_Value& vX,
const eC_Value& vY,
144 const eC_Value& vWidth,
const eC_Value& vHeight,
145 const Mode_t & eMode = VER_EXT,
146 const eC_Bool & bMultipleSelection =
false,
159 const Mode_t & eMode = VER_EXT,
160 const eC_Bool & bMultipleSelection =
false,
163#ifdef GUILIANI_STREAM_GUI
198 eC_Bool
RemoveItems(eC_UInt uiStartIndex, eC_UInt uiEndIndex, eC_Bool bIsAutoAdjustArrange =
true);
346 const eC_Value& vAbsX = (eC_FromInt(-1)),
347 const eC_Value& vAbsY = (eC_FromInt(-1)));
362 const eC_UInt& uiModifiers);
372 const eC_Value& vAbsX,
373 const eC_Value& vAbsY);
390 virtual eC_Bool
DoButtonDown(
const eC_Value& vAbsX,
const eC_Value& vAbsY);
397 virtual eC_Bool
DoDragEnd(
const eC_Value& vAbsX,
const eC_Value& vAbsY);
407 virtual eC_Bool
DoDrag(
const eC_Value& vDeltaX,
const eC_Value& vDeltaY,
const eC_Value& vAbsX,
const eC_Value& vAbsY);
416#ifdef GUILIANI_STREAM_GUI
420#ifdef GUILIANI_WRITE_GUI
486 eC_Bool AddObject(
CGUIListItem* pkObject,
const eC_Bool& bAutoArrange =
true);
499 void AdjustArrangementVER_EXT(eC_Bool bVerBarIsVisible =
false);
504 void AdjustArrangementHOR_EXT(eC_Bool bHorBarIsVisible =
false);
510 void DragAndSelectItems(
const eC_Bool bShiftPressed,
const eC_Bool bCtrlPressed);
514 void RegenerateIndexStringList();
517 static const eC_UInt INDEX_COLOR_BACKGROUND;
518 static const eC_UInt INDEX_COLOR_DRAGGEDFRAME;
538 eC_Bool m_bMultipleSelection;
542 eC_Bool m_bUseKeyboard;
549 eC_Value m_vAbsXPosClickPoint;
553 eC_Value m_vAbsYPosClickPoint;
557 eC_Bool m_bIndexStringListDirty;
563 eC_Bool m_bSelectedByHighlighting;
566 eC_Bool m_bUnifyItemSize;
GUIKeyIdentifier_t
Platform independent key identifiers.
Definition: GUIEventTypeResource.h:207
ObjectHandle_t
List of object resource ids.
Definition: GUIObjectHandleResource.h:55
Helper Macros in Guiliani
GlobalProperty_t
List of property resource ids.
Definition: GUIPropertyResource.h:67
This observer provides the base-interface for controls when using color-properties.
Definition: GUIColorPropertyObserver.h:23
This is the Guiliani base class for all composite objects.
Definition: GUICompositeObject.h:70
Base class for Guiliani Events.
Definition: GUIEvent.h:26
Contains list items and can be scrolled if there is not enough space.
Definition: GUIListBox.h:103
void SetDraggedFrameBgColor(const eC_UInt &uiDraggedFrameBgColor)
~CGUIListBox()
Destructor.
void ReleaseSelection(eC_UInt uiIndex)
Mode_t
Definition: GUIListBox.h:125
void SetUnifyItemSize(const eC_Bool &bUnifyItemSize)
eC_Bool SelectObject(const CGUIObject *pObj)
virtual void GetFocus()
Reimplemented to handle selection behaviour when being operated via keyboard.
CGUIListBox(CGUICompositeObject *const pkParent, const eC_Value &vX, const eC_Value &vY, const eC_Value &vWidth, const eC_Value &vHeight, const Mode_t &eMode=VER_EXT, const eC_Bool &bMultipleSelection=false, const ObjectHandle_t &eID=NO_HANDLE)
eC_Int FindItem(const eC_String &kItemStr) const
CGUIListItem * GetItem(eC_UInt uiIndex)
eC_String GetSelectedItemStr()
void Init()
General initialization.
eC_Int GetItemIndexOfObject(const CGUIObject *pObj) const
void SetSelection(eC_UInt uiIndex)
eC_Bool RemoveItem(CGUIListItem *pItem, eC_Bool bIsAutoAdjustArrange=true)
Removes an item from the scrolled container.
void SetWidth(const eC_Value &vWidth)
eC_Int FindItemBySubstring(const eC_String &kSearchString) const
void SetItemSelectedColor(eC_UInt uiItemSelectedColor)
CGUIListItem * GetNextItem()
eC_TListDoubleLinked< eC_UInt > IndexList_t
Type used for the index of those selected items in the list box.
Definition: GUIListBox.h:110
eC_Bool AddSelection(eC_UInt uiIndex)
virtual eC_Bool DoMouseEnter(const eC_Value &vAbsX, const eC_Value &vAbsY)
CGUIListBox()
Standard constructor.
eC_TListDoubleLinked< CGUIListItem * > ItemPtrList_t
Type used for the item list that contains items.
Definition: GUIListBox.h:107
eC_UInt GetItemCount() const
eC_Bool DoKeyDown(const GUIKeyIdentifier_t &eKeyID, const eC_UInt &uiModifiers)
virtual eC_Bool DoClick(const eC_Value &vAbsX=(eC_FromInt(-1)), const eC_Value &vAbsY=(eC_FromInt(-1)))
virtual void ReadFromStream()
void RemoveSelectionObserver(CGUIObserver *pObserver)
CGUIListBox(CGUICompositeObject *const pkParent, const CGUIRect &kRect, const Mode_t &eMode=VER_EXT, const eC_Bool &bMultipleSelection=false, const ObjectHandle_t &eID=NO_HANDLE)
eC_Bool RemoveItems(eC_UInt uiStartIndex, eC_UInt uiEndIndex, eC_Bool bIsAutoAdjustArrange=true)
eC_TListDoubleLinked< eC_String > StringList_t
Type used for the string of those selected items in the list box.
Definition: GUIListBox.h:113
void ReleaseAllSelection()
virtual eC_Bool DoDragEnd(const eC_Value &vAbsX, const eC_Value &vAbsY)
void SetHeight(const eC_Value &vHeight)
eC_Bool IsObjectAnItemInList(const CGUIObject *pObj) const
void SetBgColor(const GlobalProperty_t &eBgColor)
IndexList_t GetSelectionIndexList()
void SetUseKeyboard(const eC_Bool &bUseKeyboard)
void SetDraggedFrameBgColor(const GlobalProperty_t &eDraggedFrameBgColor)
void UpdateSelection(const CGUIObject *pkObject, const CGUIEvent *pEvent)
virtual eC_Bool DoDrag(const eC_Value &vDeltaX, const eC_Value &vDeltaY, const eC_Value &vAbsX, const eC_Value &vAbsY)
void SetSelectedByHighlighting(const eC_Bool &bSelectedByHighlighting)
virtual eC_Bool DoButtonDown(const eC_Value &vAbsX, const eC_Value &vAbsY)
virtual eC_Bool RequestFocusForSelection()
void SetBgColor(const eC_UInt &uiBgColor)
void SetMultipleSelection(const eC_Bool &bMultiSelection)
StringList_t GetSelectedItemsStrList()
eC_Bool AddItem(CGUIListItem *pItem, eC_Bool bIsAutoAdjustArrange=true)
virtual void WriteToStream(const eC_Bool bWriteClassID=false)
A list item is a control that is shown in a list as an element.
Definition: GUIListItem.h:64
This is the Guiliani base class all controls are derived from.
Definition: GUIObject.h:81
Observer Base class for Observer-Design-Pattern within Guiliani.
Definition: GUIObserver.h:28
Helper class to supply a platform independent rectangle implementation.
Definition: GUIRect.h:63
Subject Base class for Observer-Design-Pattern within Guiliani.
Definition: GUISubject.h:34
eC_TIterator< CGUIListItem * > Iterator
Iterator is typedef'd as eC_TIterator ot type T.
Definition: eC_TList_doubleLinked.h:74
void AddSelectionObserver(CGUIObserver *pObserver)