Rhino C++ API  8.6
Public Member Functions | List of all members
CRhinoUiOptionsListCtrlLinetypeComboBox Class Reference

#include <RhinoSdkUiOptionsListCtrlItem.h>

Inheritance diagram for CRhinoUiOptionsListCtrlLinetypeComboBox:
CRhinoUiOptionsListCtrlComboBox CRhinoUiComboBox CRhinoUiOptionsListCtrlItem

Public Member Functions

 CRhinoUiOptionsListCtrlLinetypeComboBox (LPCTSTR lpsLabel=NULL, LPCTSTR lpsText=NULL, int iIndentLevel=0, CRhinoUiComboBoxItemData::class_type ct=CRhinoUiComboBoxItemData::ct_linetype)
 
virtual ~CRhinoUiOptionsListCtrlLinetypeComboBox ()
 
bool IncludeByLayer () const
 
bool IncludeByParent () const
 
bool IncludeDefaults () const
 
bool IncludeDeletedLinetypes () const
 
bool IncludeReferenceLinetypes () const
 
afx_msg void OnCbnSelchange ()
 
void OnItemComboBoxSelChanged ()
 
bool PopulateComboBox ()
 
bool SetIncludeByLayer (bool b)
 
bool SetIncludeByParent (bool b)
 
bool SetIncludeDefaults (bool b)
 
bool SetIncludeDeletedLinetypes (bool b)
 
bool SetIncludeReferenceLinetypes (bool b)
 
bool SetUseSortedList (bool b)
 
bool UseSortedList () const
 
- Public Member Functions inherited from CRhinoUiOptionsListCtrlComboBox
 CRhinoUiOptionsListCtrlComboBox (LPCTSTR lpsLabel=NULL, LPCTSTR lpsText=NULL, int iIndentLevel=0, CRhinoUiComboBoxItemData::class_type ct=CRhinoUiComboBoxItemData::ct_strings)
 
virtual ~CRhinoUiOptionsListCtrlComboBox ()
 
virtual bool BeginEditItem (CRhinoUiOptionsListCtrl &list_ctrl, const CRect rEdit, begin_edit_item_reason eir)
 
bool DrawDownArrow () const
 
virtual void MeasureItem (LPMEASUREITEMSTRUCT)
 
void MoveItemWindow (CRhinoUiOptionsListCtrl &list_ctrl, const CRect rEdit)
 
virtual bool OnComboBoxPopulated ()
 
virtual void OnDrawDownArrow (CDC &dc, CRect &rItem, const CRect &rDeflate) const
 
virtual void OnDrawItem (CDC &dc, const CRect &rItem, const CRect &rDeflate) const
 
afx_msg BOOL32 OnMouseWheel (UINT nFlags, short zDelta, CPoint pt)
 
virtual BOOL32 PreTranslateMessage (MSG *pMsg)
 virtual overrides More...
 
bool SetDrawDownArrow (bool b)
 
bool SetShowDropDownOnBeginEdit (bool b)
 
void SetText (LPCTSTR lps)
 
bool ShowDropDownOnBeginEdit () const
 
- Public Member Functions inherited from CRhinoUiComboBox
 CRhinoUiComboBox ()
 
virtual ~CRhinoUiComboBox ()
 
int AddColorItem (LPCTSTR lpsColorName, COLORREF color, bool link_to_color_dialog=false)
 
int AddFontItem (const LOGFONT &lf)
 
int AddLayer (const CRhinoLayer &layer)
 
int AddLinetype (const ON_Linetype &linetype)
 
int AddPrintWidthItem (double cx)
 
COLORREF ColorFromListIndex (int iIndex, COLORREF crError=CRhinoUiPaintManager::error_color) const
 
bool ColorIsByLayer (COLORREF cr) const
 
bool ColorIsByParent (COLORREF cr) const
 
ON_wString ColorNameFromColorRef (COLORREF cr)
 
color_swatch_draw_style ColorSwatchDrawStyle () const
 
virtual int CompareItem (LPCOMPAREITEMSTRUCT)
 
bool CreateAsOwnerDraw () const
 
virtual void DeleteItem (LPDELETEITEMSTRUCT)
 
virtual void DrawItem (LPDRAWITEMSTRUCT)
 
