SkListView Class Reference

#include <SkWidget.h>

Inherits SkWidgetView, and SkWidgetView.

Collaboration diagram for SkListView:
[legend]

List of all members.

Public Types

enum  Attr {
  kBG_Attr, kNormalText_Attr, kHiliteText_Attr, kHiliteCell_Attr,
  kAttrCount
}

Public Member Functions

 SkListView (uint32_t flags=0)
virtual ~SkListView ()
SkScalar getRowHeight () const
void setRowHeight (SkScalar)
int getSelection () const
void setSelection (int)
void moveSelectionUp ()
void moveSelectionDown ()
SkPaintpaint (Attr)
SkListSourcegetListSource () const
SkListSourcesetListSource (SkListSource *)
 SkListView ()
virtual ~SkListView ()
bool hasScrollBar () const
void setHasScrollBar (bool)
int getVisibleRowCount () const
int getSelection () const
void setSelection (int)
bool moveSelectionUp ()
bool moveSelectionDown ()
SkListSourcegetListSource () const
SkListSourcesetListSource (SkListSource *)

Static Public Member Functions

static int GetWidgetEventListIndex (const SkEvent &)

Protected Member Functions

virtual void onDraw (SkCanvas *)
virtual void onSizeChange ()
virtual bool onEvent (const SkEvent &)
virtual void onInflate (const SkDOM &dom, const SkDOM::Node *node)
virtual void onDraw (SkCanvas *)
virtual void onSizeChange ()
virtual bool onEvent (const SkEvent &)
virtual void onInflate (const SkDOM &dom, const SkDOM::Node *node)
virtual bool onPrepareWidgetEvent (SkEvent *)

Detailed Description

Definition at line 352 of file SkWidget.h.


Member Enumeration Documentation

Enumerator:
kBG_Attr 
kNormalText_Attr 
kHiliteText_Attr 
kHiliteCell_Attr 
kAttrCount 

Definition at line 370 of file SkWidget.h.


Constructor & Destructor Documentation

SkListView::SkListView ( uint32_t  flags = 0  ) 
virtual SkListView::~SkListView (  )  [virtual]
SkListView::SkListView (  ) 
virtual SkListView::~SkListView (  )  [virtual]

Member Function Documentation

SkListSource* SkListView::getListSource (  )  const [inline]

Definition at line 243 of file SkWidgetViews.h.

SkListSource* SkListView::getListSource (  )  const [inline]

Definition at line 379 of file SkWidget.h.

SkScalar SkListView::getRowHeight (  )  const [inline]

Definition at line 357 of file SkWidget.h.

int SkListView::getSelection (  )  const [inline]

Return the index of the selected row, or -1 if none

Definition at line 228 of file SkWidgetViews.h.

int SkListView::getSelection (  )  const [inline]

Return the index of the selected row, or -1 if none

Definition at line 362 of file SkWidget.h.

int SkListView::getVisibleRowCount (  )  const [inline]

Return the number of visible rows

Definition at line 225 of file SkWidgetViews.h.

static int SkListView::GetWidgetEventListIndex ( const SkEvent  )  [static]

Call this in your event handler. If the specified event is from a SkListView, then it returns the index of the selected item in this list, otherwise it returns -1

bool SkListView::hasScrollBar (  )  const [inline]

Definition at line 220 of file SkWidgetViews.h.

bool SkListView::moveSelectionDown (  ) 

If possible, move the selection down and return true, else do nothing and return false. If nothing is selected, select the first item (unless there are no items).

void SkListView::moveSelectionDown (  ) 
bool SkListView::moveSelectionUp (  ) 

If possible, move the selection up and return true, else do nothing and return false If nothing is selected, select the last item (unless there are no items).

void SkListView::moveSelectionUp (  ) 
virtual void SkListView::onDraw ( SkCanvas  )  [protected, virtual]
virtual void SkListView::onDraw ( SkCanvas  )  [protected, virtual]
virtual bool SkListView::onEvent ( const SkEvent  )  [protected, virtual]

Override this to handle events in your subclass. Be sure to call the inherited version for events that you don't handle.

Reimplemented from SkEventSink.

virtual bool SkListView::onEvent ( const SkEvent  )  [protected, virtual]

Override this to handle events in your subclass. Be sure to call the inherited version for events that you don't handle.

Reimplemented from SkEventSink.

virtual void SkListView::onInflate ( const SkDOM dom,
const SkDOM::Node node 
) [protected, virtual]

Override this to initialize your subclass from the XML node. Be sure to call the inherited version too

Reimplemented from SkWidgetView.

virtual void SkListView::onInflate ( const SkDOM dom,
const SkDOM::Node node 
) [protected, virtual]

Override this to initialize your subclass from the XML node. Be sure to call the inherited version too

Reimplemented from SkWidgetView.

virtual bool SkListView::onPrepareWidgetEvent ( SkEvent evt  )  [protected, virtual]

called before posting the event to our listeners. Override to add slots to the event before posting. Return true to proceed with posting, or false to not post the event to any listener. Note: the event passed in may not be the same as calling this->event(). Be sure to call your INHERITED method as well, so that all classes in the hierarchy get a shot at modifying the event (and possibly returning false to abort).

Reimplemented from SkWidgetView.

virtual void SkListView::onSizeChange (  )  [protected, virtual]
virtual void SkListView::onSizeChange (  )  [protected, virtual]
SkPaint& SkListView::paint ( Attr   ) 
void SkListView::setHasScrollBar ( bool   ) 
SkListSource* SkListView::setListSource ( SkListSource  ) 
SkListSource* SkListView::setListSource ( SkListSource  ) 
void SkListView::setRowHeight ( SkScalar   ) 
void SkListView::setSelection ( int   ) 

Set the index of the selected row, or -1 for none

void SkListView::setSelection ( int   ) 

Set the index of the selected row, or -1 for none


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

Generated on Tue Oct 20 10:33:04 2009 for Skia by  doxygen 1.6.1