@rcsb/rcsb-saguaro-3d
Version:
RCSB Molstar/Saguaro Web App
33 lines (32 loc) • 1.41 kB
TypeScript
import { Subscription } from 'rxjs';
import { RcsbFvStructureConfigInterface } from "../RcsbFvStructure/RcsbFvStructure";
import { PluginContext } from "molstar/lib/mol-plugin/context";
import { RcsbFvCustomSequenceInterface } from "../RcsbFvSequence/RcsbFvCustomSequence";
/**Main Event Data Object Interface*/
export interface RcsbFvCustomContextManagerInterface<R, L, S> {
eventType: EventType;
eventData: string | UpdateConfigInterface<R, L, S> | ((plugin: PluginContext) => void);
}
/**Event types*/
export declare enum EventType {
UPDATE_CONFIG = "updateBoardConfig",
PLUGIN_CALL = "pluginCall"
}
export interface UpdateConfigInterface<R, L, S> {
structurePanelConfig?: Partial<RcsbFvStructureConfigInterface<R, S>>;
sequencePanelConfig?: Partial<RcsbFvCustomSequenceInterface<R, L>>;
}
/**rxjs Event Handler Object. It allows objects to subscribe methods and then, get(send) events to(from) other objects*/
export declare class RcsbFvCustomContextManager<R, L, S> {
private readonly subject;
/**Call other subscribed methods
* @param obj Event Data Structure Interface
* */
next(obj: RcsbFvCustomContextManagerInterface<R, L, S>): void;
/**Subscribe loadMethod
* @return Subscription
* */
subscribe(f: (x: RcsbFvCustomContextManagerInterface<R, L, S>) => void): Subscription;
/**Unsubscribe all methods*/
unsubscribeAll(): void;
}