int FillLayerList (CRhinoDoc *doc, bool bUseSortedList, int(*compare)(const CRhinoLayer *, const CRhinoLayer *, void *)=NULL, int(*cull)(const CRhinoLayer *, void *)=NULL, void *p=0)
 
int FillLinetypeList (CRhinoDoc *doc, bool bUseSortedList, bool bIncludeByLayer, bool bIncludeByParent, bool bReadDefaultLinetypeFile, int(*compare)(const CRhinoLinetype *, const CRhinoLinetype *, void *)=NULL, int(*cull)(const CRhinoLinetype *, void *)=NULL, void *p=NULL)
 
int FillUsingInstalledFonts (bool bIncludeTrueType=true, bool bIncludeNonTrueType=true)
 
int FillUsingStandardColorList (bool bIncludeByLayerColor=true, bool bIncludeCustomColor=true, bool bIncludeByParentColor=true, bool bIncludeByDisplayColor=false)
 
int FillUsingStandardPrintWidths (bool bIncludeByLayer, bool bIncludeDefault, bool bIncludeByParent, bool bIncludeNoPrint, bool bIncludeHairline)
 
CRhinoUiComboBoxItemDataGetComboBoxItemData (int iIndex) const
 
COLORREF GetCurColor () const
 
int GetCurColor (COLORREF &color) const
 
int GetCurFont (LOGFONT &lf_out)
 
const RhinoUiLayerComboBoxItemDataGetCurLayer () const
 
const RhinoUiLinetypeComboBoxItemDataGetCurLinetype () const
 
const RhinoUiPrintWidthComboBoxItemDataGetCurPrintWidth () const
 
int GetFontIndex (const LOGFONT &lf)
 
int GetFontIndex (LPCTSTR lpsFontFace)
 
bool GetTextFromListIndex (int iIndex, CString &sResult) const
 
class CRhinoUiPopDownLayerWndLayerPopDownWindow () const
 
UUID LayerUUIDFromListIndex (int iIndex) const
 
RhinoUiLinetypeComboBoxItemDataLinetypeDataFromListIndex (int iIndex) const
 
const ON_LinetypeLinetypeReadFromFile (const UUID &uuiid) const
 
UUID LinetypeUUIDFromListIndex (int iIndex) const
 
int ListIndexFromLayerUUID (const UUID &uuid) const
 
int ListIndexFromLinetypeUUID (const UUID &uuid) const
 
int ListIndexFromPrintWidth (double cx) const
 
virtual CRhinoUiComboBoxItemDataNewCRhinoUiComboBoxItemData (CRhinoUiComboBoxItemData::class_type ct) const
 
afx_msg void OnCbnDropDown ()
 
afx_msg void OnCbnSelchange ()
 
afx_msg int OnCreate (LPCREATESTRUCT lpCreateStruct)
 
virtual void OnCustomColorChanged (COLORREF cr, int iItemIndex)
 
afx_msg void OnDestroy ()
 
afx_msg void OnEditKillFocus ()
 
afx_msg void OnEditUpdate ()
 
afx_msg void OnLButtonDblClk (UINT nFlags, CPoint point)
 
afx_msg void OnLButtonDown (UINT nFlags, CPoint point)
 
void OnPrintWidthEditKillFocus ()
 
void OnPrintWidthEditUpdate ()
 
RhinoUiPrintWidthComboBoxItemDataPrintWidthDataFromListIndex (int iIndex) const
 
double PrintWidthFromString ()
 
color_swatch_draw_style SetColorSwatchDrawStyle (color_swatch_draw_style style)
 
bool SetCreateAsOwnerDraw (bool b)
 
COLORREF SetCurColor (COLORREF cr)
 
int SetCurFont (const LOGFONT &lf)
 
int SetCurFont (LPCTSTR lpsFontFace)
 
UUID SetCurLayer (UUID uuid, COLORREF cr)
 
UUID SetCurLinetype (UUID uuid)
 
double SetCurPrintWidth (double cx)
 
bool SetCustomColor (COLORREF cr)
 
- Public Member Functions inherited from CRhinoUiOptionsListCtrlItem
 CRhinoUiOptionsListCtrlItem (const CRhinoUiOptionsListCtrlItem &)
 
 CRhinoUiOptionsListCtrlItem (control_type ct=ct_invalid, LPCTSTR lpsLabel=NULL, LPCTSTR lpsText=NULL, int iIndentLevel=0)
 
virtual ~CRhinoUiOptionsListCtrlItem ()
 
bool AutoDelete () const
 
control_type ControlType () const
 
void DrawItemText (CDC &dc, const CString &s, const CRect &rItem, const CRect &rDeflate) const
 
bool GetItemProperty (item_property iprop) const
 
bool GetItemState (item_state istate) const
 
CRhinoUiOptionsListCtrlGetListCtrl () const
 
int IndentLevel () const
 
bool IsEnabled () const
 
bool IsFullRowItem () const
 
bool IsItemExpandable () const
 
bool IsItemHidden () const
 
bool IsReadOnly () const
 
virtual int ItemHeight () const
 
unsigned int ItemID () const
 
LPCTSTR Label () const
 
COLORREF LabelBackGroundColor () const
 
COLORREF LabelTextColor () const
 
const CRhinoUiOptionsListCtrlItemoperator= (const CRhinoUiOptionsListCtrlItem &)
 
int ParentIndex () const
 
bool SetAutoDelete (bool b)
 
int SetIndentLevel (int iIndentLevel)
 
bool SetIsEnabled (bool b)
 
bool SetIsFullRowItem (bool b)
 
bool SetIsReadOnly (bool b)
 
bool SetItemProperty (item_property iprop, bool bEnabled)
 
bool SetItemState (item_state istate, bool bEnabled)
 
bool SetLabel (LPCTSTR lpsLabel)
 
COLORREF SetLabelBackGroundColor (COLORREF cr)
 
COLORREF SetLabelTextColor (COLORREF cr)
 
bool SetParentIndex (int iItem)
 
bool SetUseLabelColors (bool b)
 
virtual LPCTSTR Text () const
 
bool UseLabelColors () const
 

Additional Inherited Members

- Public Types inherited from CRhinoUiComboBox
enum  color_swatch_draw_style { square_swatch = 0, diamond_swatch, circle_swatch, force_32bit_image_list = 0xFFFFFFFF }
 
enum  print_width_options {
  default_width = 0, no_print_width = - 1, by_layer_width = -10, by_parent_width = -15,
  list_box_error_width = -100, force_32bit_plot_width_option = 0xFFFFFFFF
}
 
- Public Types inherited from CRhinoUiOptionsListCtrlItem
enum  control_type {
  ct_static_text = 0, ct_edit_box, ct_check_box, ct_combo_box,
  ct_push_button, ct_ip_address, ct_radio_buttons, ct_color_combo_box,
  ct_color_button, ct_file, ct_font_combo, ct_layer_combo_box,
  ct_linetype_combo_box, ct_print_width_combo_box, ct_separator, ct_folder,
  ct_hyperlink, ct_custom_control, ct_invalid, force_32bit_control_type = 0xFFFFFFFF
}
 
enum  item_property {
  full_row_item_property = 1, use_label_colors_property = 2, is_group_combo_item_property = 4, property0 = 8,
  property1 = 0x10, property2 = 0x20, property3 = 0x40, property4 = 0x80,
  property5 = 0x100, property6 = 0x200, property7 = 0x400, property8 = 0x800,
  property9 = 0x1000, force_32bit_item_property = 0xFFFFFFFF
}
 
enum  item_state {
  expanded_state = 1, hidden_state = 2, enabled_state = 4, readonly_state = 8,
  hidden_group_state = 0x10, state0 = 0x20, state1 = 0x40, state2 = 0x80,
  state3 = 0x100, state4 = 0x200, state5 = 0x400, state6 = 0x800,
  state7 = 0x1000, state8 = 0x2000, state9 = 0x4000, force_32bit_item_state = 0xFFFFFFFF
}
 
- Static Public Member Functions inherited from CRhinoUiComboBox
static UUID ByLayerLinetypeID ()
 
static UUID ByParentLinetypeID ()
 
static UUID ContinuousLinetypeID ()
 
static bool GetPrintWidthDisplayString (double cx, ON_wString &result)
 
static UUID ListBoxErrorUUID ()
 
