HDK
|
#include <UT_Interrupt.h>
Public Types | |
enum | Priority { PRIORITY_TRANSIENT = 0, PRIORITY_NODE = 1, PRIORITY_PERMANENT = 2 } |
Static Public Member Functions | |
static void | setUpdateModeCallback (OPUI_UpdateModeCB function) |
static void | setEscapeCheckCallback (UI_CheckForEscapeCB function) |
static bool | getIsEscapeCheckCallbackSet () |
Protected Member Functions | |
const char * | getSharedKey () const |
Protected Member Functions inherited from UT_SharedMem | |
UT_SharedMem (const char *keypath=0, int size=0, int keyid=0) | |
UT_SharedMem (key_t key, int size) | |
UT_SharedMem (int size) | |
virtual | ~UT_SharedMem () |
UT_SharedMem (const UT_SharedMem &)=delete | |
UT_SharedMem & | operator= (const UT_SharedMem &)=delete |
int | setKey (const char *path, int id=0) |
int | setKey (key_t key) |
int | setSize (int size) |
int | detach () |
int | destroy () |
virtual void * | getMemory (int reuse=1) |
Additional Inherited Members | |
Protected Attributes inherited from UT_SharedMem | |
UT_String | ourKeyPath |
int | ourKeyId |
Definition at line 128 of file UT_Interrupt.h.
When interrupts nest, it is not always useful to display the entire stack of interrupts. Priority is used to control if the interrupt should be shown. 1) All PERMANENT messages are shown. 2) Only the topmost NODE is shown, provided it isn't shadowed by a PERMANENT. 3) Only the topmost TRANSIENT is shown, provided it isn't shadowed by a PERMANENT or NODE. Node cooking in Houdini uses the NODE level, so for most ad-hoc interrupt messages the TRANSIENT level is best.
Enumerator | |
---|---|
PRIORITY_TRANSIENT | |
PRIORITY_NODE | |
PRIORITY_PERMANENT |
Definition at line 141 of file UT_Interrupt.h.
|
explicit |
|
override |
void UT_Interrupt::clearStickyInterrupts | ( | ) |
|
inline |
Resets the ready for interrupt so no interrupts will be triggered until the hystersis interval (~200ms) occurs
Definition at line 309 of file UT_Interrupt.h.
|
inline |
Definition at line 175 of file UT_Interrupt.h.
|
inline |
Definition at line 240 of file UT_Interrupt.h.
|
inline |
Definition at line 173 of file UT_Interrupt.h.
|
inline |
Definition at line 174 of file UT_Interrupt.h.
|
inline |
Definition at line 254 of file UT_Interrupt.h.
|
inlinestatic |
Definition at line 265 of file UT_Interrupt.h.
|
inline |
Definition at line 188 of file UT_Interrupt.h.
|
protected |
Definition at line 281 of file UT_Interrupt.h.
void UT_Interrupt::interrupt | ( | ) |
|
inline |
Definition at line 156 of file UT_Interrupt.h.
bool UT_Interrupt::isPaused | ( | ) | const |
To use the long operation mechanism invoke "opStart" once, giving the name of the operation and (if possible) an estimate of the number of calls which are planned to be made to the opInterrupt method. The start method will return zero if the operation has already been terminated (possibly from a containing long operation) and should not even start. In that case, you must still call opEnd(). It will return one if the operation can proceed normally.
During the long operation, invoke the "opInterrupt" method (if possible, giving a value between 0 and 100 indicating the percentage of the operation that is complete). This method will return zero if the operation should continue and one if a request was made to terminate. When the operation is complete, invoke the "opEnd" method. This should be called even if the operation was interrupted.
The 'immediate_dialog' flag causes the idialog program to be started immediately instead of waiting for a timeout. This is the only way to start the idialog progress monitor, and should only be used for very long operations where the user would minimize Houdini (like rendering)
The opid can be used to verify nesting of interrupts. It can be passed to opEnd to verify that the nesting is proper...
These methods are now thread safe. Only the main thread will start the interrupt server.
To use the long operation mechanism invoke "opStart" once, giving the name of the operation and (if possible) an estimate of the number of calls which are planned to be made to the opInterrupt method. The start method will return zero if the operation has already been terminated (possibly from a containing long operation) and should not even start. In that case, you must still call opEnd(). It will return one if the operation can proceed normally.
During the long operation, invoke the "opInterrupt" method (if possible, giving a value between 0 and 100 indicating the percentage of the operation that is complete). This method will return zero if the operation should continue and one if a request was made to terminate. When the operation is complete, invoke the "opEnd" method. This should be called even if the operation was interrupted.
The 'immediate_dialog' flag causes the idialog program to be started immediately instead of waiting for a timeout. This is the only way to start the idialog progress monitor, and should only be used for very long operations where the user would minimize Houdini (like rendering)
The opid can be used to verify nesting of interrupts. It can be passed to opEnd to verify that the nesting is proper...
These methods are now thread safe. Only the main thread will start the interrupt server.
int UT_Interrupt::opStart | ( | const char * | opname = 0 , |
int | npoll = 0 , |
||
int | immediate_dialog = 0 , |
||
int * | opid = 0 |
||
) |
To use the long operation mechanism invoke "opStart" once, giving the name of the operation and (if possible) an estimate of the number of calls which are planned to be made to the opInterrupt method. The start method will return zero if the operation has already been terminated (possibly from a containing long operation) and should not even start. In that case, you must still call opEnd(). It will return one if the operation can proceed normally.
During the long operation, invoke the "opInterrupt" method (if possible, giving a value between 0 and 100 indicating the percentage of the operation that is complete). This method will return zero if the operation should continue and one if a request was made to terminate. When the operation is complete, invoke the "opEnd" method. This should be called even if the operation was interrupted.
The 'immediate_dialog' flag causes the idialog program to be started immediately instead of waiting for a timeout. This is the only way to start the idialog progress monitor, and should only be used for very long operations where the user would minimize Houdini (like rendering)
The opid can be used to verify nesting of interrupts. It can be passed to opEnd to verify that the nesting is proper...
These methods are now thread safe. Only the main thread will start the interrupt server.
int UT_Interrupt::opStartMessage | ( | int | priority, |
const UT_InterruptMessage & | msg, | ||
int | immediate_dialog = 0 , |
||
int * | opid = 0 |
||
) |
To use the long operation mechanism invoke "opStart" once, giving the name of the operation and (if possible) an estimate of the number of calls which are planned to be made to the opInterrupt method. The start method will return zero if the operation has already been terminated (possibly from a containing long operation) and should not even start. In that case, you must still call opEnd(). It will return one if the operation can proceed normally.
During the long operation, invoke the "opInterrupt" method (if possible, giving a value between 0 and 100 indicating the percentage of the operation that is complete). This method will return zero if the operation should continue and one if a request was made to terminate. When the operation is complete, invoke the "opEnd" method. This should be called even if the operation was interrupted.
The 'immediate_dialog' flag causes the idialog program to be started immediately instead of waiting for a timeout. This is the only way to start the idialog progress monitor, and should only be used for very long operations where the user would minimize Houdini (like rendering)
The opid can be used to verify nesting of interrupts. It can be passed to opEnd to verify that the nesting is proper...
These methods are now thread safe. Only the main thread will start the interrupt server.
int UT_Interrupt::opStartPriority | ( | int | priority, |
const char * | opname = 0 , |
||
int | npoll = 0 , |
||
int | immediate_dialog = 0 , |
||
int * | opid = 0 |
||
) |
To use the long operation mechanism invoke "opStart" once, giving the name of the operation and (if possible) an estimate of the number of calls which are planned to be made to the opInterrupt method. The start method will return zero if the operation has already been terminated (possibly from a containing long operation) and should not even start. In that case, you must still call opEnd(). It will return one if the operation can proceed normally.
During the long operation, invoke the "opInterrupt" method (if possible, giving a value between 0 and 100 indicating the percentage of the operation that is complete). This method will return zero if the operation should continue and one if a request was made to terminate. When the operation is complete, invoke the "opEnd" method. This should be called even if the operation was interrupted.
The 'immediate_dialog' flag causes the idialog program to be started immediately instead of waiting for a timeout. This is the only way to start the idialog progress monitor, and should only be used for very long operations where the user would minimize Houdini (like rendering)
The opid can be used to verify nesting of interrupts. It can be passed to opEnd to verify that the nesting is proper...
These methods are now thread safe. Only the main thread will start the interrupt server.
void UT_Interrupt::pause | ( | bool | dopause | ) |
void UT_Interrupt::popInterruptCallback | ( | ) |
|
inline |
We have some hystersis from starting a computation and accepting the first interrupt, this avoids interactive computations from suddenly getting interrupted by escape keys.
Definition at line 302 of file UT_Interrupt.h.
|
inline |
Definition at line 245 of file UT_Interrupt.h.
void UT_Interrupt::setAppTitle | ( | const char * | title | ) |
|
inlinestatic |
Definition at line 263 of file UT_Interrupt.h.
bool UT_Interrupt::setInterruptable | ( | bool | allow, |
bool * | prev_enabled = nullptr , |
||
bool | allow_ui = false |
||
) |
|
inline |
Definition at line 248 of file UT_Interrupt.h.
void UT_Interrupt::setLongOpText | ( | const UT_StringHolder & | longoptext | ) |
Call this before a new set of opStart()s are called. It will also cause idialog to configure the user interface with two text boxes instead of the usual single line. After that, you can call setLongOpText() to modify the second line message.
Call this before a new set of opStart()s are called. It will also cause idialog to configure the user interface with two text boxes instead of the usual single line. After that, you can call setLongOpText() to modify the second line message.
void UT_Interrupt::setSignalCallback | ( | UTsigHandler | function | ) |
void UT_Interrupt::setStickyInterrupts | ( | ) |
|
inlinestatic |
Definition at line 258 of file UT_Interrupt.h.
Definition at line 160 of file UT_Interrupt.h.
|
inline |
Definition at line 185 of file UT_Interrupt.h.
|
inline |
Definition at line 293 of file UT_Interrupt.h.