custcont.h File Reference
 
 
 
custcont.h File Reference
#include "maxheap.h"
#include "winutil.h"
#include "buildver.h"
#include "strclass.h"
#include "actiontableTypedefs.h"
#include "acolor.h"
#include "baseinterface.h"
#include "RollupConstants.h"

Classes

class   DADMgr
class   ICustomControl
class   CUIPosData
class   CUIFrameMsgHandler
class   ICUIFrame
class   ICUIFrameDestructorPolicy
  Class representing the DestructorPolicy for AutoPtr instances wrapping ICUIFrame pointers. More...
class   CUIFrameMgr
class   MacroButtonData
class   ISpinnerControl
class   ISpinnerControlDestructorPolicy
  Class representing the DestructorPolicy for AutoPtr instances wrapping ISpinnerControl pointers. More...
class   ISliderControl
class   ISliderControlDestructorPolicy
  Class representing the DestructorPolicy for AutoPtr instances wrapping ISliderControl pointers. More...
class   IRollupCallback
  class IRollupCallback : public InterfaceServer More...
class   IRollupPanel
  class IRollupPanel : public InterfaceServer More...
class   IRollupRCMenuItem
  class IRollupRCMenuItem : public InterfaceServer More...
class   IRollupWindow
class   IRollupWindowDestructorPolicy
  Class representing the DestructorPolicy for AutoPtr instances wrapping IRollupWindow pointers. More...
class   ICustEdit
class   ICustEditDestructorPolicy
  Class representing the DestructorPolicy for AutoPtr instances wrapping ICustEdit pointers. More...
class   ICustStatusEdit
class   ICustStatusEditDestructorPolicy
  Class representing the DestructorPolicy for AutoPtr instances wrapping ICustStatusEdit pointers. More...
class   FlyOffData
class   ICustButton
class   ICustButtonDestructorPolicy
  Class representing the DestructorPolicy for AutoPtr instances wrapping ICustButton pointers. More...
class   ICustStatus
class   ICustStatusDestructorPolicy
  Class representing the DestructorPolicy for AutoPtr instances wrapping ICustStatus pointers. More...
class   ICustSeparator
class   ICustSeparatorDestructorPolicy
  Class representing the DestructorPolicy for AutoPtr instances wrapping ICustSeparator pointers. More...
class   ToolItem
class   ToolButtonItem
  This class describes the properties of a 3ds Max custom toolbar button. More...
class   ToolMacroItem
class   ToolSeparatorItem
class   ToolStatusItem
class   ToolOtherItem
class   ICustToolbar
class   ICustToolbarDestructorPolicy
  Class representing the DestructorPolicy for AutoPtr instances wrapping ICustToolbar pointers. More...
class   ICustImage
class   ICustImageDestructorPolicy
  Class representing the DestructorPolicy for AutoPtr instances wrapping ICustImage pointers. More...
class   IOffScreenBuf
class   IColorSwatch
class   IColorSwatchDestructorPolicy
  Class representing the DestructorPolicy for AutoPtr instances wrapping IColorSwatch pointers. More...
class   IColorSwatchRenamer
 

class IColorSwatchRenamer

More...
class   IDADWindow
class   IDADWindowDestructorPolicy
  Class representing the DestructorPolicy for AutoPtr instances wrapping IDADWindow pointers. More...

Defines

#define  CHILDWND_CUI
#define  I_EXEC_CB_NO_BORDER   0xA000
  Pass this to CustButton::Execute() to turnoff borders, like in the toolbar.
#define  I_EXEC_CS_NO_BORDER   0xA001
  Pass this to CustStatus::Execute() to turnoff borders, like in the toolbar.
#define  I_EXEC_SPINNER_RESET   0xA002
  Set a spinner back to its Reset value.
#define  I_EXEC_SPINNER_IS_RESET_CHANGE   0xA003
  When called during a CC_SPINNER_xxx messages, it will return true if the msg was triggered by a right-click reset.
#define  I_EXEC_SPINNER_ALT_DISABLE   0xA004
  disable the alt key spinner behaviour
#define  I_EXEC_SPINNER_ALT_ENABLE   0xA005
  enable the alt key spinner behaviour
#define  I_EXEC_SPINNER_ONE_CLICK_DISABLE   0xA006
  disable the one click spinner behaviour with alt or ctrl down
#define  I_EXEC_SPINNER_ONE_CLICK_ENABLE   0xA007
  enable the one click spinner behaviour with alt or ctrl down
#define  I_EXEC_BUTTON_DAD_ENABLE   0xA008
  enable or disable button drag & drop within a toolbar
#define  I_EXEC_GET_TOOLTIP_HWND   0xA009
  return the hwnd for the tooltip
#define  OWNER_MEDIT_SAMPLE   0
#define  OWNER_NODE   1
#define  OWNER_MTL_TEX   2
#define  OWNER_SCENE   3
#define  OWNER_BROWSE_NEW   4
#define  OWNER_BROWSE_LIB   5
#define  OWNER_BROWSE_MEDIT   6
#define  OWNER_BROWSE_SCENE   7
#define  OWNER_MATERIAL_EXPLORER   8
#define  CUIFRAMECLASS   _M("CUIFrame")
#define  CUI_TOOLBAR   (1<<0)
  set if frame holds toolbars and/or tool palettes
#define  CUI_MENU   (1<<1)
  set if frame holds a menu
#define  CUI_HWND   (1<<2)
  set if frame hold a generic hWnd
#define  CUI_TOP_DOCK   (1<<0)
  Can be docked at the top.
#define  CUI_BOTTOM_DOCK   (1<<1)
  Can be docked at the bottom.
#define  CUI_LEFT_DOCK   (1<<2)
  Can be docked on the left.
#define  CUI_RIGHT_DOCK   (1<<3)
  Can be docked at the right.
#define  CUI_ALL_DOCK   (CUI_TOP_DOCK|CUI_BOTTOM_DOCK|CUI_LEFT_DOCK|CUI_RIGHT_DOCK)
  Can be docked at any of the four positions.
#define  CUI_HORIZ_DOCK   (CUI_TOP_DOCK|CUI_BOTTOM_DOCK)
  Can be docked at the top or bottom.
#define  CUI_VERT_DOCK   (CUI_LEFT_DOCK|CUI_RIGHT_DOCK)
  Can be docked at the left or right.
#define  CUI_FLOATABLE   (1<<4)
  Can be floated.
#define  CUI_FLOATING   (1<<4)
  Synonym for CUI_FLOATABLE.
#define  CUI_CONNECTABLE   (1<<5)
  Not currently implemented.
#define  CUI_SM_HANDLES   (1<<6)
  Set if frame should display size/move handles.
#define  CUI_SLIDING   (1<<7)
  Frame doesn't butt up against the one next to it.
#define  CUI_MAX_SIZED   (1<<8)
  Frame takes up the entire row.
#define  CUI_DONT_SAVE   (1<<9)
  Don't save this CUI frame in the .cui file.
#define  CUI_HAS_MENUBAR   (1<<10)
  CUI frames that have a menu bar need to be treated differently.
#define  CUI_MINIMIZED_DOCKABLE   (1<<11)
  CUI frames can be minimized docked, which has an minimized handle to allow expanding.
#define  CUI_MINIMIZED_DOCK   (1<<12)
  CUI frmaes are minimized docked.
#define  CUI_NO_PANEL   0
  Turn off docking.
#define  CUI_TOP_PANEL   CUI_TOP_DOCK
  Docks to the top of the viewport.
#define  CUI_BOTTOM_PANEL   CUI_BOTTOM_DOCK
  Docks to the bottom of the viewport.
#define  CUI_LEFT_PANEL   CUI_LEFT_DOCK
  Docks to the left of the viewport.
#define  CUI_RIGHT_PANEL   CUI_RIGHT_DOCK
  Docks to the right of the viewport.
#define  CUI_FIXED_PANELS   (CUI_TOP_PANEL|CUI_BOTTOM_PANEL|CUI_LEFT_PANEL|CUI_RIGHT_PANEL)
  docs anywhere
#define  CUI_FLOATING_PANELS   (1<<4)
  Signifies a floating panel.
#define  CUI_ALL_PANELS   (CUI_FIXED_PANELS|CUI_FLOATING_PANELS)
  All options combined.
#define  CUI_POSDATA_MSG   (WM_APP + 0x3412)
  used for retrieving CUIFrame position data
#define  CUI_SUBFRAME_ADDED_MSG   (WM_APP + 0x3413)
  tells a parent window that an ICUIFrame has been added
#define  CUI_SUBFRAME_REMOVED_MSG   (WM_APP + 0x3414)
  tells a parent window that an ICUIFrame has been removed
#define  CUI_PRESET_MACROBUTTONS   (WM_APP + 0x3415)
  Set MacroButtonStates is about to be called on the toolbar.
#define  CUI_SUBFRAME_ACTIVATE_MSG   (WM_APP + 0x3416)
  tells a parent window that a subframe's active state has changed
#define  CUI_NONE   0
#define  CUI_HORIZ   CUI_HORIZ_DOCK
  Docked horizontally.
#define  CUI_VERT   CUI_VERT_DOCK
  Docked vertically.
#define  CUI_FLOAT   CUI_FLOATING
  Floating.
#define  CUI_MIN_TB_WIDTH   25
#define  CUI_MENU_HIDE   0
#define  CUI_MENU_SHOW_ENABLED   1
#define  CUI_MENU_SHOW_DISABLED   2
#define  CUI_MIN_SIZE   0
  The minimum size.
#define  CUI_MAX_SIZE   1
  The maximum size.
#define  CUI_PREF_SIZE   2
  3ds Max does not currently take advantage of this size, only MIN and MAX are used.
#define  CUI_SIZE_16   16
#define  CUI_SIZE_24   24
#define  CUI_MASK_NONE   0
#define  CUI_MASK_MONO   1
#define  CUI_MASK_ALPHA   2
#define  CUI_MASK_ALPHA_PREMULT   3
#define  CUI_EDIT_NONE   0
#define  CUI_EDIT_KBD   (1<<0)
#define  CUI_EDIT_SCRIPT   (1<<1)
#define  CUI_EDIT_MACRO   (CUI_EDIT_KBD | CUI_EDIT_SCRIPT)
#define  CUI_EDIT_ORDER   (1<<2)
#define  CUI_MODE_NORMAL   0
#define  CUI_MODE_EDIT   1
#define  MB_TYPE_KBD   1
#define  MB_TYPE_SCRIPT   2
#define  MB_TYPE_ACTION   3
#define  MB_TYPE_ACTION_CUSTOM   4
#define  MB_FLAG_ENABLED   (1 << 0)
#define  MB_FLAG_CHECKED   (1 << 1)
#define  SPINNERWINDOWCLASS   _M("SpinnerControl")
#define  CC_SPINNER_CHANGE   WM_USER + 600
#define  CC_SPINNER_BUTTONDOWN   WM_USER + 601
#define  CC_SPINNER_BUTTONUP   WM_USER + 602
#define  SPINNER_WRAP_DISTANCE   40
#define  SLIDERWINDOWCLASS   _M("SliderControl")
#define  CC_SLIDER_CHANGE   WM_USER + 611
#define  CC_SLIDER_BUTTONDOWN   WM_USER + 612
#define  CC_SLIDER_BUTTONUP   WM_USER + 613
#define  WM_CUSTROLLUP_RECALCLAYOUT   WM_USER+876
#define  ROLLUPWINDOWCLASS   _M("RollupWindow")
#define  APPENDROLL_CLOSED   (1<<0)
#define  DONTAUTOCLOSE   (1<<1)
#define  ROLLUP_SAVECAT   (1<<2)
#define  ROLLUP_USEREPLACEDCAT   (1<<3)
#define  ROLLUP_NOBORDER   (1<<4)
#define  CUSTEDITWINDOWCLASS   _M("CustEdit")
#define  WM_CUSTEDIT_ENTER   (WM_USER+685)
#define  CUSTSTATUSEDITWINDOWCLASS   _M("CustStatusEdit")
#define  CUSTBUTTONWINDOWCLASS   _M("CustButton")
#define  CC_COMMAND   WM_USER + 700
#define  CC_CMD_SET_TYPE   23
#define  CC_CMD_SET_STATE   24
#define  CC_CMD_HILITE_COLOR   25
#define  RED_WASH   RGB(255,192,192)
#define  GREEN_WASH   (ColorMan()->GetColor(kActiveCommand))
#define  BLUE_WASH   (ColorMan()->GetColor(kPressedHierarchyButton))
#define  SUBOBJ_COLOR   (ColorMan()->GetColor(kSubObjectColor))
#define  BN_BUTTONDOWN   8173
#define  BN_BUTTONUP   8174
#define  BN_RIGHTCLICK   8183
#define  BN_FLYOFF   8187
#define  CMF_TOOLBUTTON   9274
#define  FLY_VARIABLE   1
#define  FLY_UP   2
#define  FLY_DOWN   3
#define  FLY_HVARIABLE   4
#define  FLY_LEFT   5
#define  FLY_RIGHT   6
#define  CUSTSTATUSWINDOWCLASS   _M("CustStatus")
#define  CUSTSEPARATORWINDOWCLASS   _M("CustSeparator")
#define  CUSTTOOLBARWINDOWCLASS   _M("CustToolbar")
#define  TB_RIGHTCLICK   0x2861
#define  CTB_NONE   CUI_NONE
#define  CTB_HORIZ   CUI_HORIZ
#define  CTB_VERT   CUI_VERT
#define  CTB_FLOAT   CUI_FLOAT
#define  CENTER_TOOL_VERTICALLY   0xffffffff
#define  CUSTIMAGEWINDOWCLASS   _M("CustImage")
#define  CC_COLOR_CHANGE   WM_USER + 603
#define  CC_COLOR_BUTTONDOWN   WM_USER + 606
#define  CC_COLOR_BUTTONUP   WM_USER + 607
#define  CC_COLOR_SEL   WM_USER + 604
#define  CC_COLOR_DROP   WM_USER + 605
#define  CC_COLOR_CLOSE   WM_USER + 608
#define  COLORSWATCHWINDOWCLASS   _M("ColorSwatch")
#define  COLOR_SWATCH_RENAMER_INTERFACE_51   Interface_ID(0x5a684953, 0x1fc043dc)
#define  DADWINDOWCLASS   _M("DragDropWindow")

Typedefs

typedef void *  RollupState
typedef LRESULT CALLBACK  PaintProc (HDC hdc, Rect rect, BOOL in, BOOL checked, BOOL enabled)
typedef LRESULT CALLBACK  WindowProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)

Enumerations

enum   EditSpinnerType {
  EDITTYPE_INT, EDITTYPE_FLOAT, EDITTYPE_UNIVERSE, EDITTYPE_POS_INT,
  EDITTYPE_POS_FLOAT, EDITTYPE_POS_UNIVERSE, EDITTYPE_TIME
}
enum   CustButType { CBT_PUSH, CBT_CHECK }
enum   StatusTextFormat { STATUSTEXT_LEFT, STATUSTEXT_CENTERED, STATUSTEXT_RIGHT }
enum   ToolItemType {
  CTB_PUSHBUTTON, CTB_CHECKBUTTON, CTB_MACROBUTTON, CTB_SEPARATOR,
  CTB_STATUS, CTB_OTHER
}

Functions

CoreExport HBRUSH  GetLTGrayBrush ()
CoreExport HBRUSH  GetDKGrayBrush ()
CoreExport void  MakeBrushesSolid (BOOL onOff)
CoreExport HFONT  GetFixedFont ()
  Return the fixed font used by 3ds Max.
CoreExport HFONT  GetFixedFont_LocalCharSet ()
  Return the fixed font used by 3ds Max, based on the 3ds Max's language and character set. For internal use only.
CoreExport HFONT  GetFixedFontBold ()
  Return the fixed bold font used by 3ds Max.
CoreExport HFONT  GetFixedFontBold_LocalCharSet ()
  Return the fixed bold font used by 3ds Max, based on the 3ds Max's language and character set. For internal use only.
CoreExport LONG  GetFixedFontHeight ()
  Returns the height of the fixed font used by 3ds Max.
CoreExport LONG  GetFixedFontHeightSmall ()
  Returns the height of the small fixed font used by 3ds Max.
CoreExport DWORD  GetFixedFontCharset ()
  Returns the fixed font character set for the language currently used by 3ds Max.
CoreExport const MCHAR *  GetFixedFontFace ()
  Returns the font face string for the fixed font used by 3ds Max.
CoreExport HFONT  GetUIFont ()
  Return the standard font used in 3ds Max's user interface.
CoreExport HFONT  GetUIFont_LocalCharSet ()
  Return the standard font used in 3ds Max's user interface, depending on the language and charset. For internal use only.
CoreExport HFONT  GetUIFontBold ()
  Return the standard bold font used in 3ds Max's user interface.
CoreExport HFONT  GetUIFontBold_LocalCharSet ()
  Return the standard bold font used in 3ds Max's user interface, depending on the language and charset. For internal use only.
CoreExport LONG  GetUIFontHeight ()
  Returns the height of standard font which used in 3ds Max's user interface.
CoreExport LONG  GetUIFontHeightSmall ()
  Returns the height of small font which used in 3ds Max's user interface.
CoreExport DWORD  GetUIFontCharset ()
  Returns character set for the current language used in 3ds Max's user interface.
CoreExport const MCHAR *  GetUIFontFace ()
  Returns the font face string for the standard font used in 3ds Max's user interface.
CoreExport HCURSOR  GetPanCursor ()
CoreExport void  UpdateButtonOutlines ()
CoreExport ICUIFrame GetICUIFrame (HWND hCtrl)
CoreExport void  ReleaseICUIFrame (ICUIFrame *icf)
CoreExport HWND  CreateCUIFrameWindow (HWND hParent, const MCHAR *title, int x, int y, int cx, int cy)
CoreExport CUIFrameMgr GetCUIFrameMgr ()
CoreExport void  DoCUICustomizeDialog ()
CoreExport BOOL  AllFloatersAreHidden ()
CoreExport void  ResizeFloatingTB (HWND hWnd)
CoreExport ISpinnerControl GetISpinner (HWND hCtrl)
CoreExport void  ReleaseISpinner (ISpinnerControl *isc)
CoreExport void  SetSnapSpinner (BOOL b)
CoreExport BOOL  GetSnapSpinner ()
CoreExport void  SetSnapSpinValue (float f)
CoreExport float  GetSnapSpinValue ()
CoreExport void  SetSpinnerPrecision (int p)
CoreExport int  GetSpinnerPrecision ()
CoreExport void  SetSpinnerWrap (int w)
CoreExport int  GetSpinnerWrap ()
CoreExport ISliderControl GetISlider (HWND hCtrl)
CoreExport void  ReleaseISlider (ISliderControl *isc)
CoreExport ISliderControl SetupIntSlider (HWND hwnd, int idSlider, int idEdit, int min, int max, int val, int numSegs)
CoreExport ISliderControl SetupFloatSlider (HWND hwnd, int idSlider, int idEdit, float min, float max, float val, int numSegs)
CoreExport ISliderControl SetupUniverseSlider (HWND hwnd, int idSlider, int idEdit, float min, float max, float val, int numSegs)
CoreExport void  SetSliderDragNotify (BOOL onOff)
CoreExport BOOL  GetSliderDragNotify ()
CoreExport BOOL  IsRollupPanelOpen (HWND hDlg)
CoreExport IRollupWindow GetIRollup (HWND hCtrl)
CoreExport void  ReleaseIRollup (IRollupWindow *irw)
CoreExport ICustEdit GetICustEdit (HWND hCtrl)
CoreExport void  ReleaseICustEdit (ICustEdit *ice)
CoreExport ICustStatusEdit GetICustStatusEdit (HWND hCtrl)
CoreExport void  ReleaseICustStatusEdit (ICustStatusEdit *ice)
CoreExport ICustButton GetICustButton (HWND hCtrl)
CoreExport void  ReleaseICustButton (ICustButton *icb)
CoreExport ICustStatus GetICustStatus (HWND hCtrl)
CoreExport void  ReleaseICustStatus (ICustStatus *ics)
CoreExport ICustSeparator GetICustSeparator (HWND hCtrl)
CoreExport void  ReleaseICustSeparator (ICustSeparator *ics)
CoreExport ICustToolbar GetICustToolbar (HWND hCtrl)
CoreExport void  ReleaseICustToolbar (ICustToolbar *ict)
CoreExport ICustImage GetICustImage (HWND hCtrl)
CoreExport void  ReleaseICustImage (ICustImage *ici)
CoreExport IOffScreenBuf CreateIOffScreenBuf (HWND hWnd)
CoreExport void  DestroyIOffScreenBuf (IOffScreenBuf *iBuf)
CoreExport IColorSwatch GetIColorSwatch (HWND hCtrl, COLORREF col, const MCHAR *name)
CoreExport IColorSwatch GetIColorSwatch (HWND hCtrl, Color col, const MCHAR *name)
CoreExport IColorSwatch GetIColorSwatch (HWND hCtrl, AColor col, const MCHAR *name)
CoreExport IColorSwatch GetIColorSwatch (HWND hCtrl)
CoreExport void  ReleaseIColorSwatch (IColorSwatch *ics)
CoreExport void  RefreshAllColorSwatches ()
CoreExport IDADWindow GetIDADWindow (HWND hWnd)
CoreExport void  ReleaseIDADWindow (IDADWindow *idw)
CoreExport void  InstallThumbTack (HWND hwnd)
  This function installs a thumb tack in the title bar of a window which forces the window to the top.
CoreExport void  RemoveThumbTack (HWND hwnd)
CoreExport ISpinnerControl SetupIntSpinner (HWND hwnd, int idSpin, int idEdit, int min, int max, int val)
  Handy routines for setting up Integer Spinners.
CoreExport ISpinnerControl SetupFloatSpinner (HWND hwnd, int idSpin, int idEdit, float min, float max, float val, float scale=0.1f)
  Handy routines for setting up Floating Point and Universe Spinners.
CoreExport ISpinnerControl SetupUniverseSpinner (HWND hwnd, int idSpin, int idEdit, float min, float max, float val, float scale=0.1f)
CoreExport void  SetSpinDragNotify (BOOL onOff)
CoreExport BOOL  GetSpinDragNotify ()
CoreExport void  DisableAccelerators ()
CoreExport void  EnableAccelerators ()
CoreExport BOOL  AcceleratorsEnabled ()
CoreExport void  SetSaveRequiredFlag (BOOL requireSave=TRUE, BOOL requireAutoBackupSave=TRUE)
  Explicitly marks the scene as changed.
CoreExport BOOL  GetSaveRequiredFlag ()
  Retrieves the internal save required flag.
CoreExport BOOL  IsSaveRequired ()
  This tells if the scene needs to be saved.
CoreExport BOOL  IsAutoSaveRequired ()
  This tells if the current scene needs to be backed up.

Define Documentation

#define CHILDWND_CUI
#define I_EXEC_CB_NO_BORDER   0xA000

Pass this to CustButton::Execute() to turnoff borders, like in the toolbar.

#define I_EXEC_CS_NO_BORDER   0xA001

Pass this to CustStatus::Execute() to turnoff borders, like in the toolbar.

#define I_EXEC_SPINNER_RESET   0xA002

Set a spinner back to its Reset value.

#define I_EXEC_SPINNER_IS_RESET_CHANGE   0xA003

When called during a CC_SPINNER_xxx messages, it will return true if the msg was triggered by a right-click reset.

#define I_EXEC_SPINNER_ALT_DISABLE   0xA004

disable the alt key spinner behaviour

#define I_EXEC_SPINNER_ALT_ENABLE   0xA005

enable the alt key spinner behaviour

#define I_EXEC_SPINNER_ONE_CLICK_DISABLE   0xA006

disable the one click spinner behaviour with alt or ctrl down

#define I_EXEC_SPINNER_ONE_CLICK_ENABLE   0xA007

