DanielBullimore / OOmutiny

OO Javascript frontend
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

0.1.1.1.1 Floating Panel #21

Closed DanielBullimore closed 4 years ago

DanielBullimore commented 5 years ago

Draft

Priority: [Unset]

Depends:

0.0 Master[OoMutiny]-(OoMutiny.class.js) => 0.1 Point[OoPoint]-(OoPoint.class.js) => 0.1.1 Region[OoRegion]-(OoPointRegion.class.js) => 0.1.1.1 View[OoView]-(OoPointRegionView.class.js)

Description:

A floating panel is effectively a region of the gui which is rendered on top of all other objects and can be dragged by the user to a new point. Floating Panels can be closed or reduced to an icon by the user, these features can be enabled or disabled individually before rendering. The intended use case for Floats: is tool boxes, dialog, multitasking, on screen stats or other monitoring; all of which could be implemented as sub classes.

UML:

OoFloatingPanel-16-9-2019

Properties:

booAllowIcon - Protected boolean, true = allow user to reduce panel to icon. false = icon functions are not even rendered
booAllowClose - Protected boolean, true = allow user to close panel. false = close functions are not rendered
booEnableTitle - protected boolean, true = a panel title is display. false = no title is displayed.
strTitleText - protected string, contains the text to display as panel title, set using funSetTitle(). 
booStateIsFloating - private boolean, true = user has grabbed the panel and it is now  in 'floating' state.
booStateIsClosed - private boolean, true = panel is closed do not render or false panel is open
booStateIsIcon - private boolean, true = panel is in iconimized state or false panel is in panelized state

Methods:

funSetTitle() - public, takes string strTitleText parameter and sets title of panel as strTitleText.
funIconimize() - public, called when an user wants to reduce a panel to an icon.
funPanelize() - public, called when an user wants to restore an iconimize panel.
funClose() - public, removes the panel completely from GUI. does not destroy instance.
funEnableIcon() - public, accepts booAllowIconimize as true = enable and display inconimize features or false = disable the feature. Protects booAllowIcon.
funEnableClose() - public, accepts booAllowClosePanel as true = enable and display close button or false = disable feature.
funEnableTitle() - public, accepts booDisplayTitle as true = enable title and display title text (set with funSetTitle) or false disable the feature
funGrab() - public, triggered when user holds left mouse down, sets to panel to follow mouse cursor using teleport method inherited from region.
funRelease - public, triggered when user has released left mouse after moving panel to new point
DanielBullimore commented 4 years ago

Made added state variables OoFloatingPanel-16-9-2019

DanielBullimore commented 4 years ago

Sanity checks passed