Rhino C++ API  8.13
Public Types | Public Member Functions | Public Attributes | Friends | List of all members
CRhinoUiComboBoxItemData Class Reference

#include <RhinoSdkUiComboBox.h>

Public Types

enum  class_type {
  ct_font = 0, ct_color, ct_layer, ct_linetype,
  ct_print_width, ct_strings, ct_uuid, ct_invalid,
  force_32bit_class_type = 0xFFFFFFFF
}
 

Public Member Functions

 CRhinoUiComboBoxItemData (class_type ct)
 
virtual ~CRhinoUiComboBoxItemData ()
 
class_type ClassType () const
 
RhinoUiColorComboBoxItemDataColorData ()
 
RhinoUiFontComboBoxItemDataFontData ()
 
RhinoUiLayerComboBoxItemDataLayerData ()
 
RhinoUiLinetypeComboBoxItemDataLinetypeData ()
 
RhinoUiPrintWidthComboBoxItemDataPrintWidthData ()
 
void SetText (LPCTSTR lps)
 
void SetUuidData (ON_UUID uuid)
 
LPCTSTR Text () const
 
ON_UUID UuidData () const
 

Public Attributes

LONG m_lUserData
 
void * m_pUserData
 
RhinoUiColorComboBoxItemData m_color
 
RhinoUiFontComboBoxItemData m_font
 
RhinoUiLayerComboBoxItemData m_layer
 
RhinoUiLinetypeComboBoxItemData m_linetype
 
RhinoUiPrintWidthComboBoxItemData m_print_width
 
ON_UUID m_uuid
 

Friends

class CRhinoUiComboBox
 

Member Enumeration Documentation

◆ class_type

Valid CRhinoUiComboBox item data types

Enumerator
ct_font 

Font item, m_data.m_font property will be valid.

ct_color 

Color item, m_data.m_color property will be valid.

ct_layer 

Uses m_data.m_color for drawing layer color swatch.

ct_linetype 
ct_print_width 
ct_strings 

Generic item, neither font nor color items will be valid.

ct_uuid 

An ON_UUID.

ct_invalid 

For internal use, should always be last item in list

force_32bit_class_type 

for internal use only, this allows adding additional values without breaking the SDK in the future

Constructor & Destructor Documentation

◆ CRhinoUiComboBoxItemData()

CRhinoUiComboBoxItemData::CRhinoUiComboBoxItemData ( class_type  ct)

Description: Constructor

Parameters: ct [in] Type of data this object will contain. Tells constructor which property to initialize

See Also: CRhinoUiComboBoxItemData::class_type

◆ ~CRhinoUiComboBoxItemData()

virtual CRhinoUiComboBoxItemData::~CRhinoUiComboBoxItemData ( )
virtual

Description: Destructor

Member Function Documentation

◆ ClassType()

class_type CRhinoUiComboBoxItemData::ClassType ( ) const

Description: Identifies what type of data this object contains.

Returns: CRhinoUiComboBoxItemData::class_type which identifies type of data this object contains.

See Also: CRhinoUiComboBoxItemData::class_type

◆ ColorData()

RhinoUiColorComboBoxItemData* CRhinoUiComboBoxItemData::ColorData ( )

Description: Get color data associated with this object. This will only be valid if ClassType() returns ct_color.

Returns: Pointer to RhinoUiColorComboBoxItemData struct if ClassType() returns ct_color otherwise NULL.

See Also: CRhinoUiComboBoxItemData::class_type RhinoUiColorComboBoxItemData

◆ FontData()

RhinoUiFontComboBoxItemData* CRhinoUiComboBoxItemData::FontData ( )

Description: Get font data associated with this object. This will only be valid if ClassType() returns ct_font.

Returns: Pointer to RhinoUiFontComboBoxItemData struct if ClassType() returns ct_font otherwise NULL.

See Also: CRhinoUiComboBoxItemData::class_type RhinoUiFontComboBoxItemData

◆ LayerData()

RhinoUiLayerComboBoxItemData* CRhinoUiComboBoxItemData::LayerData ( )

Description: Get layer data associated with this object. This will only be valid if ClassType() returns ct_layer.

Returns: Pointer to RhinoUiLayerComboBoxItemData struct if ClassType() returns ct_layer otherwise NULL.

See Also: CRhinoUiComboBoxItemData::class_type RhinoUiLayerComboBoxItemData

◆ LinetypeData()

RhinoUiLinetypeComboBoxItemData* CRhinoUiComboBoxItemData::LinetypeData ( )

Description: Get linetype data associated with this object. This will only be valid if ClassType() returns ct_linetype.

Returns: Pointer to RhinoUiLinetypeComboBoxItemData struct if ClassType() returns ct_linetype otherwise NULL.

See Also: CRhinoUiComboBoxItemData::class_type RhinoUiLinetypeComboBoxItemData

◆ PrintWidthData()

RhinoUiPrintWidthComboBoxItemData* CRhinoUiComboBoxItemData::PrintWidthData ( )

Description: Get print width data associated with this object. This will only be valid if ClassType() returns ct_print_width.

Returns: Pointer to RhinoUiPrintWithComboBoxItemData struct if ClassType() returns ct_print_width otherwise NULL.

See Also: CRhinoUiComboBoxItemData::class_type RhinoUiPrintWidthComboBoxItemData

◆ SetText()

void CRhinoUiComboBoxItemData::SetText ( LPCTSTR  lps)

Description: Set text associated with this item. This text will be used when owner drawing items when the combo box does not include CBS_HASSTRINGS style.

Parameters: lps [in] New text value.

See Also: CRhinoUiComboBoxItemData::Text()

◆ SetUuidData()

void CRhinoUiComboBoxItemData::SetUuidData ( ON_UUID  uuid)

Description: Store uuid on this item data.0 Sets class type to ct_uuid.

See Also: CRhinoUiComboBoxItemData::class_type

◆ Text()

LPCTSTR CRhinoUiComboBoxItemData::Text ( ) const

Description: Display text associated with this item. This text will be used when owner drawing items when the combo box does not include CBS_HASSTRINGS style.

Returns: Text to owner draw.

See Also: CRhinoUiComboBoxItemData::SetText()

◆ UuidData()

ON_UUID CRhinoUiComboBoxItemData::UuidData ( ) const

Description: Get UUID associated with this object. This will only be valid if ClassType() returns ct_uuid.

Returns: The stored uuid if ClassType() returns ct_uuid otherwise NULL.

See Also: CRhinoUiComboBoxItemData::class_type

Friends And Related Function Documentation

◆ CRhinoUiComboBox

friend class CRhinoUiComboBox
friend

Member Data Documentation

◆ m_color

RhinoUiColorComboBoxItemData CRhinoUiComboBoxItemData::m_color

◆ m_font

RhinoUiFontComboBoxItemData CRhinoUiComboBoxItemData::m_font

◆ m_layer

RhinoUiLayerComboBoxItemData CRhinoUiComboBoxItemData::m_layer

◆ m_linetype

RhinoUiLinetypeComboBoxItemData CRhinoUiComboBoxItemData::m_linetype

◆ m_lUserData

LONG CRhinoUiComboBoxItemData::m_lUserData

◆ m_print_width

RhinoUiPrintWidthComboBoxItemData CRhinoUiComboBoxItemData::m_print_width

◆ m_pUserData

void* CRhinoUiComboBoxItemData::m_pUserData

Since this object is attached to combo box items using CComboBox::SetItemDataPtr() the next to properties can be used to attach additional data to item.

◆ m_uuid

ON_UUID CRhinoUiComboBoxItemData::m_uuid