Rhino C++ API
8.13
|
#include <RhinoSdkUiComboBox.h>
Public Types | |
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 Member Functions | |
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 void | MeasureItem (LPMEASUREITEMSTRUCT) |
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) |
Static Public Member Functions | |
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 | |
enum | change_mode { cm_selchange = 0, cm_editupdate, cm_nochange, force_32bit_change_mode = 0xFFFFFFFF } |
Protected Member Functions | |
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 BOOL32 | PreTranslateMessage (MSG *pMsg) |
virtual overrides More... | |
virtual void | ShowLayerPopDownWnd (HWND hWnd, bool bShow) |
virtual LRESULT | WindowProc (UINT message, WPARAM wParam, LPARAM lParam) |
Friends | |
void | CRhinoUiPopDownLayerWnd::HidePopUpWindow () |
int CALLBACK | RhinoUiComboBoxEnumFontProc (const LOGFONT *, const TEXTMETRIC *, DWORD, LPARAM) |
|
protected |
These styles are only applied to owner draw versions of the combo box that include color swatches such as Color combos and Layer combos
Enumerator | |
---|---|
square_swatch | |
diamond_swatch | |
circle_swatch | |
force_32bit_image_list | for internal use only, this allows adding additional values without breaking the SDK in the future |
CRhinoUiComboBox::CRhinoUiComboBox | ( | ) |
Description: Constructor
|
virtual |
Description: Destructor
int CRhinoUiComboBox::AddColorItem | ( | LPCTSTR | lpsColorName, |
COLORREF | color, | ||
bool | link_to_color_dialog = false |
||
) |
Description: Used to add a color item to list. To see the font names you must either use the CBS_OWERDRAWFIXED style or set m_bMakeOwnerDraw prior to creating this control. ///< Parameters: lpsColorName [in] Display text associated with color color [in] Color returned when item is selected and drawn when combo box is visible link_to_color_dialog [in] If this is true then color dialog will be displayed when item is selected. Returns: Zero or greater which is list index of added item or -1 on error.
See Also: CRhinoUiComboBox::ColorFromListIndex()
int CRhinoUiComboBox::AddFontItem | ( | const LOGFONT & | lf | ) |
Description: Add font description to list. To see font sample you must either use the CBS_OWERDRAWFIXED style or set m_bMakeOwnerDraw prior to creating this control.
Parameters: lf [in] Font to add to the list
Returns: Zero based index of new item in list or -1 on error.
See Also: CRhinoUiComboBox::GetFontIndex() CRhinoUiComboBox::GetCurFont()
int CRhinoUiComboBox::AddLayer | ( | const CRhinoLayer & | layer | ) |
Description: Add layer name and color to list. Item is added as CRhinoUiComboBoxItemData::ct_color data type.
Parameters: layer [in] Layer to add to list.
Returns: Zero based index of new item in list or -1 on error.
See Also: CRhinoUiCombo::FillLayerList()
int CRhinoUiComboBox::AddLinetype | ( | const ON_Linetype & | linetype | ) |
Description: Add linetype to the list box. Item is added as CRhinoUiComboBoxItemData::ct_linetype data type.
Parameters: linetype [in] Linetype to add to list. bReadFromFile [in] Linetype is not currently in the document linetype table, it is a default linetype or was read from a linetype definition file.
Returns: Zero based index of new item in list or -1 on error.
See Also: CRhinoUiCombo::FillLinetypeList()
int CRhinoUiComboBox::AddPrintWidthItem | ( | double | cx | ) |
Description: Add a print width value to list.
Parameters: cx [in] Width value to add to the list
Returns: Zero based index of new item in list or -1 on error.
See Also: CRhinoUiComboBox::print_width_options CRhinoUiComboBox::FillUsingStandardWidths()
|
static |
Description: Call this method to get the UUID associated with the "By Layer" linetype item in this combo box.
Returns: UUID associated with "By Layer" comob box item
|
static |
Description: Call this method to get the UUID associated with the "By Parent" linetype item in this combo box.
Returns: UUID associated with "By Parent" comob box item
COLORREF CRhinoUiComboBox::ColorFromListIndex | ( | int | iIndex, |
COLORREF | crError = CRhinoUiPaintManager::error_color |
||
) | const |
Description: Get color associated with combo box item. CRhinoUiComboBoxItemData::ct_color.
Parameters: iIndex [in] Index of item to get color for. crError = color to be returned in case of error.
Returns: Color associated with list item or crError on error
See Also: CRhinoUiComboBox::AddColorItem()
bool CRhinoUiComboBox::ColorIsByLayer | ( | COLORREF | cr | ) | const |
Description: Check color to see if it is By Layer color.
Parameters: cr [in] Color to check
Returns: Returns true if cr is equal to CRhinoUiPaintManager::bylayer_color indicating that cr is an invalid RGB value.
See Also: CRhinoUiPaintManager::bylayer_color CRhinoUiComboBox::ColorFromListIndex()
bool CRhinoUiComboBox::ColorIsByParent | ( | COLORREF | cr | ) | const |
Description: Check color to see if it is By Parent color.
Parameters: cr [in] Color to check
Returns: Returns true if cr is equal to CRhinoUiPaintManager::byparent_color indicating that cr is an invalid RGB value.
See Also: CRhinoUiPaintManager::byparent_color CRhinoUiComboBox::ColorFromListIndex()
ON_wString CRhinoUiComboBox::ColorNameFromColorRef | ( | COLORREF | cr | ) |
Description: Get string associated with color value.
Parameters: cr [in] Color to check for.
Returns: Combo box string associated with RGB value
See Also: CRhinoUiComboBox::AddColorItem()
color_swatch_draw_style CRhinoUiComboBox::ColorSwatchDrawStyle | ( | ) | const |
Description: Call this method to determine how color swatches are drawn in owner draw versions of the combo box that include a color swatch.
Returns: Returns color swatch draw style, see CRhinoUiComboBoxItem::color_swatch_draw_style for options.
See Also: CRhinoUiComboBoxItem::color_swatch_draw_style CRhinoUiComboBoxItem::ColorSwatchDrawStyle()
|
virtual |
|
static |
Description: Call this method to get the UUID associated with the "Continuous" linetype item in this combo box.
Returns: UUID associated with "Continuous" comob box item
bool CRhinoUiComboBox::CreateAsOwnerDraw | ( | ) | const |
Description: Flag which tells control to ensure that it is owner draw when it is created so that font and color previews are visible.
Returns: If true then combo box style will be modified to include CBS_OWNERDRAW fixed if not owner draw when created.
See Also: CRhinoUiComboBoxItem::SetCreateAsOwnerDraw()
|
protectedvirtual |
|
virtual |
|
protected |
|
virtual |
int CRhinoUiComboBox::FillLayerList | ( | CRhinoDoc * | doc, |
bool | bUseSortedList, | ||
int(*)(const CRhinoLayer *, const CRhinoLayer *, void *) | compare = NULL , |
||
int(*)(const CRhinoLayer *, void *) | cull = NULL , |
||
void * | p = 0 |
||
) |
Description: Populate list control with layers associated with active CRhinoDoc. To see the layer color swatches you must either use the CBS_OWERDRAWFIXED style or set m_bMakeOwnerDraw prior to creating this control.
Parameters: doc [in] Document containing layer table to read bUseSortedList [in] If true then use the default layer list returned by CRhinoLayerTable::GetSortedList() compare [in] Only valid if bUseSortedList is false. If so and compare is not NULL then CRhinoLayerTable::Sort() is called using the compare parameter prior to calling CRhinoLayerTable::GetSortedList(). cull [in] Only valid if bUseSortedList is false. If so and cull is not NULL then CRhinoLayerTable::Sort() is called using the cull parameter prior to calling CRhinoLayerTable::GetSortedList(). p [in] Passed to CRhinoLayerTable::Sort() if it is called Returns: Returns number of layers added to list box.
See Also: class CRhinoLayerTable CRhinoLayerTable::Sort() CRhinoLayerTable::GetSortedList()
int CRhinoUiComboBox::FillLinetypeList | ( | CRhinoDoc * | doc, |
bool | bUseSortedList, | ||
bool | bIncludeByLayer, | ||
bool | bIncludeByParent, | ||
bool | bReadDefaultLinetypeFile, | ||
int(*)(const CRhinoLinetype *, const CRhinoLinetype *, void *) | compare = NULL , |
||
int(*)(const CRhinoLinetype *, void *) | cull = NULL , |
||
void * | p = NULL |
||
) |
Description: Populate list control with linetypes associated with the specified CRhinoDoc.
Parameters: doc [in] Document containing linetype table to read bUseSortedList [in] If true then use the default linetype returned by CRhinoLinetypeTable::GetSortedList(); otherwise iterate the linetype table and apply the compare and cull methods is specified. bIncludeByLayer [in] If true then "By Layer" option is added to the top of the list bIncludeByParent [in] If true then "By Parent" option is added to the top of the list bReadDefaultLinetypeFile [in] If true then the default linetype table is read and linetypes are added to the bottom of the list. compare [in] Only valid if bUseSortedList is false. If so and compare is not NULL then CRhinoLinetypeTable::Sort() is called using the compare parameter prior to calling CRhinoLinetypeTable::GetSortedList(). cull [in] Only valid if bUseSortedList is false. If so and cull is not NULL then CRhinoLinetypeTable::Sort() is called using the cull parameter prior to calling CRhinoLinetypeTable::GetSortedList(). p [in] Passed to CRhinoLinetypeTable::Sort() if it is called Returns: Returns number of layers added to list box.
See Also: class CRhinoLayerTable CRhinoLayerTable::Sort() CRhinoLayerTable::GetSortedList()
int CRhinoUiComboBox::FillUsingInstalledFonts | ( | bool | bIncludeTrueType = true , |
bool | bIncludeNonTrueType = true |
||
) |
Description: Enumerate fonts installed on system and add them to the list. To see the font sample you must either use the CBS_OWERDRAWFIXED style or set m_bMakeOwnerDraw prior to creating this control.
Parameters: bIncludeTrueType [in] If true then true type fonts are added to the list. bIncludeNonTrueType [in] If true then non true type fonts are added to the list.
Returns: Number of fonts added to the list. To see the font names you must either use the CBS_OWERDRAWFIXED style or set m_bMakeOwnerDraw prior to creating this control.
See Also: CRhinoUiComboBox::AddFontItem()
int CRhinoUiComboBox::FillUsingStandardColorList | ( | bool | bIncludeByLayerColor = true , |
bool | bIncludeCustomColor = true , |
||
bool | bIncludeByParentColor = true , |
||
bool | bIncludeByDisplayColor = false |
||
) |
Description: Populate combo box using base Rhino colors. If bIncludeByLayerColor is true then the first item in the list is "By Layer". If bIncludeCustomColor is true then the last item is "Other" which displays color dialog when selected.
Standard color list: By Layer Black White Red Yellow Green Cyan Blue Magenta Other
To see color swatches you must either use the CBS_OWERDRAWFIXED style or set m_bMakeOwnerDraw prior to creating this control.
Parameters: bIncludeByLayerColor [in] Include "By Layer" option as first item in list. bIncludeByParentColor [in] Include "By Parent" option as second item in list. bIncludeCustomColor [in] Include "Other" option as last item in list. If "Other" is selected a color dialog appears.
Returns: If list is filled correctly then true is returned otherwise false is returned indicating there was an error.
See Also: CRhinoUiComboBoxItemData::class_type CRhinoUiComboBox::ClassType()
int CRhinoUiComboBox::FillUsingStandardPrintWidths | ( | bool | bIncludeByLayer, |
bool | bIncludeDefault, | ||
bool | bIncludeByParent, | ||
bool | bIncludeNoPrint, | ||
bool | bIncludeHairline | ||
) |
Description: Populate list control with linetypes associated with the specified CRhinoDoc.
Parameters: bIncludeByLayer [in] If true then "By Layer" option is added to top of list; otherwise it is not bIncludeDefault [in] If true then "Default" option is added to top of list; otherwise it is not bIncludeByParent [in] If true then "By Parent" option is added to top of list; otherwise it is not bIncludeNoPrint [in] If true then "By Print" option is added to top of list; otherwise it is not bIncludeHairline [in] If true then "Hairline" option is added to top of list; otherwise it is not
Returns: Returns number of widths added to list box.
See Also: CRhinoUiComboBox::print_width_options CRhinoUiComboBox::GetPrintWidthDisplayString()
CRhinoUiComboBoxItemData* CRhinoUiComboBox::GetComboBoxItemData | ( | int | iIndex | ) | const |
Description: Get item data pointer associated with list item.
Parameters: iIndex [in] Zero based index of list item to check.
Returns: Pointer to data item associated with iIndex. Returns NULL if iIndex is invalid or there is no pointer associated with item at iIndex.
See Also: CRhinoUiComboBoxItemData CRhinoUiComboBox::ClassType()
COLORREF CRhinoUiComboBox::GetCurColor | ( | ) | const |
Description: Get color associated with current selection.
Returns: Returns RGB value associated with currently selected item. If no item is selected then CRhinoUiPaintManager::error_color is returned.
See Also: CRhinoUiComboBox::ColorFromListIndex() CRhinoUiComboBox::ColorIsByLayer()
int CRhinoUiComboBox::GetCurColor | ( | COLORREF & | color | ) | const |
Description: Get color associated with current selection and return the current selection index.
Returns: Returns LB_ERROR if nothing is selected otherwise; zero based index of the curret list item and sets color equal to the selected color.
See Also: CRhinoUiComboBox::ColorFromListIndex() CRhinoUiComboBox::ColorIsByLayer() CRhinoUiComboBox::GetCurColor()
int CRhinoUiComboBox::GetCurFont | ( | LOGFONT & | lf_out | ) |
Description: Get LOGFONT associated with currently selected item.
Parameters: lf_out [out] Currently selected LOGFONT is copied here.
Returns: Zero based index of currently selected item whos LOGFONT was copied. A value of LB_ERROR indicates there is no current selection. A value of -2 indicates there was a current selection but it did not contain associated font data.
See Also: CRhinoUiComboBox::SetCurFont() CComboBox::GetCurSel() LB_ERROR
const RhinoUiLayerComboBoxItemData* CRhinoUiComboBox::GetCurLayer | ( | ) | const |
Description: Get layer index associated with current selection.
Returns: Returns a RhinoUiLayerComboBoxItemData pointer associated with current selection or NULL if none is found.
See Also: CRhinoUiComboBox::FillLayerList() CRhinoUiComboBox::SetCurLayer()
const RhinoUiLinetypeComboBoxItemData* CRhinoUiComboBox::GetCurLinetype | ( | ) | const |
Description: Get linetype index associated with current selection.
Returns: Returns linetype index for the currently selected linetype. If no item is selected then -1 is returned.
See Also: CRhinoUiComboBox::FillLinetypeList() CRhinoUiComboBox::SetCurLinetypeIndex()
const RhinoUiPrintWidthComboBoxItemData* CRhinoUiComboBox::GetCurPrintWidth | ( | ) | const |
Description: Get print width data associated with current selection.
Returns: Returns print width data for the currently selected linetype. If no item is selected then NULL is returned.
See Also: CRhinoUiComboBox::FillUsingStandardWidths() CRhinoUiComboBox::SetCurPrintWidth()
int CRhinoUiComboBox::GetFontIndex | ( | const LOGFONT & | lf | ) |
Description: Find list item associated with a particular font face name.
Parameters: lf[in] Font face name to search for. String comparison is not case sensitive.
Returns: Zero based index of list item that matched font name or -1 if not found.
See Also: CRhinoUiComboBox::AddFontItem()
int CRhinoUiComboBox::GetFontIndex | ( | LPCTSTR | lpsFontFace | ) |
Description: Find list item associated with a particular font face name.
Parameters: lpsFontFace[in] Font face name to search for. String comparison is not case sensitive.
Returns: Zero based index of list item that matched font name or -1 if not found.
See Also: CRhinoUiComboBox::AddFontItem()
|
static |
Description: Create display string from width value.
Parameters: cx [in] If cx is equal to one of the CRhinoUiComboBox::print_width_options then the appropriate display string is created. If cx is not a CRhinoUiComboBox::print_width_options and is less than 0.0 then a error string is generated. If cx is >= 0.0 then cx is formatted as a string and returned. result [out] Buffer to receive the display string.
Returns: If cx is equal to one of the CRhinoUiComboBox::print_width_options then the appropriate display string is copied to result and true is returned. If cx is not a CRhinoUiComboBox::print_width_options and is less than 0.0 then result will be an empty string and false will be returned. If cx is >= 0.0 then cx is formatted as a string, placed in result and true is returned.
See Also: CRhinoUiComboBox::print_width_options CRhinoUiComboBox::FillUsingStandardWidths()
bool CRhinoUiComboBox::GetTextFromListIndex | ( | int | iIndex, |
CString & | sResult | ||
) | const |
Description: Get text associated with a combo box list item. First checks to see if list box contains a string, if it does then then the string is returned. If no string or an empty string is found at iIndex then checks associated CRhinoUiComboBoxItemData pointer associated with iIndex. If a CRhinoUiComboBoxItemData* item is associated with iIndex then CRhinoUiComboBoxItemData::Text() is returned.
Parameters: iIndex [in] Zero based index of string in list box sResult [out] CString object to receive result
Returns: If string is associated with item and value paced in sResult true is returned otherwerise false is returned.
See Also: CRhinoUiComboBoxItemData::Text()
class CRhinoUiPopDownLayerWnd* CRhinoUiComboBox::LayerPopDownWindow | ( | ) | const |
UUID CRhinoUiComboBox::LayerUUIDFromListIndex | ( | int | iIndex | ) | const |
Description: Get layer index associated with combo box item.
Parameters: iIndex [in] Index of combo box item to get the layer index for.
Returns: Layer index associated with comob box item or -1 on error
See Also: CRhinoUiComboBox::AddLayer() CRhinoUiComboBox::LayerUUIDFromListIndex()
RhinoUiLinetypeComboBoxItemData* CRhinoUiComboBox::LinetypeDataFromListIndex | ( | int | iIndex | ) | const |
Description: Get linetype information associated with combo box item.
Parameters: iIndex [in] Index of combo box item to get the linetype index for.
Returns: Linetype data associated with comob box item or NULL on error
See Also: CRhinoUiComboBox::AddLinetype() CRhinoUiComboBox::LinetypeUUIDFromListIndex()
const ON_Linetype* CRhinoUiComboBox::LinetypeReadFromFile | ( | const UUID & | uuiid | ) | const |
Description: Call this method to get the linetype associated with a item which was read from a linetype definition file. When the combo box fills the list with these items it generates unique UUIDs for each item and addes them to an internal list.
Parameters: uuid [in] UUID of linetype to find
Returns: Returns a pointer to the ON_Linetype which was read from a file or NULL if not found.
See Also: CRhinoUiComboBox::FillLinetypeList()
UUID CRhinoUiComboBox::LinetypeUUIDFromListIndex | ( | int | iIndex | ) | const |
Description: Get linetype UUID associated with combo box item.
Parameters: iIndex [in] Index of combo box item to get the linetype uuid for.
Returns: Linetype UUID associated with comob box item or ON_nil_uuid on error
See Also: CRhinoUiComboBox::AddLinetype() CRhinoUiComboBox::LinetypeIndexFromListIndex()
|
static |
Description: Call this method to get the UUID returned when there is no current selection or and error condition was found.
Returns: UUID associated with error condition or no selection
int CRhinoUiComboBox::ListIndexFromLayerUUID | ( | const UUID & | uuid | ) | const |
Description: Call this method to get the list box index associated with the specified layer UUID
Parameters: uuid [in] UUID of layer to find
Returns: List box index for matching item or -1 if not found
See Also: CRhinoUiComboBox::AddLayer() CRhinoUiComboBox::LayerIndexFromListIndex()
int CRhinoUiComboBox::ListIndexFromLinetypeUUID | ( | const UUID & | uuid | ) | const |
Description: Call this method to get the list box index associated with the specified linetype UUID
Parameters: uuid [in] UUID of linetype to find
Returns: List box index for matching item or -1 if not found
See Also: CRhinoUiComboBox::AddLinetype() CRhinoUiComboBox::LinetypeIndexFromListIndex()
int CRhinoUiComboBox::ListIndexFromPrintWidth | ( | double | cx | ) | const |
Description: Call this method to get the list box index associated with the specified print width
Parameters: uuid [in] UUID of print width to find
Returns: List box index for matching item or -1 if not found
See Also: CRhinoUiComboBox::AddPrintWidth() CRhinoUiComboBox::PrintWidthIndexFromListIndex()
|
virtual |
Standard CComboBox overrides
Reimplemented in CRhinoUiOptionsListCtrlComboBox.
|
virtual |
Description: This method is called when adding color items to the combo box list box. Override this method if you want to derive a class from CRhinoUiComboBoxItemData and provide additional data members and methods.
Parameters: ct [in] type of control data being requested.
See Also: CRhinoUiComboBoxItemData CRhinoUiComboBoxItemData::class_type
afx_msg void CRhinoUiComboBox::OnCbnDropDown | ( | ) |
afx_msg void CRhinoUiComboBox::OnCbnSelchange | ( | ) |
|
protectedvirtual |
afx_msg int CRhinoUiComboBox::OnCreate | ( | LPCREATESTRUCT | lpCreateStruct | ) |
|
virtual |
Description: Called when color dialog is closed by pressing the OK button.
Parameters: cr [in] Color returned by color dialog. iItemIndex [in] List index for item that caused the color dialog to be displayed.
afx_msg void CRhinoUiComboBox::OnDestroy | ( | ) |
Message map methods
afx_msg void CRhinoUiComboBox::OnEditKillFocus | ( | ) |
afx_msg void CRhinoUiComboBox::OnEditUpdate | ( | ) |
afx_msg void CRhinoUiComboBox::OnLButtonDblClk | ( | UINT | nFlags, |
CPoint | point | ||
) |
afx_msg void CRhinoUiComboBox::OnLButtonDown | ( | UINT | nFlags, |
CPoint | point | ||
) |
void CRhinoUiComboBox::OnPrintWidthEditKillFocus | ( | ) |
Description: This method is called when a CBN_EDITCHANGE message is received and this combo box The current value in the edit control is validated and converted to a valid width if possible.
See Also: CRhinoUiComboBox::PrintWidthFromString() CRhinoUiComboBox::OnEditKillFocus()
void CRhinoUiComboBox::OnPrintWidthEditUpdate | ( | ) |
Description: This method is called when a CBN_EDITUPDATE message is received and this combo box The current value in the edit control is validated and converted to a valid width if possible.
See Also: CRhinoUiComboBox::PrintWidthFromString() CRhinoUiComboBox::OnEditKillFocus()
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
virtual overrides
Reimplemented in CRhinoUiOptionsListCtrlComboBox.
RhinoUiPrintWidthComboBoxItemData* CRhinoUiComboBox::PrintWidthDataFromListIndex | ( | int | iIndex | ) | const |
Description: Get plot width information associated with combo box item.
Parameters: iIndex [in] Index of combo box item to get the plot width for.
Returns: Plot width data associated with comob box item or NULL on error
See Also: CRhinoUiComboBox::AddPlotWidth()
double CRhinoUiComboBox::PrintWidthFromString | ( | ) |
Description: Call this method to convert the current string in the combo box edit control to a width value.
Returns: Returns a CRhinoUiComboBox::print_width_options or valid width value on success or list_box_error_width on failure.
See Also: CRhinoUiComboBox::OnPrintWidthEditKillFocus() CRhinoUiComboBox::OnEditKillFocus()
|
static |
Description: Read default print widths from specified file.
Parameters: lpsFileName [in] Name of file to read widths [out] Width values will be added to this list bQueitly [in] If this is true then this function will fail quietly otherwise a message box will appear on error.
Returns: Returns true if file was successfully opened and read.
See Also: CRhinoUiComboBox::FillUsingStandardWidths()
color_swatch_draw_style CRhinoUiComboBox::SetColorSwatchDrawStyle | ( | color_swatch_draw_style | style | ) |
Description: Call this method to control how color swatches are drawn in owner draw versions of the combo box that include a color swatch.
Parameters: style [in] New swatch draw style, see CRhinoUiComboBoxItem::color_swatch_draw_style for options.
Returns: Returns previous value.
See Also: CRhinoUiComboBoxItem::color_swatch_draw_style CRhinoUiComboBoxItem::ColorSwatchDrawStyle()
bool CRhinoUiComboBox::SetCreateAsOwnerDraw | ( | bool | b | ) |
Description: Set flag which tells control to ensure that it is owner draw when it is created so that font and color previews are visible.
Parameters: b [in] New value for create flag.
Returns: Returns previous value.
See Also: CRhinoUiComboBoxItem::CreateAsOwnerDraw()
COLORREF CRhinoUiComboBox::SetCurColor | ( | COLORREF | cr | ) |
Description: Get color associated with current selection and return the current selection index.
Returns: Returns LB_ERROR if nothing is selected otherwise; zero based index of the curret list item and sets color equal to the selected color.
See Also: CRhinoUiComboBox::ColorFromListIndex() CRhinoUiComboBox::ColorIsByLayer() CRhinoUiComboBox::GetCurColor() Description: Find list item with specified color and set it as currently selected item.
Parameters: cr [in] Check each item in list for color that matches and make the first one found current selection.
Returns: Color of previously selected item or CRhinoUiPaintManager::error_color on error.
See Also: CRhinoUiPaintManager::error_color CRhinoUiComboBox::ColorFromListIndex() CRhinoUiComboBox::ColorIsByLayer()
int CRhinoUiComboBox::SetCurFont | ( | const LOGFONT & | lf | ) |
Description: Find item in list that has same font face and make it the current selection. Nothing happens if font face name is not found in the list.
Parameters: lf [in] LOGFONT Structure containing font face name.
Returns: A return value greater than or equal to zero is the zero based index of previously selected item. A value of LB_ERROR indicates that there was not previous selection. A value of -2 indicates there was and error and the selection was not changed.
See Also: CRhinoUiComboBox::GetCurFont() LB_ERROR CComboBox::SetCurSel()
int CRhinoUiComboBox::SetCurFont | ( | LPCTSTR | lpsFontFace | ) |
Description: Find item in list that has same font face and make it the current selection. Nothing happens if font face name is not found in the list.
Parameters: lpsFontFace [in] Font face name.
Returns: A return value greater than or equal to zero is the zero based index of previously selected item. A value of LB_ERROR indicates that there was not previous selection. A value of -2 indicates there was and error and the selection was not changed.
See Also: LB_ERROR CComboBox::SetCurSel()
UUID CRhinoUiComboBox::SetCurLayer | ( | UUID | uuid, |
COLORREF | cr | ||
) |
Description: Find list item with specified layer index and set it as currently selected item.
Parameters: uuid [in] Check each item in list for a layer UUID that matches and make the first one found the current selection.
Returns: Layer UUID of previously selected item or ListBoxErrorUUID() if there was no previous selection.
See Also: CRhinoUiComboBox::GetCurLayer() CRhinoUiComboBox::FillLayerList()
UUID CRhinoUiComboBox::SetCurLinetype | ( | UUID | uuid | ) |
Description: Find list item with specified linetype index and set it as currently selected item.
Parameters: iLinetypeIndex [in] Check each item in list for a linetype index that matches and make the first one found the current selection.
Returns: Linetype index of previously selected item or -1 on error. /// See Also: CRhinoUiComboBox::GetCurLinetypeIndex() CRhinoUiComboBox::FillLinetypeList()
double CRhinoUiComboBox::SetCurPrintWidth | ( | double | cx | ) |
Description: Find list item with specified print width set it as currently selected item.
Parameters: cx [in] Check each item in list for a print width that matches and make the first one found the current selection.
Returns: Print width of previously selected item or list_box_error_width on error.
See Also: CRhinoUiComboBox::GetCurLinetypeIndex() CRhinoUiComboBox::list_box_error_width
bool CRhinoUiComboBox::SetCustomColor | ( | COLORREF | cr | ) |
|
protectedvirtual |
Reimplemented in CRhinoUiOptionsListCtrlComboBox.
|
protectedvirtual |
|
friend |
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
CRhinoUiComboBoxItemData m_current;.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |