Public Member Functions

ICUIFrame Class Reference

Search for all occurrences

Detailed Description

See also:
Class CUIFrameMgr, Class CUIFrameMsgHandler, Class ICustToolbar, Class ICustomControl.

Description:
This class provides access to an individual CUI Frame (the name given to the windows that contain toolbars, menus, the command panel, etc.)

To create a floating tool palette, for example, you create a CUIFrame, create a toolbar, and then attach the two (similar to creating a custom edit field, and custom spinner, then attaching the two). This is done using the method ICustToolbar::LinkToCUIFrame().

When a Toolbar is part of a CUI frame it's called a Tool Palette. Tool Palettes can either float or dock (whereas a Toolbar must be placed by the developer in a dialog using the resource editor).

#include <custcont.h>

Inheritance diagram for ICUIFrame:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void  SetPosType (DWORD t)=0
virtual DWORD  GetPosType ()=0
virtual void  SetPosRank (int rank, int subrank=0)=0
virtual int  GetPosRank ()=0
virtual int  GetPosSubrank ()=0
virtual BOOL  IsFloating ()=0
virtual void  Hide (BOOL b)=0
virtual BOOL  IsHidden ()=0
virtual void  SetCurPosition (DWORD pos)=0
virtual DWORD  GetCurPosition ()=0
virtual void  SetContentType (DWORD t)=0
virtual DWORD  GetContentType ()=0
virtual void  SetContentHandle (HWND hContent)=0
virtual HWND  GetContentHandle ()=0
virtual void  SetTabbedToolbar (BOOL b)=0
virtual BOOL  GetTabbedToolbar ()=0
virtual void  AddToolbarTab (HWND hTBar, CUIFrameMsgHandler *msgHandler, const MCHAR *name, int pos=-1)=0
virtual void  DeleteToolbarTab (int pos)=0
virtual int  GetToolbarCount ()=0
virtual HWND  GetToolbarHWnd (int pos)=0
virtual const MCHAR *  GetTabName (int pos)=0
virtual void  SetCurrentTab (int pos)=0
virtual int  GetCurrentTab ()=0
virtual int  GetSize (int sizeType, int dir, int orient)=0
virtual BOOL  InstallMsgHandler (CUIFrameMsgHandler *msgHandler)=0
virtual void  SetName (const MCHAR *name)=0
virtual const MCHAR *  GetName ()=0
virtual BOOL  SetMenuDisplay (int md)=0
virtual int  GetMenuDisplay ()=0
virtual void  SetSystemWindow (BOOL b)=0
virtual BOOL  GetSystemWindow ()=0
virtual BOOL  ReadConfig (const MCHAR *cfg, int startup=FALSE)=0
virtual void  WriteConfig (const MCHAR *cfg)=0

Member Function Documentation

virtual void SetPosType ( DWORD  t ) [pure virtual]
Remarks:
Sets the position type. This determines the possible locations for the frame.
Parameters:
t The position to set. See CUI Frame Position Types.
virtual DWORD GetPosType ( ) [pure virtual]
Remarks:
Returns a DWORD which describes the position options for this CUI Frame. See CUI Frame Position Types.
virtual void SetPosRank ( int  rank,
int  subrank = 0 
) [pure virtual]
Remarks:
This method is for internal use only. Developers must not assign the rank and subrank as these are computed internally. Developers should create their toolbars 'floating'. Then when a user docks the toolbar it will be docked automatically when 3ds Max starts up the next time.
virtual int GetPosRank ( ) [pure virtual]
Remarks:
Returns the position rank. Consider three docked toolbars, one alone on the top line, and two side by side on the line below. The top toolbar would have a rank of 0 (and a subrank of 0). The toolbar on the left in the line below would have a rank of 1 and a subrank of 0. The toolbar beside it to the right would have a rank of 1 and a subrank of 1.
virtual int GetPosSubrank ( ) [pure virtual]
Remarks:
Returns the position subrank. See GetPosRank() above.
virtual BOOL IsFloating ( ) [pure virtual]
Remarks:
Returns TRUE if the frame is floating (not docked); otherwise FALSE.
virtual void Hide ( BOOL  b ) [pure virtual]
Remarks:
Sets the frame to hidden or not. Note that if a developer is doing something like showing their toolbars at BeginEditParams() and hiding them at EndEditParms() then this method can be used. In such a case, if the toolbar is docked then RecalcLayout() needs to be called to update the layout. If the toolbars are floating then RecalcLayout() does not need to be called.
Parameters:
b TRUE for hidden; FALSE for not hidden.
virtual BOOL IsHidden ( ) [pure virtual]
Remarks:
Returns TRUE if the frame is hidden; FALSE if visible.
virtual void SetCurPosition ( DWORD  pos ) [pure virtual]
Remarks:
This method is for internal use only.
virtual DWORD GetCurPosition ( ) [pure virtual]
Remarks:
Returns the current position of the frame. One of the following values.

CUI_TOP_DOCK

Docked at the top.

CUI_BOTTOM_DOCK

Docked at the bottom.

CUI_LEFT_DOCK

Docked on the left.

CUI_RIGHT_DOCK

Docked on the right.

CUI_FLOATING

The frame is floating (not docked).
virtual void SetContentType ( DWORD  t ) [pure virtual]
Remarks:
Sets the frame contents type. This specifies if this frame holds a toolbar, menu or a floating panel.
Parameters:
t One or more of the following flags:

CUI_TOOLBAR
Set if frame holds toolbars and / or tool palettes.

CUI_MENU
This is used internally to set if the frame holds a menu. Note: Developers should not create their own menus. 3ds Max assumes that only one menu exists.

CUI_HWND
Set if frame hold a generic window handle. The command panel (which can be floated) is an example of a generic window.
virtual DWORD GetContentType ( ) [pure virtual]
Remarks:
Returns a value which indicates the frame contents type. One of the following flags:

CUI_TOOLBAR

Set if frame holds toolbars and / or tool palettes.

CUI_MENU

Set if the frame holds a menu.

CUI_HWND

Set if frame hold a generic window handle.
virtual void SetContentHandle ( HWND  hContent ) [pure virtual]
Remarks:
Sets the content handle. This is the window handle for the toolbar, or menu handle for a menu. Developers typically create Tool Palettes by linking a toolbar to a CUIFrame using ICustToolbar::LinkToCUIFrame() and do not need to call this method as it's done automatically.
Parameters:
hContent The handle to set.
virtual HWND GetContentHandle ( ) [pure virtual]
Remarks:
Returns the content handle.
virtual void SetTabbedToolbar ( BOOL  b ) [pure virtual]
Remarks:
Sets if this frame represents a tabbed toolbar. A tabbed toolbar may have individual tabs added and deleted.
Parameters:
b TRUE for tabbed; FALSE for not tabbed.
virtual BOOL GetTabbedToolbar ( ) [pure virtual]
Remarks:
Returns TRUE if this frame is a tabbed toolbar; otherwise FALSE.
virtual void AddToolbarTab ( HWND  hTBar,
CUIFrameMsgHandler msgHandler,
const MCHAR *  name,
int  pos = -1 
) [pure virtual]
Remarks:
Adds the toolbar tab whose window handle is passed to the list of tabs maintained by this class.
Parameters:
hTBar The window handle of the toolbar tab to add.
msgHandler The message handler for the tab or NULL if not used.
name The name for the tab.
pos The position for the tab. This is the zero based index where 0 is at left edge of those in the frame and the max value is GetToolbarCount()-1. A value of -1 adds the tab to the end of the list of tabs. Also, for example, if you specify a value of 0 for an existing tabbed toolbar, the new tab is inserted at position 0 and the others are moved to the right.
virtual void DeleteToolbarTab ( int  pos ) [pure virtual]
Remarks:
Deletes the specified toolbar tab.
Parameters:
pos Specifies the position of the tab to delete. This is the zero based index where 0 is at left edge of those in the frame and the max value is GetToolbarCount()-1.
virtual int GetToolbarCount ( ) [pure virtual]
Remarks:
Returns the number of toolbar tabs in this frame.
virtual HWND GetToolbarHWnd ( int  pos ) [pure virtual]
Remarks:
Returns the window handle of the toolbar tab whose position is passed.
Parameters:
pos Specifies the position of the tab. This is the zero based index where 0 is at left edge of those in the frame and the max value is GetToolbarCount()-1.
virtual const MCHAR* GetTabName ( int  pos ) [pure virtual]
Remarks:
Returns the name of the specified toolbar tab.
Parameters:
pos Specifies the position of the tab. This is the zero based index where 0 is at left edge of those in the frame and the max value is GetToolbarCount()-1.
virtual void SetCurrentTab ( int  pos ) [pure virtual]
Remarks:
Sets the currently active tab.
Parameters:
pos Specifies the position of the tab. This is the zero based index where 0 is at left edge of those in the frame and the max value is GetToolbarCount()-1.
virtual int GetCurrentTab ( ) [pure virtual]
Remarks:
Returns the position of the currently active tab. This is the zero based index where 0 is at left edge of those in the frame and the max value is GetToolbarCount()-1.
virtual int GetSize ( int  sizeType,
int  dir,
int  orient 
) [pure virtual]
Remarks:
Returns the size of this frame for the specified size type, direction (width or height) and orientation.

Note: If this frame has a custom message handler (a CUIFrameMsgHandler object, it's ProcessMessage() method is called passing CUI_POSDATA_MSG which is used to determine the size.
Parameters:
sizeType The size type. See CUI Frame Size Types.
dir The direction of the frame.

CUI_HORIZ: Width.

CUI_VERT: Height.
orient The orientation. See CUI Frame Orientations.
virtual BOOL InstallMsgHandler ( CUIFrameMsgHandler msgHandler ) [pure virtual]
Remarks:
Installs a custom message processing routine.
Parameters:
msgHandler Points to the handler to install. See Class CUIFrameMsgHandler for details.
Returns:
TRUE on success; otherwise FALSE.
virtual void SetName ( const MCHAR *  name ) [pure virtual]
Remarks:
Sets the name for the frame. This name shows up as a tooltip and also on the window border if the frame is floated. Note that the name is also used to store position information in the CUI file. Therefore developers must use a name and not simply set it to NULL.
Parameters:
name The name to set.
virtual const MCHAR* GetName ( ) [pure virtual]
Remarks:
Returns the name of the frame.
virtual BOOL SetMenuDisplay ( int  md ) [pure virtual]
Remarks:
Sets the menu display state.
Parameters:
md One of the following values:

CUI_MENU_HIDE
CUI_MENU_SHOW_ENABLED
CUI_MENU_SHOW_DISABLED
virtual int GetMenuDisplay ( ) [pure virtual]
Remarks:
Returns the state of the menu display. One of the following values:

CUI_MENU_HIDE
CUI_MENU_SHOW_ENABLED
CUI_MENU_SHOW_DISABLED
virtual void SetSystemWindow ( BOOL  b ) [pure virtual]
Remarks:
System windows are those that come up automatically inside 3ds Max. So command panel, the main toolbar, the tab panel and the main menu are all system windows. It is not therefore appropriate for developers to declare themselves as system windows and this method should not be called passing TRUE.
Parameters:
b TRUE to set as a system window; otherwise FALSE.
virtual BOOL GetSystemWindow ( ) [pure virtual]
Remarks:
Returns TRUE if this CUIFrame is a system window; otherwise FALSE. See SetSystemWindow() above.
virtual BOOL ReadConfig ( const MCHAR *  cfg,
int  startup = FALSE 
) [pure virtual]
Remarks:
This method is for internal use only.
virtual void WriteConfig ( const MCHAR *  cfg ) [pure virtual]
Remarks:
This method is for internal use only.

ICUIFrame ICUIFrame ICUIFrame ICUIFrame ICUIFrame ICUIFrame ICUIFrame ICUIFrame ICUIFrame ICUIFrame
ICUIFrame ICUIFrame ICUIFrame ICUIFrame ICUIFrame ICUIFrame ICUIFrame ICUIFrame ICUIFrame ICUIFrame