Panel

Panel for grouping elements. Does not directly handle elements, instead relies on blitter transparency. However, can handle the state of the elements.

Constructors

this
this(Text text, string source, Coordinate coordinates)
this(dstring text, string source, Coordinate position)

Default CTOR

Members

Aliases

WESet
alias WESet = LinkedList!(WindowElement, false, "a is b")
Undocumented in source.

Functions

addPopUpElement
void addPopUpElement(PopUpElement p, int x, int y)

Puts a PopUpElement on the GUI at the given position.

addPopUpElement
void addPopUpElement(PopUpElement p)

Puts a PopUpElement on the GUI.

bitBLT
void bitBLT(Point target, ABitmap source)
Undocumented in source. Be warned that the author may not have intended to support it.
bitBLT
void bitBLT(Point target, ABitmap source, Coordinate slice)
Undocumented in source. Be warned that the author may not have intended to support it.
bitBLTPattern
void bitBLTPattern(Coordinate target, ABitmap pattern)
Undocumented in source. Be warned that the author may not have intended to support it.
clearArea
void clearArea(Coordinate target)
Undocumented in source. Be warned that the author may not have intended to support it.
closePopUp
void closePopUp(PopUpElement p)

Closes a single popup element.

cycleFocus
int cycleFocus(int direction)

Cycles the focus on a single element. Returns -1 if end is reached, or the number of remaining elements that are cycleable in the direction.

draw
void draw()
Undocumented in source. Be warned that the author may not have intended to support it.
drawBox
void drawBox(Coordinate target, ubyte color)
Undocumented in source. Be warned that the author may not have intended to support it.
drawBoxPattern
void drawBoxPattern(Coordinate target, ubyte[] pattern)
Undocumented in source. Be warned that the author may not have intended to support it.
drawFilledBox
void drawFilledBox(Coordinate target, ubyte color)
Undocumented in source. Be warned that the author may not have intended to support it.
drawLine
void drawLine(Point from, Point to, ubyte color)
Undocumented in source. Be warned that the author may not have intended to support it.
drawLinePattern
void drawLinePattern(Point from, Point to, ubyte[] pattern)
Undocumented in source. Be warned that the author may not have intended to support it.
drawTextML
void drawTextML(Coordinate target, Text text, Point offset)
Undocumented in source. Be warned that the author may not have intended to support it.
drawTextSL
void drawTextSL(Coordinate target, Text text, Point offset)
Undocumented in source. Be warned that the author may not have intended to support it.
endPopUpSession
void endPopUpSession(PopUpElement p)

Ends the popup session and closes all popups.

fill
void fill(Point target, ubyte color, ubyte background)
Undocumented in source. Be warned that the author may not have intended to support it.
focusGiven
void focusGiven()

Called when an object receives focus.

focusTaken
void focusTaken()

Called when an object loses focus.

getAbsolutePosition
Coordinate getAbsolutePosition(WindowElement sender)
Undocumented in source. Be warned that the author may not have intended to support it.
requestCursor
void requestCursor(CursorType type)

Sets the cursor to the given type on request.

requestFocus
void requestFocus(WindowElement sender)

Gives focus to the element if applicable

xorBitBLT
void xorBitBLT(Coordinate target, ABitmap pattern)
Undocumented in source. Be warned that the author may not have intended to support it.
xorBitBLT
void xorBitBLT(Coordinate target, ubyte color)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

focusedElem
sizediff_t focusedElem;

Index of the currently focused element

subElems
WESet subElems;

Contains all elements within the panel

Inherited Members

From WindowElement

inputHandler
InputHandler inputHandler;

Common input handler, must be set upon program initialization for text input, etc.

position
Box position;

Contains the position of the element. Should be only modified with functions to ensure consistency.

parent
ElementContainer parent;

Points to the container for two-way communication

text
Text text;

Contains the text of the element if any. Should be modified with functions to ensure redraws.

source
string source;

Passed with other event informations when event is caused. Can be something like the name of the instance.

flags
uint flags;

Contains various status flags.

ENABLE_MOUSE_PRESS
enum ENABLE_MOUSE_PRESS;
Undocumented in source.
IS_CLICKED
enum IS_CLICKED;
Undocumented in source.
ENABLE_RCLICK_FLAG
enum ENABLE_RCLICK_FLAG;
Undocumented in source.
IS_PRESSED
enum IS_PRESSED;
Undocumented in source.
IS_CHECKED
enum IS_CHECKED;
Undocumented in source.
IS_FOCUSED
enum IS_FOCUSED;
Undocumented in source.
IS_LHS
enum IS_LHS;
Undocumented in source.
customStyle
StyleSheet customStyle;

Sets a custom style for this element. If not set, then it'll get the style from it's parent.

onMouseLClick
EventDeleg onMouseLClick;

Called on left mouseclick released

onMouseRClick
EventDeleg onMouseRClick;

Called on right mouseclick released

onMouseMClick
EventDeleg onMouseMClick;

Called on middle mouseclick released

onMouseMove
EventDeleg onMouseMove;

Called if mouse is moved on object

onMouseScroll
EventDeleg onMouseScroll;

Called if mouse is scrolled on object

lastMousePosition
MouseMotionEvent lastMousePosition;

Stores the last known mouse position for future reference

getText
Text getText()

Returns the text of this element.

setText
void setText(Text s)
Undocumented in source. Be warned that the author may not have intended to support it.
setText
void setText(dstring s)
Undocumented in source. Be warned that the author may not have intended to support it.
state
ElementState state [@property setter]

Sets whether the element is enabled or not.

state
ElementState state [@property getter]

Returns whether the element is enabled or not.

setParent
void setParent(ElementContainer parent)
Undocumented in source. Be warned that the author may not have intended to support it.
draw
void draw()

Updates the output. Every subclass must override it.

getPosition
Box getPosition()
Undocumented in source. Be warned that the author may not have intended to support it.
setPosition
Box setPosition(Box position)
Undocumented in source. Be warned that the author may not have intended to support it.
getSource
string getSource [@property getter]

Returns the source string.

mousePressEvent
bool mousePressEvent [@property getter]

Returns true if the element will generate events on mouse press and mouse release. By default, only release is used.

mousePressEvent
bool mousePressEvent [@property setter]

Returns true if the element will generate events on mouse press and mouse release. By default, only release is used.

getStyleSheet
StyleSheet getStyleSheet()

Returns the next available StyleSheet.

focusGiven
void focusGiven()

Called when an object receives focus.

focusTaken
void focusTaken()

Called when an object loses focus.

cycleFocus
int cycleFocus(int direction)

Cycles the focus on a single element. Returns -1 if end is reached, or the number of remaining elements that are cycleable in the direction.

passKey
void passKey(uint keyCode, ubyte mod)

Passes key events to the focused element when not in text editing mode.

isFocused
bool isFocused [@property getter]

Returns whether the element is focused

isPressed
bool isPressed [@property getter]

Returns whether the element is pressed

isChecked
bool isChecked [@property getter]

Returns whether the element is checked

isChecked
bool isChecked [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
passMCE
void passMCE(MouseEventCommons mec, MouseClickEvent mce)
Undocumented in source. Be warned that the author may not have intended to support it.
passMME
void passMME(MouseEventCommons mec, MouseMotionEvent mme)
Undocumented in source. Be warned that the author may not have intended to support it.
passMWE
void passMWE(MouseEventCommons mec, MouseWheelEvent mwe)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta