ostrat.pCanv

package ostrat.pCanv

Type members

Classlikes

abstract class CanvasNoPanels(title: String) extends CanvasUser with PanelLike

A canvas that is not divided up into panels. A panel is a portion of the canvas that has its own origin and is clipped.

A canvas that is not divided up into panels. A panel is a portion of the canvas that has its own origin and is clipped.

abstract class CanvasPanelled(title: String) extends CanvasUser

A canvas divided up into panels. Each panel is clipped and has its own origin.

A canvas divided up into panels. Each panel is clipped and has its own origin.

An abstract Canvas interface implemented and to be implemented on various platforms. A concrete implementation will utilise canvas like an HTML canvas or a Scalafx canvas. This concrete implementation class must (can?) be mixed in with a a particular use trait like CanvSimple or CanvMulti. The default methods take the origin as the centre of the canvas. Note the Canvas Platform merely passes bare pointer event data to delegate functions. It does not process them in relation to objects painted on the Canvas.

An abstract Canvas interface implemented and to be implemented on various platforms. A concrete implementation will utilise canvas like an HTML canvas or a Scalafx canvas. This concrete implementation class must (can?) be mixed in with a a particular use trait like CanvSimple or CanvMulti. The default methods take the origin as the centre of the canvas. Note the Canvas Platform merely passes bare pointer event data to delegate functions. It does not process them in relation to objects painted on the Canvas.

It is really not a good idea to use this trait, use a sub class of this trait directly in your applications. You do not want to be thinking in terms of the imperative methods of this application. Use one of the provided classes like CanvasNoPanels or Canvas Panelled or create your own if the provided classes don't fulfill your needs.

This trait is for Canvas Implementations with a Top left origin and downward y axis. It should not be used directly by graphical applications.

This trait is for Canvas Implementations with a Top left origin and downward y axis. It should not be used directly by graphical applications.

This trait provides stub methods to allow development on a Canvas with incomplete functionality. Override the methods as desired but remove this trait form the inheritance hierarchy once full functionality has been implemented

This trait provides stub methods to allow development on a Canvas with incomplete functionality. Override the methods as desired but remove this trait form the inheritance hierarchy once full functionality has been implemented

abstract class CanvasUser(val title: String)

So the descendant classes need to set the canv.mouseup field to use the mouse and its equivalents.

So the descendant classes need to set the canv.mouseup field to use the mouse and its equivalents.

abstract class CmdBarGui(title: String) extends CanvasPanelled

A simple 2 panel display, a man panel and a command bar.

A simple 2 panel display, a man panel and a command bar.

case class DispAnim(fAnim: Double => Unit, secs: Double) extends DispPhase
trait DispObj
sealed trait DispPhase
case class DispStill(fDisp: () => Unit) extends DispPhase
trait Dist2Gui extends MapGui

Why is the called a Dist2LikeGui not a Dist2 Gui

Why is the called a Dist2LikeGui not a Dist2 Gui

trait GuiLaunch

A convenience trait for launching Apps.

A convenience trait for launching Apps.

trait GuiLaunchMore extends GuiLaunch
case class GuiLaunchSimple(settingStr: String, default: (CanvasPlatform => Any, String)) extends GuiLaunch
trait GuiLaunchStd extends GuiLaunch

A convenience trait for launching Apps that takes an Int and an Identifier as its settings.

A convenience trait for launching Apps that takes an Int and an Identifier as its settings.

abstract class MapGui(title: String) extends CanvasPanelled

A MapGui uses a CanvMulti. It has a main map panel and a top control panel. In addition translates between 2d game coordinates and 2d coordinates on the canvas. Allowing the canvas to display a moving, scalable 2d view though the Game map. The x coordinate increases from left to right, the y coordinate increases from bottom to top.

A MapGui uses a CanvMulti. It has a main map panel and a top control panel. In addition translates between 2d game coordinates and 2d coordinates on the canvas. Allowing the canvas to display a moving, scalable 2d view though the Game map. The x coordinate increases from left to right, the y coordinate increases from bottom to top.

object MenuBranch
Companion
class
class MenuBranch(text: String, val nodes: Seq[MenuNode]) extends MenuSub
Companion
object
Companion
class
class MenuBranchDynamic(text: String, val getSubMenu: () => Seq[MenuNode]) extends MenuSub
Companion
object
abstract class MenuContextGraphic(seq: MenuSeq, x: Double, y: Double)

Not sure aboout this class

Not sure aboout this class

object MenuLeaf
Companion
class
class MenuLeaf(text: String, val action: () => Unit) extends MenuNode
Companion
object
object MenuNode
Companion
class
sealed abstract class MenuNode(val text: String)
Companion
object
object MenuSeq
object MenuSub
Companion
class
sealed abstract class MenuSub(text: String) extends MenuNode
Companion
object
case class MouseButtonCmd(cmd: MouseButton => Unit)
case class Panel(outerCanv: CanvasPanelled, clipPoly: Polygon, cover: Boolean) extends PanelLike

A virtual panel created from the Canvas implemented using the clip function.

A virtual panel created from the Canvas implemented using the clip function.

trait PanelLike extends RectCenlign

The purpose of this trait is to give common methods for Panels and Simple Canvases. A SimpleCanvas is like a Panel but not a Panel.

The purpose of this trait is to give common methods for Panels and Simple Canvases. A SimpleCanvas is like a Panel but not a Panel.

object StdButton
object Turn extends ShowSingleton
abstract class UnfixedMapGui(title: String) extends MapGui

So currently this is a turn based class allowing the selection of objects within the map. That is not the case for the Planet App where the planets move too quickly for selection. The focus centre is un fixed unlike the planet App.

So currently this is a turn based class allowing the selection of objects within the map. That is not the case for the Planet App where the planets move too quickly for selection. The focus centre is un fixed unlike the planet App.

Types

type MouseCmd = MouseButton => Unit

Value members

Concrete methods

def clickButtonOld(str: String, cmd: MouseCmd, backColour: Colour): PolyCurveAll

A button to react to different mouse buttons. The length varies with the String.

A button to react to different mouse buttons. The length varies with the String.

def clickButtonStdOld(str: String, cmd: MouseCmd, backColour: Colour): PolyCurveAll

A button to react to different mouse buttons. The length is fixed regardless of the length of the String.

A button to react to different mouse buttons. The length is fixed regardless of the length of the String.

def simpleButtonOld(str: String, cmd: AnyRef): PolyCurveAll

A simple button that does not depend on which mouse button is pressed.

A simple button that does not depend on which mouse button is pressed.