enable the one click spinner behaviour with alt or ctrl down

#define I_EXEC_BUTTON_DAD_ENABLE   0xA008

enable or disable button drag & drop within a toolbar

#define I_EXEC_GET_TOOLTIP_HWND   0xA009

return the hwnd for the tooltip

#define OWNER_MEDIT_SAMPLE   0
#define OWNER_NODE   1
#define OWNER_MTL_TEX   2
#define OWNER_SCENE   3
#define OWNER_BROWSE_NEW   4
#define OWNER_BROWSE_LIB   5
#define OWNER_BROWSE_MEDIT   6
#define OWNER_BROWSE_SCENE   7
#define OWNER_MATERIAL_EXPLORER   8
#define CUIFRAMECLASS   _M("CUIFrame")
#define CUI_TOOLBAR   (1<<0)

set if frame holds toolbars and/or tool palettes

#define CUI_MENU   (1<<1)

set if frame holds a menu

#define CUI_HWND   (1<<2)

set if frame hold a generic hWnd

#define CUI_POSDATA_MSG   (WM_APP + 0x3412)

used for retrieving CUIFrame position data

#define CUI_SUBFRAME_ADDED_MSG   (WM_APP + 0x3413)

tells a parent window that an ICUIFrame has been added

#define CUI_SUBFRAME_REMOVED_MSG   (WM_APP + 0x3414)

tells a parent window that an ICUIFrame has been removed

#define CUI_PRESET_MACROBUTTONS   (WM_APP + 0x3415)

Set MacroButtonStates is about to be called on the toolbar.

#define CUI_SUBFRAME_ACTIVATE_MSG   (WM_APP + 0x3416)

tells a parent window that a subframe's active state has changed

#define CUI_MIN_TB_WIDTH   25
#define CUI_MENU_HIDE   0
#define CUI_MENU_SHOW_ENABLED   1
#define CUI_MENU_SHOW_DISABLED   2
#define CUI_SIZE_16   16
#define CUI_SIZE_24   24
#define CUI_MASK_NONE   0
#define CUI_MASK_MONO   1
#define CUI_MASK_ALPHA   2
#define CUI_MASK_ALPHA_PREMULT   3
#define CUI_EDIT_NONE   0
#define CUI_EDIT_KBD   (1<<0)
#define CUI_EDIT_SCRIPT   (1<<1)
#define CUI_EDIT_MACRO   (CUI_EDIT_KBD | CUI_EDIT_SCRIPT)
#define CUI_EDIT_ORDER   (1<<2)
#define CUI_MODE_NORMAL   0
#define CUI_MODE_EDIT   1
#define MB_TYPE_KBD   1
#define MB_TYPE_SCRIPT   2
#define MB_TYPE_ACTION   3
#define MB_TYPE_ACTION_CUSTOM   4
#define MB_FLAG_ENABLED   (1 << 0)
#define MB_FLAG_CHECKED   (1 << 1)
#define SPINNERWINDOWCLASS   _M("SpinnerControl")
#define CC_SPINNER_CHANGE   WM_USER + 600
#define CC_SPINNER_BUTTONDOWN   WM_USER + 601
#define CC_SPINNER_BUTTONUP   WM_USER + 602
#define SPINNER_WRAP_DISTANCE   40
#define SLIDERWINDOWCLASS   _M("SliderControl")
#define CC_SLIDER_CHANGE   WM_USER + 611
#define CC_SLIDER_BUTTONDOWN   WM_USER + 612
#define CC_SLIDER_BUTTONUP   WM_USER + 613
#define WM_CUSTROLLUP_RECALCLAYOUT   WM_USER+876
#define ROLLUPWINDOWCLASS   _M("RollupWindow")
#define APPENDROLL_CLOSED   (1<<0)
#define DONTAUTOCLOSE   (1<<1)
#define ROLLUP_SAVECAT   (1<<2)
#define ROLLUP_USEREPLACEDCAT   (1<<3)
#define ROLLUP_NOBORDER   (1<<4)
#define CUSTEDITWINDOWCLASS   _M("CustEdit")
#define WM_CUSTEDIT_ENTER   (WM_USER+685)
#define CUSTSTATUSEDITWINDOWCLASS   _M("CustStatusEdit")
#define CUSTBUTTONWINDOWCLASS   _M("CustButton")
#define CC_COMMAND   WM_USER + 700
#define CC_CMD_SET_TYPE   23
#define CC_CMD_SET_STATE   24
#define CC_CMD_HILITE_COLOR   25
#define RED_WASH   RGB(255,192,192)
#define GREEN_WASH   (ColorMan()->GetColor(kActiveCommand))
#define BLUE_WASH   (ColorMan()->GetColor(kPressedHierarchyButton))
#define SUBOBJ_COLOR   (ColorMan()->GetColor(kSubObjectColor))
#define BN_BUTTONDOWN   8173
#define BN_BUTTONUP   8174
#define BN_RIGHTCLICK   8183
#define BN_FLYOFF   8187
#define CMF_TOOLBUTTON   9274
#define FLY_VARIABLE   1
#define FLY_UP   2
#define FLY_DOWN   3
#define FLY_HVARIABLE   4
#define FLY_LEFT   5
#define FLY_RIGHT   6
#define CUSTSTATUSWINDOWCLASS   _M("CustStatus")
#define CUSTSEPARATORWINDOWCLASS   _M("CustSeparator")
#define CUSTTOOLBARWINDOWCLASS   _M("CustToolbar")
#define TB_RIGHTCLICK   0x2861
#define CTB_NONE   CUI_NONE
#define CTB_HORIZ   CUI_HORIZ
#define CTB_VERT   CUI_VERT
#define CTB_FLOAT   CUI_FLOAT
#define CENTER_TOOL_VERTICALLY   0xffffffff
#define CUSTIMAGEWINDOWCLASS   _M("CustImage")
#define CC_COLOR_CHANGE   WM_USER + 603
#define CC_COLOR_BUTTONDOWN   WM_USER + 606
#define CC_COLOR_BUTTONUP   WM_USER + 607
#define CC_COLOR_SEL   WM_USER + 604
#define CC_COLOR_DROP   WM_USER + 605
#define CC_COLOR_CLOSE   WM_USER + 608
#define COLORSWATCHWINDOWCLASS   _M("ColorSwatch")
#define COLOR_SWATCH_RENAMER_INTERFACE_51   Interface_ID(0x5a684953, 0x1fc043dc)
#define DADWINDOWCLASS   _M("DragDropWindow")

Typedef Documentation

typedef LRESULT CALLBACK PaintProc(HDC hdc, Rect rect, BOOL in, BOOL checked, BOOL enabled)
typedef LRESULT CALLBACK WindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)

Enumeration Type Documentation


Function Documentation

CoreExport HBRUSH GetLTGrayBrush ( )
CoreExport HBRUSH GetDKGrayBrush ( )
CoreExport void MakeBrushesSolid ( BOOL  onOff )
CoreExport HCURSOR GetPanCursor ( )
CoreExport void UpdateButtonOutlines ( )
CoreExport ICUIFrame* GetICUIFrame ( HWND  hCtrl )
Remarks:
Used to initialize and return a pointer to the CUI Frame control.
Parameters:
hCtrl window handle of the control.
CoreExport void ReleaseICUIFrame ( ICUIFrame icf )
Remarks:
Used to release the control when finished.
Parameters:
icf Points to the control to release.
CoreExport HWND CreateCUIFrameWindow ( HWND  hParent,
const MCHAR *  title,
int  x,
int  y,
int  cx,
int  cy 
)
Remarks:
Creates a CUI Frame Window with the specified window handle, size and title parameters. Values of 0 may be passed for x, y, cx and cy. This indicates that the initial size doesn't matter. For example, when the 3ds Max CUI is created initially everything is docked. 3ds Max then calls CUIFrameMgr::RecalcLayout() which computes all the sizes. Thus the values passed don't matter since they are all going to be recalculated anyway.
Parameters:
hParent handle of the parent window for the frame.
title title for the frame. This effectively calls SetName() below to establish a name for the frame.
x x coordinate of the upper left corner.
y y coordinate of the upper left corner.
cx x size.
cy y size.
Returns:
If the function succeeds, the return value is the window handle to the dialog box. If the function fails, the return value is NULL.
CoreExport CUIFrameMgr* GetCUIFrameMgr ( )
Remarks:
Returns a pointer to the CUIFrameMgr which controls the overall operation of CUI Frames (the windows which contain toolbars, menus, the command panel, etc).
CoreExport void DoCUICustomizeDialog ( )
Remarks:
This global function presents the Customize User Interface dialog.
CoreExport BOOL AllFloatersAreHidden ( )
Remarks:
Returns TRUE if all floaters are hidden; otherwise FALSE.
CoreExport void ResizeFloatingTB ( HWND  hWnd )
CoreExport ISpinnerControl* GetISpinner ( HWND  hCtrl )
Remarks:
Used to initialize and return a pointer to the spinner control.
Parameters:
hCtrl window handle of the control.
CoreExport void ReleaseISpinner ( ISpinnerControl isc )
Remarks:
Used to release the control when finished.
Parameters:
isc Points to the control to release.
CoreExport void SetSnapSpinner ( BOOL  b )
Remarks:
This activates or de-activates the global spinner snap toggle.
Parameters:
BOOL b

TRUE to activate; FALSE to de-activate.
CoreExport BOOL GetSnapSpinner ( )
Remarks:
Returns the global spinner snap setting; TRUE if on; FALSE if off.
CoreExport void SetSnapSpinValue ( float  f )
Remarks:
This sets the global spinner snap increment or decrement value.
Parameters:
float f

The value that is added to or subtracted from the current spinner value when the arrow buttons are pressed.
CoreExport float GetSnapSpinValue ( )
Remarks:
Returns the global spinner snap increment or decrement value.
CoreExport void SetSpinnerPrecision ( int  p )
Remarks:
Sets the precision (number of decimal places displayed) used by the spinner control. Note that this function also affects slider controls. See Class ISliderControl.
Parameters:
int p

The number of decimal places to display in the edit box linked to the spinner control.
CoreExport int GetSpinnerPrecision ( )
Remarks:
Returns the number of decimal places displayed in the edit box linked to a spinner control. Note that this function also affects slider controls. See Class ISliderControl.

Spinner controls have a global snap setting. This is set in 3ds Max using File/Preferences... in the General page by changing the Spinner Snap setting. When enabled this specifies an increment that is applied to the current spinner value each time the UP or DOWN buttons are pressed on the spinner control.
CoreExport void SetSpinnerWrap ( int  w )
CoreExport int GetSpinnerWrap ( )
CoreExport ISliderControl* GetISlider ( HWND  hCtrl )
Remarks:
Used to initialize and return a pointer to the slider control.
Parameters:
hCtrl window handle of the control.
CoreExport void ReleaseISlider ( ISliderControl isc )
Remarks:
Used to release the control when finished.
Parameters:
isc Points to the control to release.
CoreExport ISliderControl* SetupIntSlider ( HWND  hwnd,
int  idSlider,
int  idEdit,
int  min,
int  max,
int  val,
int  numSegs 
)
Remarks:
This global function is used for setting up integer sliders. It performs the equivalent of the GetISlider(), SetLimits(), SetValue(), and LinkToEdit().
Parameters:
HWND hwnd

The handle of the dialog box in which the slider appears.

int idSlider

The ID of the slider.

int idEdit

The ID of the edit control.

int min

The minimum allowable value.

int max

The maximum allowable value.

int val

The initial value for the spinner.

int numSegs

The number of segments to use for the control.
Returns:
A pointer to the slider control.
CoreExport ISliderControl* SetupFloatSlider ( HWND  hwnd,
int  idSlider,
int  idEdit,
float  min,
float  max,
float  val,
int  numSegs 
)
Remarks:
This global function is used for setting up floating point sliders. It performs the equivalent of the GetISlider(), SetLimits(), SetValue(), and LinkToEdit().
Parameters:
HWND hwnd

The handle of the dialog box in which the slider appears.

