CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
OdEdUserIO Class Referenceabstract

#include <EdUserIO.h>

Inheritance diagram for OdEdUserIO:
OdRxObject OdEdBaseUserIO OdDbUserIO OdStaticRxObject< OdDbUserIO > CFxUserIO

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdEdUserIO)
 
virtual bool interactive ()
 
virtual int getKeyword (const OdString &prompt, const OdString &keywords, int defVal=-1, int options=OdEd::kInpDefault, OdEdIntegerTracker *pTracker=0)=0
 
virtual int getInt (const OdString &prompt, int options=OdEd::kInpDefault, int defVal=0, const OdString &keywords=OdString::kEmpty, OdEdIntegerTracker *pTracker=0)=0
 
virtual double getReal (const OdString &prompt, int options=OdEd::kInpDefault, double defVal=0.0, const OdString &keywords=OdString::kEmpty, OdEdRealTracker *pTracker=0)=0
 
virtual OdString getString (const OdString &prompt, int options=OdEd::kInpDefault, const OdString &defValue=OdString::kEmpty, const OdString &keywords=OdString::kEmpty, OdEdStringTracker *pTracker=0)=0
 
virtual void putString (const OdString &string)=0
 
virtual OdSharedPtr< OdCmColorBasegetCmColor (const OdString &prompt, int options=OdEd::kInpDefault, const OdCmColorBase *pDefaultValue=0, const OdString &keywords=OdString::kEmpty, OdEdColorTracker *pTracker=0)=0
 
virtual OdString getFilePath (const OdString &prompt, int options=OdEd::kGfpForOpen, const OdString &dialogCaption=OdString::kEmpty, const OdString &defExt=OdString::kEmpty, const OdString &fileName=OdString::kEmpty, const OdString &filter=OdString::kEmpty, const OdString &keywords=OdString::kEmpty, OdEdStringTracker *pTracker=0)
 
virtual void putError (const OdString &errmsg)
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
virtual void addRef ()=0
 
virtual void release ()=0
 
virtual long numRefs () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual void copyFrom (const OdRxObject *pSource)
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Additional Inherited Members

- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Detailed Description

This class implements non-geometric interactive user IO functionality for custom interactive command objects.

Corresponding C++ library: TD_Root <group OdEd_Classes>

Definition at line 394 of file EdUserIO.h.

Member Function Documentation

◆ getCmColor()

virtual OdSharedPtr< OdCmColorBase > OdEdUserIO::getCmColor ( const OdString prompt,
int  options = OdEd::kInpDefault,
const OdCmColorBase pDefaultValue = 0,
const OdString keywords = OdString::kEmpty,
OdEdColorTracker pTracker = 0 
)
pure virtual

Returns user input of a color as wrapped value.

Parameters
prompt[in] Message displayed to prompt the user.
options[in] Combination of OdEd::GetPointOptions enum values.
pDefaultValue[in] Pointer to a default value to return if an empty string is received as input.
keywords[in] Keyword string.
pTracker[in] Pointer to a User IO tracker.
Remarks
This function uses the underlying OdEdBaseIO functions putString and getString for low level output and input.

If prompt is an empty string, a default prompt string is used.

◆ getFilePath()

virtual OdString OdEdUserIO::getFilePath ( const OdString prompt,
int  options = OdEd::kGfpForOpen,
const OdString dialogCaption = OdString::kEmpty,
const OdString defExt = OdString::kEmpty,
const OdString fileName = OdString::kEmpty,
const OdString filter = OdString::kEmpty,
const OdString keywords = OdString::kEmpty,
OdEdStringTracker pTracker = 0 
)
virtual

Returns user input of a filename obtained in some manner.

Parameters
options[in] combination of OdEd::CommonInputOptions and OdEd::GetFilePathFlags enum values.
prompt[in] Prompt output before pausing for user input.
dialogCaption[in] Dialog caption.
defExt[in] Default file extension without "."
fileName[in] Initial filename to initialize dialog with.
filter[in] Filter pattern.
pTracker[in/out] File path tracker; may be used to display file preview.
Remarks
flags must be one of the following:

Value Description OdEd::kGfpForOpen 0 For Open. OdEd::kGfpForSave 1 For Save. OdEd::kGfpOverwritePrompt 2 Enable overwrite prompt displaying when exist file selected for saving.

The default implementation of this function utilizes getString().

Reimplemented in CFxUserIO.

◆ getInt()

virtual int OdEdUserIO::getInt ( const OdString prompt,
int  options = OdEd::kInpDefault,
int  defVal = 0,
const OdString keywords = OdString::kEmpty,
OdEdIntegerTracker pTracker = 0 
)
pure virtual

Returns user input of an integer.

Parameters
prompt[in] Prompt output before pausing for user input.
pTracker[in/out] Pointer to an IO Tracker for this user input.
options[in] Bitwise OR combination of OdEd::CommonInputOptions enum.
defVal[in] Returned if user input nothing and OdEd::kInpReturnDefVal flag is set.
Remarks
If prompt is empty, a default prompt is used.

This function uses the underlying OdEdBaseIO functions putString and getString for low level output and input.

Implemented in CFxUserIO.

◆ getKeyword()

virtual int OdEdUserIO::getKeyword ( const OdString prompt,
const OdString keywords,
int  defVal = -1,
int  options = OdEd::kInpDefault,
OdEdIntegerTracker pTracker = 0 
)
pure virtual

Returns user input of a keyword.

Parameters
prompt[in] Prompt output before pausing for user input.
keywords[in] Keyword list.
options[in] Bitwise OR combination of OdEd::CommonInputOptions enum.
defVal[in] Returned if user input nothing.
Returns
Returns the index of the entered keyword in the keyword list, or -1 it's not there.
Remarks
This function uses the underlying OdEdBaseIO functions putString and getString for low level output and input.
This function does not throw a KeywordException.

Implemented in CFxUserIO.

◆ getReal()

virtual double OdEdUserIO::getReal ( const OdString prompt,
int  options = OdEd::kInpDefault,
double  defVal = 0.0,
const OdString keywords = OdString::kEmpty,
OdEdRealTracker pTracker = 0 
)
pure virtual

Returns user input of a double.

Parameters
prompt[in] Prompt output before pausing for user input.
options[in] Bitwise OR combination of OdEd::CommonInputOptions enum.
defVal[in] Returned if user input nothing and OdEd::kInpReturnDefVal flag is set.
pTracker[in] Pointer to an IO Tracker for this user input.
Remarks
If prompt is empty, a default prompt is used.

This function uses the underlying OdEdBaseIO functions putString and getString for low level output and input.

Implemented in CFxUserIO.

◆ getString()

virtual OdString OdEdUserIO::getString ( const OdString prompt,
int  options = OdEd::kInpDefault,
const OdString defValue = OdString::kEmpty,
const OdString keywords = OdString::kEmpty,
OdEdStringTracker pTracker = 0 
)
pure virtual

Returns user input of a string.

Parameters
options[in] combination of OdEd::CommonInputOptions and OdEd::GetStringOptions enum values.
prompt[in] Prompt output before pausing for user input.
pTracker[in] Pointer to an IO Tracker for this user input.
defValue[in] Default value.
keywords[in] Keyword string.
Remarks
If prompt is empty, a default prompt is used.

This function uses the underlying OdEdBaseIO functions putString and getString for low level output and input.

Implemented in CFxUserIO.

◆ interactive()

virtual bool OdEdUserIO::interactive ( )
virtual

Returns true if this is manual user input not batch invocation

◆ ODRX_DECLARE_MEMBERS()

OdEdUserIO::ODRX_DECLARE_MEMBERS ( OdEdUserIO  )

◆ putError()

virtual void OdEdUserIO::putError ( const OdString errmsg)
inlinevirtual

Writes the specified error message to the command's error output. Override it to distinguish normal output of a command from its error messages.

Parameters
errmsg[in] error message to write.

Definition at line 558 of file EdUserIO.h.

◆ putString()

virtual void OdEdUserIO::putString ( const OdString string)
pure virtual

Writes the specified string to the command's output.

Parameters
string[in] string to write.

Implemented in CFxUserIO.


The documentation for this class was generated from the following file: