|
Module Simantics/Diagram/SymbolLibraryThis module is undocumented. This is a list of its definitions. create :: IndexRootSymbolProvideFactory -> <Proc,ReadGraph> ISymbolProvider Loads the symbol groups and returns a provider for them. Requires a read
transaction. Dispose the result with createIndexRootSymbolProvideFactory :: Maybe Resource -> Maybe Resource -> <ReadGraph> IndexRootSymbolProvideFactory Creates the factory for the symbol libraries under the given index root, as
they apply to the given diagram. Both arguments may be disposeSymbolProvider :: ISymbolProvider -> <Proc> () Disposes the provider and releases the resources it holds. Neither it nor the groups and items obtained from it may be used afterwards. getGroupDescription :: ISymbolGroup -> <Proc> String A longer description of the group, for tooltips and the like. getGroupItems :: ISymbolGroup -> <Proc> Vector ISymbolItem The symbols contained by the group. getGroupName :: ISymbolGroup -> <Proc> String The name of the group, as shown to the user. getItemDescription :: ISymbolItem -> <Proc> String A longer description of the symbol, for tooltips and the like. getItemGroup :: ISymbolItem -> <Proc> ISymbolGroup The group this symbol belongs to. getItemName :: ISymbolItem -> <Proc> String The name of the symbol, as shown to the user. getItemResource :: ISymbolItem -> <Proc> Resource The resource the symbol is defined by. Not every symbol comes from the database; for one that does not the result is a null reference, so only call this for symbols that are known to be graph-backed. getSymbolGroups :: ISymbolProvider -> <Proc> [ISymbolGroup] The symbol groups offered by the provider. itemToContext :: ISymbolItem -> <Proc> ICanvasContext Builds a canvas context that contains just the given symbol as a single
diagram element, for rendering the symbol on its own. Same as
itemToContextWithSel :: ISymbolItem -> Boolean -> <Proc> ICanvasContext Builds a canvas context that contains just the given symbol as a single
diagram element. The boolean tells whether a selection frame is painted
around a selected element. Dispose the result with |