static bool ReadPrintWidthFile (const wchar_t *lpsFileName, ON_SimpleArray< double > &widths, bool bQuietly)
 
- Protected Types inherited from CRhinoUiComboBox
enum  change_mode { cm_selchange = 0, cm_editupdate, cm_nochange, force_32bit_change_mode = 0xFFFFFFFF }
 
- Protected Types inherited from CRhinoUiOptionsListCtrlItem
enum  begin_edit_item_reason {
  eir_label_left_clicked = 0, eir_value_left_clicked, eir_f2_pressed, eir_navigation_key,
  force_32bit_begin_edit_item_reason = 0xFFFFFFFF
}
 
- Protected Member Functions inherited from CRhinoUiOptionsListCtrlComboBox
afx_msg void OnCbnSelchange ()
 
afx_msg void OnEditKillFocus ()
 
afx_msg void OnKillFocus (CWnd *pNewWnd)
 
void ShowLayerPopDownWnd (HWND hWnd, bool bShow)
 CRhinoUiOptionsListCtrlComboBox. More...
 
- Protected Member Functions inherited from CRhinoUiComboBox
virtual LRESULT DefWindowProc (UINT message, WPARAM wParam, LPARAM lParam)
 
void DestroyLayerPopDownWnd ()
 
virtual BOOL32 OnChildNotify (UINT message, WPARAM wParam, LPARAM lParam, LRESULT *pResult)
 
virtual BOOL32 OnWndMsg (UINT message, WPARAM wParam, LPARAM lParam, LRESULT *pResult)
 
virtual void PostNcDestroy ()
 
virtual void PreSubclassWindow ()
 
virtual LRESULT WindowProc (UINT message, WPARAM wParam, LPARAM lParam)
 
- Protected Member Functions inherited from CRhinoUiOptionsListCtrlItem
bool ForwardOnMouseWheel (CWnd &wnd, UINT nFlags, short zDelta, CPoint pt)
 
bool SetControlType (control_type ct)
 
- Protected Attributes inherited from CRhinoUiOptionsListCtrlComboBox
bool m_bDrawDownArrow
 
bool m_bIncludeEditCtrl
 
bool m_bOwnerDraw
 
bool m_bShowDropDownOnBeginEdit
 
bool m_bShowingDropDown
 
bool m_bSort
 
- Protected Attributes inherited from CRhinoUiComboBox
bool m_bIncludeNonTrueType
 
bool m_bIncludeTrueType
 
bool m_bInOnPrintWidthEditKillFocus
 
bool m_bShowReferenceLayers
 
change_mode m_change_mode
 
COLORREF m_crCustom
 
RhinoUiColorComboBoxItemData m_current_color
 CRhinoUiComboBoxItemData m_current;. More...
 
RhinoUiFontComboBoxItemData m_current_font
 
RhinoUiLayerComboBoxItemData m_current_layer
 
RhinoUiLinetypeComboBoxItemData m_current_linetype
 
RhinoUiPrintWidthComboBoxItemData m_current_print_width
 
CRhinoUiComboBoxItemData::class_type m_fill_class_type
 
ON_ObjectArray< ON_Linetypem_from_file_linetypes
 
class CRhinoUiPopDownLayerWndm_pWndLayerPopDown
 
color_swatch_draw_style m_swatch_style
 
- Protected Attributes inherited from CRhinoUiOptionsListCtrlItem
CPoint m_ptEndTrackSelect
 

Detailed Description


CRhinoUiOptionsListCtrlLinetypeComboBox

Description: This control will display a simple combo box containing a list loaded line types.

Constructor & Destructor Documentation

◆ CRhinoUiOptionsListCtrlLinetypeComboBox()

CRhinoUiOptionsListCtrlLinetypeComboBox::CRhinoUiOptionsListCtrlLinetypeComboBox ( LPCTSTR  lpsLabel = NULL,
LPCTSTR  lpsText = NULL,
int  iIndentLevel = 0,
CRhinoUiComboBoxItemData::class_type  ct = CRhinoUiComboBoxItemData::ct_linetype 
)

Description: Constructor

Parameters: lpsLabel [in] Label for this item, appears in left column of options list lpsText [in] Text associated with this item, appears in right column of options list

◆ ~CRhinoUiOptionsListCtrlLinetypeComboBox()

virtual CRhinoUiOptionsListCtrlLinetypeComboBox::~CRhinoUiOptionsListCtrlLinetypeComboBox ( )
virtual

Description: Destructor

Member Function Documentation

◆ IncludeByLayer()

bool CRhinoUiOptionsListCtrlLinetypeComboBox::IncludeByLayer ( ) const

Description: This method is called by PopulateComboBox() when adding linetype options to combo box.

Returns: Returns true if "By Layer" option should be added to linetype list; otherwise false.

See Also: CRhinoUiOptionsListCtrlLinetypeComboBox::PopulateComboBox() CRhinoUiOptionsListCtrlLinetypeComboBox::SetIncludeByLayer()

◆ IncludeByParent()

bool CRhinoUiOptionsListCtrlLinetypeComboBox::IncludeByParent ( ) const

Description: This method is called by PopulateComboBox() when adding linetypes to combo box.

Returns: Returns true if "By Parent" option should be added to linetype list; otherwise false.

See Also: CRhinoUiOptionsListCtrlLinetypeComboBox::PopulateComboBox() CRhinoUiOptionsListCtrlLinetypeComboBox::SetIncludeByParent()

◆ IncludeDefaults()

bool CRhinoUiOptionsListCtrlLinetypeComboBox::IncludeDefaults ( ) const

Description: This method is called by PopulateComboBox() when adding linetype options to combo box.

Returns: Returns true if default linetypes option should be added to linetype list; otherwise false.

See Also: CRhinoUiOptionsListCtrlLinetypeComboBox::PopulateComboBox() CRhinoUiOptionsListCtrlLinetypeComboBox::SetIncludeDefaults()

◆ IncludeDeletedLinetypes()

bool CRhinoUiOptionsListCtrlLinetypeComboBox::IncludeDeletedLinetypes ( ) const

Description: This method is called by PopulateComboBox() when adding linetypes to the combo box.

Returns: Returns true if deleted linetype names should be added to the combo box; otherwise false.

See Also: CRhinoUiOptionsListCtrlLinetypeComboBox::PopulateComboBox() CRhinoUiOptionsListCtrlLinetypeComboBox::SetIncludeDeletedLinetypes()

◆ IncludeReferenceLinetypes()

bool CRhinoUiOptionsListCtrlLinetypeComboBox::IncludeReferenceLinetypes ( ) const

Description: This method is called by PopulateComboBox() when adding linetypes to the combo box.

Returns: Returns true if reference linetype names should be added to the combo box; otherwise false.

See Also: CRhinoUiOptionsListCtrlLinetypeComboBox::PopulateComboBox() CRhinoUiOptionsListCtrlLinetypeComboBox::SetIncludeReferenceLinetypes()

◆ OnCbnSelchange()

afx_msg void CRhinoUiOptionsListCtrlLinetypeComboBox::OnCbnSelchange ( )

◆ OnItemComboBoxSelChanged()

void CRhinoUiOptionsListCtrlLinetypeComboBox::OnItemComboBoxSelChanged ( )
virtual

Description: CRhinoUiOptionsListCtrlComboBox override, calls base class.

Overridden to save currently selected linetype

See Also: CRhinoUiOptionsListCtrlComboBox::OnItemComboBoxSelChanged()

Reimplemented from CRhinoUiOptionsListCtrlComboBox.

◆ PopulateComboBox()

bool CRhinoUiOptionsListCtrlLinetypeComboBox::PopulateComboBox ( )
virtual

Description: CRhinoUiOptionsListCtrlComboBox virtual override

Overridden to fill combo box with loaded linetypes

Returns: Returns true if combo box is filled with one or more of the loaded linetypes; otherwise false.

See Also: CRhinoUiOptionsListCtrlComboBox::PopulateComboBox() CRhinoUiOptionsListCtrlLinetypeComboBox::SetIncludeByLayer() CRhinoUiOptionsListCtrlLinetypeComboBox::IncludeByLayer()

Reimplemented from CRhinoUiOptionsListCtrlComboBox.

◆ SetIncludeByLayer()

bool CRhinoUiOptionsListCtrlLinetypeComboBox::SetIncludeByLayer ( bool  b)

