mockup

package
v0.0.0-...-fbe3beb Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WHITE    = "white"
	DARKGREY = "#555"
)
View Source
var EditablePrefix = "M_"

Functions

func NewBox

func NewBox(w, h, x, y float64, id string, e svg.Editable) *box

func NewButton

func NewButton(w, h, x, y float64, content string, id string, e svg.Editable) *button

func NewLabel

func NewLabel(w, h, x, y float64, content string, id string, e svg.Editable) *label

func NewLine

func NewLine(w, h, x, y float64, id string) *line

func NewTextBox

func NewTextBox(w, h, x, y float64, content string, id string, e svg.Editable) *textBox

Types

type AttributeEditor

type AttributeEditor struct {
}

type BaseElement

type BaseElement struct {
	Position  Position
	Dimension Dimension
}

func (*BaseElement) GetBase

func (be *BaseElement) GetBase() BaseElement

func (*BaseElement) GetWHXY

func (be *BaseElement) GetWHXY() (float64, float64, float64, float64)

func (*BaseElement) MoveTo

func (be *BaseElement) MoveTo(x, y float64)

func (*BaseElement) ResizeTo

func (be *BaseElement) ResizeTo(w, h float64)

type Border

type Border struct {
	X1 float64
	Y1 float64
	X2 float64
	Y2 float64
}

type Clonable

type Clonable struct {
	jquery.JQuery
}

type CloneBox

type CloneBox struct {
	MockupElement
}

func (*CloneBox) MoveTo

func (ele *CloneBox) MoveTo(x, y float64)

func (*CloneBox) Svg

func (ele *CloneBox) Svg() svg.SvgElement

type ControlEditable

type ControlEditable struct {
	Movable
	Scalable
	LineMovable
	Clonable
	Border
}

func NewControlEditable

func NewControlEditable(x1, y1, x2, y2 float64) *ControlEditable

func (*ControlEditable) BindEvents

func (ed *ControlEditable) BindEvents(m map[string]MockupElement)

type Dimension

type Dimension struct {
	Width  float64
	Height float64
}

type LineMovable

type LineMovable struct {
	jquery.JQuery
}

type MockupElement

type MockupElement interface {
	Svg() svg.SvgElement
	Id() string
	SetId(id string)
	GetWHXY() (float64, float64, float64, float64)
	MoveTo(x, y float64)
	ResizeTo(x, y, w, h float64)
	GetBase() BaseElement
	SetEditable(e svg.Editable)
}

type Movable

type Movable struct {
	jquery.JQuery
}

type Position

type Position struct {
	X float64
	Y float64
}

type Scalable

type Scalable struct {
	jquery.JQuery
}

type ScaleBox

type ScaleBox struct {
	MockupElement
	// contains filtered or unexported fields
}

func NewScaleBox

func NewScaleBox(mockupElement MockupElement) *ScaleBox

func (*ScaleBox) EResizeTo

func (ele *ScaleBox) EResizeTo(x, y float64)

func (*ScaleBox) Id

func (ele *ScaleBox) Id() string

func (*ScaleBox) MoveTo

func (ele *ScaleBox) MoveTo(x, y float64)

func (*ScaleBox) NEResizeTo

func (ele *ScaleBox) NEResizeTo(x, y float64)

func (*ScaleBox) NResizeTo

func (ele *ScaleBox) NResizeTo(x, y float64)

func (*ScaleBox) NWResizeTo

func (ele *ScaleBox) NWResizeTo(x, y float64)

func (*ScaleBox) SEesizeTo

func (ele *ScaleBox) SEesizeTo(x, y float64)

func (*ScaleBox) SResizeTo

func (ele *ScaleBox) SResizeTo(x, y float64)

func (*ScaleBox) SWResizeTo

func (ele *ScaleBox) SWResizeTo(x, y float64)

func (*ScaleBox) SetId

func (ele *ScaleBox) SetId(id string)

func (*ScaleBox) Svg

func (ele *ScaleBox) Svg() svg.SvgElement

func (*ScaleBox) WResizeTo

func (ele *ScaleBox) WResizeTo(x, y float64)

type ScaleLine

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

func NewScaleLine

func NewScaleLine(l MockupElement) *ScaleLine

func (ScaleLine) Id

func (id ScaleLine) Id() string

func (*ScaleLine) Line

func (ele *ScaleLine) Line() *line

func (*ScaleLine) MoveTo

func (ele *ScaleLine) MoveTo(x, y float64)

func (*ScaleLine) PointTo

func (ele *ScaleLine) PointTo(x, y float64, sqr int)

func (*ScaleLine) ResizeTo

func (ele *ScaleLine) ResizeTo(x, y, w, h float64)

func (*ScaleLine) SetId

func (i *ScaleLine) SetId(id string)

func (*ScaleLine) Svg

func (ele *ScaleLine) Svg() svg.SvgElement

type Stroke

type Stroke struct {
	Color     string
	Thickness Thickness
}

type Text

type Text struct {
	Content string
	Color   string
}

type Thickness

type Thickness int
const (
	None Thickness = iota
	VeryThin
	Thin
	Medium
	Thick
	VeryThick
)

func (Thickness) Float64

func (thickness Thickness) Float64() float64

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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