ICustStatusEdit Class Reference

ICustStatusEdit Class Referenceabstract

#include <custcont.h>

Class Description

See also
Class ICustomControl.

Description:
This control mimics the edit control as well as a status control. It may be set to 'read-only' so the user can read but cannot edit the displayed string.

The value to use in the Class field of the Custom Control Properties dialog is: CustStatusEdit
+ Inheritance diagram for ICustStatusEdit:

Public Member Functions

virtual void GetText (MCHAR *text, int ct)=0
 
virtual void GetText (MSTR &text) const =0
 
virtual int GetTextLength () const =0
 
virtual void SetText (const MCHAR *text)=0
 
virtual void SetText (int i)=0
 
virtual void SetText (float f, int precision=3)=0
 
virtual int GetInt (BOOL *valid=NULL)=0
 
virtual float GetFloat (BOOL *valid=NULL)=0
 
virtual void SetLeading (int lead)=0
 
virtual void WantReturn (BOOL yesNo)=0
 
virtual BOOL GotReturn ()=0
 
virtual void GiveFocus ()=0
 
virtual BOOL HasFocus ()=0
 
virtual void WantDlgNextCtl (BOOL yesNo)=0
 
virtual void SetNotifyOnKillFocus (BOOL onOff)=0
 
virtual void SetBold (BOOL onOff)=0
 
virtual void SetReadOnly (BOOL onOff)=0
 
- Public Member Functions inherited from ICustomControl
virtual HWND GetHwnd ()=0
 
virtual void Enable (BOOL onOff=TRUE)=0
 
virtual void Disable ()=0
 
virtual BOOL IsEnabled ()=0
 
virtual void Enable2 (BOOL onOff=TRUE)=0
 
virtual INT_PTR Execute (int cmd, ULONG_PTR arg1=0, ULONG_PTR arg2=0, ULONG_PTR arg3=0)
 
virtual void SetTooltip (bool bEnable, const MCHAR *text)=0
 Sets a tooltip for the custom control. More...
 
CoreExport void UpdateEnableState (Animatable *anim, int subNum)
 Helper function to disable or enable this UI control based on whether the Animatable associated with it is keyframable or not (locked parameter or scripted parameters are not keyframable). More...
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 
virtual UtilExport BaseInterfaceGetInterface (Interface_ID id)
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 

Member Function Documentation

virtual void GetText ( MCHAR text,
int  ct 
)
pure virtual
Remarks
Retrieves the text entered into the control.
Parameters:
MCHAR *text

Storage for the text to retrieve.

int ct

Specifies the maximum length of the string returned.
virtual void GetText ( MSTR text) const
pure virtual
Remarks
This retrieves the text entered into the control.
Parameters:
MSTR& text

Storage for the text to retrieve.
virtual int GetTextLength ( ) const
pure virtual
Remarks
This retrieves the length of the text entered into the control. It returns the length of the text in characters (so without the terminating NULL). Note that this value may be higher than the actual length of the text when it contains multi-byte characters.
virtual void SetText ( const MCHAR text)
pure virtual
Remarks
This method places the text into the control for editing.
Parameters:
MCHAR *text

The text to place in the control.
virtual void SetText ( int  i)
pure virtual
Remarks
This method allows you to pass in an integer value to the control. The integer is converted to a string and displayed in the control.
Parameters:
int i

This value is converted to a string and displayed in the control.
virtual void SetText ( float  f,
int  precision = 3 
)
pure virtual
Remarks
This method allows you to pass in a floating point value to the control. The float is converted to a string and displayed in the control.
Parameters:
float f

This value is converted to a string and displayed in the control.

int precision=3

The precision argument is simply the number of decimal places that get represented in the string that appears in the edit field. So if the arguments were (1.0f/3.0f, 3) then the string "0.333" would appear in the edit field.
virtual int GetInt ( BOOL *  valid = NULL)
pure virtual
Remarks
This method parses and returns an integer value from the control.
Parameters:
BOOL *valid=NULL

This pointer, if passed, is set to TRUE if the input is 'valid'; otherwise FALSE. FALSE indicates that something caused the parsing of the input to terminate improperly. An example is a non-numeric character. So for example, if the user entered "123jkfksdf" into the field the valid pointer would be set to FALSE.
virtual float GetFloat ( BOOL *  valid = NULL)
pure virtual
Remarks
This method parses and returns a floating point value from the control.
Parameters:
BOOL *valid=NULL

This pointer, if passed, is set to TRUE if the input is 'valid'; otherwise FALSE. FALSE indicates that something caused the parsing of the input to terminate improperly. An example is a non-numeric character. So for example, if the user entered "123jkfksdf" into the field this pointer would be set to FALSE.
virtual void SetLeading ( int  lead)
pure virtual
Remarks
A developer doesn't normally need to call this method. This offsets the text vertically in the edit control.
Parameters:
int lead

This parameter specifies the number of pixels to offset.
virtual void WantReturn ( BOOL  yesNo)
pure virtual
Remarks
This method allows custom handling of the RETURN key. If you pass TRUE to this method an EN_CHANGE message will be sent to the control when the RETURN key is pressed. The EN_CHANGE message is sent when the user has taken any action that may have altered text in an edit control so developer need to also call GotReturn() (documented below) to see if it was indeed a RETURN key press.
Parameters:
BOOL yesNo

If TRUE, then when the user presses the RETURN key in that control, the edit field will send an EN_CHANGE message to the owner, and calling GotReturn() will return TRUE.
virtual BOOL GotReturn ( )
pure virtual
Remarks
This method should be called on receipt of an EN_CHANGE message. It return TRUE if pressing the RETURN key generated the message; otherwise FALSE.
virtual void GiveFocus ( )
pure virtual
Remarks
Calling this method gives the control the focus to receive input.
virtual BOOL HasFocus ( )
pure virtual
Remarks
Returns TRUE if the control has the focus to receive input; otherwise FALSE.
virtual void WantDlgNextCtl ( BOOL  yesNo)
pure virtual
Remarks
Determines whether the TAB key may be used to jump to the next control in the tab sequence.
Parameters:
BOOL yesNo

TRUE to enable the TAB key to move to the next control; FALSE to disable the TAB key from moving the focus.
virtual void SetNotifyOnKillFocus ( BOOL  onOff)
pure virtual
Remarks
Normally when a user exits an edit filed the notification WM_CUSTEDIT_ENTER is sent. Many plug-ins key off this message to finalize the input of values. For instance, if the user is entering a value into an edit field and they hit the TAB key to leave the field the value should be entered. Normally this is the desired behavior. However, as a special case condition, if a developer does not want to update the value, this method may be called so the WM_CUSTEDIT_ENTER notification won't be sent when the edit control loses focus.
Parameters:
BOOL onOff

TRUE to turn on; FALSE to turn off.
virtual void SetBold ( BOOL  onOff)
pure virtual
Remarks
Sets the text font in the edit control to display in a bold format or normal.
Parameters:
BOOL onOff

TRUE to turn bolding on; FALSE to turn off.
virtual void SetReadOnly ( BOOL  onOff)
pure virtual
Remarks
Sets if the control is 'read-only'. That is, the string is displayed but cannot be edited.
Parameters:
BOOL onOff

TRUE for read-only; FALSE to allow editing.