Rhino C++ API  8.14
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Friends | List of all members
CRhinoDialog Class Reference

#include <RhinoSdkDialog.h>

Inheritance diagram for CRhinoDialog:
CRhinoUiDialog CRhinoTabbedDockBarDialog CRhRdkResizingDialog

Public Member Functions

 CRhinoDialog (LPCTSTR lpszTemplateName, CWnd *pParentWnd=nullptr)
 Modal construct. More...
 
 CRhinoDialog (UINT nIDTemplate, CWnd *pParentWnd=nullptr)
 
virtual ~CRhinoDialog ()
 
CSize CalcDialogSize (INT nResourceId)
 
BOOL32 Create (LPCTSTR lpszTemplateName, CWnd *pParentWnd=nullptr) override
 Modeless construct. More...
 
BOOL32 Create (UINT nIDTemplate, CWnd *pParentWnd=nullptr) override
 
UINT DialogID ()
 
LPCTSTR DialogStringID ()
 
unsigned int DocumentSerialNumber () const
 
virtual INT_PTR DoModal () override
 
bool EnableDisplayCommands () const
 
void EnableSaveDialogPositionAndSize (bool bEnable=true, const wchar_t *wRegistryTitle=nullptr)
 
bool InDoModal () const
 
bool IsSaveDialogPositionAndSizeEnabled () const
 
void Localize ()
 
virtual void OnColorButtonClicked (UINT nBtnID)
 Called by CRhColorButton if button clicked and color changed;. More...
 
void OnRhinoHelpButton ()
 Dialog Utilities. More...
 
BOOL32 PreTranslateMessage (MSG *pMsg) override
 Overrides. More...
 
bool PushPickButton (bool hide_this_dialog)
 
void SetEnableDisplayCommands (bool b)
 
void SetEnableDisplayCommands (bool b, unsigned int documentRuntimeSerialNumber)
 
- Public Member Functions inherited from CRhinoUiDialog
 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 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)
 
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)
 
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...
 

Static Public Member Functions

static int CheckSemiModalMessagePump ()
 
static bool InDoSemiModal ()
 

Public Attributes

class CRhDialogSdkExtension * m__rhino_dialog_sdk_extension
 
- Public Attributes inherited from CRhinoUiDialog
bool m_allow_auto_resize
 
CRhinoUiLocalizeDialog m_localize
 For internal use only. More...
 
CRhinoUiDialogItemResizer m_Resize
 

Protected Member Functions

virtual BOOL32 ContinueModal ()
 Implementation. More...
 
void DoDataExchange (CDataExchange *pDX) override
 DDX/DDV support. More...
 
virtual void OnCancel ()
 
virtual BOOL32 OnCommand (WPARAM wParam, LPARAM lParam)
 override; ///<not an override on OSX More...
 
afx_msg void OnDestroy ()
 
afx_msg BOOL32 OnHelpInfo (HELPINFO *pHelpInfo)
 
virtual BOOL32 OnInitDialog () override
 
virtual void OnOK ()
 
LRESULT WindowProc (UINT message, WPARAM wParam, LPARAM lParam) override
 
- Protected Member Functions inherited from CRhinoUiDialog
bool _SetDlgItemToolTip (CWnd *pWndCtrl, LPCTSTR lpsToolTip)
 
void Construct ()
 
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 ()
 

Friends

class CRhDialogControlBar
 

Additional Inherited Members

- Public Types inherited from CRhinoUiDialog
enum  rhino_dialog_flags { is_dockbar_dialog = 1, force_32bit_rhino_flag = 0xFFFFFFFF }
 Reserved for future use. More...
 
- Protected Attributes inherited from CRhinoUiDialog
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
 

Detailed Description

Copyright (c) 1993-2022 Robert McNeel & Associates. All rights reserved. Rhinoceros is a registered trademark of Robert McNeel & Associates.

THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.

For complete Rhino SDK copyright information see http://www.rhino3d.com/developer.

Constructor & Destructor Documentation

◆ CRhinoDialog() [1/2]

CRhinoDialog::CRhinoDialog ( LPCTSTR  lpszTemplateName,
CWnd *  pParentWnd = nullptr 
)

Modal construct.

◆ CRhinoDialog() [2/2]

CRhinoDialog::CRhinoDialog ( UINT  nIDTemplate,
CWnd *  pParentWnd = nullptr 
)

◆ ~CRhinoDialog()

virtual CRhinoDialog::~CRhinoDialog ( )
virtual

Member Function Documentation

◆ CalcDialogSize()

CSize CRhinoDialog::CalcDialogSize ( INT  nResourceId)

◆ CheckSemiModalMessagePump()

static int CRhinoDialog::CheckSemiModalMessagePump ( )
static

Description: Internal function used to check Rhino's CRhEventManager while a dialog is in a semi-modal state. Plug-ins should not have to call this function; it is exposed for the .NET API to do similar actions as CRhinoDialog's SetEnableDisplayCommands(true); Returns: 0 = nothing to do 1 = enter event 2 = cancel event

◆ ContinueModal()

virtual BOOL32 CRhinoDialog::ContinueModal ( )
protectedvirtual

Implementation.

◆ Create() [1/2]

BOOL32 CRhinoDialog::Create ( LPCTSTR  lpszTemplateName,
CWnd *  pParentWnd = nullptr 
)
overridevirtual

Modeless construct.

Reimplemented from CRhinoUiDialog.

◆ Create() [2/2]

