to broadcast or broadcast get a signal
- globalize the $application variable
global $application;
- send the module manager the
signal (and get the return value) - note that broadcast_get will
return the first result of a broadcast, and not continue broadcasting to all modules
$application->module_manager->broadcast(
$method,array("a","series","of","variables"));
$result = $application->module_manager->broadcast_get(
$method,array("a","series","of","variables"));
Common signals sent/recieved broadcast
Document Loading/Saving
pre_load_document(bookmarkid,URL)
load_document(bookmarkid,URL)
save_document(bookmarkid,URL)
post_save_document(bookmarkid,URL)
close_document(bookmarkid,URL)
all these deal with loading and saving the document,
load_document is also called repeatedly when flipping between active documents
load_from_data(bookmarkid,URL)
save_to_data(bookmarkid,URL)
when you have multiple editors, you should send these signals to other widgets when you loose focus, and you will recieve them when you get focus.
Getting Information
get_active_document()
If you are the active editor, then you should respond with an array of bookmarkid,URL to this call.
Menu/Toolbar button interaction
menu_emit(signal)
If the user presses on the menu, then the application will broadcast these signals to the modules - note you should ignore the save/load signals as they are handled directly by the loader.
you may simply redirect these signals straight to the widget which is being managed by the class