Description: Call this method to allow or disallow adding of "By Layer" linetype option to combo box.

Parameters: b [in] If truen then "By Layer" option is added to combo box; otherwise it is not.

Returns: Returns the previous value.

See Also: CRhinoUiOptionsListCtrlLinetypeComboBox::PopulateComboBox() CRhinoUiOptionsListCtrlLinetypeComboBox::IncludeByLayer()

◆ SetIncludeByParent()

bool CRhinoUiOptionsListCtrlLinetypeComboBox::SetIncludeByParent ( bool  b)

Description: Call this method to allow or disallow adding of "By Parent" linetype option to combo box.

Parameters: b [in] If truen then "By Parent" option is added to combo box; otherwise it is not.

Returns: Returns the previous value.

See Also: CRhinoUiOptionsListCtrlLinetypeComboBox::PopulateComboBox() CRhinoUiOptionsListCtrlLinetypeComboBox::IncludeByLayer() CRhinoUiOptionsListCtrlLinetypeComboBox::IncludeByParent()

◆ SetIncludeDefaults()

bool CRhinoUiOptionsListCtrlLinetypeComboBox::SetIncludeDefaults ( bool  b)

Description: Call this method to allow or disallow adding of default linetypes option to combo box.

Parameters: b [in] If truen then default linetypes are added to combo box; otherwise they are not.

Returns: Returns the previous value.

See Also: CRhinoUiOptionsListCtrlLinetypeComboBox::PopulateComboBox() CRhinoUiOptionsListCtrlLinetypeComboBox::IncludeDefaults()

◆ SetIncludeDeletedLinetypes()

bool CRhinoUiOptionsListCtrlLinetypeComboBox::SetIncludeDeletedLinetypes ( bool  b)

Description: Call this method to allow or disallow adding of deleted linetypes to the combo box.

Parameters: b [in] If truen then deleted linetype names are added to combo box; otherwise they are not.

Returns: Returns the previous value.

See Also: CRhinoUiOptionsListCtrlColorComboBox::PopulateComboBox() CRhinoUiOptionsListCtrlLinetypeComboBox::IncludeDeletedLinetypes()

◆ SetIncludeReferenceLinetypes()

bool CRhinoUiOptionsListCtrlLinetypeComboBox::SetIncludeReferenceLinetypes ( bool  b)

Description: Call this method to allow or disallow adding of reference linetypes to the combo box.

Parameters: b [in] If truen then reference linetype names are added to combo box; otherwise they are not.

Returns: Returns the previous value.

See Also: CRhinoUiOptionsListCtrlLinetypeComboBox::PopulateComboBox() CRhinoUiOptionsListCtrlLinetypeComboBox::IncludeReferenceLinetypes()

◆ SetUseSortedList()

bool CRhinoUiOptionsListCtrlLinetypeComboBox::SetUseSortedList ( bool  b)

Description: Call this method to control what linetypes get added to the combo box. If this is set to true then the sorted and culled list displayed in the linetype dialog is used. If this set set to false then the entire linetype list is used. SetIncludeReferenceLinetypes() and SetIncludeDeletedLinetypes() are used in either case to filter the display of those linetypes.

Parameters: b [in] If true then the linetype dialog list is used.

Returns: Returns the previous value.

See Also: CRhinoUiOptionsListCtrlLinetypeComboBox::IncludeDeletedLinetypes() CRhinoUiOptionsListCtrlLinetypeComboBox::IncludeReferenceLinetypes() CRhinoUiOptionsListCtrlLinetypeComboBox::PopulateComboBox()

◆ UseSortedList()

bool CRhinoUiOptionsListCtrlLinetypeComboBox::UseSortedList ( ) const

Description: This method is called by PopulateComboBox() when adding linetypes to the combo box. If this is set to true then CRhinoLinetypeTable::GetSortedList is called otherwise all linetypes are included.

Returns: Returns true if sorted linetype list should be used; otherwise complete linetype list will be used.

See Also: CRhinoUiOptionsListCtrlLinetypeComboBox::IncludeDeletedLinetypes() CRhinoUiOptionsListCtrlLinetypeComboBox::IncludeReferenceLinetypes() CRhinoUiOptionsListCtrlLinetypeComboBox::PopulateComboBox()