57 #define MYDIALOG_CB(method) static_cast<UI_EventMethod>(&MyDialog::method)
62 namespace HDK_Sample {
69 const char*
className()
const override {
return "MyDialog"; }
96 using namespace HDK_Sample;
99 : myParsedDialog(false)
105 MyDialog::parseDialog()
134 myParsedDialog =
true;
155 if (myIsOpen == (
bool)myOpenValue)
157 myIsOpen = (bool)myOpenValue;
161 printf(
"dialog was opened\n");
165 printf(
"dialog was closed\n");
170 MyDialog::handleImport(
UI_Event *event)
183 myStatusValue =
"Import Successful!";
197 args.
err() <<
"Could not parse cmd_ui.ui file\n";
199 args.
out() <<
"Successfully launched dialog\n";
void close()
Close the UI dialog.
std::ostream & err(int show_line_number=1)
auto printf(const S &fmt, const T &...args) -> int
void addInterest(UI_Object *client, UI_EventMethod method, bool check_dup=false)
#define MYDIALOG_CB(method)
Used to wrap around callback functions responding to UI_Value changes.
void installCommand(const char *name, const char *options, CMD_Callback cb, bool is_safe=true)
Install a command into the command list.
virtual void changed(UI_Object *by, UI_Reason reason=UI_VALUE_CHANGED, UI_DeviceEvent *state=0)
UI_Value * getValueSymbol(const char *symbol, int create=1)
void setValueSymbol(const char *symbol, UI_Value *value, bool warn=true)
void CMDextendLibrary(CMD_Manager *cman)
**If you just want to fire and args
bool readUIFile(const char *ui_filename, bool quiet=false)
bool open()
Launch the UI dialog.
const char * className() const override