Rhino C++ API
8.14
|
#include <RhinoSdkUiOptionsListCtrlItem.h>
Public Member Functions | |
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 |
virtual void | OnItemComboBoxSelChanged () |
afx_msg BOOL32 | OnMouseWheel (UINT nFlags, short zDelta, CPoint pt) |
virtual bool | PopulateComboBox () |
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) |
CRhinoUiComboBoxItemData * | GetComboBoxItemData (int iIndex) const |
COLORREF | GetCurColor () const |
int | GetCurColor (COLORREF &color) const |
int | GetCurFont (LOGFONT &lf_out) |
const RhinoUiLayerComboBoxItemData * | GetCurLayer () const |
const RhinoUiLinetypeComboBoxItemData * | GetCurLinetype () const |
const RhinoUiPrintWidthComboBoxItemData * | GetCurPrintWidth () const |
int | GetFontIndex (const LOGFONT &lf) |
int | GetFontIndex (LPCTSTR lpsFontFace) |
bool | GetTextFromListIndex (int iIndex, CString &sResult) const |
class CRhinoUiPopDownLayerWnd * | LayerPopDownWindow () const |
UUID | LayerUUIDFromListIndex (int iIndex) const |
RhinoUiLinetypeComboBoxItemData * | LinetypeDataFromListIndex (int iIndex) const |
const ON_Linetype * | LinetypeReadFromFile (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 CRhinoUiComboBoxItemData * | NewCRhinoUiComboBoxItemData (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 () |
RhinoUiPrintWidthComboBoxItemData * | PrintWidthDataFromListIndex (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 |
CRhinoUiOptionsListCtrl * | GetListCtrl () 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 CRhinoUiOptionsListCtrlItem & | operator= (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 |
Protected Member Functions | |
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 | |
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_Linetype > | m_from_file_linetypes |
class CRhinoUiPopDownLayerWnd * | m_pWndLayerPopDown |
color_swatch_draw_style | m_swatch_style |
Protected Attributes inherited from CRhinoUiOptionsListCtrlItem | |
CPoint | m_ptEndTrackSelect |
CRhinoUiOptionsListCtrlComboBox
Description: This control will display a simple combo box containing a list of options.
CRhinoUiOptionsListCtrlComboBox::CRhinoUiOptionsListCtrlComboBox | ( | LPCTSTR | lpsLabel = NULL , |
LPCTSTR | lpsText = NULL , |
||
int | iIndentLevel = 0 , |
||
CRhinoUiComboBoxItemData::class_type | ct = CRhinoUiComboBoxItemData::ct_strings |
||
) |
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 ct [in] Type of control this is
See Also: CRhinoUiOptionsListCtrlItem::CRhinoUiOptionsListCtrlItem()
|
virtual |
Description: Destructor
|
virtual |
Description: CRhinoUiOptionsListCtrlItem override.
Create simple, drop down combo box.
Parameters: See CRhinoUiOptionsListCtrlItem::BeginEditItem()
Returns: Returns true if comob box was created; otherwise false.
See Also: CRhinoUiOptionsListCtrlItem::BeginEditItem()
Implements CRhinoUiOptionsListCtrlItem.
Reimplemented in CRhinoUiOptionsListCtrlLayerComboBox, and CRhinoUiOptionsListCtrlColorComboBox.
bool CRhinoUiOptionsListCtrlComboBox::DrawDownArrow | ( | ) | const |
Description: This method is called by OnDrawItem() to determine if the drop down arrow should be drawn.
Returns: If this method returns true then the drop down arrow is drawn by OnDrawItem(); otherwise it is not.
See Also: CRhinoUiOptionsListCtrlLinetypeComboBox::SetDrawDownArrow() CRhinoUiOptionsListCtrlLinetypeComboBox::OnDrawItem()
|
virtual |
Standard CComboBox overrides
Reimplemented from CRhinoUiComboBox.
|
virtual |
Description: CRhinoUiOptionsListCtrlItem override.
Move and/or resize combo box when options list control is resized and the combo box exists.
Parameters: See CRhinoUiOptionsListCtrlItem::MoveItemWindow()
See Also: CRhinoUiOptionsListCtrlItem::MoveItemWindow()
Implements CRhinoUiOptionsListCtrlItem.
|
protected |
|
virtual |
Description: This method is called after PopulateComboBox() to set default value or modify the contents of the combo box.
The default implementation of this method sends a CRhinoUiOptionsListCtrl::m_custom_win_msg_id custom windows message with a CRhinoUiOptionsListCtrl::nc_on_populate_combo_box notification code to the parent of the options list control this item is inserted in. You can either override this method prior to adding a item to the options list control or respond the the nc_populate_combo_box in the window that owns the options list control. See CRhinoUiOptionsListCtrl::notification_codes for details.
Returns: Returns true if combo box should be displayed; otherwise false.
See Also: CRhinoUiOptionsListCtrlComboBox::BeginEditItem() CRhinoUiOptionsListCtrl::m_custom_win_msg_id CRhinoUiOptionsListCtrl::notification_codes
Reimplemented in CRhinoUiOptionsListCtrlGroupComboBox.
|
virtual |
Description: Call this method to draw the drop down arrow for a combo box item.
Parameters: dc [in] Device context to draw into rItem [in/out] Rectangle of area available for drawing. The right side of this rect will be adjusted to reflect the area drawn by the arrow. rDeflate [in] Amount to deflate the draw rectangle to account for item borders.
|
virtual |
Description: This method is overridden to display the combo box drop down list arrow when the list item is not active for editing.
Parameters: See: CRhinoUiOptionsListCtrlItem::OnDrawItem()
See Also: CRhinoUiOptionsListCtrlItem::OnDrawItem()
Reimplemented from CRhinoUiOptionsListCtrlItem.
Reimplemented in CRhinoUiOptionsListCtrlColorComboBox, and CRhinoUiOptionsListCtrlFontComboBox.
|
protected |
|
virtual |
Description: This method is called when the current selection of the combo box has changed.
The default implementation of this method sends a CRhinoUiOptionsListCtrl::m_custom_win_msg_id custom windows message with a CRhinoUiOptionsListCtrl::nc_on_combo_box_sel_changed notification code to the parent of the options list control this item is inserted in. You can either override this method prior to adding a item to the options list control or respond the the nc_populate_combo_box in the window that owns the options list control. See CRhinoUiOptionsListCtrl::notification_codes for details.
See Also: CRhinoUiOptionsListCtrl::m_custom_win_msg_id CRhinoUiOptionsListCtrl::notification_codes
Reimplemented in CRhinoUiOptionsListCtrlLayerComboBox, CRhinoUiOptionsListCtrlColorComboBox, CRhinoUiOptionsListCtrlFontComboBox, CRhinoUiOptionsListCtrlPrintWidthComboBox, CRhinoUiOptionsListCtrlLinetypeComboBox, and CRhinoUiOptionsListCtrlGroupComboBox.
|
protected |
afx_msg BOOL32 CRhinoUiOptionsListCtrlComboBox::OnMouseWheel | ( | UINT | nFlags, |
short | zDelta, | ||
CPoint | pt | ||
) |
|
virtual |
Description: This method is called by the control when the combo box has been created and needs to be populated with data. If this method returns false the combo box will destroyed.
The default implementation of this method sends a CRhinoUiOptionsListCtrl::m_custom_win_msg_id custom windows message with a CRhinoUiOptionsListCtrl::nc_populate_combo_box notification code to the parent of the options list control this item is inserted in. You can either override this method prior to adding a item to the options list control or respond the the nc_populate_combo_box in the window that owns the options list control. See CRhinoUiOptionsListCtrl::notification_codes for details.
Returns: Returns true if the combo box has been initialized and populated and should be displayed.
See Also: CRhinoUiOptionsListCtrlComboBox::BeginEditItem() CRhinoUiOptionsListCtrl::m_custom_win_msg_id CRhinoUiOptionsListCtrl::notification_codes
Reimplemented in CRhinoUiOptionsListCtrlLayerComboBox, CRhinoUiOptionsListCtrlColorComboBox, CRhinoUiOptionsListCtrlFontComboBox, CRhinoUiOptionsListCtrlPrintWidthComboBox, CRhinoUiOptionsListCtrlLinetypeComboBox, and CRhinoUiOptionsListCtrlGroupComboBox.
|
virtual |
virtual overrides
Reimplemented from CRhinoUiComboBox.
bool CRhinoUiOptionsListCtrlComboBox::SetDrawDownArrow | ( | bool | b | ) |
Description: Call this method to specify if a combo box drop down list arrow should be drawn by OnDrawItem().
Parameters: b [in] If truen then the drop down list arrow is drawn; otherwise it is not.
Returns: Returns the previous value.
See Also: CRhinoUiOptionsListCtrlLinetypeComboBox::DrawDownArrow() CRhinoUiOptionsListCtrlLinetypeComboBox::OnDrawItem()
bool CRhinoUiOptionsListCtrlComboBox::SetShowDropDownOnBeginEdit | ( | bool | b | ) |
Description: Call this method to cause the list box of the combo box to be shown when the item is selected for editing.
Parameters: b [in] If truen then the list box is shown automatically; otherwise it is not.
Returns: Returns the previous value.
See Also: CRhinoUiOptionsListCtrlLinetypeComboBox::ShowDropDownOnBeginEdit() CRhinoUiOptionsListCtrlItem::BeginEditItem()
|
virtual |
Description: This method is used to set text value for this item. This value is displayed in the right column of the options list control.
Parameters: lps [in] New display text for this item.
See Also: CRhinoUiOptionsListCtrl::Text() CRhinoUiOptionsListCtrl::DrawItemText()
Reimplemented from CRhinoUiOptionsListCtrlItem.
Reimplemented in CRhinoUiOptionsListCtrlLayerComboBox, and CRhinoUiOptionsListCtrlColorComboBox.
bool CRhinoUiOptionsListCtrlComboBox::ShowDropDownOnBeginEdit | ( | ) | const |
Description: This method is called by BeginEditItem() after the combo box has been created, populated and initialized.
Returns: If this method returns true then the the list box of the combo box that has will be shown; otherwise it will be hidden.
See Also: CRhinoUiOptionsListCtrlLinetypeComboBox::SetShowDropDownOnBeginEdit() CRhinoUiOptionsListCtrlItem::BeginEditItem()
|
protectedvirtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |