simplemap

package
v1.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2021 License: MIT Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPropertyToControl

func AddPropertyToControl(c IMapControl, name string, displayName string, propertyType uiproperties.PropertyType, groupName string, subType string) *uiproperties.Property

func EditDataSourceFormat

func EditDataSourceFormat(parent uiinterfaces.Widget, initText string, selected func(filePath string))

Types

type DataSourceFormatEditor

type DataSourceFormatEditor struct {
	uicontrols.Dialog
	// contains filtered or unexported fields
}

func NewDataSourceFormatEditor

func NewDataSourceFormatEditor(parent uiinterfaces.Widget, textInit string) *DataSourceFormatEditor

type IMapControl

type IMapControl interface {
	TypeName() string
	Name() string

	SetAdding()

	SetX(x int32)
	X() int32

	SetY(y int32)
	Y() int32

	SetWidth(width int32)
	Width() int32

	SetHeight(height int32)
	Height() int32

	SetOriginalX(x int32)
	SetOriginalY(y int32)
	SetOriginalWidth(width int32)
	SetOriginalHeight(height int32)

	Subclass() string

	Tick()

	SetDataSource(dataSource string)

	//SetPropertyValue(name string, value interface{})
	PropertyValue(name string) interface{}

	UpdateValue(val common_interfaces.ItemValue)
	LoadContent(contentBytes []byte, err error)

	UpdateSizePoints()
	SetType(typeName string)

	Dispose()

	FullDataSource() string

	OnMouseDown(x, y int)
	FindControlUnderPoint(x, y int) IMapControl
	HasAction() bool
	Action() *actions.Action

	GetFullPathToMapControl() []string
	// contains filtered or unexported methods
}

type IMapDataSource

type IMapDataSource interface {
	GetDataItemValue(path string, control IMapControl)
	LoadContent(itemUrl string, control IMapControl)
	GetWidgets(filter string, offset int, count int, toolbox IMapToolbox)
}

type IMapToolSelector

type IMapToolSelector interface {
	CurrentTool() string
	ResetCurrentTool()
}

type IMapToolbox

type IMapToolbox interface {
	SetItems(widgets common_interfaces.ResourcesInfo)
}

type Map

type Map struct {
	RootItem *MapItem    `json:"root_item"`
	Layers   []*MapLayer `json:"layers"`
}

func NewMap

func NewMap() *Map

type MapControl

type MapControl struct {
	uiproperties.PropertiesContainer

	MapWidget *MapWidget
	// contains filtered or unexported fields
}

func (*MapControl) Action added in v1.0.4

func (c *MapControl) Action() *actions.Action

func (*MapControl) Dispose

func (c *MapControl) Dispose()

func (*MapControl) ExecAction

func (c *MapControl) ExecAction(action *actions.Action) error

func (*MapControl) FindControlUnderPoint

func (c *MapControl) FindControlUnderPoint(x, y int) IMapControl

func (*MapControl) FullDataSource

func (c *MapControl) FullDataSource() string

func (*MapControl) GetFullPathToMapControl

func (c *MapControl) GetFullPathToMapControl() []string

func (*MapControl) HasAction

func (c *MapControl) HasAction() bool

func (*MapControl) Height

func (c *MapControl) Height() int32

func (*MapControl) LoadContent

func (c *MapControl) LoadContent(contentBytes []byte, err error)

func (*MapControl) Name

func (c *MapControl) Name() string

func (*MapControl) NeedTranslateOnDraw

func (c *MapControl) NeedTranslateOnDraw() bool

func (*MapControl) OnMouseDown

func (c *MapControl) OnMouseDown(x, y int)

func (*MapControl) OnPropertyChanged

func (c *MapControl) OnPropertyChanged(prop *uiproperties.Property)

func (*MapControl) SetAdding

func (c *MapControl) SetAdding()

func (*MapControl) SetDataSource

func (c *MapControl) SetDataSource(dataSource string)

func (*MapControl) SetHeight

func (c *MapControl) SetHeight(height int32)

func (*MapControl) SetOriginalHeight

func (c *MapControl) SetOriginalHeight(height int32)

func (*MapControl) SetOriginalWidth

func (c *MapControl) SetOriginalWidth(width int32)

func (*MapControl) SetOriginalX

func (c *MapControl) SetOriginalX(x int32)

func (*MapControl) SetOriginalY

func (c *MapControl) SetOriginalY(y int32)

func (*MapControl) SetType

func (c *MapControl) SetType(typeName string)

func (*MapControl) SetWidth

func (c *MapControl) SetWidth(width int32)

func (*MapControl) SetX

func (c *MapControl) SetX(x int32)

func (*MapControl) SetY

func (c *MapControl) SetY(y int32)

func (*MapControl) Subclass

func (c *MapControl) Subclass() string

func (*MapControl) Tick

func (c *MapControl) Tick()

func (*MapControl) TypeName

func (c *MapControl) TypeName() string

func (*MapControl) UpdateSizePoints

func (c *MapControl) UpdateSizePoints()

func (*MapControl) UpdateValue

func (c *MapControl) UpdateValue(value common_interfaces.ItemValue)

func (*MapControl) Width

func (c *MapControl) Width() int32

func (*MapControl) X

func (c *MapControl) X() int32

func (*MapControl) Y

func (c *MapControl) Y() int32

type MapControlLine

type MapControlLine struct {
	MapControl
	// contains filtered or unexported fields
}

func NewMapControlLine

func NewMapControlLine(mapWidget *MapWidget, parent IMapControl) *MapControlLine

func (*MapControlLine) OnCoordinatesChanged

func (c *MapControlLine) OnCoordinatesChanged(property *uiproperties.Property, oldValue interface{}, newValue interface{})

func (*MapControlLine) SetX1

func (c *MapControlLine) SetX1(x1 int32)

func (*MapControlLine) SetX2

func (c *MapControlLine) SetX2(x2 int32)

func (*MapControlLine) SetY1

func (c *MapControlLine) SetY1(y1 int32)

func (*MapControlLine) SetY2

func (c *MapControlLine) SetY2(y2 int32)

func (*MapControlLine) TypeName

func (c *MapControlLine) TypeName() string

func (*MapControlLine) UpdateSizePoints

func (c *MapControlLine) UpdateSizePoints()

func (*MapControlLine) UpdateXYWH

func (c *MapControlLine) UpdateXYWH()

func (*MapControlLine) X1

func (c *MapControlLine) X1() int32

func (*MapControlLine) X2

func (c *MapControlLine) X2() int32

func (*MapControlLine) Y1

func (c *MapControlLine) Y1() int32

func (*MapControlLine) Y2

func (c *MapControlLine) Y2() int32

type MapControlPoint

type MapControlPoint struct {
	// contains filtered or unexported fields
}

func NewMapControlPoint

func NewMapControlPoint() *MapControlPoint

type MapControlSvg

type MapControlSvg struct {
	MapControl
	// contains filtered or unexported fields
}

func NewMapControlSvg

func NewMapControlSvg(mapWidget *MapWidget, parent IMapControl) *MapControlSvg

func (*MapControlSvg) TypeName

func (c *MapControlSvg) TypeName() string

type MapControlText

type MapControlText struct {
	MapControl
	// contains filtered or unexported fields
}

func NewMapControlText

func NewMapControlText(mapWidget *MapWidget, parent IMapControl) *MapControlText

func (*MapControlText) Action added in v1.0.4

func (c *MapControlText) Action() *actions.Action

func (*MapControlText) ExecuteAction

func (c *MapControlText) ExecuteAction()

func (*MapControlText) GetProperties

func (c *MapControlText) GetProperties() []*uiproperties.Property

func (*MapControlText) HasAction

func (c *MapControlText) HasAction() bool

func (*MapControlText) OnMouseDown

func (c *MapControlText) OnMouseDown(x, y int)

func (*MapControlText) SetBorderTypeCircle

func (c *MapControlText) SetBorderTypeCircle()

func (*MapControlText) SetBorderTypeRect

func (c *MapControlText) SetBorderTypeRect()

func (*MapControlText) SetBorderWidth

func (c *MapControlText) SetBorderWidth(borderWidth int)

func (*MapControlText) Tick

func (c *MapControlText) Tick()

func (*MapControlText) TypeName

func (c *MapControlText) TypeName() string

type MapControlVertex

type MapControlVertex int
const (
	MapControlVertexNoVertex    MapControlVertex = 0
	MapControlVertexLeftTop     MapControlVertex = 1
	MapControlVertexRightTop    MapControlVertex = 2
	MapControlVertexRightBottom MapControlVertex = 3
	MapControlVertexLeftBottom  MapControlVertex = 4
	MapControlVertex1           MapControlVertex = 5
	MapControlVertex2           MapControlVertex = 6
)

type MapControlView

type MapControlView struct {
	MapControl

	OnLoadedInEditor   func(list *uiproperties.PropertiesChangesList)
	OnSelectionChanged func()
	// contains filtered or unexported fields
}

func NewMapControlView

func NewMapControlView(mapWidget *MapWidget, parent IMapControl) *MapControlView

func (*MapControlView) AddLayer

func (c *MapControlView) AddLayer(name string)

func (*MapControlView) ControlUnderPoint

func (c *MapControlView) ControlUnderPoint(x, y int32) IMapControl

func (*MapControlView) Dispose

func (c *MapControlView) Dispose()

func (*MapControlView) DownSelectedItem

func (c *MapControlView) DownSelectedItem()

func (*MapControlView) DownSelectedItemMax

func (c *MapControlView) DownSelectedItemMax()

func (*MapControlView) FindControlUnderPoint

func (c *MapControlView) FindControlUnderPoint(x, y int) IMapControl

func (*MapControlView) LoadContent

func (c *MapControlView) LoadContent(contentBytes []byte, err error)

func (*MapControlView) OnMapHeightChanged

func (c *MapControlView) OnMapHeightChanged(property *uiproperties.Property, oldValue interface{}, newValue interface{})

func (*MapControlView) OnMapWidthChanged

func (c *MapControlView) OnMapWidthChanged(property *uiproperties.Property, oldValue interface{}, newValue interface{})

func (*MapControlView) OnMouseDown

func (c *MapControlView) OnMouseDown(x, y int)

func (*MapControlView) RemoveLayer

func (c *MapControlView) RemoveLayer(layer *MapControlViewLayer)

func (*MapControlView) SaveOriginalProperties

func (c *MapControlView) SaveOriginalProperties()

func (*MapControlView) SetAdding

func (c *MapControlView) SetAdding()

func (*MapControlView) SetEditing

func (c *MapControlView) SetEditing(editing bool)

func (*MapControlView) SetIsRootControl

func (c *MapControlView) SetIsRootControl(isRootControl bool)

func (*MapControlView) Tick

func (c *MapControlView) Tick()

func (*MapControlView) TypeName

func (c *MapControlView) TypeName() string

func (*MapControlView) UpSelectedItem

func (c *MapControlView) UpSelectedItem()

func (*MapControlView) UpSelectedItemMax

func (c *MapControlView) UpSelectedItemMax()

type MapControlViewLayer

type MapControlViewLayer struct {
	// contains filtered or unexported fields
}

func NewMapControlViewLayer

func NewMapControlViewLayer() *MapControlViewLayer

type MapItem

type MapItem struct {
	Props []*uiproperties.PropertyStruct `json:"props"`
}

func NewMapItem

func NewMapItem() *MapItem

type MapLayer

type MapLayer struct {
	Name    string `json:"name"`
	Visible bool   `json:"visible"`
	Items   []*MapItem
}

func NewMapLayer

func NewMapLayer() *MapLayer

type MapLayersWidget

type MapLayersWidget struct {
	uicontrols.Panel

	OnSelectedLayer func(layer *MapControlViewLayer)
	OnChangedLayer  func(layer *MapControlViewLayer)
	// contains filtered or unexported fields
}

func NewMapLayersWidget

func NewMapLayersWidget(parent uiinterfaces.Widget) *MapLayersWidget

func (*MapLayersWidget) Dispose

func (c *MapLayersWidget) Dispose()

func (*MapLayersWidget) SetView

func (c *MapLayersWidget) SetView(view *MapControlView)

type MapToolbox

type MapToolbox struct {
	uicontrols.Panel
	// contains filtered or unexported fields
}

func NewMapToolbox

func NewMapToolbox(parent uiinterfaces.Widget) *MapToolbox

func (*MapToolbox) AddItem

func (c *MapToolbox) AddItem(displayName string, codeName string, image image.Image, item common_interfaces.ResourcesItemInfo)

func (*MapToolbox) AddStopItem

func (c *MapToolbox) AddStopItem()

func (*MapToolbox) CurrentTool

func (c *MapToolbox) CurrentTool() string

func (*MapToolbox) Dispose

func (c *MapToolbox) Dispose()

func (*MapToolbox) Reset

func (c *MapToolbox) Reset()

func (*MapToolbox) ResetCurrentTool

func (c *MapToolbox) ResetCurrentTool()

func (*MapToolbox) SetItems

func (c *MapToolbox) SetItems(widgets common_interfaces.ResourcesInfo)

func (*MapToolbox) SetMapDataSource

func (c *MapToolbox) SetMapDataSource(mapDataSource IMapDataSource)

func (*MapToolbox) UpdateStyle

func (c *MapToolbox) UpdateStyle()

type MapWidget

type MapWidget struct {
	uicontrols.Control

	OnMouseDrop        func(droppedValue interface{}, control IMapControl, x int32, y int32)
	OnSelectionChanged func()
	OnViewChanged      func()
	OnScaleChanged     func(scale float64)

	OnActionOpenMap   func(resId string)
	OnActionWriteItem func(item string, value string)
	// contains filtered or unexported fields
}

func NewMapWidget

func NewMapWidget(parent uiinterfaces.Widget) *MapWidget

func (*MapWidget) ActionOpenMap

func (c *MapWidget) ActionOpenMap(resId string)

func (*MapWidget) ActionWriteItem

func (c *MapWidget) ActionWriteItem(item string, value string)

func (*MapWidget) AddControl

func (c *MapWidget) AddControl(control IMapControl)

func (*MapWidget) CloseView

func (c *MapWidget) CloseView()

func (*MapWidget) ControlType

func (c *MapWidget) ControlType() string

func (*MapWidget) DownSelectedItem

func (c *MapWidget) DownSelectedItem()

func (*MapWidget) Draw

func (c *MapWidget) Draw(canvas ui.DrawContext)

func (*MapWidget) GetThumbnail

func (c *MapWidget) GetThumbnail(width, height int) image.Image

func (*MapWidget) HasChanges

func (c *MapWidget) HasChanges() bool

func (*MapWidget) Height

func (c *MapWidget) Height() int

func (*MapWidget) IsEditing

func (c *MapWidget) IsEditing() bool

func (*MapWidget) KeyDown

func (c *MapWidget) KeyDown(event *uievents.KeyDownEvent) bool

func (*MapWidget) Load

func (c *MapWidget) Load(resId string, value []byte) error

func (*MapWidget) MakeSnapshot

func (c *MapWidget) MakeSnapshot(action string)

func (*MapWidget) MouseDown

func (c *MapWidget) MouseDown(event *uievents.MouseDownEvent)

func (*MapWidget) MouseDrop

func (c *MapWidget) MouseDrop(ev *uievents.MouseDropEvent)

func (*MapWidget) MouseMove

func (c *MapWidget) MouseMove(event *uievents.MouseMoveEvent)

func (*MapWidget) MouseUp

func (c *MapWidget) MouseUp(event *uievents.MouseUpEvent)

func (*MapWidget) MouseWheel

func (c *MapWidget) MouseWheel(event *uievents.MouseWheelEvent)

func (*MapWidget) MoveItemDown

func (c *MapWidget) MoveItemDown()

func (*MapWidget) MoveItemDownMax

func (c *MapWidget) MoveItemDownMax()

func (*MapWidget) MoveItemUp

func (c *MapWidget) MoveItemUp()

func (*MapWidget) MoveItemUpMax

func (c *MapWidget) MoveItemUpMax()

func (*MapWidget) NotifyChanges

func (c *MapWidget) NotifyChanges(list *uiproperties.PropertiesChangesList)

func (*MapWidget) NotifyLayersChanged

func (c *MapWidget) NotifyLayersChanged()

func (*MapWidget) OnLoadedInEditor

func (c *MapWidget) OnLoadedInEditor(list *uiproperties.PropertiesChangesList)

func (*MapWidget) RectClientAreaOnWindow

func (c *MapWidget) RectClientAreaOnWindow() (int, int)

func (*MapWidget) Save

func (c *MapWidget) Save() []byte

func (*MapWidget) SelectedItems

func (c *MapWidget) SelectedItems() []IMapControl

func (*MapWidget) SetCurrentLayer

func (c *MapWidget) SetCurrentLayer(layer *MapControlViewLayer)

func (*MapWidget) SetEdit

func (c *MapWidget) SetEdit(edit bool)

func (*MapWidget) SetMapDataSource

func (c *MapWidget) SetMapDataSource(mapDataSource IMapDataSource)

func (*MapWidget) SetOnSelectionChanged

func (c *MapWidget) SetOnSelectionChanged(OnSelectionChanged func())

func (*MapWidget) SetToolSelector

func (c *MapWidget) SetToolSelector(toolSelector IMapToolSelector)

func (*MapWidget) Tick

func (c *MapWidget) Tick()

func (*MapWidget) UpSelectedItem

func (c *MapWidget) UpSelectedItem()

func (*MapWidget) View

func (c *MapWidget) View() *MapControlView

func (*MapWidget) Width

func (c *MapWidget) Width() int

func (*MapWidget) Zoom100

func (c *MapWidget) Zoom100()

func (*MapWidget) ZoomDefault

func (c *MapWidget) ZoomDefault()

func (*MapWidget) ZoomIn

func (c *MapWidget) ZoomIn()

func (*MapWidget) ZoomInContainer

func (c *MapWidget) ZoomInContainer()

func (*MapWidget) ZoomOut

func (c *MapWidget) ZoomOut()

type Point

type Point struct {
	// contains filtered or unexported fields
}

type Point32

type Point32 struct {
	// contains filtered or unexported fields
}

type PointF

type PointF struct {
	// contains filtered or unexported fields
}

type PropertiesEditor

type PropertiesEditor struct {
	uicontrols.Panel
	// contains filtered or unexported fields
}

func NewPropertiesEditor

func NewPropertiesEditor(parent uiinterfaces.Widget, client *client.Client) *PropertiesEditor

func (*PropertiesEditor) CheckBoxChanged

func (c *PropertiesEditor) CheckBoxChanged(checkBox *uicontrols.CheckBox, checked bool)

func (*PropertiesEditor) ColorPickerChanged

func (c *PropertiesEditor) ColorPickerChanged(colorPicker *uicontrols.ColorPicker, color color.Color)

func (*PropertiesEditor) ComboBoxChanged

func (c *PropertiesEditor) ComboBoxChanged(ev *uicontrols.ComboBoxEvent)

func (*PropertiesEditor) ControlType

func (c *PropertiesEditor) ControlType() string

func (*PropertiesEditor) Dispose

func (c *PropertiesEditor) Dispose()

func (*PropertiesEditor) LoadPropertiesValues

func (c *PropertiesEditor) LoadPropertiesValues()

func (*PropertiesEditor) MultilineChanged

func (c *PropertiesEditor) MultilineChanged(txtBox *uicontrols.Button, newValue string)

func (*PropertiesEditor) OnPropertyChanged

func (c *PropertiesEditor) OnPropertyChanged(prop *uiproperties.Property)

func (*PropertiesEditor) RebuildInterface

func (c *PropertiesEditor) RebuildInterface()

func (*PropertiesEditor) SetPropertiesContainer

func (c *PropertiesEditor) SetPropertiesContainer(propertiesContainer uiproperties.IPropertiesContainer)

func (*PropertiesEditor) SpinBoxChanged

func (c *PropertiesEditor) SpinBoxChanged(spinBox *uicontrols.SpinBox, value float64)

func (*PropertiesEditor) TextBoxChanged

func (c *PropertiesEditor) TextBoxChanged(txtBox *uicontrols.TextBox, oldValue string, newValue string)

func (*PropertiesEditor) TextBoxExtChanged

func (c *PropertiesEditor) TextBoxExtChanged(txtBox *uicontrols.TextBoxExt, oldValue string, newValue string)

type Rect32

type Rect32 struct {
	// contains filtered or unexported fields
}

type RectF

type RectF struct {
	// contains filtered or unexported fields
}

type SnapshotItem

type SnapshotItem struct {
	Name string
	Ds   []byte
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL