MemoWidget

Can be used as a simple text editor, or to just display text

Name in theme: 'memo';

Constructors

this
this(bool readOnly)
Undocumented in source.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

keyboardEvent
void keyboardEvent(KeyPress key)
Undocumented in source. Be warned that the author may not have intended to support it.
mouseEvent
void mouseEvent(MouseClick mouse)
Undocumented in source. Be warned that the author may not have intended to support it.
update
bool update(Matrix display)
Undocumented in source. Be warned that the author may not have intended to support it.
updateColors
void updateColors()
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

lines
List!string lines [@property getter]

returns a list of lines in memo

readOnly
bool readOnly [@property getter]

Returns true if memo's contents cannot be modified, by user

readOnly
bool readOnly [@property setter]

sets whether to allow modifying of contents (false) or not (true)

Inherited Members

From QWidget

widgetPosition
Position widgetPosition;

specifies position of this widget

widgetSize
Size widgetSize;

size of this widget

widgetCaption
string widgetCaption;

caption of this widget, it's up to the widget how to use this, progressbarWidget shows this inside the bar...

widgetShow
bool widgetShow;

whether this widget should be drawn or not

needsUpdate
bool needsUpdate;

to specify if this widget needs to be updated or not, mark this as true when the widget has changed

widgetName
string widgetName;

specifies name of this widget. must be unique, as it is used to identify widgets in theme

widgetSizeRatio
uinteger widgetSizeRatio;

specifies that how much height (in horizontal layout) or width (in vertical) is given to this widget. The ratio of all widgets is added up and height/width for each widget is then calculated using this

widgetTheme
QTheme widgetTheme;

The theme that is currently used

forceUpdate
bool delegate() forceUpdate;

Called by widget when a redraw is needed, but no redraw is scheduled

cursorPos
void delegate(uinteger x, uinteger y) cursorPos;

Called by widgets (usually keyboard-input-taking) to position the cursor

customMouseEvent
MouseEventFuction customMouseEvent;

custom mouse event, if not null, it should be called before doing anything else in mouseEvent.

customKeyboardEvent
KeyboardEventFunction customKeyboardEvent;

custom keyboard event, if not null, it should be called before doing anything else in keyboardEvent.

mouseEvent
void mouseEvent(MouseClick mouse)

Called by owner when mouse is clicked with cursor on this widget.

keyboardEvent
void keyboardEvent(KeyPress key)

Called by owner when key is pressed and this widget is active.

update
bool update(Matrix display)

Called by owner to update.

updateColors
void updateColors()

Called by owner to indicate that widget has to 're-fetch' colors from the theme.

onMouseEvent
MouseEventFuction onMouseEvent [@property setter]

use to change the custom mouse event

onKeyboardEvent
KeyboardEventFunction onKeyboardEvent [@property setter]

use to change the custom keyboard event

name
string name [@property getter]

The name of the widget. Read-only, cannot be modified

caption
string caption [@property getter]

caption of the widget. setter

caption
string caption [@property setter]

caption of the widget. getter

position
Position position [@property getter]

position of the widget. getter

position
Position position [@property setter]

position of the widget. setter

sizeRatio
uinteger sizeRatio [@property getter]

size (width/height) of the widget. getter

sizeRatio
uinteger sizeRatio [@property setter]

size (width/height) of the widget. setter

visible
bool visible [@property getter]

visibility of the widget. getter

visible
bool visible [@property setter]

visibility of the widget. setter

theme
QTheme theme [@property getter]

theme of the widget. getter

theme
QTheme theme [@property setter]

theme of the widget. setter

onForceUpdate
bool delegate() onForceUpdate [@property setter]

called by owner to set the forceUpdate function, which is used to force an update immediately.

onCursorPosition
void delegate(uinteger, uinteger) onCursorPosition [@property setter]

called by the owner to set the cursorPos function, which is used to position the cursor on the terminal.

size
Size size [@property getter]

size of the widget. getter

size
Size size [@property setter]

size of the widget. setter

Meta