BOOL32 CRhinoDialog::Create ( UINT  nIDTemplate,
CWnd *  pParentWnd = nullptr 
)
overridevirtual

Reimplemented from CRhinoUiDialog.

◆ DialogID()

UINT CRhinoDialog::DialogID ( )
inline

◆ DialogStringID()

LPCTSTR CRhinoDialog::DialogStringID ( )
inline

◆ DocumentSerialNumber()

unsigned int CRhinoDialog::DocumentSerialNumber ( ) const

Description: Call this method to get the document runtime serial number passed to SetEnableDisplayCommands Returns: Returns the document runtime serial number passed to SetEnableDisplayCommands

◆ DoDataExchange()

void CRhinoDialog::DoDataExchange ( CDataExchange *  pDX)
overrideprotectedvirtual

DDX/DDV support.

Reimplemented from CRhinoUiDialog.

◆ DoModal()

virtual INT_PTR CRhinoDialog::DoModal ( )
overridevirtual

modal processing Return values: IDOK = OK button pressed IDCANCEL = Cancel or escape pressed IDABORT = Command calling this dialog should abort.

◆ EnableDisplayCommands()

bool CRhinoDialog::EnableDisplayCommands ( ) const

◆ EnableSaveDialogPositionAndSize()

void CRhinoDialog::EnableSaveDialogPositionAndSize ( bool  bEnable = true,
const wchar_t *  wRegistryTitle = nullptr 
)

Description: Enables the size and position of the dialog to be stored in the Windows Registry. This allows a dialog's size and position to be remembered between uses. Parameters: bEnable - [in] Enables or disables saving wRegistryTitle - [in] A name, or title, to be used to uniquely identify this dialog in the registry. If omitted, the dialog's window title is used. This parameter only needs to be specified if the title of the dialog box will change between uses. See Also: CRhinoDialog::IsSaveDialogPositionAndSizeEnabled

◆ InDoModal()

bool CRhinoDialog::InDoModal ( ) const

Description: Call this method to see if a dialog is in a DoModal loop. Returns: TRUE or FALSE

◆ InDoSemiModal()

static bool CRhinoDialog::InDoSemiModal ( )
static

Returns true if a CRhinoDialog is running as a semi-modal dialog (EnableDisplayCommands() is true) and Rhino is currently waiting inside of DoModal() waiting for the user to do something.

◆ IsSaveDialogPositionAndSizeEnabled()

bool CRhinoDialog::IsSaveDialogPositionAndSizeEnabled ( ) const

Description: Verifies that the size and position of the dialog to be stored in the Windows Registry. Returns: TRUE or FALSE See Also: CRhinoDialog::EnableSaveDialogPositionAndSize

◆ Localize()

void CRhinoDialog::Localize ( )

automatically translates all dialog text to current language call at the end of OnInitDialog()

◆ OnCancel()

virtual void CRhinoDialog::OnCancel ( )
protectedvirtual

◆ OnColorButtonClicked()

virtual void CRhinoDialog::OnColorButtonClicked ( UINT  nBtnID)
virtual

Called by CRhColorButton if button clicked and color changed;.

◆ OnCommand()

virtual BOOL32 CRhinoDialog::OnCommand ( WPARAM  wParam,
LPARAM  lParam 
)
protectedvirtual

override; ///<not an override on OSX

◆ OnDestroy()

afx_msg void CRhinoDialog::OnDestroy ( )
protected

◆ OnHelpInfo()

afx_msg BOOL32 CRhinoDialog::OnHelpInfo ( HELPINFO *  pHelpInfo)
protected

◆ OnInitDialog()

virtual BOOL32 CRhinoDialog::OnInitDialog ( )
overrideprotectedvirtual

Generated message map functions {{AFX_MSG(CRhinoDialog)

Reimplemented from CRhinoUiDialog.

Reimplemented in CRhinoTabbedDockBarDialog, and CRhRdkResizingDialog.

◆ OnOK()

virtual void CRhinoDialog::OnOK ( )
protectedvirtual

◆ OnRhinoHelpButton()

void CRhinoDialog::OnRhinoHelpButton ( )

Dialog Utilities.

Display help for active Rhino command, call this from your help button.

◆ PreTranslateMessage()

BOOL32 CRhinoDialog::PreTranslateMessage ( MSG *  pMsg)
overridevirtual

Overrides.

Reimplemented from CRhinoUiDialog.

Reimplemented in CRhinoTabbedDockBarDialog.

◆ PushPickButton()

bool CRhinoDialog::PushPickButton ( bool  hide_this_dialog)

◆ SetEnableDisplayCommands() [1/2]

void CRhinoDialog::SetEnableDisplayCommands ( bool  b)
Deprecated:
use overload that takes document serial number

◆ SetEnableDisplayCommands() [2/2]

void CRhinoDialog::SetEnableDisplayCommands ( bool  b,
unsigned int  documentRuntimeSerialNumber 
)

Description: Call this method to enable view manipulation while a modal dialog is being displayed.

◆ WindowProc()

LRESULT CRhinoDialog::WindowProc ( UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)
overrideprotectedvirtual

Reimplemented from CRhinoUiDialog.

Reimplemented in CRhinoTabbedDockBarDialog.

Friends And Related Function Documentation

◆ CRhDialogControlBar

friend class CRhDialogControlBar
friend

Member Data Documentation

◆ m__rhino_dialog_sdk_extension

class CRhDialogSdkExtension* CRhinoDialog::m__rhino_dialog_sdk_extension