Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SimplePickerCell Class Reference

#include <simplepicker.h>

Inheritance diagram for SimplePickerCell:
PickerCell ValuedPickerCell< T >

Public Member Functions

virtual std::string text (void) const
 
virtual std::string id (void) const
 
virtual GFXColor textColor (void) const
 
virtual PickerCellschildren (void) const
 
virtual int tag (void) const
 
virtual void setTextColor (const GFXColor &c)
 
void addChild (SimplePickerCell *c)
 
SimplePickerCellscreateEmptyChildList (void)
 
 SimplePickerCell (const std::string &t, const std::string &id="", const GFXColor &c=GUI_CLEAR, int newTag=0)
 
virtual ~SimplePickerCell (void)
 
SimplePickerCelloperator= (const SimplePickerCell &cell)
 
 SimplePickerCell (const SimplePickerCell &cell)
 
- Public Member Functions inherited from PickerCell
virtual ~PickerCell ()
 
virtual bool hideChildren (void) const
 
virtual void setHideChildren (bool f)
 
 PickerCell (bool hideChildren=true)
 

Protected Attributes

std::string m_text
 
std::string m_id
 
GFXColor m_textColor
 
int m_tag
 
SimplePickerCellsm_children
 
- Protected Attributes inherited from PickerCell
bool m_hideChildren
 

Detailed Description

Definition at line 33 of file simplepicker.h.

Constructor & Destructor Documentation

SimplePickerCell::SimplePickerCell ( const std::string &  t,
const std::string &  id = "",
const GFXColor c = GUI_CLEAR,
int  newTag = 0 
)

Definition at line 45 of file simplepicker.cpp.

45  :
46  m_text( t )
47  , m_id( id )
48  , m_textColor( c )
49  , m_tag( tag )
50  , m_children( NULL )
51 {}
SimplePickerCell::~SimplePickerCell ( void  )
virtual

Definition at line 54 of file simplepicker.cpp.

References m_children.

55 {
56  if (m_children != NULL)
57  delete m_children;
58 }
SimplePickerCell::SimplePickerCell ( const SimplePickerCell cell)

Definition at line 73 of file simplepicker.cpp.

74 {
75  *this = cell;
76 }

Member Function Documentation

void SimplePickerCell::addChild ( SimplePickerCell c)
virtual PickerCells* SimplePickerCell::children ( void  ) const
inlinevirtual

Implements PickerCell.

Definition at line 52 of file simplepicker.h.

References m_children.

Referenced by BaseComputer::createCategoryCell().

53  {
54  return (PickerCells*) m_children;
55  }
SimplePickerCells * SimplePickerCell::createEmptyChildList ( void  )

Definition at line 37 of file simplepicker.cpp.

References m_children.

Referenced by addChild(), and BaseComputer::createCategoryCell().

38 {
39  if (m_children == NULL)
41  return m_children;
42 }
virtual std::string SimplePickerCell::id ( void  ) const
inlinevirtual

Implements PickerCell.

Definition at line 42 of file simplepicker.h.

References m_id.

43  {
44  return m_id;
45  }
SimplePickerCell & SimplePickerCell::operator= ( const SimplePickerCell cell)

Definition at line 60 of file simplepicker.cpp.

References m_children, m_id, m_tag, m_text, and m_textColor.

61 {
62  m_text = cell.m_text;
63  m_id = cell.m_id;
64  m_textColor = cell.m_textColor;
65  m_tag = cell.m_tag;
66  m_children = NULL;
67  if (cell.m_children != NULL)
68  //Need to make a copy of the children.
70  return *this;
71 }
virtual void SimplePickerCell::setTextColor ( const GFXColor c)
inlinevirtual

Definition at line 62 of file simplepicker.h.

References c, and m_textColor.

Referenced by BaseComputer::loadBuyUpgradeControls().

63  {
64  m_textColor = c;
65  }
virtual int SimplePickerCell::tag ( void  ) const
inlinevirtual

Implements PickerCell.

Definition at line 57 of file simplepicker.h.

References m_tag.

58  {
59  return m_tag;
60  }
virtual std::string SimplePickerCell::text ( void  ) const
inlinevirtual

Implements PickerCell.

Definition at line 37 of file simplepicker.h.

References m_text.

Referenced by BaseComputer::loadBuyUpgradeControls().

38  {
39  return m_text;
40  }
virtual GFXColor SimplePickerCell::textColor ( void  ) const
inlinevirtual

Implements PickerCell.

Definition at line 47 of file simplepicker.h.

References m_textColor.

Referenced by BaseComputer::loadBuyUpgradeControls().

48  {
49  return m_textColor;
50  }

Member Data Documentation

SimplePickerCells* SimplePickerCell::m_children
protected

Definition at line 85 of file simplepicker.h.

Referenced by addChild(), children(), createEmptyChildList(), operator=(), and ~SimplePickerCell().

std::string SimplePickerCell::m_id
protected

Definition at line 82 of file simplepicker.h.

Referenced by id(), and operator=().

int SimplePickerCell::m_tag
protected

Definition at line 84 of file simplepicker.h.

Referenced by operator=(), and tag().

std::string SimplePickerCell::m_text
protected

Definition at line 81 of file simplepicker.h.

Referenced by operator=(), and text().

GFXColor SimplePickerCell::m_textColor
protected

Definition at line 83 of file simplepicker.h.

Referenced by operator=(), setTextColor(), and textColor().


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