#include <custcont.h>
Public Member Functions |
|
CoreExport void | SetAppHWnd (HWND hApp) |
HWND | GetAppHWnd () |
CoreExport const MCHAR * | GetCUIDirectory () |
CoreExport void | ProcessCUIMenu (HWND hWnd, int x, int y) |
CoreExport void | DockCUIWindow (HWND hWnd, int panel, RECT *rp=NULL, int init=FALSE) |
CoreExport void | FloatCUIWindow (HWND hWnd, RECT *rp=NULL, int init=FALSE) |
CoreExport void | MinimizeCUIWindow (HWND hWnd, int init=FALSE) |
CoreExport void | SetReservedSize (int panel, int size) |
CoreExport int | GetReservedSize (int panel) |
CoreExport int | GetPanelSize (int panel, int incReserved=FALSE) |
CoreExport int | GetPanelWidth (int panel) |
CoreExport void | RecalcLayout (int entireApp=FALSE) |
CoreExport void | DrawCUIWindows (int panels=CUI_ALL_PANELS) |
CoreExport void | SetMacroButtonStates (BOOL force) |
CoreExport void | ResetIconImages () |
CoreExport int | OverDockRegion (LPPOINT pt, DWORD posType, int override=FALSE) |
CoreExport void | SetMode (int md) |
CoreExport int | GetMode () |
CoreExport void | ExpertMode (int onOff) |
CoreExport void | HideFloaters (int onOff) |
CoreExport HWND | GetItemHwnd (int id) |
CoreExport ICustButton * | GetICustButton (int id) |
CoreExport ICustStatus * | GetICustStatus (int id) |
CoreExport void | HorizTextButtons (BOOL b) |
CoreExport int | GetHorizTextButtons () |
CoreExport void | FixedWidthTextButtons (BOOL b) |
CoreExport int | GetFixedWidthTextButtons () |
CoreExport void | SetTextButtonWidth (int w) |
CoreExport int | GetTextButtonWidth () |
CoreExport int | GetCount () |
CoreExport ICUIFrame * | GetICUIFrame (int i) |
CoreExport ICUIFrame * | GetICUIFrame (const MCHAR *name) |
CoreExport ICUIFrame * | GetICUIFrame (int panel, int rank, int subrank) |
CoreExport int | SetConfigFile (const MCHAR *cfg) |
CoreExport const MCHAR * | GetConfigFile () |
CoreExport int | DeleteSystemWindows (int toolbarsOnly=TRUE) |
CoreExport int | CreateSystemWindows (int reset=FALSE) |
CoreExport int | GetSystemWindowCount () |
CoreExport void | SetImageSize (int size) |
CoreExport int | GetImageSize () |
CoreExport int | GetButtonHeight (int sz=0) |
CoreExport int | GetButtonWidth (int sz=0) |
CoreExport void | SetDefaultData (CUIFrameMsgHandler *msg, HIMAGELIST img16, HIMAGELIST img24=NULL) |
CoreExport int | GetDefaultImageListBaseIndex (SClass_ID sid, Class_ID cid) |
CoreExport MSTR * | GetDefaultImageListFilePrefix (SClass_ID sid, Class_ID cid) |
CoreExport int | AddToRawImageList (const MCHAR *pFilePrefix, int sz, HBITMAP image, HBITMAP mask) |
CoreExport int | LoadBitmapFile (const MCHAR *filename) |
CoreExport int | LoadBitmapImages () |
CoreExport CUIFrameMsgHandler * | GetDefaultMsgHandler () |
CoreExport int | ReadConfig () |
CoreExport int | WriteConfig () |
CoreExport void | SetLockLayout (BOOL lock) |
CoreExport BOOL | GetLockLayout () |
CoreExport void | EnableAllCUIWindows (int enabled) |
virtual CoreExport bool | ResolveReadPath (const MSTR &aFilename, MSTR &aResult)=0 |
Given a configuration filename, will attempt
to find the best match. |
|
virtual CoreExport bool | ResolveWritePath (const MSTR &aFilename, MSTR &aResult)=0 |
Given a configuration filename, will resolve
the correct write absolute path. |
|
Protected Member Functions |
|
CoreExport | CUIFrameMgr () |
Constructor made protected to prevent
instantiation. |
|
CUIFrameMgr (CUIFrameMgr &frame) | |
Copy Constructor made protected to prevent
instantiation. |
|
virtual CoreExport | ~CUIFrameMgr () |
Protected Attributes |
|
MSTR | cfgFile |
CoreExport CUIFrameMgr | ( | ) | [protected] |
Constructor made protected to prevent instantiation.
Blocking default constructor - use GetCUIFrameMgr() accessor
CUIFrameMgr | ( | CUIFrameMgr & | frame | ) | [protected] |
Copy Constructor made protected to prevent instantiation.
Blocking Copy constructor - use GetCUIFrameMgr() accessor
virtual CoreExport ~CUIFrameMgr | ( | ) | [protected, virtual] |
CoreExport void SetAppHWnd | ( | HWND | hApp | ) |
HWND GetAppHWnd | ( | ) | [inline] |
{ return hApp; }
CoreExport const MCHAR* GetCUIDirectory | ( | ) |
CoreExport void ProcessCUIMenu | ( | HWND | hWnd, |
int | x, | ||
int | y | ||
) |
hWnd | The handle of the window there the mouse was clicked. |
x | The x coordinate of the mouse when right clicked. |
y | The y coordinate of the cursor when right clicked. |
CoreExport void DockCUIWindow | ( | HWND | hWnd, |
int | panel, | ||
RECT * | rp = NULL , |
||
int | init = FALSE |
||
) |
hWnd | The handle of the window to dock. |
panel | The CUI docking panel location. 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. |
rp | This is the rectangle which specifies where to dock the window. This is the rectangle that a user moves around the screen when dragging a floating window over top of a docking region. This is specified in screen coordinates. If NULL is passed the window is docked using CUI_TOP_DOCK. |
init | This is used internally by 3ds Max when it's starting up. This should always default to FALSE (don't override this and pass TRUE). |
CoreExport void FloatCUIWindow | ( | HWND | hWnd, |
RECT * | rp = NULL , |
||
int | init = FALSE |
||
) |
hWnd | The window to float. |
rp | Specifies the rectangle in screen coordinates where the
floating window should reside. If NULL is passed the window is
restored to the position it was before it was docked (this
information is stored in the CUI file). Note: Calling this method on an already floating window will explicitly NOT resize the window, but rather just move it to the new origin. Said another way, only the left and top members of the rectangle are used on an already floating window. Developers should call the Win32 API MoveWindow or SetWindowPlacement to size the window. See GetFloatingCUIFrameSize() below to compute a size. |
init | This is used internally by 3ds Max when it's starting up. This should always default to FALSE (don't override this and pass TRUE). |
CoreExport void MinimizeCUIWindow | ( | HWND | hWnd, |
int | init = FALSE |
||
) |
hWnd | The handle of the window to minimize. |
init | This is used internally by 3ds Max when it's starting up. This should always default to FALSE (don't override this and pass TRUE). |
CoreExport void SetReservedSize | ( | int | panel, |
int | size | ||
) |
CoreExport int GetReservedSize | ( | int | panel | ) |
CoreExport int GetPanelSize | ( | int | panel, |
int | incReserved =
FALSE |
||
) |
CoreExport int GetPanelWidth | ( | int | panel | ) |
CoreExport void RecalcLayout | ( | int | entireApp = FALSE |
) |
entireApp | TRUE to recalculate the entire application, including the viewports. This can be expensive (basically like an Interface::ForceCompleteRedraw()); FALSE will recalculate the top, bottom, left and right panels but won't redraw the viewports. |
CoreExport void DrawCUIWindows | ( | int | panels =
CUI_ALL_PANELS |
) |
panels | See CUI Docking Panel Locations. |
CoreExport void SetMacroButtonStates | ( | BOOL | force | ) |
force | This parameter, if TRUE, tells the system to redraw the button even if its state hasn't changed since the last time it was redrawn. Normally this argument is FALSE so it only redraws the buttons that changed state. |
CoreExport void ResetIconImages | ( | ) |
CoreExport int OverDockRegion | ( | LPPOINT | pt, |
DWORD | posType, | ||
int | override =
FALSE |
||
) |
pt | The input point to check in screen coordinates. |
posType | See CUI Frame Position Types. |
override | Passing TRUE overrides the docking function so that it won't
dock. Passing FALSE will cause it to dock. Also note that if the UI
layout is locked, passing TRUE here will override that lock. In the code fragment below the state of the Ctrl key is checked and used as the docking override. |
GetCursorPos(&pt); overDockRegion = GetCUIFrameMgr()->OverDockRegion(&pt, cf->GetPosType(), (GetKeyState(VK_CONTROL) & 0x8000));
CoreExport void SetMode | ( | int | md | ) |
CoreExport int GetMode | ( | ) |
CoreExport void ExpertMode | ( | int | onOff | ) |
CoreExport void HideFloaters | ( | int | onOff | ) |
CoreExport HWND GetItemHwnd | ( | int | id | ) |
id | The ID of the control. |
CoreExport ICustButton* GetICustButton | ( | int | id | ) |
id | The ID of the control. |
CoreExport ICustStatus* GetICustStatus | ( | int | id | ) |
id | The ID of the control. |
CoreExport void HorizTextButtons | ( | BOOL | b | ) |
CoreExport int GetHorizTextButtons | ( | ) |
CoreExport void FixedWidthTextButtons | ( | BOOL | b | ) |
CoreExport int GetFixedWidthTextButtons | ( | ) |
CoreExport void SetTextButtonWidth | ( | int | w | ) |
CoreExport int GetTextButtonWidth | ( | ) |
CoreExport int GetCount | ( | ) |
CoreExport ICUIFrame* GetICUIFrame | ( | int | i | ) |
i | The zero based index in the list of frames (between 0 and GetCount()-1). |
CoreExport ICUIFrame* GetICUIFrame | ( | const MCHAR * | name | ) |
name | The name of the frame. |
CoreExport ICUIFrame* GetICUIFrame | ( | int | panel, |
int | rank, | ||
int | subrank | ||
) |
panel | One of a set of values. |
rank | The zero based rank index. |
subrank | The zero based sub-rank index. |
CoreExport int SetConfigFile | ( | const MCHAR * | cfg | ) |
CoreExport const MCHAR* GetConfigFile | ( | ) |
CoreExport int DeleteSystemWindows | ( | int | toolbarsOnly =
TRUE |
) |
CoreExport int CreateSystemWindows | ( | int | reset = FALSE |
) |
CoreExport int GetSystemWindowCount | ( | ) |
CoreExport void SetImageSize | ( | int | size | ) | [inline] |
CoreExport int GetImageSize | ( | ) | [inline] |
CoreExport int GetButtonHeight | ( | int | sz = 0 |
) | [inline] |
sz | The size to check. If 0 is passed then the current icon size is
checked. One of the following values: CUI_SIZE_16 CUI_SIZE_24 |
{ if(!sz) sz=imageSize; return sz==CUI_SIZE_16 ? 22 : 31; }
CoreExport int GetButtonWidth | ( | int | sz = 0 |
) | [inline] |
sz | The size to check. One of the following values: CUI_SIZE_16 CUI_SIZE_24 |
{ if(!sz) sz=imageSize; return sz==CUI_SIZE_16 ? 23 : 32; }
CoreExport void SetDefaultData | ( | CUIFrameMsgHandler * | msg, |
HIMAGELIST | img16, | ||
HIMAGELIST | img24 = NULL |
||
) |
CoreExport int GetDefaultImageListBaseIndex | ( | SClass_ID | sid, |
Class_ID | cid | ||
) |
CoreExport int AddToRawImageList | ( | const MCHAR * | pFilePrefix, |
int | sz, | ||
HBITMAP | image, | ||
HBITMAP | mask | ||
) |
CoreExport int LoadBitmapFile | ( | const MCHAR * | filename | ) |
CoreExport int LoadBitmapImages | ( | ) |
CoreExport CUIFrameMsgHandler* GetDefaultMsgHandler | ( | ) | [inline] |
{ return defMsgHandler; }
CoreExport int ReadConfig | ( | ) |
CoreExport int WriteConfig | ( | ) |
CoreExport void SetLockLayout | ( | BOOL | lock | ) | [inline] |
CoreExport BOOL GetLockLayout | ( | ) | [inline] |
{ return lockLayout; }
CoreExport void EnableAllCUIWindows | ( | int | enabled | ) |
Given a configuration filename, will attempt to find the best match.
If the application is configured to use User Profiles, this function will attempt to match the filename in the user profile UI directory. If this fails, it will check the system directory.
aFilename | [in] the filename to match, with extension |
aResult | [out] the resulting absolute path for the matched file, if found |
Given a configuration filename, will resolve the correct write absolute path.
If the application is configured to use User Profiles, this function map this configuration file to a user profile directory. Otherwise, the configuration file will be resolved to the legacy system UI directory.
aFilename | [in] the filename to match, with extension |
aResult | [out] the resulting absolute path to which a client should write a config file |