28 #define ma_assert(bed) arb_assert(bed)
30 #define AWAR_MACRO_RECORDING_MACRO_TEXT AWAR_MACRO_BASE "/button_label"
31 #define AWAR_MACRO_RECORDING_EXPAND AWAR_MACRO_BASE "/expand"
32 #define AWAR_MACRO_RECORDING_RUNB4 AWAR_MACRO_BASE "/runb4"
33 #define AWAR_MACRO_INTERRUPT_PROMPT AWAR_MACRO_BASE "/" NEVER_RECORDED_ID "/prompt"
47 fprintf(stderr,
"macro_execution_finished(%s)\n", macroName);
82 error =
"Please specify name of macro to record";
104 error =
"Only possible while recording macro.";
112 error =
"Please insert some text as user prompt";
128 aw_message(
"Note: this will only work while recording a macro!");
131 static AW_window_simple *aws =
NULp;
133 aws =
new AW_window_simple;
135 aws->init(awr,
"DEFINE_INTERRUPTION",
"Define macro interruption");
136 aws->load_xfig(
"macro_interruption.fig");
149 aws->create_autosize_button(
NEVER_RECORDED_ID "Add",
".. and interrupt playback until user presses 'continue'");
192 static AW_window_simple *aws =
NULp;
196 aws =
new AW_window_simple;
198 aws->load_xfig(
"macro_select.fig");
203 aws->create_button(
"CLOSE",
"CLOSE",
"C");
206 aws->create_button(
"HELP",
"HELP");
217 aws->at(
"edit"); aws->callback(
edit_macro_cb); aws->create_button(
"EDIT",
"EDIT");
218 aws->at(
"delete"); aws->callback(
delete_macro_cb); aws->create_button(
"DELETE",
"DELETE");
248 if (!recorder) error =
"macro playback only available in server";
GB_ERROR start_recording(const char *file, const char *stop_action_name, bool expand_existing)
void update_macro_record_button(AW_root *awr)
void AW_set_selected_fullname(AW_root *awr, const char *awar_prefix, const char *to_fullname)
void insert_menu_topic(const char *id, const char *name, const char *mnemonic, const char *help_text_, AW_active mask, const WindowCallback &wcb)
static void popup_interrupt_macro_window_cb(AW_window *aww)
GB_ERROR GB_add_callback(GBDATA *gbd, GB_CB_TYPE type, const DatabaseCallback &dbcb)
void AW_edit(const char *path)
UserActionTracker * get_tracker()
#define AWAR_MACRO_RECORDING_EXPAND
GB_ERROR execute(const char *macroFile, bool loop_marked, const RootCallback &execution_done_cb)
const char * GBS_global_string(const char *templat,...)
char * AW_get_selected_fullname(AW_root *awr, const char *awar_prefix)
MacroRecorder * getMacroRecorder(AW_root *aw_root)
void AW_POPDOWN(AW_window *window)
char * GBS_regreplace(const char *str, const char *regReplExpr, GB_ERROR *error)
char * window_defaults_name
window title
int GB_unlink(const char *path)
static void dont_announce_done(AW_root *)
#define AWAR_MACRO_RECORDING_RUNB4
const char * read_char_pntr() const
GB_ERROR GB_await_error()
static AW_root * SINGLETON
WindowCallback makeHelpCallback(const char *helpfile)
#define AWAR_MACRO_RECORDING_MACRO_TEXT
void add_planned_interruption(const char *displayed_text)
static void macro_recording_changed_cb()
static void insert_interruption_to_macro_cb(AW_window *aww)
static void error(const char *msg)
void AW_create_fileselection_awars(AW_root *awr, const char *awar_base, const char *directories, const char *filter, const char *file_name)
GBDATA * GB_searchOrCreate_int(GBDATA *gb_container, const char *fieldpath, long default_value)
static void exec_macro_cb(AW_window *aww, bool loop_marked)
static void edit_macro_cb(AW_window *aww)
void execute_macro(AW_root *root, const char *macroname)
AW_awar * awar(const char *awar)
static void popup_macro_window(AW_window *aww)
void AW_refresh_fileselection(AW_root *awr, const char *awar_prefix)
static AW_window_menu_modes_opengl * awm
static void start_macro_cb(AW_window *aww)
static void create_macro_variables(AW_root *aw_root)
#define AWAR_MACRO_INTERRUPT_PROMPT
AW_awar * awar_int(const char *var_name, long default_value=0, AW_default default_file=AW_ROOT_DEFAULT)
#define NEVER_RECORDED_ID
bool GB_is_directory(const char *path)
static void macro_execution_finished(AW_root *awr, char *macroName)
#define MACRO_TRIGGER_RECORDING
void aw_message(const char *msg)
void insert_macro_menu_entry(AW_window *awm, bool prepend_separator)
GB_ERROR stop_recording()
void AW_create_fileselection(AW_window *aws, const char *awar_prefix, const char *at_prefix, const char *pwd, DirDisplay disp_dirs, bool allow_wildcards)
GB_ERROR write_string(const char *aw_string)
static void delete_macro_cb(AW_window *aww)
GB_transaction ta(gb_var)
AW_awar * awar_string(const char *var_name, const char *default_value="", AW_default default_file=AW_ROOT_DEFAULT)
#define MACRO_PLAYBACK_MARKED_ID
static int info[maxsites+1]
#define MACRO_PLAYBACK_ID
void aw_message_if(GB_ERROR error)
char * GBS_global_string_copy(const char *templat,...)