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