int idSlider

The ID of the slider.

int idEdit

The ID of the edit control.

float min

The minimum allowable value.

float max

The maximum allowable value.

float val

The initial value for the spinner.

int numSegs

The number of segments to use for the control.
Returns:
A pointer to the slider control.
CoreExport ISliderControl* SetupUniverseSlider ( HWND  hwnd,
int  idSlider,
int  idEdit,
float  min,
float  max,
float  val,
int  numSegs 
)
Remarks:
This global function is used for setting up 'universal' value sliders (EDITTYPE_UNIVERSE -- these display world space units). It performs the equivalent of the GetISlider(), SetLimits(), SetValue(), and LinkToEdit().
Parameters:
HWND hwnd

The handle of the dialog box in which the slider appears.

int idSlider

The ID of the slider.

int idEdit

The ID of the edit control.

float min

The minimum allowable value.

float max

The maximum allowable value.

float val

The initial value for the spinner.

int numSegs

The number of segments to use for the control.
Returns:
A pointer to the slider control.
CoreExport void SetSliderDragNotify ( BOOL  onOff )
Remarks:
This function controls whether or not sliders send CC_SLIDER_CHANGE notifications while the user adjusts them with the mouse.
Parameters:
BOOL onOff

TRUE to turn on; FALSE to turn off.
CoreExport BOOL GetSliderDragNotify ( )
Remarks:
Returns TRUE if CC_SLIDER_CHANGE notifications are sent by sliders while the user adjusts them with the mouse; FALSE if they are not sent.
CoreExport BOOL IsRollupPanelOpen ( HWND  hDlg )
Remarks:
This function returns TRUE if a particular rollup panel is open given a handle to the dialog window in the panel.
Parameters:
HWND hDlg

Handle to the dialog window in the panel.
CoreExport IRollupWindow* GetIRollup ( HWND  hCtrl )
Remarks:
Used to initialize and return a pointer to the rollup window control.
Parameters:
hCtrl window handle of the control.
CoreExport void ReleaseIRollup ( IRollupWindow irw )
Remarks:
Used to release the control when finished.
Parameters:
irw Points to the control to release.
CoreExport ICustEdit* GetICustEdit ( HWND  hCtrl )
Remarks:
Used to initialize and return a pointer to the custom edit control.
Parameters:
hCtrl window handle of the control.
CoreExport void ReleaseICustEdit ( ICustEdit ice )
Remarks:
Used to release the control when finished.
Parameters:
ice Points to the control to release.
CoreExport ICustStatusEdit* GetICustStatusEdit ( HWND  hCtrl )
Remarks:
Used to initialize and return a pointer to the custom status edit control.
Parameters:
hCtrl window handle of the control.
CoreExport void ReleaseICustStatusEdit ( ICustStatusEdit ice )
Remarks:
Used to release the control when finished.
Parameters:
ice Points to the control to release.
CoreExport ICustButton* GetICustButton ( HWND  hCtrl )
Remarks:
Used to initialize and return a pointer to the button control.
Parameters:
hCtrl window handle of the control.
CoreExport void ReleaseICustButton ( ICustButton icb )
Remarks:
Used to release the control when finished.
Parameters:
icb Points to the control to release.
CoreExport ICustStatus* GetICustStatus ( HWND  hCtrl )
Remarks:
Used to initialize and return a pointer to the custom status control.
Parameters:
hCtrl window handle of the control.
CoreExport void ReleaseICustStatus ( ICustStatus ics )
Remarks:
Used to release the control when finished.
Parameters:
ics Points to the control to release.
CoreExport ICustSeparator* GetICustSeparator ( HWND  hCtrl )
Remarks:
Used to initialize and return a pointer to the separator control.
Parameters:
hCtrl window handle of the control.
CoreExport void ReleaseICustSeparator ( ICustSeparator ics )
Remarks:
Used to release the control when finished.
Parameters:
ics Points to the control to release.
CoreExport ICustToolbar* GetICustToolbar ( HWND  hCtrl )
Remarks:
Used to initialize and return a pointer to the toolbar control.
Parameters:
hCtrl window handle of the control.
CoreExport void ReleaseICustToolbar ( ICustToolbar ict )
Remarks:
Used to release the control when finished.
Parameters:
ict Points to the control to release.
CoreExport ICustImage* GetICustImage ( HWND  hCtrl )
Remarks:
Used to initialize and return a pointer to the image control.
Parameters:
hCtrl window handle of the control.
CoreExport void ReleaseICustImage ( ICustImage ici )
Remarks:
Used to release the control when finished.
Parameters:
ici Points to the control to release.
CoreExport IOffScreenBuf* CreateIOffScreenBuf ( HWND  hWnd )
CoreExport void DestroyIOffScreenBuf ( IOffScreenBuf iBuf )
CoreExport IColorSwatch* GetIColorSwatch ( HWND  hCtrl,
COLORREF  col,
const MCHAR *  name 
)
Remarks:
Used to initialize and return a pointer to the color swatch control.
Parameters:
hCtrl window handle of the control.
col sets the initial color selected.
name sets the text string displayed in the title bar of the selection dialog.
CoreExport IColorSwatch* GetIColorSwatch ( HWND  hCtrl,
Color  col,
const MCHAR *  name 
)
Remarks:
Used to initialize and return a pointer to the color swatch control.
Parameters:
hCtrl window handle of the control.
col sets the initial color selected.
name sets the text string displayed in the title bar of the selection dialog.
CoreExport IColorSwatch* GetIColorSwatch ( HWND  hCtrl,
AColor  col,
const MCHAR *  name 
)
Remarks:
Used to initialize and return a pointer to the color swatch control.
Parameters:
hCtrl window handle of the control.
col sets the initial color selected.
name sets the text string displayed in the title bar of the selection dialog.
CoreExport IColorSwatch* GetIColorSwatch ( HWND  hCtrl )
Remarks:
Used to initialize and return a pointer to the color swatch control.
Parameters:
hCtrl window handle of the control.
CoreExport void ReleaseIColorSwatch ( IColorSwatch ics )
Remarks:
Used to release the control when finished.
Parameters:
ice Points to the control to release.
CoreExport void RefreshAllColorSwatches ( )
Remarks:
Refresh all color swatches.
CoreExport IDADWindow* GetIDADWindow ( HWND  hWnd )
Remarks:
Used to initialize and return a pointer to the D&D window control.
Parameters:
hCtrl window handle of the control.
CoreExport void ReleaseIDADWindow ( IDADWindow idw )
Remarks:
Used to release the control when finished.
Parameters:
idw Points to the control to release.
CoreExport void InstallThumbTack ( HWND  hwnd )

This function installs a thumb tack in the title bar of a window which forces the window to the top.

The window class for the window should have 4 extra bytes in the window structure for SetWindowLongPtr().

CoreExport void RemoveThumbTack ( HWND  hwnd )
CoreExport ISpinnerControl* SetupIntSpinner ( HWND  hwnd,
int  idSpin,
int  idEdit,
int  min,
int  max,
int  val 
)

Handy routines for setting up Integer Spinners.

This global function (not part of class ISpinnerControl) is used for setting up Spinners. It performs the equivalent of GetISpinner(), SetLimits(), SetValue(), and LinkToEdit(). WARNING: To prevent a Memory Leak, be sure to call ReleaseISpinner on the pointer that this function returns, or use AutoPtr and ISpinnerControlDestructorPolicy

Parameters:
HWND hwnd - The handle of the dialog box in which the spinner appears.
int idSpin - The ID of the spinner.
int idEdit - The ID of the edit control.
int min - The minimum allowable value.
int max - The maximum allowable value.
int val - The initial value for the spinner.
Returns:
- A pointer to the spinner control.
CoreExport ISpinnerControl* SetupFloatSpinner ( HWND  hwnd,
int  idSpin,
int  idEdit,
float  min,
float  max,
float  val,
float  scale = 0.1f 
)

Handy routines for setting up Floating Point and Universe Spinners.

This global function (not part of class ISpinnerControl) is used for setting up Spinners. Internally it calls the GetISpinner(), SetLimits(), SetValue() and LinkToEdit() functions. WARNING: To prevent a Memory Leak, be sure to call ReleaseISpinner on the pointer that this function returns, or use AutoPtr and ISpinnerControlDestructorPolicy

Parameters:
HWND hwnd - The handle of the dialog box in which the spinner appears.
int idSpin - The ID of the spinner.
int idEdit - The ID of the edit control.
float min - The minimum allowable value.
float max - The maximum allowable value.
float val - The initial value for the spinner.
float scale = 0.1f - The initial scale value for the spinner.
Returns:
- A pointer to the spinner control.
Sample Code:
Sample code to initialize a spinner / edit control.
        ISpinnerControl* spin = GetISpinner(GetDlgItem(hDlg, IDC_SPIN_SPINNER));
        spin->SetLimits(0.0f, 100.0f, FALSE);
        spin->SetValue(100.0f, FALSE);
        spin->LinkToEdit(GetDlgItem(hDlg, IDC_SPIN_EDIT), EDITTYPE_FLOAT);
        ReleaseISpinner(spin);
The above code could be replaced with the following simplified code:
        ISpinnerControl* spin = SetupFloatSpinner(hDlg, IDC_SPIN_SPINNER, IDC_SPIN_EDIT, 0.0f, 100.0f, 100.0f);
        ReleaseISpinner(spin);
CoreExport ISpinnerControl* SetupUniverseSpinner ( HWND  hwnd,
int  idSpin,
int  idEdit,
float  min,
float  max,
float  val,
float  scale = 0.1f 
)
CoreExport void SetSpinDragNotify ( BOOL  onOff )
Remarks:
This function controls whether or not spinners send CC_SPINNER_CHANGE notifications while the user adjusts them with the mouse.
Parameters:
BOOL onOff

TRUE to turn on; FALSE to turn off.
CoreExport BOOL GetSpinDragNotify ( )
Remarks:
Returns TRUE if CC_SPINNER_CHANGE notifications are sent by spinners while the user adjusts them with the mouse; FALSE if they are not sent.
CoreExport void DisableAccelerators ( )
CoreExport void EnableAccelerators ( )
CoreExport BOOL AcceleratorsEnabled ( )
CoreExport void SetSaveRequiredFlag ( BOOL  requireSave = TRUE,
BOOL  requireAutoBackupSave = TRUE 
)

Explicitly marks the scene as changed.

Some operations/commands are not undoable, but they do change the scene and as a result the scene should be saved or back-ed up after an autosave time interval elapsed. Such operations/commands must set the "save-required" and "auto-backup-required" flags explicitly by calling this method. Plugins should essentially never set the "auto-backup_required" flag to false.

Parameters:
requireSave - If TRUE the scene will be considered changed since it's been saved last time; otherwise the scene is considered changed if at least one undoable operation has occurred since it was last saved
requireAutoBackupSave - If TRUE the scene will be considered as requiring to be backed-up; otherwise the scene is considered as requiring a backup if at least one undoable operation has occurred since it was last back-ed up
CoreExport BOOL GetSaveRequiredFlag ( )

Retrieves the internal save required flag.

See also:
void SetSaveRequiredFlag(BOOL requireSave = TRUE, BOOL requireAutoBackupSave = TRUE)
Returns:
The value of the "save-required" flag as last set by the SetSaveRequiredFlag method.
CoreExport BOOL IsSaveRequired ( )

This tells if the scene needs to be saved.

Whenever an undoable operation is executed (by the user or otherwise), or SetSaveRequiredFlag is called with TRUE as its first parameter, the scene is considered different than its most recently saved version.

Returns:
TRUE if the scene needs to be saved; FALSE otherwise.
CoreExport BOOL IsAutoSaveRequired ( )

This tells if the current scene needs to be backed up.

An autosave is required when (a) something has changed in the scene (a save is required) and (b) no autosave has been performed since the last scene change. The second condition (b) guarantees that the scene is backed up only once when a 3ds Max session is left unattended for a time that spans several autosave (autobackup) time intervals.

Returns:
TRUE if an autosave should occur; FALSE otherwise.