ostrat.pgui

package ostrat.pgui

The package attempts to encapsulate the various abstract canvas traits while the actual objects that populate a canvas go in package geom.

Attributes

Members list

Type members

Classlikes

abstract class CanvasNoPanels(val title: String) extends CanvasUser, 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.

Attributes

Supertypes
trait PanelLike
trait RectCenlign
trait WithCentre
trait CanvasUser
class Object
trait Matchable
class Any
Show all
Known subtypes
class BlackJackGui
class BattleGui
class FlagsGui
class ReactorGUI
class ColourGen
class TessGui
class CArcExs
class Canv
class HelloWorld
class LsAEllipses
class LsAText
class LsB1
class LsB2
class LsB3
class LsC1
class LsC2
class LsC3
class LsC3b
class LsC4
class LsC5
class LsC6
class LsC7
class LsC8
class LsD1
class LsD2
class LsD3
class LsD4
class LsD5
Show all
trait CanvasPanelled 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.

Attributes

Supertypes
trait CanvasUser
class Object
trait Matchable
class Any
Known subtypes
trait CmdBarGui
class GlobeGui
class ULocGui
class DungeonGui
class DraughtsGui
class ChessGui
class HGridSysGui
class EGridBaseGui
class DLessGui
class BC305Gui
class DiscovGui
class PeriGui
class IndRevGui
class SorsGui
class WW1Gui
class WW2Gui
class G4HGui
class G1HGui
class G3HGui
class G2HGui
class CivGui
class NormGui
class ZugGui
class TGridSysGui
class SqSysGui
class G1SGui
class G2SGui
class AltReacGui
class GoGui
class LsE1
class LsE2
class MapGui
class PlanetsGui
Show all
trait CanvasPlatform extends RectCenlign

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.

Attributes

Supertypes
trait RectCenlign
trait WithCentre
class Object
trait Matchable
class Any
Show all
Known subtypes

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.

Attributes

Supertypes
trait RectCenlign
trait WithCentre
class Object
trait Matchable
class Any
Show all
Known subtypes

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

Attributes

Supertypes
trait RectCenlign
trait WithCentre
class Object
trait Matchable
class Any
Show all
trait CanvasUser

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.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class BlackJackGui
class BattleGui
class FlagsGui
class ReactorGUI
class ColourGen
class TessGui
class CArcExs
class Canv
class HelloWorld
class LsAEllipses
class LsAText
class LsB1
class LsB2
class LsB3
class LsC1
class LsC2
class LsC3
class LsC3b
class LsC4
class LsC5
class LsC6
class LsC7
class LsC8
class LsD1
class LsD2
class LsD3
class LsD4
class LsD5
trait CmdBarGui
class GlobeGui
class ULocGui
class DungeonGui
class DraughtsGui
class ChessGui
class HGridSysGui
class EGridBaseGui
class DLessGui
class BC305Gui
class DiscovGui
class PeriGui
class IndRevGui
class SorsGui
class WW1Gui
class WW2Gui
class G4HGui
class G1HGui
class G3HGui
class G2HGui
class CivGui
class NormGui
class ZugGui
class TGridSysGui
class SqSysGui
class G1SGui
class G2SGui
class AltReacGui
class GoGui
class LsE1
class LsE2
class MapGui
class PlanetsGui
Show all
trait CmdBarGui 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.

Attributes

Supertypes
trait CanvasUser
class Object
trait Matchable
class Any
Known subtypes
class GlobeGui
class ULocGui
class DungeonGui
class DraughtsGui
class ChessGui
class HGridSysGui
class EGridBaseGui
class DLessGui
class BC305Gui
class DiscovGui
class PeriGui
class IndRevGui
class SorsGui
class WW1Gui
class WW2Gui
class G4HGui
class G1HGui
class G3HGui
class G2HGui
class CivGui
class NormGui
class ZugGui
class TGridSysGui
class SqSysGui
class G1SGui
class G2SGui
class AltReacGui
class GoGui
class LsE1
class LsE2
Show all
case class DispAnim(fAnim: Double => Unit, secs: Double) extends DispPhase

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait DispPhase
class Object
trait Matchable
class Any
Show all
trait DispObj

Attributes

Supertypes
class Object
trait Matchable
class Any
sealed trait DispPhase

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class DispAnim
class DispStill
case class DispStill(fDisp: () => Unit) extends DispPhase

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait DispPhase
class Object
trait Matchable
class Any
Show all
trait GuiLaunch

A convenience trait for launching Apps.

A convenience trait for launching Apps.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
object DLessLaunch
object EGridLaunch
object G1HLaunch
object G1SLaunch
object G3HLaunch
object G2HLaunch
object G2SLaunch
object BcLaunch
object DungLaunch
object ChessLaunch
object DiscovLaunch
object PeriLaunch
object IndRevLaunch
object NormLaunch
object SorsLaunch
object ULocLaunch
object WW1Launch
object WW2Launch
object GoLaunch
trait GuiLaunchStd
object CivLaunch
object ZugLaunch
object Lessons
Show all
trait GuiLaunchMore extends GuiLaunch

A GuiLaunch that actually uses the setting to construct the launch."

A GuiLaunch that actually uses the setting to construct the launch."

Attributes

Supertypes
trait GuiLaunch
class Object
trait Matchable
class Any
Known subtypes
object DLessLaunch
object EGridLaunch
object G1HLaunch
object G1SLaunch
object G3HLaunch
object G2HLaunch
object G2SLaunch
object BcLaunch
object DungLaunch
object ChessLaunch
object DiscovLaunch
object PeriLaunch
object IndRevLaunch
object NormLaunch
object SorsLaunch
object ULocLaunch
object WW1Launch
object WW2Launch
Show all
case class GuiLaunchSimple(settingStr: String, default: (CanvasPlatform => Any, String)) extends GuiLaunch

The simplest launcher, not usre that this class really serves any purpose.

The simplest launcher, not usre that this class really serves any purpose.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait GuiLaunch
class Object
trait Matchable
class Any
Show all
Known subtypes
object GoLaunch
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.

Attributes

Supertypes
trait GuiLaunch
class Object
trait Matchable
class Any
Known subtypes
object CivLaunch
object ZugLaunch
abstract class MapGui(val 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.

Attributes

Supertypes
trait CanvasUser
class Object
trait Matchable
class Any
Known subtypes
object MenuBranch

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
MenuBranch.type
class MenuBranch(text: String, val nodes: Seq[MenuNode]) extends MenuSub

Attributes

Companion
object
Supertypes
class MenuSub
class MenuNode
class Object
trait Matchable
class Any

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class MenuBranchDynamic(text: String, val getSubMenu: () => Seq[MenuNode]) extends MenuSub

Attributes

Companion
object
Supertypes
class MenuSub
class MenuNode
class Object
trait Matchable
class Any
abstract class MenuContextGraphic(seq: MenuSeq, x: Double, y: Double)

Not sure aboout this class

Not sure aboout this class

Attributes

Supertypes
class Object
trait Matchable
class Any
object MenuLeaf

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
MenuLeaf.type
class MenuLeaf(text: String, val action: () => Unit) extends MenuNode

Attributes

Companion
object
Supertypes
class MenuNode
class Object
trait Matchable
class Any
object MenuNode

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
MenuNode.type
sealed abstract class MenuNode(val text: String)

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class MenuLeaf
class MenuSub
class MenuBranch
object MenuSeq

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
MenuSeq.type
object MenuSub

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
MenuSub.type
sealed abstract class MenuSub(text: String) extends MenuNode

Attributes

Companion
object
Supertypes
class MenuNode
class Object
trait Matchable
class Any
Known subtypes
case class MouseButtonCmd(cmd: MouseButton => Unit)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
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.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait PanelLike
trait RectCenlign
trait WithCentre
class Object
trait Matchable
class Any
Show all
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.

Attributes

Supertypes
trait RectCenlign
trait WithCentre
class Object
trait Matchable
class Any
Show all
Known subtypes
class BlackJackGui
class BattleGui
class FlagsGui
class ReactorGUI
class ColourGen
class TessGui
class CArcExs
class Canv
class HelloWorld
class LsAEllipses
class LsAText
class LsB1
class LsB2
class LsB3
class LsC1
class LsC2
class LsC3
class LsC3b
class LsC4
class LsC5
class LsC6
class LsC7
class LsC8
class LsD1
class LsD2
class LsD3
class LsD4
class LsD5
class Panel
Show all
trait Selectable

This trait exists to provide text fpr a status bar in a graphical user interface when selected.

This trait exists to provide text fpr a status bar in a graphical user interface when selected.

Attributes

Supertypes
class Any
Known subtypes
class HCenPair[A2]
class HSepPair[A2]
class LunitState
object StdButton

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
StdButton.type
object Turn extends TellSimple

Attributes

Supertypes
trait TellSimple
trait Tell
trait Persist
class Object
trait Matchable
class Any
Show all
Self type
Turn.type
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.

Attributes

Supertypes
class MapGui
trait CanvasUser
class Object
trait Matchable
class Any
Show all

Types

Value members

Concrete methods

def clickButton(str: String, backColour: Colour)(cmd: MouseCmd): PolygonCompound

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.

Attributes

def simpleButton(str: String, backColour: Colour)(cmd: => Unit): PolygonCompound

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.

Attributes

def textBox(length: Int, str: String, backColour: Colour): PolygonCompound