Rhino C++ API
8.10
|
#include <RhinoSdkUiOptionsListCtrl.h>
Public Member Functions | |
CRhinoUiOptionsListCtrl () | |
virtual | ~CRhinoUiOptionsListCtrl () |
int | AddItem (CRhinoUiOptionsListCtrlItem *pItem) |
bool | BeginEditItem (int iItem, CRhinoUiOptionsListCtrlItem::begin_edit_item_reason eir) |
CRect | Borders () const |
bool | CreateOptionsList (CWnd *pParent, DWORD dwStyle, const CRect &r, UINT nID=0) |
virtual LRESULT | DefWindowProc (UINT message, WPARAM wParam, LPARAM lParam) |
virtual void | DrawItem (CDC &dc, int iItem, CRect rItem, const CRhinoUiOptionsListCtrlItem &item) const |
bool | EnsureVisible (int iItem, bool bPartialOK) |
bool | ExpandItem (CRhinoUiOptionsListCtrlItem *pItem, bool bExpand=true) |
bool | ExpandItem (int iItem, bool bExpand=true) |
int | FixedColumnWidth () const |
int | GetCountPerPage (bool bPartialOK=false) const |
int | GetCurSel () const |
CRhinoUiOptionsListCtrlItem * | GetItem (int iItem) const |
int | GetItemCount () const |
bool | GetItemRect (int iItem, LPRECT lpRect, item_rect_part nCode) const |
CRect | GetListRect () const |
int | GetTopIndex () const |
COLORREF | GridLineColor () const |
bool | HideItem (CRhinoUiOptionsListCtrlItem *pItem, bool bHide=true) |
bool | HideItem (int iItem, bool bHide=true) |
int | HitTest (CPoint point, int *pItem=NULL) const |
bool | IndentItems () const |
int | IndentSpacing () const |
bool | InsertItem (int iItemIndex, CRhinoUiOptionsListCtrlItem *pItem) |
bool | IsItemVisible (int iItem, bool bPartialOK) const |
bool | IsTracking () const |
int | ItemIndex (const CRhinoUiOptionsListCtrlItem &item) const |
int | ItemIndex (CPoint point) const |
bool | ItemIndexIsValid (int iItem) const |
COLORREF | LabelBkGrndColor () const |
int | LabelColumnWidth () const |
int | LabelItemHeight () const |
COLORREF | LabelTextColor () const |
int | ListStyle () const |
void | ModifyListStyle (int remove, int add) |
afx_msg void | OnActivate (UINT nState, CWnd *pWndOther, BOOL32 bMinimized) |
afx_msg void | OnActivateApp (BOOL32 bActive, DWORD dwThreadID) |
virtual void | OnBeginEditItem (CRhinoUiOptionsListCtrlItem &item) |
virtual BOOL32 | OnChildNotify (UINT message, WPARAM wParam, LPARAM lParam, LRESULT *pResult) |
virtual bool | OnComboBoxPopulated (CRhinoUiOptionsListCtrlComboBox &item) |
afx_msg HBRUSH | OnCtlColor (CDC *pDC, CWnd *pWnd, UINT nCtlColor) |
virtual void | OnEnChangeItem (CRhinoUiOptionsListCtrlItem &item) |
virtual void | OnEndEditItem (CRhinoUiOptionsListCtrlItem &item) |
afx_msg BOOL32 | OnEraseBkgnd (CDC *pDC) |
virtual bool | OnItemButtonClicked (CRhinoUiOptionsListCtrlCheckBox &item) |
virtual bool | OnItemButtonClicked (CRhinoUiOptionsListCtrlItem &item) |
virtual bool | OnItemButtonClicked (CRhinoUiOptionsListCtrlPushButton &item) |
virtual void | OnItemComboBoxSelChanged (CRhinoUiOptionsListCtrlComboBox &item) |
virtual void | OnItemRadioButtonChecked (CRhinoUiOptionsListCtrlRadioButtonColumn &item) |
afx_msg void | OnLButtonDblClk (UINT nFlags, CPoint point) |
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point) |
afx_msg void | OnLButtonUp (UINT nFlags, CPoint point) |
afx_msg void | OnMouseMove (UINT nFlags, CPoint point) |
afx_msg BOOL32 | OnMouseWheel (UINT nFlags, short zDelta, CPoint pt) |
afx_msg LRESULT | OnNcHitTest (CPoint point) |
afx_msg void | OnPaint () |
afx_msg void | OnRButtonDblClk (UINT nFlags, CPoint point) |
afx_msg void | OnRButtonDown (UINT nFlags, CPoint point) |
afx_msg void | OnRButtonUp (UINT nFlags, CPoint point) |
afx_msg BOOL32 | OnSetCursor (CWnd *pWnd, UINT nHitTest, UINT message) |
afx_msg void | OnSize (UINT nType, int cx, int cy) |
afx_msg void | OnSysColorChange () |
afx_msg void | OnVScroll (UINT nSBCode, UINT nPos, CScrollBar *pScrollBar) |
virtual BOOL32 | OnWndMsg (UINT message, WPARAM wParam, LPARAM lParam, LRESULT *pResult) |
virtual bool | PopulateItemComboBox (CRhinoUiOptionsListCtrlComboBox &item) |
virtual void | PostNcDestroy () |
virtual BOOL32 | PreTranslateMessage (MSG *pMsg) |
void | RecalcLayout () |
void | RedrawItem (const CRhinoUiOptionsListCtrlItem &item) const |
void | RedrawItem (int iItem) const |
bool | ReplaceDlgItem (CDialog *pParent, UINT nID) |
LRESULT | SendParentNotification (CRhinoUiOptionsListCtrlItem &item, UINT nNotificationCode, LRESULT *lpResult, bool bPostMessage=false) |
COLORREF | SeparatorLabelBkGrndColor () const |
COLORREF | SeparatorLabelTextColor () const |
void | SetBorders (const CRect &r) |
void | SetBorders (int iLeft, int iTop, int iRight, int iBottom) |
int | SetCurSel (int iItem) |
int | SetFixedColumnWidth (int iWidth) |
COLORREF | SetGridLineColor (COLORREF cr) |
bool | SetIndentItems (bool b) |
int | SetIndentSpacing (int iNumberOfSpaces) |
COLORREF | SetLabelBkGrndColor (COLORREF cr) |
COLORREF | SetLabelTextColor (COLORREF cr) |
void | SetListStyle (int styles) |
COLORREF | SetSeparatorLabelBkGrndColor (COLORREF cr) |
COLORREF | SetSeparatorLabelTextColor (COLORREF cr) |
void | SizeToContent (bool bGrow) |
int | TrackingMode () const |
virtual LRESULT | WindowProc (UINT message, WPARAM wParam, LPARAM lParam) |
Static Public Attributes | |
static const UINT | m_custom_win_msg_id |
Protected Types | |
enum | options_list_cursor { olc_label_width = 0, olc_invalid, force_32bit_list_cursor = 0xFFFFFFFF } |
Protected Member Functions | |
CRhinoUiOptionsListCtrlItem * | GetItemX (int iItem) const |
HCURSOR | GetOptionsListCursor (options_list_cursor cur) |
void | SetTrackingCursor (tracking_mode tm) |
anonymous enum |
Description: Valid hit test return codes
Description: Used by GetItemRect() to identify which part of an item rectangle to get.
See Also: CRhinoUiOptionsListCtrl::GetItemRect()
Enumerator | |
---|---|
irp_bounds | |
irp_label | |
irp_value | |
irp_invalid | |
force_32bit_item_rect_part | for internal use only, this allows adding additional values without breaking the SDK in the future |
Description: Custom event notification messages sent to parent use the following format: message = CRhinoUiOptionsListCtrl::m_custom_win_msg_id (static UINT holding ID of registered Windows message) WPARAM = Pointer to a RhinoUiOptionsListCtrlNM structure that provides information about the item sending the message including the CRhinoUiOptionsListCtrl::notification_codes that caused the message to be sent. typedef struct tagRhinoUiOptionsListCtrlNM { NMHDR m_NMHDR; |- hwndFrom = This window handle |- idFrom = Zero-based index of the item causing this message to be sent; |- code = CRhinoUiOptionsListCtrl::notification_codes CRhinoUiOptionsListCtrlItem* m_item = Pointer to item causing this message to be sent. Use the m_NMHDR.code to determine valid cast options for this pointer. For example, if the code == nc_on_item_button_clicked then you can cast m_item as follows: static_cast<CRhinoUiOptionsListCtrlPushButton*>( m_item) See notification_codes for valid options. } RhinoUiOptionsListCtrlNM, *LPRhinoUiOptionsListCtrlNM; LPARAM = This is a pointer to a LRESULT. This is how you respond to the notification_codes. Setting this value to true generally means you have handled the message so default processing can stop. See notification_codes for description of this parameter.
To use these notification codes do add the message map macro to the parent of this control: ON_REGISTERED_MESSAGE( CRhinoUiOptionsListCtrl::m_custom_win_msg_id, OnRegisteredMessage) Add this to the decloration of the the parent window class: afx_msg LRESULT OnRegisteredMessage( WPARAM wParam, LPARAM lParam); Add this method to the class implementation LRESULT CTestOptionsListDlg::OnRegisteredMessage( WPARAM wParam, LPARAM lParam) { LPRhinoUiOptionsListCtrlNM pNM = (LPRhinoUiOptionsListCtrlNM)wParam; LRESULT* pResult = (LRESULT*)lParam; pResult = false; CRhinoUiOptionsListCtrlItem pItem = pNM->m_item; if( NULL == pItem) return 0L; int iItemIndex = pNM->m_NMHDR.idFrom; UINT nNotificationCode = pNM->m_NMHDR.code; switch( nNotificationCode) { case CRhinoUiOptionsListCtrl::nc_on_item_button_clicked: ... break; } }
See Also: CRhinoUiOptionsListCtrl::m_custom_win_msg_id CRhinoUiOptionsListCtrl::SendParentNotification()
Enumerator | |
---|---|
nc_on_item_button_clicked | RhinoUiOptionsListCtrlNM::m_item points to a CRhinoUiOptionsListCtrlPushButton* item LRESULT is not used |
nc_on_item_check_box_clicked | RhinoUiOptionsListCtrlNM::m_item points to a CRhinoUiOptionsListCtrlCheckBox* item LRESULT is not used |
nc_populate_combo_box | RhinoUiOptionsListCtrlNM::m_item points to a CRhinoUiOptionsListCtrlComboBox* item LRESULT Combo box will only be displayed if this is equal to true. |
nc_combo_box_populated | RhinoUiOptionsListCtrlNM::m_item points to a CRhinoUiOptionsListCtrlComboBox* item LRESULT Combo box will only be displayed if this is equal to true |
nc_on_combo_box_sel_changed | RhinoUiOptionsListCtrlNM::m_item points to a CRhinoUiOptionsListCtrlComboBox* item LRESULT is not used |
nc_on_radio_button_checked | RhinoUiOptionsListCtrlNM::m_item points to a CRhinoUiOptionsListCtrlRadioButtonColumn* item LRESULT is not used |
nc_on_en_change_item | Will point to an edit box or list box edit control. This will be sent as the result of a EN_CHANGE notification. This will also be sent by numeric versions of the control when a scroll button is clicked. When being sent as a result of a scroll button the LRESULT will be 1L otherwise it will be 0L. |
nc_on_begin_edit_item | Can point to any valid derived type. This will be sent right after the control window has been created. |
nc_on_end_edit_item | Can point to any valid derived type. You will have to check the m_item->ItemID() to decide. Will be sent by a CRhinoUiOptionsListCtrlEditBox with a numeric style when a scroll button is released signifying the end of a scroll event, if this is the case LRESULT will be 1L. |
nc_expand_state_changed | Sent when an items expanded state changes. LRESULT is ignored. |
nc_on_separator_clicked | A separator control has been clicked. |
force_32bit_notification_codes | for internal use only, this allows adding additional values without breaking the SDK in the future |
|
protected |
Description: Used by GetOptionsListCursor() to describe which cursor to return
Enumerator | |
---|---|
olc_label_width | |
olc_invalid | |
force_32bit_list_cursor | for internal use only, this allows adding additional values without breaking the SDK in the future |
Description: Codes which represent the reason for the current mouse capture.
See Also: CRhinoUiOptionsListCtrl::IsTracking() CRhinoUiOptionsListCtrl::TrackingMode()
CRhinoUiOptionsListCtrl::CRhinoUiOptionsListCtrl | ( | ) |
|
virtual |
int CRhinoUiOptionsListCtrl::AddItem | ( | CRhinoUiOptionsListCtrlItem * | pItem | ) |
Description: Add a new item to the end of the options item list. Parameters: pItem [in] Item to add list. If CRhinoUiOptionsListCtrlItem::AutoDelete() is true then the control will delete the pointer when the list or item is destroyed. If pItem points to a stack variable it must remain in scope for the life of the list and you must call CRhinoUiOptionsListCtrlItem::SetAutoDelete( false) to keep the item from self deleting. Returns: Returns number greater than or equal to zero which represent the index of the item or -1 on error. See Also: CRhinoUiOptionsListCtrl::InsertItem() CRhinoUiOptionsListCtrlItem::AutoDelete() CRhinoUiOptionsListCtrlItem::SetAutoDelete()
bool CRhinoUiOptionsListCtrl::BeginEditItem | ( | int | iItem, |
CRhinoUiOptionsListCtrlItem::begin_edit_item_reason | eir | ||
) |
Description: This method is called to create edit control window when a item value is clicked on.
Parameters: iItem [in] Specifies the zero-based index to validate. eir [in] What caused this item to be edited
Returns: Return true if the item control window has been created or false if it has not.
See Also: CRhinoUiOptionsListCtrl::OnEndEditItem() CRhinoUiOptionsListCtrl::OnItemButtonClicked() CRhinoUiOptionsListCtrlItem::begin_edit_item_reason
CRect CRhinoUiOptionsListCtrl::Borders | ( | ) | const |
Description: Size of borders surrounding the list items. The client rectangle is shrunk by these amounts prior to displaying option items.
Returns: Size of borders surrounding the list items. CRect.left = Space on left side of list items CRect.top = Space above first item in list CRect.right = Space on right side of list items CRect.bottom = Space below last visible item in list
See Also: CRhinoUiOptionsListCtrl::SetBorders()
bool CRhinoUiOptionsListCtrl::CreateOptionsList | ( | CWnd * | pParent, |
DWORD | dwStyle, | ||
const CRect & | r, | ||
UINT | nID = 0 |
||
) |
Description: Create a options list control. Parameters: pParent [in] The parent window. dwStyle [in] Specifies the window style attributes. r [in] The size and position of the window, in client coordinates of pParentWnd. nID [in] The ID of the child window. Returns: Returns true if control is created or false if it was not. See Also: CWnd::Create
|
virtual |
|
virtual |
Description: This method is called when a visual aspect of an visible options list item changes.
Parameters: dc [in] Identifies the device context to be used when performing drawing operations on the options list control iItem [in] Identifies the zero-based list index of the item being drawn. rItem [in] A rectangle in the device context specified by the hDC member that defines the boundaries of the item to be drawn. item[in] Item being drawn.
bool CRhinoUiOptionsListCtrl::EnsureVisible | ( | int | iItem, |
bool | bPartialOK | ||
) |
Description: This method ensures that a options list item is at least partially visible. The options list control is scrolled if necessary. If the bPartialOK parameter is true, no scrolling occurs if the item is partially visible.
Parameters: iItem [in] Specifies the zero-based index of the options list item that is to be visible. bPartialOK [in] Specifies whether partial visibility is acceptable.
Returns: Returns true if it is successful; otherwise, it is false.
See Also: CRhinoUiOptionsListCtrl::IsItemVisible()
bool CRhinoUiOptionsListCtrl::ExpandItem | ( | CRhinoUiOptionsListCtrlItem * | pItem, |
bool | bExpand = true |
||
) |
bool CRhinoUiOptionsListCtrl::ExpandItem | ( | int | iItem, |
bool | bExpand = true |
||
) |
int CRhinoUiOptionsListCtrl::FixedColumnWidth | ( | ) | const |
Description: Call this method to get fixed width of a column. If the lock_item_label_column_width style is set then the width applies to the item label, if the lock_item_value_column_width value is set then it applies to the value column; otherwise it is ignored.
Returns: Returns previous value.
See Also: CRhinoUiOptionsListCtrl::options_list_ctrl_styles CRhinoUiOptionsListCtrl::ListStyle() CRhinoUiOptionsListCtrl::SetListStyle() CRhinoUiOptionsListCtrl::SetFixedColumnWidth()
int CRhinoUiOptionsListCtrl::GetCountPerPage | ( | bool | bPartialOK = false | ) | const |
Description: This method calculates the number of items that can fit vertically in the visible area of a options list control.
Parameters: bPartialOK [in] Specifies whether partially visible items are counted.
Returns: The number of items that can fit vertically in the visible area of a options list control.
See Also: CRhinoUiOptionsListCtrl::GetTopIndex() /// CRhinoUiOptionsListCtrl::GetItemCount()
int CRhinoUiOptionsListCtrl::GetCurSel | ( | ) | const |
Description: This method retrieves the zero-based index of the currently selected item, if any, in options list box.
Returns: The zero-based index of the currently selected item. It is less than zero if no item is currently selected.
See Also: CRhinoUiOptionsListCtrl::SetCurSel()
CRhinoUiOptionsListCtrlItem* CRhinoUiOptionsListCtrl::GetItem | ( | int | iItem | ) | const |
Description: This method retrieves options item attributes in a options list control.
Parameters: iItem [in] Specifies the zero-based index of the item whose attributes are to be retrieved.
Returns: The options item attributes associate with the item; otherwise NULL.
See Also: CRhinoUiOptionsListCtrl::GetItemCount()
int CRhinoUiOptionsListCtrl::GetItemCount | ( | ) | const |
Description: This method retrieves the number of items in a options list control.
Returns: The number of items in the options list control.
See Also: CRhinoUiOptionsListCtrl::GetItem()
bool CRhinoUiOptionsListCtrl::GetItemRect | ( | int | iItem, |
LPRECT | lpRect, | ||
item_rect_part | nCode | ||
) | const |
Description: This method retrieves the bounding rectangle for all or part of an item in the control.
Parameters: iItem [in] Specifies the zero-based index of the item whose position is to be retrieved. lpRect [out] Address of a RECT structure that receives the bounding rectangle. nCode [in] Specifies the portion of the item for which to retrieve the bounding rectangle. It can be one of these values: irp_bounds Returns the bounding rectangle of the entire item, including the label and value. irp_label Returns the bounding rectangle of the item label column irp_value Returns the bounding rectangle of the item value column
Returns: Nonzero if it is successful; otherwise, it is zero.
|
protected |
CRect CRhinoUiOptionsListCtrl::GetListRect | ( | ) | const |
Description: This method returns the rectangle for the options list control client area. This rectangle is the client rectangle defeated by the border offsets.
Returns: Returns rectangle used to display options list control items.
See Also: CRhinoUiOptionsListCtrl::SetBorders() CRhinoUiOptionsListCtrl::Borders()
|
protected |
int CRhinoUiOptionsListCtrl::GetTopIndex | ( | ) | const |
Description: This method retrieves the index of the topmost visible item when in options list.
Returns: Returns the index of the topmost visible item.
COLORREF CRhinoUiOptionsListCtrl::GridLineColor | ( | ) | const |
Description: Current color used to for drawing horizontal and vertical grid lines separating list items.
Returns: Returns color used to for drawing horizontal and vertical grid lines separating list items. If SetLabelBkGrndColor( CRhinoUiPaintManager::unset_color) is called then the default color is used. To change call SetGridLineColor( RGB( r, g, b)) with new grid line color. By default the grid line color is CRhinoUiPaintManager::unset_color which causes the default grind line color to be used.
bool CRhinoUiOptionsListCtrl::HideItem | ( | CRhinoUiOptionsListCtrlItem * | pItem, |
bool | bHide = true |
||
) |
Description: Call this method to control wether or not an item is displayed in the list control.
Parameters: pItem [in] Item to display or hide bHide [in] If bHide is true then the item will be removed from the list display but not from the list, the item will still have the same item index.
Returns: Returns true if the items hide state was successfully changed or false if not.
bool CRhinoUiOptionsListCtrl::HideItem | ( | int | iItem, |
bool | bHide = true |
||
) |
Description: Call this method to control wether or not an item is displayed in the list control.
Parameters: iItem [in] Index of item to display or hide. bHide [in] If bHide is true then the item will be removed from the list display but not from the list, the item will still have the same item index.
Returns: Returns true if the items hide state was successfully changed or false if not.
int CRhinoUiOptionsListCtrl::HitTest | ( | CPoint | point, |
int * | pItem = NULL |
||
) | const |
Description: Test point to see if it is over a item or size control.
Parameters: point [in] Point is client window coordinates to test pItem [out] If not NULL it will receive the item index if the point is over a valid item.
Returns: Returns CRhinoUiOptionsListCtrl::hit_test value.
See Also: CRhinoUiOptionsListCtrl::hit_test
bool CRhinoUiOptionsListCtrl::IndentItems | ( | ) | const |
Description: Call this method to determine if items indent level will be used.
Parameters: iWidth [in] Specifies width in pixels.
Returns: If this returns true then CRhinoUiOptionsListCtrlItem::IndentLevel() is used when drawing item labels; otherwise it is ignored. The default value is off.
See Also: CRhinoUiOptionsListCtrl::SetIndentItems() CRhinoUiOptionsListCtrlItem::IndentLevel()
int CRhinoUiOptionsListCtrl::IndentSpacing | ( | ) | const |
Description: Call this method to determine the number of spaces used to indent an item. label when item indenting is enabled. The default value is 3 spaces.
Returns: Returns the number of spaces which will be multiplied by the item spacing when indenting item labels.
See Also: CRhinoUiOptionsListCtrl::SetIndentSpacing() CRhinoUiOptionsListCtrl::IndentItems() CRhinoUiOptionsListCtrl::SetIndentItems() CRhinoUiOptionsListCtrlItem::IndentLevel()
bool CRhinoUiOptionsListCtrl::InsertItem | ( | int | iItemIndex, |
CRhinoUiOptionsListCtrlItem * | pItem | ||
) |
Description: Insert new item into options list control. If the location is less than zero or greater than or equal to list item count the item is added to the end of the list. Parameters: iItemIndex [in] Index to insert item into. If the less than zero or greater than or equal to list item count the item is added to the end of the list. pItem [in] Item to insert into list. If CRhinoUiOptionsListCtrlItem::AutoDelete() is true then the control will delete the pointer when the list or item is destroyed. If pItem points to a stack variable it must remain in scope for the life of the list and you must call CRhinoUiOptionsListCtrlItem::SetAutoDelete( false) to keep the item from self deleting. Returns: Returns true if item is successfully inserted into options list control or false if was not. See Also: CRhinoUiOptionsListCtrl::AddItem() CRhinoUiOptionsListCtrlItem::AutoDelete() CRhinoUiOptionsListCtrlItem::SetAutoDelete()
bool CRhinoUiOptionsListCtrl::IsItemVisible | ( | int | iItem, |
bool | bPartialOK | ||
) | const |
Description: This method will check to see if a options list item is at is at least partially visible. If the bPartialOK parameter is true then partially visible items return false.
Parameters: iItem [in] Specifies the zero-based index of the options list item that to check. bPartialOK [in] Specifies whether partially visible items okay.
Returns: Returns true if item is visible; otherwise false.
See Also: CRhinoUiOptionsListCtrl::EnsureVisible()
bool CRhinoUiOptionsListCtrl::IsTracking | ( | ) | const |
Description: Used to determine if mouse tracking is active.
Returns: Returns true if the mouse is captured and being tracked; otherwise false.
See Also: CRhinoUiOptionsListCtrl::TrackingMode()
int CRhinoUiOptionsListCtrl::ItemIndex | ( | const CRhinoUiOptionsListCtrlItem & | item | ) | const |
Description: Get options list item index from list item object.
Parameters: item [in] Search list for this item
Returns: Returns zero or greater if item is found or -1 if not.
See Also: CRhinoUiOptionsListCtrl::GetItem()
int CRhinoUiOptionsListCtrl::ItemIndex | ( | CPoint | point | ) | const |
Description: Get options list item index from client window point.
Parameters: point [in] Point to test in client window coordinates.
Returns: Returns zero or greater if point is over item or -1 if not.
See Also: CRhinoUiOptionsListCtrl::GetItem()
bool CRhinoUiOptionsListCtrl::ItemIndexIsValid | ( | int | iItem | ) | const |
Description: This method will validate a zero-base index into the options list control.
Parameters: iItem [in] Specifies the zero-based index to validate.
Returns: Returns true if index is valid; otherwise false.
See Also:
COLORREF CRhinoUiOptionsListCtrl::LabelBkGrndColor | ( | ) | const |
Description: Current item label background color.
Returns: Returns color used to fill item label background for unselected items. If SetLabelBkGrndColor( CRhinoUiPaintManager::unset_color) is called then the current dialog background color will be used. To change call SetLabelBkGrndColor( RGB( r, g, b)) with new background color. By default the label background color is CRhinoUiPaintManager::unset_color which causes the dialog background color to be returned.
See Also: CRhinoUiOptionsListCtrl::SetLabelBkGrndColor() CRhinoUiOptionsListCtrl::LabelTextColor() CRhinoUiOptionsListCtrl::SetLabelTextColor()
int CRhinoUiOptionsListCtrl::LabelColumnWidth | ( | ) | const |
Description: Get current width for label column.
Returns: Current width of label column in client window units.
int CRhinoUiOptionsListCtrl::LabelItemHeight | ( | ) | const |
Description: Default label item height.
Returns: Returns default label item height.
COLORREF CRhinoUiOptionsListCtrl::LabelTextColor | ( | ) | const |
Description: Current item label text color color.
Returns: Returns color used to for label text in unselected items. If SetLabelBkGrndColor( CRhinoUiPaintManager::unset_color) is called then the current dialog text color will be used. To change call SetLabelBkGrndColor( RGB( r, g, b)) with new background color. By default the label background color is CRhinoUiPaintManager::unset_color which causes the dialog background text color to be returned.
See Also: CRhinoUiOptionsListCtrl::SetLabelTextColor() CRhinoUiOptionsListCtrl::LabelBkGrndColor() CRhinoUiOptionsListCtrl::SetLabelBkGrndColor()
int CRhinoUiOptionsListCtrl::ListStyle | ( | ) | const |
Description: Call this method to get options list control style flags.
Returns: Returns bitwise integer which represents which styles are set. See options_list_ctrl_styles for options.
void CRhinoUiOptionsListCtrl::ModifyListStyle | ( | int | remove, |
int | add | ||
) |
Description: Call this method modify specific style flags.
Parameters: remove [in] Style flags to remove. add [in] Style flags to add.
See Also: CRhinoUiOptionsListCtrl::options_list_ctrl_styles CRhinoUiOptionsListCtrl::ListStyle()
afx_msg void CRhinoUiOptionsListCtrl::OnActivate | ( | UINT | nState, |
CWnd * | pWndOther, | ||
BOOL32 | bMinimized | ||
) |
afx_msg void CRhinoUiOptionsListCtrl::OnActivateApp | ( | BOOL32 | bActive, |
DWORD | dwThreadID | ||
) |
|
virtual |
Description: This method is called when a item control window has been created and is about to be displayed. The default behavior is to send a registered windows message to the parent of the list control to notify it of this event.
Parameters: item [in] Specifies the item control window has just been created so the value may be modified.
See Also: CRhinoUiOptionsListCtrl::BeginEditItem() CRhinoUiOptionsListCtrl::OnEndEditItem()
|
virtual |
|
virtual |
Description: This method is called upon a successful call to PopulateItemComboBox() to notify the list control that it has been populated and provide it with and opportunity set set the current selection.
Parameters: item [in] Specifies comobo box to set current selection.
Returns: Return true if edit action should continue; otherwise false.
See Also: CRhinoUiOptionsListCtrl::BeginEditItem() CRhinoUiOptionsListCtrl::PopulateItemComboBox() CRhinoUiOptionsListCtrl::OnItemComboBoxSelChanged() CRhinoUiOptionsListCtrl::OnEndEditItem()
afx_msg HBRUSH CRhinoUiOptionsListCtrl::OnCtlColor | ( | CDC * | pDC, |
CWnd * | pWnd, | ||
UINT | nCtlColor | ||
) |
|
virtual |
Description: This method is called as a result of an EN_CHANGE notification. The default behavior is to send a registered windows message to the parent of the list control to notify it of this event.
Parameters: item [in] Specifies the item whos value has been modified.
|
virtual |
Description: This method is called when a item value has been changed. The default behavior is to send a registered windows message to the parent of the list control to notify it of this event.
Parameters: item [in] Specifies the item whos value has been modified.
See Also: CRhinoUiOptionsListCtrl::BeginEditItem()
afx_msg BOOL32 CRhinoUiOptionsListCtrl::OnEraseBkgnd | ( | CDC * | pDC | ) |
|
virtual |
Description: This method is called when check box has been clicked on. The default behavior is to send a registered windows message to the parent of the list control to notify it of this event.
Parameters: item [in] Specifies the item which was clicked on.
Returns: Returns true if item value should be updated or false if it should not.
See Also: CRhinoUiOptionsListCtrl::OnEndEditItem()
|
virtual |
Description: This method is called when control want to simulate clicking on a button. The message is used by the file control to notify the list control the file button was pressed. The default behavior is to send a registered windows message to the parent of the list control to notify it of this event.
Parameters: item [in] Specifies the item which was clicked on.
Returns: Returns true if item value should be updated or false if it should not.
See Also: CRhinoUiOptionsListCtrl::OnEndEditItem()
|
virtual |
Description: This method is called when push button has been clicked on. The default behavior is to send a registered windows message to the parent of the list control to notify it of this event.
Parameters: item [in] Specifies the item which was clicked on.
Returns: Returns true if item value should be updated or false if it should not.
See Also: CRhinoUiOptionsListCtrl::BeginEditItem() CRhinoUiOptionsListCtrl::OnItemButtonClicked() CRhinoUiOptionsListCtrl::OnItemComboBoxSelChanged()
|
virtual |
Description: This method is called when when the user changes the current selection in the list box of a combo box. The default behavior is to send a registered windows message to the parent of the list control to notify it of this event.
Parameters: item [in] Specifies comobo box which selection has changed.
See Also: CRhinoUiOptionsListCtrl::BeginEditItem() CRhinoUiOptionsListCtrl::PopulateItemComboBox() CRhinoUiOptionsListCtrl::OnComboBoxPopulated() CRhinoUiOptionsListCtrl::OnEndEditItem()
|
virtual |
Description: This method is called when when the user clicks a radio button in a radio button column list control item. The default behavior is to send a registered windows message to the parent of the list control to notify it of this event.
Parameters: item [in] Specifies radio button column which selection has changed.
See Also: CRhinoUiOptionsListCtrl::BeginEditItem() CRhinoUiOptionsListCtrl::OnEndEditItem()
afx_msg void CRhinoUiOptionsListCtrl::OnLButtonDblClk | ( | UINT | nFlags, |
CPoint | point | ||
) |
afx_msg void CRhinoUiOptionsListCtrl::OnLButtonDown | ( | UINT | nFlags, |
CPoint | point | ||
) |
afx_msg void CRhinoUiOptionsListCtrl::OnLButtonUp | ( | UINT | nFlags, |
CPoint | point | ||
) |
afx_msg void CRhinoUiOptionsListCtrl::OnMouseMove | ( | UINT | nFlags, |
CPoint | point | ||
) |
afx_msg BOOL32 CRhinoUiOptionsListCtrl::OnMouseWheel | ( | UINT | nFlags, |
short | zDelta, | ||
CPoint | pt | ||
) |
afx_msg LRESULT CRhinoUiOptionsListCtrl::OnNcHitTest | ( | CPoint | point | ) |
afx_msg void CRhinoUiOptionsListCtrl::OnPaint | ( | ) |
afx_msg void CRhinoUiOptionsListCtrl::OnRButtonDblClk | ( | UINT | nFlags, |
CPoint | point | ||
) |
afx_msg void CRhinoUiOptionsListCtrl::OnRButtonDown | ( | UINT | nFlags, |
CPoint | point | ||
) |
afx_msg void CRhinoUiOptionsListCtrl::OnRButtonUp | ( | UINT | nFlags, |
CPoint | point | ||
) |
afx_msg BOOL32 CRhinoUiOptionsListCtrl::OnSetCursor | ( | CWnd * | pWnd, |
UINT | nHitTest, | ||
UINT | message | ||
) |
afx_msg void CRhinoUiOptionsListCtrl::OnSize | ( | UINT | nType, |
int | cx, | ||
int | cy | ||
) |
afx_msg void CRhinoUiOptionsListCtrl::OnSysColorChange | ( | ) |
afx_msg void CRhinoUiOptionsListCtrl::OnVScroll | ( | UINT | nSBCode, |
UINT | nPos, | ||
CScrollBar * | pScrollBar | ||
) |
|
virtual |
|
virtual |
Description: This method is called by CRhinoUiOptionsListCtrlComboBox and derived controls after the combo box has been created but before it has been displayed. The method should be used to add items to the combo box. If not items are added and/or this method returns true then the combo box is destroyed and no further action is taken in response to BeginEditItem().
The default behavior is to send a registered windows message to the parent of the list control to notify it of this event.
Parameters: item [in] Specifies comobo box to add items to.
Returns: Return true to force comobo box to display, false to abort edit operation.
See Also: CRhinoUiOptionsListCtrl::BeginEditItem() CRhinoUiOptionsListCtrl::OnItemComboBoxSelChanged() CRhinoUiOptionsListCtrl::OnEndEditItem()
|
virtual |
|
virtual |
void CRhinoUiOptionsListCtrl::RecalcLayout | ( | ) |
Description: Call this method to adjust list control contents and decide if the scroll bar should be displayed or not. This is called by OnSize() and should be called when done showing or hiding items.
See Also: CRhinoUiOptionsListCtrl::HideItem()
void CRhinoUiOptionsListCtrl::RedrawItem | ( | const CRhinoUiOptionsListCtrlItem & | item | ) | const |
Description: This method forces a list view control to repaint a specific.
Parameters: item [in] Will look up this item and redraw if found.
void CRhinoUiOptionsListCtrl::RedrawItem | ( | int | iItem | ) | const |
Description: This method forces a list view control to repaint a specific.
Parameters: iItem [in] Specifies the zero-based index of the item to redraw.
bool CRhinoUiOptionsListCtrl::ReplaceDlgItem | ( | CDialog * | pParent, |
UINT | nID | ||
) |
Description: Replace a dialog item with this control Parameters: pParent [in] Dialog to embed tab control inside of. nID [in] The ID of the dialog control to replace. The new tab control will be created using this ID. Returns: Returns true if successful; otherwise false See Also: CRhinoUiOptionsListCtrl::CreateOptionsList()
LRESULT CRhinoUiOptionsListCtrl::SendParentNotification | ( | CRhinoUiOptionsListCtrlItem & | item, |
UINT | nNotificationCode, | ||
LRESULT * | lpResult, | ||
bool | bPostMessage = false |
||
) |
Description: Send m_custom_win_msg_id registered windows message to the parent of this options list control.
Parameters: item [in] Item associated with this message nNotificationCode [in] CRhinoUiOptionsListCtrl::notification_codes, reason for sending this message lpResult [out] Response to message. See CRhinoUiOptionsListCtrl::notification_codes for description. bPostMessage [in] Some messages and controls may be destroyed or in the process of being destroyed when this message is being sent. If this is the case set this to true so messages waiting for control get processed prior to sending this message. Returns: Returns the result of the call to ParentWindow->SendMessage() or ParentWindow->PostMessage()
See Also: CRhinoUiOptionsListCtrl::notification_codes CRhinoUiOptionsListCtrl::m_custom_win_msg_id class CRhinoUiOptionsListCtrlItem
COLORREF CRhinoUiOptionsListCtrl::SeparatorLabelBkGrndColor | ( | ) | const |
Description: Current separator item label background color.
Returns: Returns color used to fill item label background for unselected items. If SetLabelBkGrndColor( CRhinoUiPaintManager::unset_color) is called then the current dialog background color will be used. To change call SetLabelBkGrndColor( RGB( r, g, b)) with new background color. By default the label background color is CRhinoUiPaintManager::unset_color which causes the dialog background color to be returned.
See Also: CRhinoUiOptionsListCtrl::SetLabelBkGrndColor() CRhinoUiOptionsListCtrl::LabelTextColor() CRhinoUiOptionsListCtrl::SetLabelTextColor()
COLORREF CRhinoUiOptionsListCtrl::SeparatorLabelTextColor | ( | ) | const |
Description: Current separator item label text color color.
Returns: Returns color used to for label text in unselected items. If SetLabelBkGrndColor( CRhinoUiPaintManager::unset_color) is called then the current dialog text color will be used. To change call SetLabelBkGrndColor( RGB( r, g, b)) with new background color. By default the label background color is CRhinoUiPaintManager::unset_color which causes the dialog background text color to be returned.
See Also: CRhinoUiOptionsListCtrl::SetLabelTextColor() CRhinoUiOptionsListCtrl::LabelBkGrndColor() CRhinoUiOptionsListCtrl::SetLabelBkGrndColor()
void CRhinoUiOptionsListCtrl::SetBorders | ( | const CRect & | r | ) |
Description: Size of borders surrounding the list items. The client rectangle is shrunk by these amounts prior to displaying option items.
Parameters: r [in] Size of borders surrounding the list items. r.left = Space on left side of list items r.top = Space above first item in list r.right = Space on right side of list items r.bottom = Space below last visible item in list
See Also: CRhinoUiOptionsListCtrl::Borders()
void CRhinoUiOptionsListCtrl::SetBorders | ( | int | iLeft, |
int | iTop, | ||
int | iRight, | ||
int | iBottom | ||
) |
Description: Size of borders surrounding the list items. The client rectangle is shrunk by these amounts prior to displaying option items.
Parameters: iLeft [in] Space on left side of list items iTop [in] Space above first item in list iRight [in] Space on right side of list items iBottom [in] Space below last visible item in list
See Also: CRhinoUiOptionsListCtrl::Borders()
int CRhinoUiOptionsListCtrl::SetCurSel | ( | int | iItem | ) |
Description: This method selects a item and scrolls it into view, if necessary. When the new item is selected, the list box removes the highlight from the previously selected item.
Parameters: Specifies the zero-based index of the item to be selected. If nSelect is –1, the options list box is set to have no selection.
Returns: Previously selected item.
See Also: CRhinoUiOptionsListCtrl::GetCurSel()
int CRhinoUiOptionsListCtrl::SetFixedColumnWidth | ( | int | iWidth | ) |
Description: Call this method to set the fixed width of a column. If the lock_item_label_column_width style is set then the width applies to the item label, if the lock_item_value_column_width value is set then it applies to the value column; otherwise it is ignored.
Parameters: iWidth [in] Specifies width in pixels.
Returns: Returns previous width
See Also: CRhinoUiOptionsListCtrl::options_list_ctrl_styles CRhinoUiOptionsListCtrl::ListStyle() CRhinoUiOptionsListCtrl::SetListStyle() CRhinoUiOptionsListCtrl::FixedColumnWidth()
COLORREF CRhinoUiOptionsListCtrl::SetGridLineColor | ( | COLORREF | cr | ) |
Description: Used to override default grid line color. Default value is CRhinoUiPaintManager::unset_color which causes the default color to be used. Set to valid RGB value to change label text color.
Parameters: cr [in] New grid line color CRhinoUiPaintManager::unset_color for default color.
Returns: Returns previous value
See Also: CRhinoUiOptionsListCtrl::GridLineColor() CRhinoUiOptionsListCtrl::LabelBkGrndColor() CRhinoUiOptionsListCtrl::SetLabelBkGrndColor() CRhinoUiOptionsListCtrl::LabelTextColor() CRhinoUiOptionsListCtrl::SetLabelTextColor()
bool CRhinoUiOptionsListCtrl::SetIndentItems | ( | bool | b | ) |
Description: Call this method to enable or disable item label indenting.
Parameters: b [in] If true then CRhinoUiOptionsListCtrlItem::IndentLevel() is used when drwing item labels.
Returns: Returns previous value.
See Also: CRhinoUiOptionsListCtrl::SetIndentItems() CRhinoUiOptionsListCtrlItem::IndentLevel()
int CRhinoUiOptionsListCtrl::SetIndentSpacing | ( | int | iNumberOfSpaces | ) |
Description: Call this method to set the number of spaces which will be used for an indent level.
Parameters: iNumberOfSpaces [in] Specifies the number of spaces which will be multiplied by the item indent level when calculating item label indents.
Returns: Returns the previous value.
See Also: CRhinoUiOptionsListCtrl::IndentSpacing() CRhinoUiOptionsListCtrl::IndentItems() CRhinoUiOptionsListCtrl::SetIndentItems() CRhinoUiOptionsListCtrlItem::IndentLevel()
COLORREF CRhinoUiOptionsListCtrl::SetLabelBkGrndColor | ( | COLORREF | cr | ) |
Description: Used to override default label back ground color for unselected items. Default value is CRhinoUiPaintManager::unset_color which causes the dialog background color to be used. Set to valid RGB value to change label background color.
Parameters: cr [in] New unselected label background color or CRhinoUiPaintManager::unset_color for default color.
Returns: Returns previous value
See Also: CRhinoUiOptionsListCtrl::LabelBkGrndColor() CRhinoUiOptionsListCtrl::LabelTextColor() CRhinoUiOptionsListCtrl::SetLabelTextColor() CRhinoUiOptionsListCtrl::GridLineColor() CRhinoUiOptionsListCtrl::SetGridLineColor()
COLORREF CRhinoUiOptionsListCtrl::SetLabelTextColor | ( | COLORREF | cr | ) |
Description: Used to override default label text color for unselected items. Default value is CRhinoUiPaintManager::unset_color which causes the dialog text color to be used. Set to valid RGB value to change label text color.
Parameters: cr [in] New label text color CRhinoUiPaintManager::unset_color for default color.
Returns: Returns previous value
See Also: CRhinoUiOptionsListCtrl::LabelTextColor() CRhinoUiOptionsListCtrl::LabelBkGrndColor() CRhinoUiOptionsListCtrl::SetLabelBkGrndColor() CRhinoUiOptionsListCtrl::GridLineColor() CRhinoUiOptionsListCtrl::SetGridLineColor()
void CRhinoUiOptionsListCtrl::SetListStyle | ( | int | styles | ) |
Description: Call this method to change style flags.
Parameters: styles [in] New styles.
See Also: CRhinoUiOptionsListCtrl::options_list_ctrl_styles CRhinoUiOptionsListCtrl::ListStyle()
COLORREF CRhinoUiOptionsListCtrl::SetSeparatorLabelBkGrndColor | ( | COLORREF | cr | ) |
Description: Used to override default label back ground color for unselected items. Default value is CRhinoUiPaintManager::unset_color which causes the dialog background color to be used. Set to valid RGB value to change label background color.
Parameters: cr [in] New unselected label background color or CRhinoUiPaintManager::unset_color for default color.
Returns: Returns previous value
See Also: CRhinoUiOptionsListCtrl::LabelBkGrndColor() /// CRhinoUiOptionsListCtrl::LabelTextColor() CRhinoUiOptionsListCtrl::SetLabelTextColor() CRhinoUiOptionsListCtrl::GridLineColor() CRhinoUiOptionsListCtrl::SetGridLineColor()
COLORREF CRhinoUiOptionsListCtrl::SetSeparatorLabelTextColor | ( | COLORREF | cr | ) |
Description: Used to override default label text color for unselected items. Default value is CRhinoUiPaintManager::unset_color which causes the dialog text color to be used. Set to valid RGB value to change label text color.
Parameters: cr [in] New label text color CRhinoUiPaintManager::unset_color for default color.
Returns: Returns previous value
See Also: CRhinoUiOptionsListCtrl::LabelTextColor() CRhinoUiOptionsListCtrl::LabelBkGrndColor() CRhinoUiOptionsListCtrl::SetLabelBkGrndColor() CRhinoUiOptionsListCtrl::GridLineColor() CRhinoUiOptionsListCtrl::SetGridLineColor()
|
protected |
void CRhinoUiOptionsListCtrl::SizeToContent | ( | bool | bGrow | ) |
Description: Resize the window so there is no extra space at the bottom and ensure that no items are partially displayed. Parameters: bGrow [in] Allow window to grow to fit the bottom visible item.
int CRhinoUiOptionsListCtrl::TrackingMode | ( | ) | const |
Description: Returns code which describes why the mouse is captured or not_tracking it not captured.
Returns: Returns CRhinoUiOptionsListCtrl::tracking_mode value indicating what is being tracked or CRhinoUiOptionsListCtrl::not_tracking if not tracking.
See Also: CRhinoUiOptionsListCtrl::IsTracking()
|
virtual |
|
static |
Description: See description for CRhinoUiOptionsListCtrl::notification_codes
See Also: CRhinoUiOptionsListCtrl::notification_codes CRhinoUiOptionsListCtrl::SendParentNotification()