Documentation ¶
Index ¶
- func CreateNode(branch bool) fyne.CanvasObject
- func GetChildUIDs(parentUID string) []string
- func IsBranch(uid string) bool
- func NewFyneCrlDiagramNode(node core.Concept, trans *core.Transaction, ...) diagramwidget.DiagramNode
- func ShowFyneFormatDialog(properties diagramwidget.DiagramElementProperties, ...)
- func ShowSecondaryPopup(fcde FyneCrlDiagramElement, event *desktop.MouseEvent)
- func UpdateNode(uid string, branch bool, node fyne.CanvasObject)
- type ConceptStateBinding
- type CrlEditorFyneGUI
- func (gui *CrlEditorFyneGUI) CloseDiagramView(diagramID string, trans *core.Transaction) error
- func (gui *CrlEditorFyneGUI) ConceptDeleted(elID string, trans *core.Transaction) error
- func (gui *CrlEditorFyneGUI) ConceptSelected(el core.Concept, trans *core.Transaction) error
- func (gui *CrlEditorFyneGUI) DisplayDiagram(diagram core.Concept, trans *core.Transaction) error
- func (gui *CrlEditorFyneGUI) FileLoaded(el core.Concept, trans *core.Transaction)
- func (gui *CrlEditorFyneGUI) GetConceptStateBinding(uid string) ConceptStateBinding
- func (gui *CrlEditorFyneGUI) GetNoSaveDomains(noSaveDomains map[string]core.Concept, trans *core.Transaction)
- func (gui *CrlEditorFyneGUI) GetWindow() fyne.Window
- func (gui *CrlEditorFyneGUI) Initialize(trans *core.Transaction) error
- func (gui *CrlEditorFyneGUI) RefreshGUI(trans *core.Transaction) error
- type FyneCrlDiagramElement
- type FyneCrlDiagramLink
- func (fcdl *FyneCrlDiagramLink) GetDiagramElement() core.Concept
- func (fcdl *FyneCrlDiagramLink) GetDiagramElementID() string
- func (fcdl *FyneCrlDiagramLink) GetFyneProperties() diagramwidget.DiagramElementProperties
- func (fcdl *FyneCrlDiagramLink) GetModelElement() core.Concept
- func (fcdl *FyneCrlDiagramLink) GetModelElementID() string
- func (fcdl *FyneCrlDiagramLink) SetFyneProperties(properties diagramwidget.DiagramElementProperties)
- func (fcdl *FyneCrlDiagramLink) SetLabel(label string)
- type FyneCrlDiagramNode
- func (fcdn *FyneCrlDiagramNode) GetDiagramElement() core.Concept
- func (fcdn *FyneCrlDiagramNode) GetDiagramElementID() string
- func (fcdn *FyneCrlDiagramNode) GetFyneProperties() diagramwidget.DiagramElementProperties
- func (fcdn *FyneCrlDiagramNode) GetModelElement() core.Concept
- func (fcdn *FyneCrlDiagramNode) GetModelElementID() string
- func (fcdn *FyneCrlDiagramNode) MouseDown(event *desktop.MouseEvent)
- func (fcdn *FyneCrlDiagramNode) MouseUp(event *desktop.MouseEvent)
- func (fcdn *FyneCrlDiagramNode) SetFyneProperties(properties diagramwidget.DiagramElementProperties)
- type FyneDiagramManager
- type FyneFormatDialog
- type FynePropertyManager
- type FyneTreeManager
- type IDsSortedByLabel
- type ToolbarSelection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetChildUIDs ¶
GetChildUIDs returns an array of the child UIDs
func NewFyneCrlDiagramNode ¶
func NewFyneCrlDiagramNode(node core.Concept, trans *core.Transaction, diagramWidget *diagramwidget.DiagramWidget) diagramwidget.DiagramNode
NewFyneCrlDiagramNode creates a fyne node that corresponds to the supplied crldiagram node
func ShowFyneFormatDialog ¶
func ShowFyneFormatDialog(properties diagramwidget.DiagramElementProperties, callback func(diagramwidget.DiagramElementProperties))
ShowFyneFormatDialog displays the dialog for editing the DiagramElement properties
func ShowSecondaryPopup ¶
func ShowSecondaryPopup(fcde FyneCrlDiagramElement, event *desktop.MouseEvent)
ShowSecondaryPopup actually displays the secondary popup - it is used for both Nodes and Links
func UpdateNode ¶
UpdateNode updates the data in the indicated node
Types ¶
type ConceptStateBinding ¶
type ConceptStateBinding interface { GetBoundData() *binding.Struct Update(*core.ChangeNotification, *core.Transaction) error }
ConceptStateBinding serves as an interface between a fyne data binding and an activeCRL concept
func NewConceptStateBinding ¶
func NewConceptStateBinding(id string) ConceptStateBinding
NewConceptStateBinding creates a binding for the given id
type CrlEditorFyneGUI ¶
type CrlEditorFyneGUI struct {
// contains filtered or unexported fields
}
CrlEditorFyneGUI is the Crl Editor built with Fyne
var FyneGUISingleton *CrlEditorFyneGUI
FyneGUISingleton is the unique instance of the CrlEditorFyneGUI for the application
func NewFyneGUI ¶
func NewFyneGUI(crlEditor *crleditor.Editor, providedApp fyne.App) *CrlEditorFyneGUI
NewFyneGUI returns an initialized FyneGUI
func (*CrlEditorFyneGUI) CloseDiagramView ¶
func (gui *CrlEditorFyneGUI) CloseDiagramView(diagramID string, trans *core.Transaction) error
CloseDiagramView closes the view of the diagram
func (*CrlEditorFyneGUI) ConceptDeleted ¶
func (gui *CrlEditorFyneGUI) ConceptDeleted(elID string, trans *core.Transaction) error
ConceptDeleted - no additional action required
func (*CrlEditorFyneGUI) ConceptSelected ¶
func (gui *CrlEditorFyneGUI) ConceptSelected(el core.Concept, trans *core.Transaction) error
ConceptSelected causes the indicated element to be selected in the properties, tree, and diagram.
func (*CrlEditorFyneGUI) DisplayDiagram ¶
func (gui *CrlEditorFyneGUI) DisplayDiagram(diagram core.Concept, trans *core.Transaction) error
DisplayDiagram displays the indicated diagram
func (*CrlEditorFyneGUI) FileLoaded ¶
func (gui *CrlEditorFyneGUI) FileLoaded(el core.Concept, trans *core.Transaction)
FileLoaded - no action required
func (*CrlEditorFyneGUI) GetConceptStateBinding ¶
func (gui *CrlEditorFyneGUI) GetConceptStateBinding(uid string) ConceptStateBinding
GetConceptStateBinding returns the ConceptStateBinding for the given uid. If the binding does not already exist, one is created and indexed under the uid
func (*CrlEditorFyneGUI) GetNoSaveDomains ¶
func (gui *CrlEditorFyneGUI) GetNoSaveDomains(noSaveDomains map[string]core.Concept, trans *core.Transaction)
GetNoSaveDomains - there aren't any for the CRLEditorFyneGUI
func (*CrlEditorFyneGUI) GetWindow ¶
func (gui *CrlEditorFyneGUI) GetWindow() fyne.Window
GetWindow returns the main window of the FyneGUI
func (*CrlEditorFyneGUI) Initialize ¶
func (gui *CrlEditorFyneGUI) Initialize(trans *core.Transaction) error
Initialize initializes the information content of the GUI.
func (*CrlEditorFyneGUI) RefreshGUI ¶
func (gui *CrlEditorFyneGUI) RefreshGUI(trans *core.Transaction) error
RefreshGUI initializes the graphical state of the GUI
type FyneCrlDiagramElement ¶
type FyneCrlDiagramElement interface { GetDiagramElement() core.Concept GetDiagramElementID() string GetModelElement() core.Concept GetModelElementID() string GetFyneProperties() diagramwidget.DiagramElementProperties SetFyneProperties(diagramwidget.DiagramElementProperties) Refresh() }
FyneCrlDiagramElement serves as a mapping between the Fyne DiagramElement and the core DiagramElement
type FyneCrlDiagramLink ¶
type FyneCrlDiagramLink struct { diagramwidget.BaseDiagramLink // contains filtered or unexported fields }
FyneCrlDiagramLink is an extension to the diagramwidget.DiagramLink that serves as a binding between the fyne link and the crldiagramdomain link
func NewFyneCrlDiagramLink ¶
func NewFyneCrlDiagramLink(diagramWidget *diagramwidget.DiagramWidget, link core.Concept, trans *core.Transaction) *FyneCrlDiagramLink
NewFyneCrlDiagramLink creates a fyne link that corresponds to the supplied crldiagramdomain link
func (*FyneCrlDiagramLink) GetDiagramElement ¶
func (fcdl *FyneCrlDiagramLink) GetDiagramElement() core.Concept
GetDiagramElement returns the crl diagram element associated with the link
func (*FyneCrlDiagramLink) GetDiagramElementID ¶
func (fcdl *FyneCrlDiagramLink) GetDiagramElementID() string
GetDiagramElementID returns the ID of the crl diagram eleent associagted with the link
func (*FyneCrlDiagramLink) GetFyneProperties ¶
func (fcdl *FyneCrlDiagramLink) GetFyneProperties() diagramwidget.DiagramElementProperties
GetFyneProperties returns the fyne DiagramElementProperties of the diagram link
func (*FyneCrlDiagramLink) GetModelElement ¶
func (fcdl *FyneCrlDiagramLink) GetModelElement() core.Concept
GetModelElement returns the crl model element represented by the link
func (*FyneCrlDiagramLink) GetModelElementID ¶
func (fcdl *FyneCrlDiagramLink) GetModelElementID() string
GetModelElementID returns the ID of the crl model eleent represented by the link
func (*FyneCrlDiagramLink) SetFyneProperties ¶
func (fcdl *FyneCrlDiagramLink) SetFyneProperties(properties diagramwidget.DiagramElementProperties)
SetFyneProperties sets the fyne DiagramElementProperties of the diagram link
func (*FyneCrlDiagramLink) SetLabel ¶
func (fcdl *FyneCrlDiagramLink) SetLabel(label string)
SetLabel sets the label for the fyne DiagramLink
type FyneCrlDiagramNode ¶
type FyneCrlDiagramNode struct { diagramwidget.BaseDiagramNode // contains filtered or unexported fields }
FyneCrlDiagramNode is an extension to diagramwidget.DiagramNode that serves as a binding between the diagramwidget nodes and the crldiagramdomain diagram noddes
func (*FyneCrlDiagramNode) GetDiagramElement ¶
func (fcdn *FyneCrlDiagramNode) GetDiagramElement() core.Concept
GetDiagramElement returns the crl diagram element associated with the link
func (*FyneCrlDiagramNode) GetDiagramElementID ¶
func (fcdn *FyneCrlDiagramNode) GetDiagramElementID() string
GetDiagramElementID returns the ID of the crl diagram eleent associagted with the link
func (*FyneCrlDiagramNode) GetFyneProperties ¶
func (fcdn *FyneCrlDiagramNode) GetFyneProperties() diagramwidget.DiagramElementProperties
GetFyneProperties returns the fyne DiagramElementProperties of the diagram link
func (*FyneCrlDiagramNode) GetModelElement ¶
func (fcdn *FyneCrlDiagramNode) GetModelElement() core.Concept
GetModelElement returns the crl model element represented by the link
func (*FyneCrlDiagramNode) GetModelElementID ¶
func (fcdn *FyneCrlDiagramNode) GetModelElementID() string
GetModelElementID returns the ID of the crl model eleent represented by the link
func (*FyneCrlDiagramNode) MouseDown ¶
func (fcdn *FyneCrlDiagramNode) MouseDown(event *desktop.MouseEvent)
MouseDown shows the secondary popup for right mouse
func (*FyneCrlDiagramNode) MouseUp ¶
func (fcdn *FyneCrlDiagramNode) MouseUp(event *desktop.MouseEvent)
MouseUp responds to mouse up events
func (*FyneCrlDiagramNode) SetFyneProperties ¶
func (fcdn *FyneCrlDiagramNode) SetFyneProperties(properties diagramwidget.DiagramElementProperties)
SetFyneProperties sets the fyne DiagramElementProperties of the diagram link
type FyneDiagramManager ¶
type FyneDiagramManager struct {
// contains filtered or unexported fields
}
FyneDiagramManager manages the relationship between the fyne DiagramWidgets and the underlying CRL model. It is a component of the FyneGUI
func NewFyneDiagramManager ¶
func NewFyneDiagramManager(fyneGUI *CrlEditorFyneGUI) *FyneDiagramManager
NewFyneDiagramManager creates a diagram manager and associates it with the FyneGUI
func (*FyneDiagramManager) ElementSelected ¶
func (dm *FyneDiagramManager) ElementSelected(id string, trans *core.Transaction)
ElementSelected selects the element in each diagram (if present)
func (*FyneDiagramManager) GetDrawingArea ¶
func (dm *FyneDiagramManager) GetDrawingArea() *fyne.Container
GetDrawingArea returns the diagram area container
func (*FyneDiagramManager) GetSelectedDiagram ¶
func (dm *FyneDiagramManager) GetSelectedDiagram() *diagramwidget.DiagramWidget
GetSelectedDiagram returns the currently selected DiagramWidget
func (*FyneDiagramManager) SelectDiagram ¶
func (dm *FyneDiagramManager) SelectDiagram(diagramID string)
SelectDiagram selects the tab whose diagram has the indicated ID
type FyneFormatDialog ¶
type FyneFormatDialog struct {
// contains filtered or unexported fields
}
FyneFormatDialog is the screen used to edit DiagramElement properties
type FynePropertyManager ¶
type FynePropertyManager struct {
// contains filtered or unexported fields
}
FynePropertyManager manages the property display in the interface
func NewFynePropertyManager ¶
func NewFynePropertyManager() *FynePropertyManager
NewFynePropertyManager creates an initialized instance of the FynePropertyManager
type FyneTreeManager ¶
type FyneTreeManager struct {
// contains filtered or unexported fields
}
FyneTreeManager is the manager of the fyne tree in the CrlFyneEditor
func NewFyneTreeManager ¶
func NewFyneTreeManager(fyneGUI *CrlEditorFyneGUI) *FyneTreeManager
NewFyneTreeManager returns an initialized FyneTreeManager
func (*FyneTreeManager) ElementSelected ¶
func (ftm *FyneTreeManager) ElementSelected(uid string)
ElementSelected causes the tree manager to select the indicated tree entry
func (*FyneTreeManager) ShowElementInTree ¶
func (ftm *FyneTreeManager) ShowElementInTree(element core.Concept)
ShowElementInTree ensures that the indicated element is shown in the tree
type IDsSortedByLabel ¶
type IDsSortedByLabel []string
IDsSortedByLabel implements the sort.Interface for []string based on the string being the ID of a core.Element sorted by the Label of the Element
func (IDsSortedByLabel) Len ¶
func (a IDsSortedByLabel) Len() int
func (IDsSortedByLabel) Less ¶
func (a IDsSortedByLabel) Less(i, j int) bool
func (IDsSortedByLabel) Swap ¶
func (a IDsSortedByLabel) Swap(i, j int)
type ToolbarSelection ¶
type ToolbarSelection int
ToolbarSelection is the enumeration of toolbar items
const ( CursorSelected ToolbarSelection = iota ElementSelected LiteralSelected ReferenceSelected ReferenceLinkSelected RefinementSelected RefinementLinkSelected OwnerPointerSelected ReferencedElementPointerSelected AbstractElementPointerSelected RefinedElementPointerSelected OneToOneMapSelected CreateRefinementOfConceptSelected )
The enumerated values ToolbarSelection
func (ToolbarSelection) ToString ¶
func (selection ToolbarSelection) ToString() string
ToString retuns text identifying the ToolbarSelection