/**
* Forms the basis of a panel display
*
* @ingroup mainapi
*/
class panels_display {
var $incoming_content = NULL;
var $css_id = NULL;
function add_pane($pane, $location = FALSE) {
$pane->pid = $this->next_new_pid();
if (!
$location || !
isset($this->
panels[$location])) {
foreach ($this->panels as $panel_name => $panel) {
$this->panels[$panel_name][] = $pid;
}
}
}
else {
$this->panels[$location][] = $pane->pid;
}
}
function duplicate_pane($pid, $location = FALSE) {
$pane = $this->clone_pane($pid);
$this->add_pane($pid, $location);
}
function clone_pane($pid) {
unset($pane->
position);
// necessary?
return $pane;
}
function next_new_pid() {
// necessary if/until we use this method and ONLY this method for adding temporary pids.
// then we can do it with a nice static var.
}
}
}
}
function panels_export_pane_across_displays($source_display, &$target_display, $pid, $location = FALSE) {
$pane = $source_display->clone_pane($pid);
$target_display->add_pane($pane, $location);
}