Rhino C++ API
8.13
|
CRhinoUiDialog dialog. More...
#include <RhinoSdkUiDialog.h>
Public Types | |
enum | rhino_dialog_flags { is_dockbar_dialog = 1, force_32bit_rhino_flag = 0xFFFFFFFF } |
Reserved for future use. More... | |
Public Member Functions | |
CRhinoUiDialog (LPCTSTR lpszTemplateName=NULL, CWnd *pParentWnd=NULL) | |
CRhinoUiDialog (UINT nIDTemplate, CWnd *pParentWnd=NULL) | |
virtual | ~CRhinoUiDialog () |
bool | AddResizeControl (bool b) |
bool | AllowEscapeAndEnter () const |
void | CallOnUpdateUi () |
virtual BOOL32 | Create (LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL) |
Modeless construct. More... | |
virtual BOOL32 | Create (UINT nIDTemplate, CWnd *pParentWnd=NULL) |
virtual BOOL32 | CreateIndirect (HGLOBAL hDialogTemplate, CWnd *pParentWnd=NULL) |
virtual BOOL32 | CreateIndirect (LPCDLGTEMPLATE lpDialogTemplate, CWnd *pParentWnd=NULL, void *lpDialogInit=NULL) |
AFX_MODULE_STATE * | DialogModuleState () |
UINT | DialogTemplateID () const |
LPCTSTR | DialogTemplateName () const |
void | DisableAllDialogItems () |
INT_PTR | DoModal () |
void | EnableAllDlgControls (bool bEnable) |
bool | EnableDialogItem (UINT nItemID, bool bEnable) |
int | EnableDialogItems (CUIntArray &nItemIDArray, bool bEnable) |
int | EnableDialogItems (UINT *nItemIDArray, int iArraySize, bool bEnable) |
virtual bool | ForwardLMouseDblClickMessagesToParent (CPoint point) |
virtual bool | ForwardLMouseDownMessagesToParent (CPoint point) |
bool | GetDlgItemRect (UINT nID, CRect &rc) |
bool | IsDialogItemEnabled (UINT nItemID) const |
bool | IsResizable () |
bool | IsRhinoFlagSet (rhino_dialog_flags flag) const |
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct) |
afx_msg HBRUSH | OnCtlColor (CDC *pDC, CWnd *pWnd, UINT nCtlColor) |
afx_msg void | OnDestroy () |
afx_msg void | OnGetMinMaxInfo (MINMAXINFO *lpMMI) |
virtual BOOL32 | OnInitDialog () |
afx_msg void | OnLButtonDblClk (UINT nFlags, CPoint point) |
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point) |
afx_msg LRESULT | OnNcHitTest (CPoint point) |
afx_msg void | OnPaint () |
afx_msg void | OnSize (UINT nType, int cx, int cy) |
virtual void | OnUnhandledEscapeAndEnter (UINT nChar) |
virtual bool | OverrideAllowEscapeAndEnter (MSG *msg) |
void | PaintGradientTitleRect (CDC *pDC, LPRECT lpRect, const char *lpsCaption=0, bool bActiveWindow=TRUE) |
void | PaintGradientTitleRect (CDC *pDC, LPRECT lpRect, const wchar_t *lpsCaption=0, bool bActiveWindow=TRUE) |
virtual BOOL32 | PreTranslateMessage (MSG *pMsg) |
void | RestoreAllDisabledDialogItems () |
int | RhinoFlags () const |
bool | SetAllowEscapeAndEnter (bool b) |
bool | SetDlgItemToolTip (CWnd *pWndCtrl, const char *lpsToolTip) |
bool | SetDlgItemToolTip (CWnd *pWndCtrl, const wchar_t *lpsToolTip) |
bool | SetDlgItemToolTip (UINT nID, const char *lpsToolTip) |
bool | SetDlgItemToolTip (UINT nID, const wchar_t *lpsToolTip) |
bool | SetMinSizeToCurrentSize () |
bool | SetRhinoFlag (rhino_dialog_flags flag, bool b) |
int | SetRhinoFlags (int iFlags) |
void | SetToolTipOwner (CWnd *pWnd) |
Ported from CRhinoUiDialog. More... | |
Public Attributes | |
bool | m_allow_auto_resize |
CRhinoUiLocalizeDialog | m_localize |
For internal use only. More... | |
CRhinoUiDialogItemResizer | m_Resize |
Protected Member Functions | |
bool | _SetDlgItemToolTip (CWnd *pWndCtrl, LPCTSTR lpsToolTip) |
void | Construct () |
virtual void | DoDataExchange (CDataExchange *pDX) |
DDX/DDV support. More... | |
BOOL32 | RhCreateDlgIndirect (LPCDLGTEMPLATE lpDialogTemplate, CWnd *pParentWnd, HINSTANCE hInst) |
BOOL32 | RhCreateIndirect (HGLOBAL hDialogTemplate, CWnd *pParentWnd, HINSTANCE hInst) |
BOOL32 | RhCreateIndirect (LPCDLGTEMPLATE lpDialogTemplate, CWnd *pParentWnd, void *lpDialogInit, HINSTANCE hInst) |
INT_PTR | RhDoModal () |
virtual LRESULT | WindowProc (UINT message, WPARAM wParam, LPARAM lParam) |
Protected Attributes | |
bool | m_activate_tool_tip |
bool | m_allow_escape_and_enter |
bool | m_bAddResizer |
UUID | m_plugin_id |
CRect | m_rcGripper |
CRect | m_rcPage |
int | m_rhino_flags |
CSize | m_sizeGripper |
CSize | m_sizeMax |
Defaults to 0,0 which means no clamp, if other than 0,0 use this instead. More... | |
CSize | m_sizeMin |
Defaults to 0,0 which means no clamp, if other than 0,0 use this instead. More... | |
UINT | m_template_name_id |
CString | m_template_name_string |
CToolTipCtrl | m_tool_tip |
CWnd * | m_tool_tip_owner |
Friends | |
class | CRhinoUiDialogItemResizer |
class | CRhinoUiLocalizeDialog |
CRhinoUiDialog dialog.
CRhinoUiDialog::CRhinoUiDialog | ( | LPCTSTR | lpszTemplateName = NULL , |
CWnd * | pParentWnd = NULL |
||
) |
Description: Constructors
Parameters: lpszTemplateName [in] Contains a null-terminated string that is the name of a dialog-box template resource. nIDTemplate [in] Contains the identifier of a dialog-box template resource. pParentWnd [in] Pointer to the parent or owner window object of type CWnd to which the dialog object belongs. If it is NULL, the dialog object parent window is set to the main application window. See Also: CDialog
CRhinoUiDialog::CRhinoUiDialog | ( | UINT | nIDTemplate, |
CWnd * | pParentWnd = NULL |
||
) |
|
virtual |
Description: Destructor
|
protected |
bool CRhinoUiDialog::AddResizeControl | ( | bool | b | ) |
bool CRhinoUiDialog::AllowEscapeAndEnter | ( | ) | const |
Description: If true allow escape and enter keys to close dialog box. The default value allows escape and enter keys to close the dialog. Use SetAllowEscapeAndEnter( false) to change the default.
Returns: If true escape and enter keys will close the dialog
See Also: CRhinoUiDialog::SetAllowEscapeAndEnter()
void CRhinoUiDialog::CallOnUpdateUi | ( | ) |
|
protected |
|
virtual |
Modeless construct.
Reimplemented in CRhinoDialog.
|
virtual |
Reimplemented in CRhinoDialog.
|
virtual |
|
virtual |
AFX_MODULE_STATE* CRhinoUiDialog::DialogModuleState | ( | ) |
Description: Return the module state that was current when this dialog object was created.
Returns: Return the module state that was current when this dialog object was created.
UINT CRhinoUiDialog::DialogTemplateID | ( | ) | const |
Description: Template ID passed to dialog constructor.
Returns: Return template ID passed to dialog constructor.
See Also: CRhinoUiDialog::CRhinoUiDialog()
LPCTSTR CRhinoUiDialog::DialogTemplateName | ( | ) | const |
Description: Template name passed to dialog constructor.
Returns: Return template name passed to dialog constructor.
See Also: CRhinoUiDialog::CRhinoUiDialog()
void CRhinoUiDialog::DisableAllDialogItems | ( | ) |
Description: Call this method to temporarily disable every control in this dialog. Prior to disabling a control the controls enabled state is pushed to a restore list. The control enabed state list is used by the RestoreAllDisabledDialogItems() method to return the controls to there original state.
|
protectedvirtual |
DDX/DDV support.
Reimplemented in CRhinoDialog, CRhinoUiTabCtrlPage, CRhinoPrintControlsBase, and CRhinoUiDockBarDialog.
INT_PTR CRhinoUiDialog::DoModal | ( | ) |
void CRhinoUiDialog::EnableAllDlgControls | ( | bool | bEnable | ) |
Description: Call this method to enable or disable every control in this dialog.
bool CRhinoUiDialog::EnableDialogItem | ( | UINT | nItemID, |
bool | bEnable | ||
) |
Description: Retrieves a pointer to the specified control or child window in this dialog box and enables or disables the control window based on the value of the bEnable argument.
Parameters: nItemID [in] Specifies the identifier of the control to be enabled or disabled bEnable [in] Specifies whether to enable or disable the window. If this parameter is true, the window is enabled. If the parameter is false, the window is disabled.
Returns: Returns true if nItemID is a valid control identifier otherwise returns false.
See Also: CRhinoUiDialog::EnableDialogItems() CRhinoUiDialog::IsDialogItemEnabled()
int CRhinoUiDialog::EnableDialogItems | ( | CUIntArray & | nItemIDArray, |
bool | bEnable | ||
) |
Description: Retrieves a pointer to the specified controls or child windows in this dialog box and enables or disables the control windows based on the value of the bEnable argument.
Parameters: nItemID [in] Specifies the identifiers of the controls to be enabled or disabled. bEnable [in] Specifies whether to enable or disable the windows. If this parameter is true, the windows are enabled. If the parameter is false, the windows are disabled.
Returns: Returns true if nItemID is a valid control identifier otherwise returns false.
See Also: CRhinoUiDialog::EnableDialogItem() CRhinoUiDialog::IsDialogItemEnabled()
int CRhinoUiDialog::EnableDialogItems | ( | UINT * | nItemIDArray, |
int | iArraySize, | ||
bool | bEnable | ||
) |
Description: Retrieves a pointer to the specified controls or child windows in this dialog box and enables or disables the control windows based on the value of the bEnable argument.
Parameters: nItemID [in] Specifies the identifiers of the controls to be enabled or disabled. iArraySize [in] Specifies the size of the nItemID array. bEnable [in] Specifies whether to enable or disable the windows. If this parameter is true, the windows are enabled. If the parameter is false, the windows are disabled.
Returns: Returns true if nItemID is a valid control identifier otherwise returns false.
See Also: CRhinoUiDialog::EnableDialogItem() CRhinoUiDialog::IsDialogItemEnabled()
|
virtual |
Description: When the left mouse button is double clicked on the client area but not down on a control the dialog can forward the message to its parent window. You would want to do this if you dialog was modless and embedded in a container that handles mouse down events.
Parameters: point [in] Specifies the x- and y-coordinate of the cursor. These coordinates are always relative to the upper-left corner of the window.
Returns: The default behavior is to return false. To change this you will need to derive a new class from this one and override this method.
See Also: CRhinoUiDialog::ForwardLMouseDownMessagesToParent()
Reimplemented in CRhinoUiDockBarClientExpandableTabPage, CRhinoUiModelessDockingDialog, and CRhinoUiDockBarDialog.
|
virtual |
Description: When the left mouse button goes down over client area of the dialog but not down on a control the dialog can forward the message to its parent window. You would want to do this if you dialog was modless and embedded in a container that handles mouse down events.
Parameters: point [in] Specifies the x- and y-coordinate of the cursor. These coordinates are always relative to the upper-left corner of the window.
Returns: The default behavior is to return false. To change this you will need to derive a new class from this one and override this method.
See Also: CRhinoUiDialog::ForwardLMouseDblClickMessagesToParent()
Reimplemented in CRhinoUiDockBarClientExpandableTabPage, CRhinoUiModelessDockingDialog, and CRhinoUiDockBarDialog.
bool CRhinoUiDialog::GetDlgItemRect | ( | UINT | nID, |
CRect & | rc | ||
) |
bool CRhinoUiDialog::IsDialogItemEnabled | ( | UINT | nItemID | ) | const |
Description: Retrieves a pointer to the specified control or child window in this dialog box returns true if it found and is enabled or false if the control is not found or the enabled. value of the bEnable argument.
Parameters: nItemID [in] Specifies the identifier of the control to check.
Returns: Returns true if nItemID is a valid control identifier and is enabled otherwise returns false.
See Also: CRhinoUiDialog::EnableDialogItems() CRhinoUiDialog::EnableDialogItem()
bool CRhinoUiDialog::IsResizable | ( | ) |
bool CRhinoUiDialog::IsRhinoFlagSet | ( | rhino_dialog_flags | flag | ) | const |
Description: Call this method to determine if a flag is currently set.
Parameters: flag [in] Specifies the identifier of the flag to check.
Returns: Returns true if the flag is set otherwise returns false.
See Also: CRhinoUiDialog::SetRhinoFlags() CRhinoUiDialog::RhinoFlags() CRhinoUiDialog::SetRhinoFlag()
afx_msg int CRhinoUiDialog::OnCreate | ( | LPCREATESTRUCT | lpCreateStruct | ) |
afx_msg HBRUSH CRhinoUiDialog::OnCtlColor | ( | CDC * | pDC, |
CWnd * | pWnd, | ||
UINT | nCtlColor | ||
) |
afx_msg void CRhinoUiDialog::OnDestroy | ( | ) |
afx_msg void CRhinoUiDialog::OnGetMinMaxInfo | ( | MINMAXINFO * | lpMMI | ) |
|
virtual |
afx_msg void CRhinoUiDialog::OnLButtonDblClk | ( | UINT | nFlags, |
CPoint | point | ||
) |
afx_msg void CRhinoUiDialog::OnLButtonDown | ( | UINT | nFlags, |
CPoint | point | ||
) |
afx_msg LRESULT CRhinoUiDialog::OnNcHitTest | ( | CPoint | point | ) |
afx_msg void CRhinoUiDialog::OnPaint | ( | ) |
afx_msg void CRhinoUiDialog::OnSize | ( | UINT | nType, |
int | cx, | ||
int | cy | ||
) |
|
virtual |
Description: If AllowEscapeAndEnter is set to true, the dialog will not close when these keys are pressed. If there is no control on the dialog that should receive these characters, they are "eaten" by the dailog and nothing happens. This function allows you to perform some action when in the case where the enter and escape would be "eaten".
Parameters: nChar [in] either VK_ESCAPE or VK_RETURN
See Also: CRhinoUiDialog::AllowEscapeAndEnter() CRhinoUiDialog::SetAllowEscapeAndEnter( bool b)
Reimplemented in CRhinoUiModelessDockingDialog.
|
virtual |
Description: Override this method to allow the escape and enter keys to get forwarded to multi-line controls like rich text boxes in hosted user controls.
Parameters: msg [in] Value passed to CRhinoUiDialog::PreTranslate message. Look at msg->wParam to see if it is equal to VK_ENTER or VK_ESCAPE. msg->hWnd Will contain the window handle of the target control.
Returns: true Disregard the AllowEscapeAndEnter() and forward the message. false Go ahead and suppress the message.
See Also: CRhinoUiDialog::AllowEscapeAndEnter() CRhinoUiDialog::SetAllowEscapeAndEnter( bool b)
void CRhinoUiDialog::PaintGradientTitleRect | ( | CDC * | pDC, |
LPRECT | lpRect, | ||
const char * | lpsCaption = 0 , |
||
bool | bActiveWindow = TRUE |
||
) |
If Windows supports gradient window captions and they are enabled then gradient fill the specified rectangle otherwise solid fill it. If lpsCaption points to a string then paint it left justified and vertically center justified.
void CRhinoUiDialog::PaintGradientTitleRect | ( | CDC * | pDC, |
LPRECT | lpRect, | ||
const wchar_t * | lpsCaption = 0 , |
||
bool | bActiveWindow = TRUE |
||
) |
|
virtual |
Reimplemented in CRhinoTabbedDockBarDialog, CRhinoDialog, and CRhinoUiModelessDockingDialog.
void CRhinoUiDialog::RestoreAllDisabledDialogItems | ( | ) |
Description: Call this method to return dialog controls to there original enabled state. This method will only do something if DisableAllDialogItems() was previously called.
See Also: CRhinoUiDialog::DisableAllDialogItems()
|
protected |
|
protected |
|
protected |
|
protected |
int CRhinoUiDialog::RhinoFlags | ( | ) | const |
Description: Call this method to get the current flag settings. This is provided as a way of adding functionality to this class without breaking the sdk.
Returns: Returns current flags value
See Also: CRhinoUiDialog::SetRhinoFlags() CRhinoUiDialog::IsRhinoFlagSet() CRhinoUiDialog::SetRhinoFlag()
bool CRhinoUiDialog::SetAllowEscapeAndEnter | ( | bool | b | ) |
Description: Set this to true if you do not want the escape and enter keys to close this dialog. You will want to do this when embedding a modless dialog in a control bar.
Parameters: b [in] If true then escape and enter keys will close the dialog box otherwise nothing will happen when these keys are pressed.
Returns: Previous value for AllowEscapeAndEnter()
See Also: CRhinoUiDialog::AllowEscapeAndEnter()
bool CRhinoUiDialog::SetDlgItemToolTip | ( | CWnd * | pWndCtrl, |
const char * | lpsToolTip | ||
) |
bool CRhinoUiDialog::SetDlgItemToolTip | ( | CWnd * | pWndCtrl, |
const wchar_t * | lpsToolTip | ||
) |
bool CRhinoUiDialog::SetDlgItemToolTip | ( | UINT | nID, |
const char * | lpsToolTip | ||
) |
bool CRhinoUiDialog::SetDlgItemToolTip | ( | UINT | nID, |
const wchar_t * | lpsToolTip | ||
) |
bool CRhinoUiDialog::SetMinSizeToCurrentSize | ( | ) |
bool CRhinoUiDialog::SetRhinoFlag | ( | rhino_dialog_flags | flag, |
bool | b | ||
) |
Description: Call this method to set a specific flag value.
Parameters: flag [in] Flag to set b [in] New value for the flag
Returns: Returns previous value
See Also: CRhinoUiDialog::SetRhinoFlags() CRhinoUiDialog::IsRhinoFlagSet() CRhinoUiDialog::RhinoFlags()
int CRhinoUiDialog::SetRhinoFlags | ( | int | iFlags | ) |
Description: Call this method to set multiple rhino flags.
Parameters: iFlags [in] Specifies the new flags value.
Returns: Returns previous value
See Also: CRhinoUiDialog::RhinoFlags() CRhinoUiDialog::IsRhinoFlagSet() CRhinoUiDialog::SetRhinoFlag()
void CRhinoUiDialog::SetToolTipOwner | ( | CWnd * | pWnd | ) |
Ported from CRhinoUiDialog.
|
protectedvirtual |
Reimplemented in CRhinoTabbedDockBarDialog, CRhinoDialog, and CRhinoUiModelessDockingDialog.
|
friend |
|
friend |
|
protected |
bool CRhinoUiDialog::m_allow_auto_resize |
|
protected |
|
protected |
CRhinoUiLocalizeDialog CRhinoUiDialog::m_localize |
For internal use only.
|
protected |
|
protected |
|
protected |
CRhinoUiDialogItemResizer CRhinoUiDialog::m_Resize |
|
protected |
|
protected |
|
protected |
Defaults to 0,0 which means no clamp, if other than 0,0 use this instead.
|
protected |
Defaults to 0,0 which means no clamp, if other than 0,0 use this instead.
|
protected |
|
protected |
|
protected |
|
protected |