From 37786af705b0a400aee66228cec477fd7aceb76b Mon Sep 17 00:00:00 2001 From: Vadim Lopatin Date: Thu, 22 May 2014 12:12:41 +0400 Subject: [PATCH] move documentation to gh-pages http://buggins.github.io/dlangui/ --- docs/all.html | 58 ---- docs/collections.html | 154 --------- docs/controls.html | 215 ------------ docs/drawbuf.html | 223 ------------- docs/editors.html | 752 ------------------------------------------ docs/events.html | 154 --------- docs/fonts.html | 364 -------------------- docs/ftfonts.html | 90 ----- docs/gldrawbuf.html | 133 -------- docs/glsupport.html | 51 --- docs/i18n.html | 122 ------- docs/images.html | 44 --- docs/layouts.html | 124 ------- docs/linestream.html | 62 ---- docs/lists.html | 279 ---------------- docs/logger.html | 40 --- docs/menu.html | 303 ----------------- docs/platform.html | 252 -------------- docs/popup.html | 132 -------- docs/resources.html | 127 ------- docs/sdlapp.html | 29 -- docs/signals.html | 236 ------------- docs/styles.html | 476 -------------------------- docs/tabs.html | 235 ------------- docs/types.html | 147 --------- docs/widget.html | 211 ------------ 26 files changed, 5013 deletions(-) delete mode 100644 docs/all.html delete mode 100644 docs/collections.html delete mode 100644 docs/controls.html delete mode 100644 docs/drawbuf.html delete mode 100644 docs/editors.html delete mode 100644 docs/events.html delete mode 100644 docs/fonts.html delete mode 100644 docs/ftfonts.html delete mode 100644 docs/gldrawbuf.html delete mode 100644 docs/glsupport.html delete mode 100644 docs/i18n.html delete mode 100644 docs/images.html delete mode 100644 docs/layouts.html delete mode 100644 docs/linestream.html delete mode 100644 docs/lists.html delete mode 100644 docs/logger.html delete mode 100644 docs/menu.html delete mode 100644 docs/platform.html delete mode 100644 docs/popup.html delete mode 100644 docs/resources.html delete mode 100644 docs/sdlapp.html delete mode 100644 docs/signals.html delete mode 100644 docs/styles.html delete mode 100644 docs/tabs.html delete mode 100644 docs/types.html delete mode 100644 docs/widget.html diff --git a/docs/all.html b/docs/all.html deleted file mode 100644 index 30128744..00000000 --- a/docs/all.html +++ /dev/null @@ -1,58 +0,0 @@ - - - dlangui.all - -

dlangui.all

- -DLANGUI library. -

-This module is just to simplify import of most useful DLANGUI modules. - -

-Synopsis:
-
// helloworld
-import dlangui.all;
-// required in one of modules
-mixin APP_ENTRY_POINT;
-
-/// entry point for dlangui based application
-extern (C) int UIAppMain(string[] args) {
-    // resource directory search paths
-    string[] resourceDirs = [
-        appendPath(exePath, "../../../res/"),   // for Visual D and DUB builds
-        appendPath(exePath, "../../../../res/"), // for Mono-D builds
-        appendPath(exePath, "res/") // when res dir is located at the same directory as executable
-    ];
-
-    // setup resource directories - will use only existing directories
-    drawableCache.setResourcePaths(resourceDirs);
-
-    // setup i18n - look for i18n directory inside one of passed directories
-    i18n.findTranslationsDir(resourceDirs);
-    // select translation file - for english language
-    i18n.load("en.ini"); //"ru.ini", "en.ini"
-
-    // create window
-    Window window = Platform.instance.createWindow("My Window", null);
-    // create some widget to show in window
-    window.mainWidget = (new Button()).text("Hello world"d);
-    // show window
-    window.show();
-    // run message loop
-    return Platform.instance.enterMessageLoop();
-}
-
-
-
- -

-License:
-Boost License 1.0 -

-Authors:
-Vadim Lopatin, coolreader.org@gmail.com

- - -
Page generated by Ddoc. Vadim Lopatin, 2014 - - diff --git a/docs/collections.html b/docs/collections.html deleted file mode 100644 index c304dc2c..00000000 --- a/docs/collections.html +++ /dev/null @@ -1,154 +0,0 @@ - - - dlangui.core.collections - -

dlangui.core.collections

- -DLANGUI library. -

-This module implements array based collection. - -

-Synopsis:
-
import dlangui.core.collections;
-
-// add
-Collection!Widget widgets;
-widgets ~= new Widget("id1");
-widgets ~= new Widget("id2");
-Widget w3 = new Widget("id3");
-widgets ~= w3;
-
-// remove by index
-widgets.remove(1);
-
-// foreach
-foreach(w; widgets)
-    writeln("widget: ", w.id);
-
-// remove by value
-widgets -= w3;
-writeln(widgets[0].id);
-
-
-
- -

-License:
-Boost License 1.0 -

-Authors:
-Vadim Lopatin, coolreader.org@gmail.com

- -
struct Collection(T, bool ownItems = false); -
-
array based collection of items - retains item order when during add/remove operations

- -
bool empty(); -
-
returns true if there are no items in collection

- -
-
size_t length(); -
-
returns number of items in collection

- -
-
size_t size(); -
-
returns currently allocated capacity (may be more than length)

- -
-
void size(size_t newSize); -
-
change capacity (e.g. to reserve big space to avoid multiple reallocations)

- -
-
void length(size_t newSize); -
-
returns number of items in collection

- -
-
T opIndex(size_t index); -
-
access item by index

- -
-
void add(T item, size_t index = size_t.max); -
-
insert new item in specified position

- -
-
void addAll(ref Collection!(T, ownItems) v); -
-
add all items from other collection

- -
-
Collection opOpAssign(string op)(T item); -
-
support for appending (~=, +=) and removing by value (-=)

- -
-
size_t indexOf(T item); -
-
returns index of first occurence of item, size_t.max if not found

- -
-
T remove(size_t index); -
-
remove single item, returning removed item

- -
-
bool removeValue(T value); -
-
remove single item by value - if present in collection, returning true if item was found and removed

- -
-
int opApply(int delegate(ref T param) op); -
-
support of foreach with reference

- -
-
void clear(); -
-
remove all items

- -
-
T popFront(); -
-
remove first item

- -
-
void pushFront(T item); -
-
insert item at beginning of collection

- -
-
T popBack(); -
-
remove last item

- -
-
void pushBack(T item); -
-
insert item at end of collection

- -
-
T front(); -
-
peek first item

- -
-
T back(); -
-
peek last item

- -
-
-
-
- -
Page generated by Ddoc. Vadim Lopatin, 2014 - - diff --git a/docs/controls.html b/docs/controls.html deleted file mode 100644 index aad41595..00000000 --- a/docs/controls.html +++ /dev/null @@ -1,215 +0,0 @@ - - - dlangui.widgets.controls - -

dlangui.widgets.controls

- -DLANGUI library. -

-This module contains simple controls widgets implementation. -

- -TextWidget -

- -ImageWidget -

- -Button -

- -ImageButton -

- -ScrollBar -

- - -

-Synopsis:
-
import dlangui.widgets.controls;
-
-
- -

-License:
-Boost License 1.0 -

-Authors:
-Vadim Lopatin, coolreader.org@gmail.com

- -
class VSpacer: dlangui.widgets.widget.Widget; -
-
vertical spacer to fill empty space in vertical layouts

- -
-
class HSpacer: dlangui.widgets.widget.Widget; -
-
horizontal spacer to fill empty space in horizontal layouts

- -
-
class TextWidget: dlangui.widgets.widget.Widget; -
-
static text widget

- -
@property dstring text(); -
-
get widget text

- -
-
@property Widget text(dstring s); -
-
set text to show

- -
-
@property Widget text(UIString s); -
-
set text to show

- -
-
@property Widget textResource(string s); -
-
set text resource ID to show

- -
-
-
-
class ImageWidget: dlangui.widgets.widget.Widget; -
-
static image widget

- -
@property string drawableId(); -
-
get drawable image id

- -
-
@property ImageWidget drawableId(string id); -
-
set drawable image id

- -
-
@property ref DrawableRef drawable(); -
-
get drawable

- -
-
@property ImageWidget drawable(DrawableRef img); -
-
set custom drawable (not one from resources)

- -
-
-
-
class ImageButton: dlangui.widgets.controls.ImageWidget; -
-
button with image only

- -
-
class ImageTextButton: dlangui.widgets.layouts.HorizontalLayout; -
-
button with image and text

- -
-
class CheckBox: dlangui.widgets.controls.ImageTextButton; -
-
checkbox

- -
-
class RadioButton: dlangui.widgets.controls.ImageTextButton; -
-
radio button

- -
-
class Button: dlangui.widgets.widget.Widget; -
-
Text only button

- -
-
interface OnScrollHandler; -
-
scroll event handler interface

- -
abstract bool onScrollEvent(AbstractSlider source, ScrollEvent event); -
-
handle scroll event

- -
-
-
-
class AbstractSlider: dlangui.widgets.widget.WidgetGroup; -
-
base class for widgets like scrollbars and sliders

- -
Signal!OnScrollHandler onScrollEventListener; -
-
scroll event listeners

- -
-
const @property int position(); -
-
returns slider position

- -
-
@property AbstractSlider position(int newPosition); -
-
sets new slider position

- -
-
const @property int minValue(); -
-
returns slider range min value

- -
-
const @property int maxValue(); -
-
returns slider range max value

- -
-
const @property int pageSize(); -
-
page size (visible area size)

- -
-
@property AbstractSlider pageSize(int size); -
-
set page size (visible area size)

- -
-
AbstractSlider setRange(int min, int max); -
-
set new range (min and max values for slider)

- -
-
-
-
class ScrollBar: dlangui.widgets.controls.AbstractSlider, dlangui.widgets.widget.OnClickHandler; -
-
scroll bar - either vertical or horizontal

- -
@property Orientation orientation(); -
-
returns scrollbar orientation (Vertical, Horizontal)

- -
-
@property ScrollBar orientation(Orientation value); -
-
sets scrollbar orientation

- -
-
bool onMouseEvent(MouseEvent event); -
-
handle mouse wheel events

- -
-
void onDraw(DrawBuf buf); -
-
Draw widget at its position to buffer

- -
-
-
-
- -
Page generated by Ddoc. Vadim Lopatin, 2014 - - diff --git a/docs/drawbuf.html b/docs/drawbuf.html deleted file mode 100644 index 742cca5c..00000000 --- a/docs/drawbuf.html +++ /dev/null @@ -1,223 +0,0 @@ - - - dlangui.graphics.drawbuf - -

dlangui.graphics.drawbuf

- -DLANGUI library. -

-This module contains drawing buffer implementation. -

- - -

-Synopsis:
-
import dlangui.graphics.drawbuf;
-
-
- -

-License:
-Boost License 1.0 -

-Authors:
-Vadim Lopatin, coolreader.org@gmail.com

- -
uint blendARGB(uint dst, uint src, uint alpha); -
-
blend two RGB pixels using alpha

- -
-
uint blendAlpha(uint a1, uint a2); -
-
blend two alpha values 0..255 (255 is fully transparent, 0 is opaque)

- -
-
ubyte blendGray(ubyte dst, ubyte src, uint alpha); -
-
blend two RGB pixels using alpha

- -
-
pure nothrow bool isFullyTransparentColor(uint color); -
-
returns true if color is #FFxxxxxx (color alpha is 255)

- -
-
struct NinePatch; -
-
9-patch image scaling information (see Android documentation). -

- -
Rect frame; -
-
frame (non-scalable) part size for left, top, right, bottom edges.

- -
-
Rect padding; -
-
padding (distance to content area) for left, top, right, bottom edges.

- -
-
-
-
abstract class DrawBuf: dlangui.core.types.RefCountedObject; -
-
drawing buffer - image container which allows to perform some drawing operations

- -
@property uint alpha(); -
-
get current alpha setting (to be applied to all drawing operations)

- -
-
@property void alpha(uint alpha); -
-
set new alpha setting (to be applied to all drawing operations)

- -
-
void addAlpha(uint alpha); -
-
apply additional transparency to current drawbuf alpha value

- -
-
uint applyAlpha(uint argb); -
-
applies current drawbuf alpha to argb color value

- -
-
@property uint id(); -
-
unique ID of drawbug instance, for using with hardware accelerated rendering for caching

- -
-
const @property const(NinePatch)* ninePatch(); -
-
get nine patch information pointer, null if this is not a nine patch image buffer

- -
-
@property void ninePatch(NinePatch* ninePatch); -
-
set nine patch information pointer, null if this is not a nine patch image buffer

- -
-
@property bool hasNinePatch(); -
-
check whether there is nine-patch information available for drawing buffer

- -
-
bool detectNinePatch(); -
-
override to detect nine patch using image 1-pixel border; returns true if 9-patch markup is found in image.

- -
-
@property int width(); -
-
returns current width

- -
-
@property int height(); -
-
returns current height

- -
-
@property ref Rect clipRect(); -
-
returns clipping rectangle, when clipRect.isEmpty == true -- means no clipping.

- -
-
@property Rect clipOrFullRect(); -
-
returns clipping rectangle, or (0,0,dx,dy) when no clipping.

- -
-
@property void clipRect(ref const Rect rect); -
-
sets new clipping rectangle, when clipRect.isEmpty == true -- means no clipping.

- -
-
@property void intersectClipRect(ref const Rect rect); -
-
sets new clipping rectangle, when clipRect.isEmpty == true -- means no clipping.

- -
-
bool applyClipping(ref Rect rc); -
-
apply clipRect and buffer bounds clipping to rectangle

- -
-
bool applyClipping(ref Rect rc, ref Rect rc2); -
-
apply clipRect and buffer bounds clipping to rectangle; if clippinup applied to first rectangle, reduce second rectangle bounds proportionally.

- -
-
void beforeDrawing(); -
-
reserved for hardware-accelerated drawing - begins drawing batch

- -
-
void afterDrawing(); -
-
reserved for hardware-accelerated drawing - ends drawing batch

- -
-
@property int bpp(); -
-
returns buffer bits per pixel

- -
-
abstract void resize(int width, int height); -
-
resize buffer

- -
-
abstract void fill(uint color); -
-
fill the whole buffer with solid color (no clipping applied)

- -
-
abstract void fillRect(Rect rc, uint color); -
-
fill rectangle with solid color (clipping is applied)

- -
-
abstract void drawGlyph(int x, int y, Glyph* glyph, uint color); -
-
draw 8bit alpha image - usually font glyph using specified color (clipping is applied)

- -
-
abstract void drawFragment(int x, int y, DrawBuf src, Rect srcrect); -
-
draw source buffer rectangle contents to destination buffer

- -
-
abstract void drawRescaled(Rect dstrect, DrawBuf src, Rect srcrect); -
-
draw source buffer rectangle contents to destination buffer rectangle applying rescaling

- -
-
void drawImage(int x, int y, DrawBuf src); -
-
draw unscaled image at specified coordinates

- -
-
void drawFrame(Rect rc, uint frameColor, Rect frameSideWidths, uint innerAreaColor = 4294967295u); -
-
draws rectangle frame of specified color and widths (per side), and optinally fills inner area

- -
-
DrawBuf transformColors(ref ColorTransform transform); -
-
create drawbuf with copy of current buffer with changed colors (returns this if not supported)

- -
-
-
-
struct ClipRectSaver; -
-
RAII setting/restoring of clip rectangle

- -
-
- -
Page generated by Ddoc. Vadim Lopatin, 2014 - - diff --git a/docs/editors.html b/docs/editors.html deleted file mode 100644 index 708d1ff4..00000000 --- a/docs/editors.html +++ /dev/null @@ -1,752 +0,0 @@ - - - dlangui.widgets.editors - -

dlangui.widgets.editors

- -DLANGUI library. -

-This module contains implementation of editors. -

- -

- -EditLine - single line editor. -

- -EditBox - multiline editor -

- - -

-Synopsis:
-
import dlangui.widgets.editors;
-
-
- -

-License:
-Boost License 1.0 -

-Authors:
-Vadim Lopatin, coolreader.org@gmail.com

- -
enum EditorActions: int; -
-
Editor action codes

- -
Left
-
move cursor one char left

- -
-
SelectLeft
-
move cursor one char left with selection

- -
-
Right
-
move cursor one char right

- -
-
SelectRight
-
move cursor one char right with selection

- -
-
Up
-
move cursor one line up

- -
-
SelectUp
-
move cursor one line up with selection

- -
-
Down
-
move cursor one line down

- -
-
SelectDown
-
move cursor one line down with selection

- -
-
WordLeft
-
move cursor one word left

- -
-
SelectWordLeft
-
move cursor one word left with selection

- -
-
WordRight
-
move cursor one word right

- -
-
SelectWordRight
-
move cursor one word right with selection

- -
-
PageUp
-
move cursor one page up

- -
-
SelectPageUp
-
move cursor one page up with selection

- -
-
PageDown
-
move cursor one page down

- -
-
SelectPageDown
-
move cursor one page down with selection

- -
-
PageBegin
-
move cursor to the beginning of page

- -
-
SelectPageBegin
-
move cursor to the beginning of page with selection

- -
-
PageEnd
-
move cursor to the end of page

- -
-
SelectPageEnd
-
move cursor to the end of page with selection

- -
-
LineBegin
-
move cursor to the beginning of line

- -
-
SelectLineBegin
-
move cursor to the beginning of line with selection

- -
-
LineEnd
-
move cursor to the end of line

- -
-
SelectLineEnd
-
move cursor to the end of line with selection

- -
-
DocumentBegin
-
move cursor to the beginning of document

- -
-
SelectDocumentBegin
-
move cursor to the beginning of document with selection

- -
-
DocumentEnd
-
move cursor to the end of document

- -
-
SelectDocumentEnd
-
move cursor to the end of document with selection

- -
-
DelPrevChar
-
delete char before cursor (backspace)

- -
-
DelNextChar
-
delete char after cursor (del key)

- -
-
DelPrevWord
-
delete word before cursor (ctrl + backspace)

- -
-
DelNextWord
-
delete char after cursor (ctrl + del key)

- -
-
InsertNewLine
-
insert new line (Enter)

- -
-
PrependNewLine
-
insert new line after current position (Ctrl+Enter)

- -
-
ToggleReplaceMode
-
Turn On/Off replace mode

- -
-
Copy
-
Copy selection to clipboard

- -
-
Cut
-
Cut selection to clipboard

- -
-
Paste
-
Paste selection from clipboard

- -
-
Undo
-
Undo last change

- -
-
Redo
-
Redo last undoed change

- -
-
Tab
-
Tab (e.g., Tab key to insert tab character or indent text)

- -
-
BackTab
-
Tab (unindent text, or remove whitespace before cursor, usually Shift+Tab)

- -
-
SelectAll
-
Select whole content (usually, Ctrl+A)

- -
-
ScrollLineUp
-
Scroll one line up (not changing cursor)

- -
-
ScrollLineDown
-
Scroll one line down (not changing cursor)

- -
-
ScrollPageUp
-
Scroll one page up (not changing cursor)

- -
-
ScrollPageDown
-
Scroll one page down (not changing cursor)

- -
-
ScrollLeft
-
Scroll window left

- -
-
ScrollRight
-
Scroll window right

- -
-
ZoomIn
-
Zoom in editor font

- -
-
ZoomOut
-
Zoom out editor font

- -
-
-
-
dstring[] splitDString(dstring source, dchar delimiter = EOL); -
-
split dstring by delimiters

- -
-
dstring concatDStrings(dstring[] lines, dstring delimiter = SYSTEM_DEFAULT_EOL); -
-
concat strings from array using delimiter

- -
-
dstring replaceEolsWithSpaces(dstring source); -
-
replace end of lines with spaces

- -
-
struct TextPosition; -
-
text content position

- -
int line; -
-
line number, zero based

- -
-
int pos; -
-
character position in line (0 == before first character)

- -
-
const int opCmp(ref const TextPosition v); -
-
compares two positions

- -
-
-
-
struct TextRange; -
-
text content range

- -
const @property bool empty(); -
-
returns true if range is empty

- -
-
const @property bool singleLine(); -
-
returns true if start and end located at the same line

- -
-
const @property int lines(); -
-
returns count of lines in range

- -
-
-
-
enum EditAction: int; -
-
action performed with editable contents

- -
Replace
-
insert content into specified position (range.start) - delete content in range - replace range content with new content

- -
-
-
-
class EditOperation; -
-
edit operation details for EditableContent

- -
@property EditAction action(); -
-
action performed

- -
-
@property ref TextRange range(); -
-
source range to replace with new content

- -
-
@property ref TextRange newRange(); -
-
new range after operation applied

- -
-
protected dstring[] _content; -
-
new content for range (if required for this action)

- -
-
protected dstring[] _oldContent; -
-
old content for range

- -
-
bool merge(EditOperation op); -
-
try to merge two operations (simple entering of characters in the same line), return true if succeded

- -
-
-
-
class UndoBuffer; -
-
Undo/Redo buffer

- -
@property bool hasUndo(); -
-
returns true if buffer contains any undo items

- -
-
@property bool hasRedo(); -
-
returns true if buffer contains any redo items

- -
-
void saveForUndo(EditOperation op); -
-
adds undo operation

- -
-
EditOperation undo(); -
-
returns operation to be undone (put it to redo), null if no undo ops available

- -
-
EditOperation redo(); -
-
returns operation to be redone (put it to undo), null if no undo ops available

- -
-
void clear(); -
-
clears both undo and redo buffers

- -
-
-
-
interface EditableContentListener; -
-
Editable Content change listener

- -
-
class EditableContent; -
-
editable plain text (singleline/multiline)

- -
Signal!EditableContentListener contentChangeListeners; -
-
listeners for edit operations

- -
-
@property bool multiline(); -
-
returns true if miltyline content is supported

- -
-
@property dstring text(); -
-
returns all lines concatenated delimited by '\n'

- -
-
@property EditableContent text(dstring newContent); -
-
replace whole text with another content

- -
-
@property int length(); -
-
returns line text

- -
-
dstring line(int index); -
-
returns line text by index, "" if index is out of bounds

- -
-
TextPosition lineEnd(int lineIndex); -
-
returns text position for end of line lineIndex

- -
-
TextPosition firstNonSpace(int lineIndex); -
-
returns position before first non-space character of line, returns 0 position if no non-space chars

- -
-
TextPosition lastNonSpace(int lineIndex); -
-
returns position after last non-space character of line, returns 0 position if no non-space chars on line

- -
-
int lineLength(int lineIndex); -
-
returns text position for end of line lineIndex

- -
-
int maxLineLength(); -
-
returns maximum length of line

- -
-
dstring[] rangeText(TextRange range); -
-
return text for specified range

- -
-
void correctPosition(ref TextPosition position); -
-
when position is out of content bounds, fix it to nearest valid position

- -
-
void correctRange(ref TextRange range); -
-
when range positions is out of content bounds, fix it to nearest valid position

- -
-
protected void removeLines(int start, int removedCount); -
-
removes removedCount lines starting from start

- -
-
protected void insertLines(int start, int count); -
-
inserts count empty lines at specified position

- -
-
protected void replaceRange(TextRange before, TextRange after, dstring[] newContent); -
-
inserts or removes lines, removes text in range

- -
-
TextPosition moveByWord(TextPosition p, int direction, bool camelCasePartsAsWords); -
-
change text position to nearest word bound (direction < 0 - back, > 0 - forward)

- -
-
bool performOperation(EditOperation op, Object source); -
-
edit content

- -
-
@property bool hasUndo(); -
-
return true if there is at least one operation in undo buffer

- -
-
@property bool hasRedo(); -
-
return true if there is at least one operation in redo buffer

- -
-
bool undo(); -
-
undoes last change

- -
-
bool redo(); -
-
redoes last undone change

- -
-
void clearUndo(); -
-
clear undo/redp history

- -
-
-
-
abstract class EditWidgetBase: dlangui.widgets.widget.WidgetGroup, dlangui.widgets.editors.EditableContentListener, dlangui.widgets.menu.MenuItemActionHandler; -
-
base for all editor widgets

- -
bool onMenuItemAction(const Action action); -
-


-
-
bool canShowPopupMenu(int x, int y); -
-
returns true if widget can show popup (e.g. by mouse right click at point x,y)

- -
-
bool isActionEnabled(const Action action); -
-
override to change popup menu items state

- -
-
void showPopupMenu(int x, int y); -
-
shows popup at (x,y)

- -
-
uint getCursorType(int x, int y); -
-
returns mouse cursor type for widget

- -
-
@property bool wantTabs(); -
-
when true, Tab / Shift+Tab presses are processed internally in widget (e.g. insert tab character) instead of focus change navigation.

- -
-
@property EditWidgetBase wantTabs(bool wantTabs); -
-
sets tab size (in number of spaces)

- -
-
@property bool readOnly(); -
-
readonly flag (when true, user cannot change content of editor)

- -
-
@property EditWidgetBase readOnly(bool readOnly); -
-
sets readonly flag

- -
-
@property bool replaceMode(); -
-
replace mode flag (when true, entered character replaces character under cursor)

- -
-
@property EditWidgetBase replaceMode(bool replaceMode); -
-
sets replace mode flag

- -
-
@property bool useSpacesForTabs(); -
-
when true, spaces will be inserted instead of tabs

- -
-
@property EditWidgetBase useSpacesForTabs(bool useSpacesForTabs); -
-
set new Tab key behavior flag: when true, spaces will be inserted instead of tabs

- -
-
@property int tabSize(); -
-
returns tab size (in number of spaces)

- -
-
@property EditWidgetBase tabSize(int newTabSize); -
-
sets tab size (in number of spaces)

- -
-
@property EditableContent content(); -
-
editor content object

- -
-
protected bool _ownContent; -
-
when ownContent is false, content should not be destroyed in editor destructor

- -
-
@property EditWidgetBase content(EditableContent content); -
-
set content object

- -
-
@property dstring text(); -
-
get widget text

- -
-
@property Widget text(dstring s); -
-
set text

- -
-
@property Widget text(UIString s); -
-
set text

- -
-
protected Rect caretRect(); -
-
returns cursor rectangle

- -
-
protected void drawCaret(DrawBuf buf); -
-
draws caret

- -
-
protected void updateScrollbars(); -
-
override to update scrollbars - if necessary

- -
-
protected void correctCaretPos(); -
-
when cursor position or selection is out of content bounds, fix it to nearest valid position

- -
-
protected dstring spacesForTab(int currentPos); -
-
generate string of spaces, to reach next tab position

- -
-
protected bool wholeLinesSelected(); -
-
returns true if one or more lines selected fully

- -
-
protected dstring indentLine(dstring src, bool back); -
-
change line indent

- -
-
protected void indentRange(bool back); -
-
indent / unindent range

- -
-
protected Action findKeyAction(uint keyCode, uint flags); -
-
map key to action

- -
-
bool onKeyEvent(KeyEvent event); -
-
handle keys

- -
-
bool onMouseEvent(MouseEvent event); -
-
process mouse event; return true if event is processed by widget.

- -
-
-
-
class EditLine: dlangui.widgets.editors.EditWidgetBase; -
-
single line editor

- -
void measure(int parentWidth, int parentHeight); -
-
measure

- -
-
bool onKeyEvent(KeyEvent event); -
-
handle keys

- -
-
bool onMouseEvent(MouseEvent event); -
-
process mouse event; return true if event is processed by widget.

- -
-
void layout(Rect rc); -
-
Set widget rectangle to specified value and layout widget contents. (Step 2 of two phase layout).

- -
-
protected void drawLineBackground(DrawBuf buf, Rect lineRect, Rect visibleRect); -
-
override to custom highlight of line background

- -
-
void onDraw(DrawBuf buf); -
-
draw content

- -
-
-
-
class EditBox: dlangui.widgets.editors.EditWidgetBase, dlangui.widgets.controls.OnScrollHandler; -
-
single line editor

- -
bool onScrollEvent(AbstractSlider source, ScrollEvent event); -
-
handle scroll event

- -
-
void measure(int parentWidth, int parentHeight); -
-
measure

- -
-
void layout(Rect rc); -
-
Set widget rectangle to specified value and layout widget contents. (Step 2 of two phase layout).

- -
-
protected void drawLineBackground(DrawBuf buf, int lineIndex, Rect lineRect, Rect visibleRect); -
-
override to custom highlight of line background

- -
-
void onDraw(DrawBuf buf); -
-
draw content

- -
-
-
-
- -
Page generated by Ddoc. Vadim Lopatin, 2014 - - diff --git a/docs/events.html b/docs/events.html deleted file mode 100644 index 4e34a858..00000000 --- a/docs/events.html +++ /dev/null @@ -1,154 +0,0 @@ - - - dlangui.core.events - -

dlangui.core.events

- -DLANGUI library. -

-This module contains dlangui event types declarations. -

- - -

-Synopsis:
-
import dlangui.core.events;
-
-
- -

-License:
-Boost License 1.0 -

-Authors:
-Vadim Lopatin, coolreader.org@gmail.com

- -
class Action; -
-
UI action

- -
this(int id, uint keyCode, uint keyFlags = 0); -
-
action with accelerator, w/o label

- -
-
this(int id, dstring label, string iconResourceId = null, uint keyCode = 0, uint keyFlags = 0); -
-
action with label, icon, and accelerator

- -
-
@property Accelerator[] accelerators(); -
-
returs array of accelerators

- -
-
@property dstring acceleratorText(); -
-
returns text description for first accelerator of action; null if no accelerators

- -
-
bool checkAccelerator(uint keyCode, uint keyFlags); -
-
returns true if accelerator matches provided key code and flags

- -
-
-
-
struct ButtonDetails; -
-
mouse button state details

- -
long _downTs; -
-
Clock.currStdTime() for down event of this button (0 if button is up).

- -
-
long _upTs; -
-
Clock.currStdTime() for up event of this button (0 if button is still down).

- -
-
short _downX; -
-
x coordinates of down event

- -
-
short _downY; -
-
y coordinates of down event

- -
-
ushort _downFlags; -
-
mouse button flags when down event occured

- -
-
void down(short x, short y, ushort flags); -
-
update for button down

- -
-
void up(short x, short y, ushort flags); -
-
update for button up

- -
-
@property int downDuration(); -
-
returns button down state duration in hnsecs (1/10000 of second).

- -
-
-
-
class KeyEvent; -
-
keyboard event

- -
@property KeyAction action(); -
-
key action (KeyDown, KeyUp, Text, Repeat)

- -
-
@property uint keyCode(); -
-
key code

- -
-
@property uint flags(); -
-
flags (shift, ctrl, alt...)

- -
-
@property dstring text(); -
-
entered text, for Text action

- -
-
this(KeyAction action, uint keyCode, uint flags, dstring text = null); -
-
create key event

- -
-
-
-
class ScrollEvent; -
-
slider/scrollbar event

- -
@property void position(int newPosition); -
-
change position in event handler to update slider position

- -
-
int defaultUpdatePosition(); -
-
default update position for actions like PageUp/PageDown, LineUp/LineDown

- -
-
-
-
- -
Page generated by Ddoc. Vadim Lopatin, 2014 - - diff --git a/docs/fonts.html b/docs/fonts.html deleted file mode 100644 index 507d4b9f..00000000 --- a/docs/fonts.html +++ /dev/null @@ -1,364 +0,0 @@ - - - dlangui.graphics.fonts - -

dlangui.graphics.fonts

- -DLANGUI library. -

-This module contains base fonts access interface and common implementation. -

- -Font - base class for fonts. -

- -FontManager - base class for font managers - provides access to available fonts. -

- -

- -Actual implementation is: -

- -dlangui.graphics.ftfonts - FreeType based font manager. -

- -dlangui.platforms.windows.w32fonts - Win32 API based font manager. -

- -

- -To enable OpenGL support, build with version(USE_OPENGL); - -

-See Also:
-dlangui.graphics.drawbuf, DrawBuf, drawbuf, drawbuf.html -

- -

- - -

-Synopsis:
-
import dlangui.graphics.fonts;
-
-// find suitable font of size 25, normal, preferrable Arial, or, if not available, any SansSerif font
-FontRef font = FontManager.instance.getFont(25, FontWeight.Normal, false, FontFamily.SansSerif, "Arial");
-
-dstring sampleText = "Sample text to draw"d;
-// measure text string width and height (one line)
-Point sz = font.textSize(sampleText);
-// draw red text at center of DrawBuf buf
-font.drawText(buf, buf.width / 2 - sz.x/2, buf.height / 2 - sz.y / 2, sampleText, 0xFF0000);
-
-
- -

-License:
-Boost License 1.0 -

-Authors:
-Vadim Lopatin, coolreader.org@gmail.com

- -
enum FontFamily: ubyte; -
-
font families enum

- -
Unspecified
-
Unknown / not set / does not matter

- -
-
SansSerif
-
Sans Serif font, e.g. Arial

- -
-
Serif
-
Serif font, e.g. Times New Roman

- -
-
Fantasy
-
Fantasy font

- -
-
Cursive
-
Cursive font

- -
-
MonoSpace
-
Monospace font (fixed pitch font), e.g. Courier New

- -
-
-
-
enum FontWeight: int; -
-
font weight constants (0..1000)

- -
Normal
-
normal font weight

- -
-
Bold
-
bold font

- -
-
-
-
@property void function(uint id) glyphDestroyCallback(); -
-
get glyph destroy callback (to cleanup OpenGL caches) -

-Used for resource management. Usually you don't have to call it manually.

- -
-
@property void glyphDestroyCallback(void function(uint id) callback); -
-
Set glyph destroy callback (to cleanup OpenGL caches) - This callback is used to tell OpenGL glyph cache that glyph is not more used - to let OpenGL glyph cache delete texture if all glyphs in it are no longer used. -

-Used for resource management. Usually you don't have to call it manually.

- -
-
uint nextGlyphId(); -
-
ID generator for glyphs -

-Generates next glyph ID. Unique IDs are being used to control OpenGL glyph cache items lifetime. -

- - Used for resource management. Usually you don't have to call it manually.

- -
-
immutable int MAX_WIDTH_UNSPECIFIED; -
-
constant for measureText maxWidth paramenter - to tell that all characters of text string should be measured.

- -
-
abstract class Font: dlangui.core.types.RefCountedObject; -
-
Instance of font with specific size, weight, face, etc. -

-Allows to measure text string and draw it on DrawBuf -

- - Use FontManager.instance.getFont() to retrieve font instance.

- -
abstract @property int size(); -
-
returns font size (as requested from font engine)

- -
-
abstract @property int height(); -
-
returns actual font height including interline space

- -
-
abstract @property int weight(); -
-
returns font weight

- -
-
abstract @property int baseline(); -
-
returns baseline offset

- -
-
abstract @property bool italic(); -
-
returns true if font is italic

- -
-
abstract @property string face(); -
-
returns font face name

- -
-
abstract @property FontFamily family(); -
-
returns font family

- -
-
abstract @property bool isNull(); -
-
returns true if font object is not yet initialized / loaded

- -
-
@property bool isFixed(); -
-
returns true if font has fixed pitch (all characters have equal width)

- -
-
@property int spaceWidth(); -
-
returns true if font is fixed

- -
-
int charWidth(dchar ch); -
-
returns character width

- -
-
int measureText(const dchar[] text, ref int[] widths, int maxWidth = MAX_WIDTH_UNSPECIFIED, int tabSize = 4, int tabOffset = 0, uint textFlags = 0); -
-
Measure text string, return accumulated widths[] (distance to end of n-th character), returns number of measured chars. -

-Supports Tab character processing and processing of menu item labels like '&File'. - -

-Params:
- - - - - - - - - - - - -
dchar[] texttext string to measure
int[] widthsoutput buffer to put measured widths (widths[i] will be set to cumulative widths text[0..i])
int maxWidthmaximum width to measure - measure is stopping if max width is reached (pass MAX_WIDTH_UNSPECIFIED to measure all characters)
int tabSizetabulation size, in number of spaces
int tabOffsetwhen string is drawn not from left position, use to move tab stops left/right
uint textFlagsTextFlag bit set - to control underline, hotkey label processing, etc...

-Returns:
-number of characters measured (may be less than text.length if maxWidth is reached)

- -
-
Point textSize(const dchar[] text, int maxWidth = MAX_WIDTH_UNSPECIFIED, int tabSize = 4, int tabOffset = 0, uint textFlags = 0); -
-
Measure text string as single line, returns width and height -

-Params:
- - - - - - - - - - -
dchar[] texttext string to measure
int maxWidthmaximum width - measure is stopping if max width is reached
int tabSizetabulation size, in number of spaces
int tabOffsetwhen string is drawn not from left position, use to move tab stops left/right
uint textFlagsTextFlag bit set - to control underline, hotkey label processing, etc...

- -
-
void drawText(DrawBuf buf, int x, int y, const dchar[] text, uint color, int tabSize = 4, int tabOffset = 0, uint textFlags = 0); -
-
Draw text string to buffer. -

-Params:
- - - - - - - - - - - - - - - - -
DrawBuf bufgraphics buffer to draw text to
int xx coordinate to draw first character at
int yy coordinate to draw first character at
dchar[] texttext string to draw
uint colorcolor for drawing of glyphs
int tabSizetabulation size, in number of spaces
int tabOffsetwhen string is drawn not from left position, use to move tab stops left/right
uint textFlagsset of TextFlag bit fields

- -
-
abstract Glyph* getCharGlyph(dchar ch, bool withImage = true); -
-
get character glyph information

- -
-
abstract void checkpoint(); -
-
clear usage flags for all entries

- -
-
abstract void cleanup(); -
-
removes entries not used after last call of checkpoint() or cleanup()

- -
-
-
-
struct FontList; -
-
font instance collection - utility class, for font manager implementations

- -
-
abstract class FontManager; -
-
Access points to fonts.

- -
static @property void instance(FontManager manager); -
-
sets new font manager singleton instance

- -
-
static @property FontManager instance(); -
-
returns font manager singleton instance

- -
-
abstract ref FontRef getFont(int size, int weight, bool italic, FontFamily family, string face); -
-
get font instance best matched specified parameters

- -
-
abstract void checkpoint(); -
-
clear usage flags for all entries -- for cleanup of unused fonts

- -
-
abstract void cleanup(); -
-
removes entries not used after last call of checkpoint() or cleanup()

- -
-
-
-
struct GlyphCache; -
-
Glyph image cache -

-Recently used glyphs are marked with glyph.lastUsage = 1 -

- - checkpoint() call clears usage marks -

- - cleanup() removes all items not accessed since last checkpoint()

- -
Glyph* find(dchar ch); -
-
try to find glyph for character in cache, returns null if not found

- -
-
Glyph* put(dchar ch, Glyph* glyph); -
-
put character glyph to cache

- -
-
void cleanup(); -
-
removes entries not used after last call of checkpoint() or cleanup()

- -
-
void checkpoint(); -
-
clear usage flags for all entries

- -
-
void clear(); -
-
removes all entries (when built with USE_OPENGL version, notify OpenGL cache about removed glyphs)

- -
-
-
-
- -
Page generated by Ddoc. Vadim Lopatin, 2014 - - diff --git a/docs/ftfonts.html b/docs/ftfonts.html deleted file mode 100644 index 968e5e21..00000000 --- a/docs/ftfonts.html +++ /dev/null @@ -1,90 +0,0 @@ - - - dlangui.graphics.ftfonts - -

dlangui.graphics.ftfonts

- -DLANGUI library. -

-This file contains FontManager implementation based on FreeType library. -

- -

- -

- - -

-License:
-Boost License 1.0 -

-Authors:
-Vadim Lopatin, coolreader.org@gmail.com

- -
class FreeTypeFont: dlangui.graphics.fonts.Font; -
-
Font implementation based on Win32 API system fonts.

- -
this(FontFileItem item, int size); -
-
need to call create() after construction to initialize font

- -
-
void clear(); -
-
cleanup resources

- -
-
bool findGlyph(dchar code, dchar def_char, ref FT_UInt index, ref FreeTypeFontFile file); -
-
find glyph index for character

- -
-
bool create(); -
-
load font files

- -
-
void checkpoint(); -
-
clear usage flags for all entries

- -
-
void cleanup(); -
-
removes entries not used after last call of checkpoint() or cleanup()

- -
-
-
-
class FreeTypeFontManager: dlangui.graphics.fonts.FontManager; -
-
FreeType based font manager.

- -
ref FontRef getFont(int size, int weight, bool italic, FontFamily family, string face); -
-
get font instance with specified parameters

- -
-
void checkpoint(); -
-
clear usage flags for all entries

- -
-
void cleanup(); -
-
removes entries not used after last call of checkpoint() or cleanup()

- -
-
bool registerFont(string filename, FontFamily family = FontFamily.SansSerif, string face = null, bool italic = false, int weight = 0); -
-
register freetype font by filename - optinally font properties can be passed if known (e.g. from libfontconfig).

- -
-
-
-
- -
Page generated by Ddoc. Vadim Lopatin, 2014 - - diff --git a/docs/gldrawbuf.html b/docs/gldrawbuf.html deleted file mode 100644 index eafa8fbe..00000000 --- a/docs/gldrawbuf.html +++ /dev/null @@ -1,133 +0,0 @@ - - - dlangui.graphics.gldrawbuf - -

dlangui.graphics.gldrawbuf

- -DLANGUI library. -

-This module contains opengl based drawing buffer implementation. -

- -To enable OpenGL support, build with version(USE_OPENGL); - -

-Synopsis:
-
import dlangui.graphics.gldrawbuf;
-
-
- -

-License:
-Boost License 1.0 -

-Authors:
-Vadim Lopatin, coolreader.org@gmail.com

- -
class GLDrawBuf: dlangui.graphics.drawbuf.DrawBuf; -
-
drawing buffer - image container which allows to perform some drawing operations

- -
@property Scene scene(); -
-
get current scene (exists only between beforeDrawing() and afterDrawing() calls)

- -
-
@property int width(); -
-
returns current width

- -
-
@property int height(); -
-
returns current height

- -
-
void beforeDrawing(); -
-
reserved for hardware-accelerated drawing - begins drawing batch

- -
-
void afterDrawing(); -
-
reserved for hardware-accelerated drawing - ends drawing batch

- -
-
void resize(int width, int height); -
-
resize buffer

- -
-
void fill(uint color); -
-
fill the whole buffer with solid color (no clipping applied)

- -
-
void fillRect(Rect rc, uint color); -
-
fill rectangle with solid color (clipping is applied)

- -
-
void drawGlyph(int x, int y, Glyph* glyph, uint color); -
-
draw 8bit alpha image - usually font glyph using specified color (clipping is applied)

- -
-
void drawFragment(int x, int y, DrawBuf src, Rect srcrect); -
-
draw source buffer rectangle contents to destination buffer

- -
-
void drawRescaled(Rect dstrect, DrawBuf src, Rect srcrect); -
-
draw source buffer rectangle contents to destination buffer rectangle applying rescaling

- -
-
void clear(); -
-
cleanup resources

- -
-
-
-
abstract class SceneItem; -
-
base class for all drawing scene items.

- -
-
class Scene; -
-
Drawing scene (operations sheduled for drawing)

- -
void add(SceneItem item); -
-
add new scene item to scene

- -
-
void draw(); -
-
draws all scene items and removes them from list

- -
-
void reset(); -
-
resets scene for new drawing - deletes all items

- -
-
-
-
void onObjectDestroyedCallback(uint pobject); -
-
object deletion listener callback function type

- -
-
void onGlyphDestroyedCallback(uint pobject); -
-
object deletion listener callback function type

- -
-
- -
Page generated by Ddoc. Vadim Lopatin, 2014 - - diff --git a/docs/glsupport.html b/docs/glsupport.html deleted file mode 100644 index a6257d3f..00000000 --- a/docs/glsupport.html +++ /dev/null @@ -1,51 +0,0 @@ - - - dlangui.graphics.glsupport - -

dlangui.graphics.glsupport

- -DLANGUI library. -

-This module contains OpenGL access layer. -

- -To enable OpenGL support, build with version(USE_OPENGL); - -

-Synopsis:
-
import dlangui.graphics.glsupport;
-
-
- -

-License:
-Boost License 1.0 -

-Authors:
-Vadim Lopatin, coolreader.org@gmail.com

- -
uint genTexture(); -
-
generate new texture ID

- -
-
void deleteTexture(ref uint textureId); -
-
delete OpenGL texture

- -
-
void flushGL(); -
-
call glFlush

- -
-
bool createFramebuffer(ref uint textureId, ref uint framebufferId, int dx, int dy); -
-
returns texture ID for buffer, 0 if failed

- -
-
- -
Page generated by Ddoc. Vadim Lopatin, 2014 - - diff --git a/docs/i18n.html b/docs/i18n.html deleted file mode 100644 index 02712a80..00000000 --- a/docs/i18n.html +++ /dev/null @@ -1,122 +0,0 @@ - - - dlangui.core.i18n - -

dlangui.core.i18n

- -DLANGUI library. -

-This module contains internationalization support implementation. -

- -Translation files contain of simple key=value pair lines. -

- -STRING_RESOURCE_ID=Translation text. -

- -Supports fallback to another translation file (e.g. default language). -

- -

- - -

-Synopsis:
-
import dlangui.core.i18n;
-
-// use global i18n object to get translation for string ID
-dstring translated = i18n.get("STR_FILE_OPEN");
-
-// UIString type can hold either string resource id or dstring raw value.
-UIString text;
-
-// assign resource id as string
-text = "ID_FILE_EXIT";
-// or assign raw value as dstring
-text = "some text"d;
-
-// i18n.get() will automatically be invoked when getting UIString value (e.g. using alias this).
-dstring translated = text;
-
-
- -

-License:
-Boost License 1.0 -

-Authors:
-Vadim Lopatin, coolreader.org@gmail.com

- -
struct UIString; -
-
container for UI string - either raw value or string resource ID

- -
this(string id); -
-
create string with i18n resource id

- -
-
this(dstring value); -
-
create string with raw value

- -
-
const @property dstring value(); -
-
get value (either raw or translated by id)

- -
-
@property void value(dstring newValue); -
-
set raw value

- -
-
ref UIString opAssign(dstring rawValue); -
-
assign raw value

- -
-
ref UIString opAssign(string ID); -
-
assign ID

- -
-
-
-
class UIStringList; -
-
UI string translator

- -
void clear(); -
-
remove all items

- -
-
void set(string id, dstring value); -
-
set item value

- -
-
const dstring get(string id); -
-
get item value, null if translation is not found for id

- -
-
bool load(std.stream.InputStream stream); -
-
load strings from stream

- -
-
bool load(string filename); -
-
load strings from file (utf8, id=value lines)

- -
-
-
-
- -
Page generated by Ddoc. Vadim Lopatin, 2014 - - diff --git a/docs/images.html b/docs/images.html deleted file mode 100644 index e0f28ea3..00000000 --- a/docs/images.html +++ /dev/null @@ -1,44 +0,0 @@ - - - dlangui.graphics.images - -

dlangui.graphics.images

- -DLANGUI library. -

-This module contains image loading functions. -

- -Currently uses FreeImage. -

- -Usage of libpng is not feasible under linux due to conflicts of library and binding versions. - -

-Synopsis:
-
import dlangui.graphics.images;
-
-
- -

-License:
-Boost License 1.0 -

-Authors:
-Vadim Lopatin, coolreader.org@gmail.com

- -
ColorDrawBuf loadImage(string filename); -
-
load and decode image from file to ColorDrawBuf, returns null if loading or decoding is failed

- -
-
ColorDrawBuf loadImage(InputStream stream); -
-
load and decode image from stream to ColorDrawBuf, returns null if loading or decoding is failed

- -
-
- -
Page generated by Ddoc. Vadim Lopatin, 2014 - - diff --git a/docs/layouts.html b/docs/layouts.html deleted file mode 100644 index 4353db1d..00000000 --- a/docs/layouts.html +++ /dev/null @@ -1,124 +0,0 @@ - - - dlangui.widgets.layouts - -

dlangui.widgets.layouts

- -DLANGUI library. -

-This module contains common layouts implementations. -

- -Layouts are similar to the same in Android. -

- -LinearLayout - either VerticalLayout or HorizontalLayout. -VerticalLayout - just LinearLayout with orientation=Orientation.Vertical -HorizontalLayout - just LinearLayout with orientation=Orientation.Vertical -FrameLayout - children occupy the same place, usually one one is visible at a time -TableLayout - children aligned into rows and columns -

- - -

-Synopsis:
-
import dlangui.widgets.layouts;
-
-
- -

-License:
-Boost License 1.0 -

-Authors:
-Vadim Lopatin, coolreader.org@gmail.com

- -
struct LayoutItem; -
-
helper for layouts

- -
void set(Widget widget, Orientation orientation); -
-
sets item for widget

- -
-
void measure(int parentWidth, int parentHeight); -
-
set item and measure it

- -
-
-
-
class LayoutItems; -
-
helper class for layouts

- -
Point measure(int parentWidth, int parentHeight); -
-
fill widget layout list with Visible or Invisible items, measure them

- -
-
void setWidgets(ref WidgetList widgets); -
-
fill widget layout list with Visible or Invisible items, measure them

- -
-
-
-
class FrameLayout: dlangui.widgets.widget.WidgetGroup; -
-
place all children into same place (usually, only one child should be visible at a time)

- -
void measure(int parentWidth, int parentHeight); -
-
Measure widget according to desired width and height constraints. (Step 1 of two phase layout).

- -
-
void layout(Rect rc); -
-
Set widget rectangle to specified value and layout widget contents. (Step 2 of two phase layout).

- -
-
void onDraw(DrawBuf buf); -
-
Draw widget at its position to buffer

- -
-
bool showChild(string ID, Visibility otherChildrenVisibility = Visibility.Invisible, bool updateFocus = false); -
-
make one of children (with specified ID) visible, for the rest, set visibility to otherChildrenVisibility

- -
-
-
-
class TableLayout: dlangui.widgets.widget.WidgetGroup; -
-
layout children as table with rows and columns

- -
@property int colCount(); -
-
number of columns

- -
-
void measure(int parentWidth, int parentHeight); -
-
Measure widget according to desired width and height constraints. (Step 1 of two phase layout).

- -
-
void layout(Rect rc); -
-
Set widget rectangle to specified value and layout widget contents. (Step 2 of two phase layout).

- -
-
void onDraw(DrawBuf buf); -
-
Draw widget at its position to buffer

- -
-
-
-
- -
Page generated by Ddoc. Vadim Lopatin, 2014 - - diff --git a/docs/linestream.html b/docs/linestream.html deleted file mode 100644 index 20a1b035..00000000 --- a/docs/linestream.html +++ /dev/null @@ -1,62 +0,0 @@ - - - dlangui.core.linestream - -

dlangui.core.linestream

- -DLANGUI library. -

-This module contains text file reader implementation. -

- -Support utf8, utf16, utf32 be and le encodings, and line endings - according to D language source file specification. -

- -Low resource consuming. Doesn't flood with GC allocations. Dup line if you want to store it somewhere. -

- -Tracks line number. -

- - -

-Synopsis:
-
import dlangui.core.linestream;
-
-import std.stdio;
-import std.conv;
-import std.utf;
-string fname = "somefile.d";
-writeln("opening file");
-std.stream.File f = new std.stream.File(fname);
-scope(exit) { f.close(); }
-try {
-	LineStream lines = LineStream.create(f, fname);
-	for (;;) {
-		dchar[] s = lines.readLine();
-		if (s is null)
-			break;
-		writeln("line " ~ to!string(lines.line()) ~ ":" ~ toUTF8(s));
-	}
-	if (lines.errorCode != 0) {
-		writeln("Error ", lines.errorCode, " ", lines.errorMessage, " -- at line ", lines.errorLine, " position ", lines.errorPos);
-	} else {
-		writeln("EOF reached");
-	}
-} catch (Exception e) {
-	writeln("Exception " ~ e.toString);
-}
-
-
- -

-License:
-Boost License 1.0 -

-Authors:
-Vadim Lopatin, coolreader.org@gmail.com

- - -
Page generated by Ddoc. Vadim Lopatin, 2014 - - diff --git a/docs/lists.html b/docs/lists.html deleted file mode 100644 index 14ba22cd..00000000 --- a/docs/lists.html +++ /dev/null @@ -1,279 +0,0 @@ - - - dlangui.widgets.lists - -

dlangui.widgets.lists

- -DLANGUI library. -

-This module contains list widgets implementation. -

- -Similar to lists implementation in Android UI API. - -

-Synopsis:
-
import dlangui.widgets.lists;
-
-
- -

-License:
-Boost License 1.0 -

-Authors:
-Vadim Lopatin, coolreader.org@gmail.com

- -
interface ListAdapter; -
-
list widget adapter provides items for list widgets

- -
abstract @property int itemCount(); -
-
returns number of widgets in list

- -
-
abstract Widget itemWidget(int index); -
-
return list item widget by item index

- -
-
abstract uint itemState(int index); -
-
return list item's state flags

- -
-
abstract uint setItemState(int index, uint flags); -
-
set one or more list item's state flags, returns updated state

- -
-
abstract uint resetItemState(int index, uint flags); -
-
reset one or more list item's state flags, returns updated state

- -
-
-
-
class WidgetListAdapter: dlangui.widgets.lists.ListAdapter; -
-
List adapter for simple list of widget instances

- -
@property ref WidgetList widgets(); -
-
list of widgets to display

- -
-
@property int itemCount(); -
-
returns number of widgets in list

- -
-
Widget itemWidget(int index); -
-
return list item widget by item index

- -
-
uint itemState(int index); -
-
return list item's state flags

- -
-
uint setItemState(int index, uint flags); -
-
set one or more list item's state flags, returns updated state

- -
-
uint resetItemState(int index, uint flags); -
-
reset one or more list item's state flags, returns updated state

- -
-
-
-
class ListWidget: dlangui.widgets.widget.WidgetGroup, dlangui.widgets.controls.OnScrollHandler; -
-
List

- -
@property Orientation orientation(); -
-
returns linear layout orientation (Vertical, Horizontal)

- -
-
@property ListWidget orientation(Orientation value); -
-
sets linear layout orientation

- -
-
protected int _firstVisibleItem; -
-
first visible item index

- -
-
protected int _scrollPosition; -
-
scroll position - offset of scroll area

- -
-
protected int _maxScrollPosition; -
-
maximum scroll position

- -
-
protected Rect _clientRc; -
-
client area rectangle (counting padding, margins, and scrollbar)

- -
-
protected int _totalSize; -
-
total height of all items for Vertical orientation, or width for Horizontal

- -
-
protected int _hoverItemIndex; -
-
item with Hover state, -1 if no such item

- -
-
protected int _selectedItemIndex; -
-
item with Selected state, -1 if no such item

- -
-
protected bool _selectOnHover; -
-
when true, mouse hover selects underlying item

- -
-
@property bool selectOnHover(); -
-
when true, mouse hover selects underlying item

- -
-
@property ListWidget selectOnHover(bool select); -
-
when true, mouse hover selects underlying item

- -
-
protected bool _clickOnButtonDown; -
-
if true, generate itemClicked on mouse down instead mouse up event

- -
-
Rect itemRectNoScroll(int index); -
-
returns rectangle for item (not scrolled, first item starts at 0,0)

- -
-
Rect itemRect(int index); -
-
returns rectangle for item (scrolled)

- -
-
int itemByPosition(int pos); -
-
returns item index by 0-based offset from top/left of list content

- -
-
protected bool _ownAdapter; -
-
when true, need to destroy adapter on list destroy

- -
-
@property ListAdapter adapter(); -
-
get adapter

- -
-
@property ListWidget adapter(ListAdapter adapter); -
-
set adapter

- -
-
@property ListWidget ownAdapter(ListAdapter adapter); -
-
set adapter, which will be owned by list (destroy will be called for adapter on widget destroy)

- -
-
@property int itemCount(); -
-
returns number of widgets in list

- -
-
Widget itemWidget(int index); -
-
return list item widget by item index

- -
-
bool itemEnabled(int index); -
-
returns true if item with corresponding index is enabled

- -
-
protected void selectionChanged(int index, int previouslySelectedItem = -1); -
-
override to handle change of selection

- -
-
protected void itemClicked(int index); -
-
override to handle mouse up on item

- -
-
protected void handleFocusChange(bool focused); -
-
override to handle focus changes

- -
-
void makeSelectionVisible(); -
-
ensure selected item is visible (scroll if necessary)

- -
-
void makeItemVisible(int itemIndex); -
-
ensure item is visible

- -
-
bool moveSelection(int direction, bool wrapAround = true); -
-
move selection

- -
-
bool onScrollEvent(AbstractSlider source, ScrollEvent event); -
-
handle scroll event

- -
-
void measure(int parentWidth, int parentHeight); -
-
Measure widget according to desired width and height constraints. (Step 1 of two phase layout).

- -
-
void layout(Rect rc); -
-
Set widget rectangle to specified value and layout widget contents. (Step 2 of two phase layout).

- -
-
void onDraw(DrawBuf buf); -
-
Draw widget at its position to buffer

- -
-
bool onKeyEvent(KeyEvent event); -
-
list navigation using keys

- -
-
bool onMouseEvent(MouseEvent event); -
-
process mouse event; return true if event is processed by widget.

- -
-
-
-
- -
Page generated by Ddoc. Vadim Lopatin, 2014 - - diff --git a/docs/logger.html b/docs/logger.html deleted file mode 100644 index 94a37ead..00000000 --- a/docs/logger.html +++ /dev/null @@ -1,40 +0,0 @@ - - - dlangui.core.logger - -

dlangui.core.logger

- -DLANGUI library. -

-This module contains logger implementation. -

- -

- - -

-Synopsis:
-
import dlangui.core.logger;
-
-// use stderror for logging
-setStderrLogger();
-// set log level
-setLogLevel(LogLeve.Debug);
-// log debug message
-Log.d("mouse clicked at ", x, ",", y);
-// log error message
-Log.d("exception while reading file", e);
-
-
- -

-License:
-Boost License 1.0 -

-Authors:
-Vadim Lopatin, coolreader.org@gmail.com

- - -
Page generated by Ddoc. Vadim Lopatin, 2014 - - diff --git a/docs/menu.html b/docs/menu.html deleted file mode 100644 index e37b2f8f..00000000 --- a/docs/menu.html +++ /dev/null @@ -1,303 +0,0 @@ - - - dlangui.widgets.menu - -

dlangui.widgets.menu

- -DLANGUI library. -

-This module contains menu widgets implementation. -

- -MenuItem - menu item properties container - to hold hierarchy of menu. -MainMenu - main menu widget -PopupMenu - popup menu widget - -

-Synopsis:
-
import dlangui.widgets.popup;
-
-
- -

-License:
-Boost License 1.0 -

-Authors:
-Vadim Lopatin, coolreader.org@gmail.com

- -
enum MenuItemType: int; -
-
menu item type

- -
Normal
-
normal menu item

- -
-
Check
-
menu item - checkbox

- -
-
Radio
-
menu item - radio button

- -
-
Separator
-
menu separator (horizontal line)

- -
-
Submenu
-
submenu - contains child items

- -
-
-
-
interface MenuItemClickHandler; -
-
interface to handle menu item click

- -
-
interface MenuItemActionHandler; -
-
interface to handle menu item action

- -
-
class MenuItem; -
-
menu item properties

- -
Signal!MenuItemClickHandler onMenuItemClick; -
-
handle menu item click (parameter is MenuItem)

- -
-
Signal!MenuItemActionHandler onMenuItemAction; -
-
handle menu item click action (parameter is Action)

- -
-
@property int id(); -
-
item action id, 0 if no action

- -
-
@property int subitemCount(); -
-
returns count of submenu items

- -
-
@property int subitemIndex(MenuItem item); -
-
returns subitem index for item, -1 if item is not direct subitem of this

- -
-
MenuItem subitem(int index); -
-
returns submenu item by index

- -
-
@property MenuItem type(MenuItemType type); -
-
set new MenuItemType

- -
-
@property bool checked(); -
-
get check for checkbox or radio button item

- -
-
protected void checkRadioButton(int index); -
-
check radio button with specified index, uncheck other radio buttons in group (group consists of sequence of radio button items; other item type - end of group)

- -
-
@property MenuItem checked(bool flg); -
-
set check for checkbox or radio button item

- -
-
dchar getHotkey(); -
-
get hotkey character from label (e.g. 'F' for item labeled "&File"), 0 if no hotkey

- -
-
int findSubitemByHotkey(dchar ch); -
-
find subitem by hotkey character, returns subitem index, -1 if not found

- -
-
MenuItem add(MenuItem subitem); -
-
adds submenu item

- -
-
MenuItem add(Action subitemAction); -
-
adds submenu item from action

- -
-
@property dstring acceleratorText(); -
-
returns text description for first accelerator of action; null if no accelerators

- -
-
@property bool isSubmenu(); -
-
returns true if item is submenu (contains subitems)

- -
-
@property UIString label(); -
-
returns item label

- -
-
const @property const(Action) action(); -
-
returns item action

- -
-
@property MenuItem action(Action a); -
-
sets item action

- -
-
@property bool enabled(); -
-
menu item Enabled flag

- -
-
@property MenuItem enabled(bool enabled); -
-
menu item Enabled flag

- -
-
Signal!(void, MenuItem) onMenuItem; -
-
handle menu item click

- -
-
Signal!(bool, MenuItem) onBeforeOpeningSubmenu; -
-
prepare for opening of submenu, return true if opening is allowed

- -
-
-
-
class MenuItemWidget: dlangui.widgets.widget.WidgetGroup; -
-
widget to draw menu item

- -
void measure(int parentWidth, int parentHeight); -
-
Measure widget according to desired width and height constraints. (Step 1 of two phase layout).

- -
-
void layout(Rect rc); -
-
Set widget rectangle to specified value and layout widget contents. (Step 2 of two phase layout).

- -
-
void onDraw(DrawBuf buf); -
-
Draw widget at its position to buffer

- -
-
-
-
class MenuWidgetBase: dlangui.widgets.lists.ListWidget; -
-
base class for menus

- -
Signal!MenuItemClickHandler onMenuItemClickListener; -
-
menu item click listener

- -
-
Signal!MenuItemActionHandler onMenuItemActionListener; -
-
menu item action listener

- -
-
void measure(int parentWidth, int parentHeight); -
-
Measure widget according to desired width and height constraints. (Step 1 of two phase layout).

- -
-
protected void selectionChanged(int index, int previouslySelectedItem = -1); -
-
override to handle change of selection

- -
-
protected void itemClicked(int index); -
-
override to handle mouse up on item

- -
-
@property PopupWidget thisPopup(); -
-
returns popup this menu is located in

- -
-
bool onKeyEvent(KeyEvent event); -
-
list navigation using keys

- -
-
-
-
class MainMenu: dlangui.widgets.menu.MenuWidgetBase; -
-
main menu (horizontal)

- -
@property bool wantsKeyTracking(); -
-
override and return true to track key events even when not focused

- -
-
@property uint textFlags(); -
-
get text flags (bit set of TextFlag enum values)

- -
-
@property bool activated(); -
-
return true if main menu is activated (focused or has open submenu)

- -
-
void activate(); -
-
bring focus to main menu, if not yet activated

- -
-
void deactivate(bool force = false); -
-
close and remove focus, if activated

- -
-
bool toggle(); -
-
activate or deactivate main menu, return true if it has been activated

- -
-
protected void handleFocusChange(bool focused); -
-
override to handle focus changes

- -
-
bool onKeyEvent(KeyEvent event); -
-
list navigation using keys

- -
-
-
-
class PopupMenu: dlangui.widgets.menu.MenuWidgetBase; -
-
popup menu widget (vertical layout of items)

- -
-
- -
Page generated by Ddoc. Vadim Lopatin, 2014 - - diff --git a/docs/platform.html b/docs/platform.html deleted file mode 100644 index b010d21b..00000000 --- a/docs/platform.html +++ /dev/null @@ -1,252 +0,0 @@ - - - dlangui.platforms.common.platform - -

dlangui.platforms.common.platform

- -DLANGUI library. -

-This module contains common Plaform definitions. -

- -Platform is abstraction layer for application. -

- - -

-Synopsis:
-
import dlangui.platforms.common.platform;
-
-
- -

-License:
-Boost License 1.0 -

-Authors:
-Vadim Lopatin, coolreader.org@gmail.com

- -
enum WindowFlag: uint; -
-
window creation flags

- -
Resizable
-
window can be resized

- -
-
Fullscreen
-
window should be shown in fullscreen mode

- -
-
Modal
-
modal window - grabs input focus

- -
-
-
-
abstract class Window; -
-
Window abstraction layer. Widgets can be shown only inside window. -

- -
abstract @property dstring windowCaption(); -
-
returns window caption

- -
-
abstract @property void windowCaption(dstring caption); -
-
sets window caption

- -
-
void requestLayout(); -
-
requests layout for main widget and popups

- -
-
PopupWidget showPopup(Widget content, Widget anchor = null, uint alignment = PopupAlign.Center, int x = 0, int y = 0); -
-
show new popup

- -
-
bool removePopup(PopupWidget popup); -
-
remove popup

- -
-
bool isChild(Widget w); -
-
returns true if widget is child of either main widget or one of popups

- -
-
void scheduleAnimation(); -
-
after drawing, call to schedule redraw if animation is active

- -
-
@property Widget focusedWidget(); -
-
returns current focused widget

- -
-
Widget setFocus(Widget newFocus); -
-
change focus to widget

- -
-
bool dispatchKeyEvent(KeyEvent event); -
-
dispatch keyboard event

- -
-
protected Widget[] _mouseTrackingWidgets; -
-
widget which tracks Move events

- -
-
protected Widget _mouseCaptureWidget; -
-
widget which tracks all events after processed ButtonDown

- -
-
protected bool _mouseCaptureFocusedOutTrackMovements; -
-
does current capture widget want to receive move events even if pointer left it

- -
-
bool dispatchMouseEvent(MouseEvent event); -
-
dispatch mouse event to window content widgets

- -
-
protected void checkUpdateNeeded(Widget root, ref bool needDraw, ref bool needLayout, ref bool animationActive); -
-
checks content widgets for necessary redraw and/or layout

- -
-
protected void setCursorType(uint cursorType); -
-
sets cursor type for window

- -
-
bool checkUpdateNeeded(ref bool needDraw, ref bool needLayout, ref bool animationActive); -
-
checks content widgets for necessary redraw and/or layout

- -
-
void update(bool force = false); -
-
requests update for window (unless force is true, update will be performed only if layout, redraw or animation is required).

- -
-
abstract void invalidate(); -
-
request window redraw

- -
-
abstract void close(); -
-
close window

- -
-
-
-
abstract class Platform; -
-
Platform abstraction layer. -

-Represents application.

- -
abstract Window createWindow(dstring windowCaption, Window parent, uint flags = WindowFlag.Resizable); -
-
create window -

-Args:
-windowCaption = window caption text - parent = parent Window, or null if no parent - flags = WindowFlag bit set, combination of Resizable, Modal, Fullscreen -

- - Window w/o Resizable nor Fullscreen will be created with size based on measurement of its content widget

- -
-
abstract void closeWindow(Window w); -
-
close window -

-Closes window earlier created with createWindow()

- -
-
abstract int enterMessageLoop(); -
-
Starts application message loop. -

-When returned from this method, application is shutting down.

- -
-
abstract dstring getClipboardText(bool mouseBuffer = false); -
-
retrieves text from clipboard (when mouseBuffer == true, use mouse selection clipboard - under linux)

- -
-
abstract void setClipboardText(dstring text, bool mouseBuffer = false); -
-
sets text to clipboard (when mouseBuffer == true, use mouse selection clipboard - under linux)

- -
-
abstract void requestLayout(); -
-
calls request layout for all windows

- -
-
@property string uiLanguage(); -
-
returns currently selected UI language code

- -
-
@property Platform uiLanguage(string langCode); -
-
set UI language (e.g. "en", "fr", "ru") - will relayout content of all windows if language has been changed

- -
-
@property Platform uiTheme(string themeResourceId); -
-
sets application UI theme - will relayout content of all windows if theme has been changed

- -
-
@property string[] resourceDirs(); -
-
returns list of resource directories

- -
-
@property Platform resourceDirs(string[] dirs); -
-
set list of directories to load resources from

- -
-
-
-
@property Platform platform(); -
-
get current platform object instance

- -
-
@property bool openglEnabled(); -
-
check if hardware acceleration is enabled

- -
-
void setOpenglEnabled(); -
-
call on app initialization if OpenGL support is detected

- -
-
template APP_ENTRY_POINT()
-
put "mixin APP_ENTRY_POINT;" to main module of your dlangui based app

- -
-
- -
Page generated by Ddoc. Vadim Lopatin, 2014 - - diff --git a/docs/popup.html b/docs/popup.html deleted file mode 100644 index de697f9b..00000000 --- a/docs/popup.html +++ /dev/null @@ -1,132 +0,0 @@ - - - dlangui.widgets.popup - -

dlangui.widgets.popup

- -DLANGUI library. -

-This module contains popup widgets implementation. -

- -Popups appear above other widgets inside window. -

- -Useful for popup menus, notification popups, etc. - -

-Synopsis:
-
import dlangui.widgets.popup;
-
-
- -

-License:
-Boost License 1.0 -

-Authors:
-Vadim Lopatin, coolreader.org@gmail.com

- -
enum PopupAlign: uint; -
-
popup alignment option flags

- -
Center
-
center popup around anchor widget center

- -
-
Below
-
place popup below anchor widget close to lower bound

- -
-
Right
-
place popup below anchor widget close to right bound (when no space enough, align near left bound)

- -
-
Point
-
align to specified point

- -
-
-
-
enum PopupFlags: uint; -
-
popup behavior flags - for PopupWidget.flags property

- -
CloseOnClickOutside
-
close popup when mouse button clicked outside of its bounds

- -
-
-
-
class PopupWidget: dlangui.widgets.layouts.LinearLayout; -
-
popup widget container

- -
@property void delegate(PopupWidget popup) onPopupCloseListener(); -
-
popup close listener (called right before closing)

- -
-
@property PopupWidget onPopupCloseListener(void delegate(PopupWidget popup) listener); -
-
set popup close listener (to call right before closing)

- -
-
@property uint flags(); -
-
returns popup behavior flags (combination of PopupFlags)

- -
-
@property PopupWidget flags(uint flags); -
-
set popup behavior flags (combination of PopupFlags)

- -
-
@property ref PopupAnchor anchor(); -
-
access to popup anchor

- -
-
bool modal(); -
-
returns true if popup is modal

- -
-
PopupWidget modal(bool modal); -
-
set modality flag

- -
-
void measure(int parentWidth, int parentHeight); -
-
Measure widget according to desired width and height constraints. (Step 1 of two phase layout).

- -
-
void close(); -
-
close and destroy popup

- -
-
void onClose(); -
-
just call on close listener

- -
-
void layout(Rect rc); -
-
Set widget rectangle to specified value and layout widget contents. (Step 2 of two phase layout).

- -
-
bool onMouseEventOutside(MouseEvent event); -
-
called for mouse activity outside shown popup bounds

- -
-
-
-
- -
Page generated by Ddoc. Vadim Lopatin, 2014 - - diff --git a/docs/resources.html b/docs/resources.html deleted file mode 100644 index 614fb3ba..00000000 --- a/docs/resources.html +++ /dev/null @@ -1,127 +0,0 @@ - - - dlangui.graphics.resources - -

dlangui.graphics.resources

- -DLANGUI library. -

-This module contains resource management and drawables implementation. -

- -imageCache is RAM cache of decoded images (as DrawBuf). -

- -drawableCache is cache of Drawables. -

- -Supports nine-patch PNG images in .9.png files (like in Android). -

- -Supports state drawables using XML files similar to ones in Android. - -

-Synopsis:
-
import dlangui.graphics.resources;
-
-
- -

-License:
-Boost License 1.0 -

-Authors:
-Vadim Lopatin, coolreader.org@gmail.com

- -
class FrameDrawable: dlangui.graphics.resources.Drawable; -
-
solid borders (may be of different width) and, optionally, solid inner area

- -
-
static uint decodeHexColor(string s); -
-
decode color string #AARRGGBB, e.g. #5599AA

- -
-
static uint decodeDimension(string s); -
-
decode size string, e.g. 1px or 2 or 3pt

- -
-
static Drawable createColorDrawable(string s); -
-
decode solid color / gradient / frame drawable from string like #AARRGGBB, e.g. #5599AA - -

-SolidFillDrawable:
-#AARRGGBB - e.g. #8090A0 or #80ffffff -

-FrameDrawable:
-#frameColor,frameWidth[,#middleColor] - or #frameColor,leftBorderWidth,topBorderWidth,rightBorderWidth,bottomBorderWidth[,#middleColor] - e.g. #000000,2,#C0FFFFFF - black frame of width 2 with 75% transparent white middle - e.g. #0000FF,2,3,4,5,#FFFFFF - blue frame with left,top,right,bottom borders of width 2,3,4,5 and white inner area

- -
-
void extractStateFlags(ref string[string] attr, ref uint stateMask, ref uint stateValue); -
-
converts XML attribute name to State (see http://developer.android.com/guide/topics/resources/drawable-resource.html#StateList)

- -
-
class StateDrawable: dlangui.graphics.resources.Drawable; -
-
Drawable which is drawn depending on state (see http://developer.android.com/guide/topics/resources/drawable-resource.html#StateList)

- -
bool parseList4(T)(string value, ref T[4] items); -
-
parse 4 comma delimited integers

- -
-
bool load(string filename); -
-
load from XML file

- -
-
-
-
class ImageCache; -
-
decoded raster images cache (png, jpeg) -- access by filenames

- -
ref DrawBufRef get(string filename); -
-
get and cache image

- -
-
ref DrawBufRef get(string filename, ref ColorTransform transform); -
-
get and cache color transformed image

- -
-
-
-
@property ImageCache imageCache(); -
-
image cache singleton

- -
-
@property void imageCache(ImageCache cache); -
-
image cache singleton

- -
-
@property DrawableCache drawableCache(); -
-
drawable cache singleton

- -
-
@property void drawableCache(DrawableCache cache); -
-
drawable cache singleton

- -
-
- -
Page generated by Ddoc. Vadim Lopatin, 2014 - - diff --git a/docs/sdlapp.html b/docs/sdlapp.html deleted file mode 100644 index bf41162a..00000000 --- a/docs/sdlapp.html +++ /dev/null @@ -1,29 +0,0 @@ - - - src.dlangui.platforms.sdl.sdlapp - -

src.dlangui.platforms.sdl.sdlapp

- -DLANGUI library. -

-This module contains implementation of SDL2 based backend for dlang library. -

- - -

-Synopsis:
-
import dlangui.platforms.sdl.sdlapp;
-
-
- -

-License:
-Boost License 1.0 -

-Authors:
-Vadim Lopatin, coolreader.org@gmail.com

- - -
Page generated by Ddoc. Vadim Lopatin, 2014 - - diff --git a/docs/signals.html b/docs/signals.html deleted file mode 100644 index ae2118b8..00000000 --- a/docs/signals.html +++ /dev/null @@ -1,236 +0,0 @@ - - - dlangui.core.signals - -

dlangui.core.signals

- -DLANGUI library. -

-This module contains definition of signals / listeners. -

- -Similar to std.signals. -

- -Unlike std.signals, supports any types of delegates, and as well interfaces with single method. -

- -Unlike std.signals, can support return types for slots. - -

-Caution:
-unlike std.signals, does not disconnect signal from slots belonging to destroyed objects. -

- -Listener here stand for holder of single delegate (slot). -Signal is the same but supports multiple slots. -

- -Can be declared either using list of result value and argument types, or by interface name with single method. -

- - -

-Synopsis:
-
import dlangui.core.signals;
-
-interface SomeInterface {
-    bool someMethod(string s, int n);
-}
-class Foo : SomeInterface {
-	override bool someMethod(string s, int n) {
-		writeln("someMethod called ", s, ", ", n);
-		return n > 10; // can return value
-	}
-}
-
-// Listener! can hold arbitrary number of connected slots
-
-// declare using list of return value and parameter types
-Listener!(bool, string, n) signal1;
-
-Foo f = new Foo();
-// when signal is defined as type list, you can use delegate
-signal1 = bool delegate(string s, int n) { writeln("inside delegate - ", s, n); return false; }
-// or method reference
-signal1 = &f.someMethod;
-
-// declare using interface with single method
-Listener!SomeInterface signal2;
-// you still can use any delegate
-signal2 = bool delegate(string s, int n) { writeln("inside delegate - ", s, n); return false; }
-// but for class method which overrides interface method, you can use simple syntax
-signal2 = f; // it will automatically take &f.someMethod
-
-
-// call listener(s) either by opcall or explicit emit
-signal1("text", 1);
-signal1.emit("text", 2);
-signal2.emit("text", 3);
-
-// check if any slit is connected
-if (signal1.assigned)
-	writeln("has listeners");
-
-// Signal! can hold arbitrary number of connected slots
-
-// declare using list of return value and parameter types
-Signal!(bool, string, n) signal3;
-
-// add listeners via connect call
-signal3.connect(bool delegate(string, int) { return false; });
-// or via ~= operator
-signal3 ~= bool delegate(string, int) { return false; };
-
-// declare using interface with single method
-Signal!SomeInterface signal4;
-
-// you can connect several slots to signal
-signal4 ~= f;
-signal4 ~= bool delegate(string, int) { return true; }
-
-// calling of listeners of Signal! is similar to Listener!
-// using opCall
-bool res = signal4("blah", 5);
-// call listeners using emit
-bool res = signal4.emit("blah", 5);
-
-// you can disconnect individual slots
-// using disconnect()
-signal4.disconnect(f);
-// or -= operator
-signal4 -= f;
-
-
- -

-License:
-Boost License 1.0 -

-Authors:
-Vadim Lopatin, coolreader.org@gmail.com

- -
struct Listener(T1) if (is(T1 == interface) && __traits(allMembers, T1).length == 1); -
-
Single listener; parameter is interface with single method

- -
bool assigned(); -
-
returns true if listener is assigned

- -
-
void opAssign(slot_t listenerDelegate); -
-
assign delegate

- -
-
void opAssign(T1 listenerObject); -
-
assign object implementing interface

- -
-
-
-
struct Listener(RETURN_T, T1...); -
-
Single listener; implicitly specified return and parameter types

- -
bool assigned(); -
-
returns true if listener is assigned

- -
-
-
-
struct Signal(T1) if (is(T1 == interface) && __traits(allMembers, T1).length == 1); -
-
Multiple listeners; implicitly specified return and parameter types

- -
bool assigned(); -
-
returns true if listener is assigned

- -
-
void opAssign(slot_t listener); -
-
replace all previously assigned listeners with new one (if null passed, remove all listeners)

- -
-
void opAssign(T1 listener); -
-
replace all previously assigned listeners with new one (if null passed, remove all listeners)

- -
-
return_t opCall(params_t params); -
-
call all listeners; for signals having non-void return type, stop iterating when first return value is nonzero

- -
-
return_t emit(params_t params); -
-
call all listeners; for signals having non-void return type, stop iterating when first return value is nonzero

- -
-
void connect(slot_t listener); -
-
add listener

- -
-
void disconnect(slot_t listener); -
-
remove listener

- -
-
void connect(T1 listener); -
-
add listener - as interface member

- -
-
void disconnect(T1 listener); -
-
add listener - as interface member

- -
-
-
-
struct Signal(RETURN_T, T1...); -
-
Multiple listeners; implicitly specified return and parameter types

- -
bool assigned(); -
-
returns true if listener is assigned

- -
-
void opAssign(slot_t listener); -
-
replace all previously assigned listeners with new one (if null passed, remove all listeners)

- -
-
RETURN_T opCall(T1 params); -
-
call all listeners; for signals having non-void return type, stop iterating when first return value is nonzero

- -
-
RETURN_T emit(T1 params); -
-
call all listeners; for signals having non-void return type, stop iterating when first return value is nonzero

- -
-
void connect(slot_t listener); -
-
add listener

- -
-
void disconnect(slot_t listener); -
-
remove listener

- -
-
-
-
- -
Page generated by Ddoc. Vadim Lopatin, 2014 - - diff --git a/docs/styles.html b/docs/styles.html deleted file mode 100644 index 76fef520..00000000 --- a/docs/styles.html +++ /dev/null @@ -1,476 +0,0 @@ - - - dlangui.widgets.styles - -

dlangui.widgets.styles

- -DLANGUI library. -

-This module contains declaration of themes and styles implementation. -

- -Style - style container -Theme - parent for all styles -

- - -

-Synopsis:
-
import dlangui.widgets.styles;
-
-
- -

-License:
-Boost License 1.0 -

-Authors:
-Vadim Lopatin, coolreader.org@gmail.com

- -
immutable uint COLOR_TRANSPARENT; -
-
transparent color constant

- -
-
immutable ushort FONT_SIZE_UNSPECIFIED; -
-
unspecified font size constant - to take parent style property value

- -
-
immutable ushort FONT_WEIGHT_UNSPECIFIED; -
-
unspecified font weight constant - to take parent style property value

- -
-
immutable ubyte FONT_STYLE_UNSPECIFIED; -
-
unspecified font style constant - to take parent style property value

- -
-
immutable ubyte FONT_STYLE_NORMAL; -
-
normal font style constant

- -
-
immutable ubyte FONT_STYLE_ITALIC; -
-
italic font style constant

- -
-
immutable int SIZE_UNSPECIFIED; -
-
use as widget.layout() param to avoid applying of parent size

- -
-
immutable uint TEXT_FLAGS_UNSPECIFIED; -
-
use text flags from parent style

- -
-
immutable uint TEXT_FLAGS_USE_PARENT; -
-
use text flags from parent widget

- -
-
immutable int FILL_PARENT; -
-
layout option, to occupy all available place

- -
-
immutable int WRAP_CONTENT; -
-
layout option, for size based on content

- -
-
immutable int WEIGHT_UNSPECIFIED; -
-
to take layout weight from parent

- -
-
enum Align: ubyte; -
-
Align option bit constants

- -
Unspecified
-
alignment is not specified

- -
-
Left
-
horizontally align to the left of box

- -
-
Right
-
horizontally align to the right of box

- -
-
HCenter
-
horizontally align to the center of box

- -
-
Top
-
vertically align to the top of box

- -
-
Bottom
-
vertically align to the bottom of box

- -
-
VCenter
-
vertically align to the center of box

- -
-
Center
-
align to the center of box (VCenter | HCenter)

- -
-
TopLeft
-
align to the top left corner of box (Left | Top)

- -
-
-
-
enum TextFlag: uint; -
-
text drawing flag bits

- -
HotKeys
-
text contains hot key prefixed with & char (e.g. "&File")

- -
-
UnderlineHotKeys
-
underline hot key when drawing

- -
-
UnderlineHotKeysWhenAltPressed
-
underline hot key when drawing

- -
-
Underline
-
underline text when drawing

- -
-
-
-
class DrawableAttribute; -
-
custom drawable attribute container for styles

- -
-
class Style; -
-
style properties

- -
const @property const(Style) parentStyle(); -
-
access to parent style for this style

- -
-
@property Style parentStyle(); -
-
access to parent style for this style

- -
-
@property ref DrawableRef customDrawable(string id); -
-
get custom drawable attribute

- -
-
const @property string customDrawableId(string id); -
-
get custom drawable attribute

- -
-
Style setCustomDrawable(string id, string resourceId); -
-
sets custom drawable attribute for style

- -
-
const @property FontFamily fontFamily(); -
-
font size

- -
-
const @property string fontFace(); -
-
font size

- -
-
const @property bool fontItalic(); -
-
font style - italic

- -
-
const @property ushort fontWeight(); -
-
font weight

- -
-
const @property ushort fontSize(); -
-
font size

- -
-
const @property ref const(Rect) padding(); -
-
padding

- -
-
const @property ref const(Rect) margins(); -
-
margins

- -
-
const @property uint alpha(); -
-
alpha (0=opaque .. 255=transparent)

- -
-
const @property uint textColor(); -
-
text color

- -
-
const @property uint textFlags(); -
-
text flags

- -
-
const @property uint backgroundColor(); -
-
background color

- -
-
const @property string backgroundImageId(); -
-
font size

- -
-
const @property uint minWidth(); -
-
minimal width constraint, 0 if limit is not set

- -
-
const @property uint maxWidth(); -
-
max width constraint, returns SIZE_UNSPECIFIED if limit is not set

- -
-
const @property uint minHeight(); -
-
minimal height constraint, 0 if limit is not set

- -
-
const @property uint maxHeight(); -
-
max height constraint, SIZE_UNSPECIFIED if limit is not set

- -
-
@property Style minWidth(int value); -
-
set min width constraint

- -
-
@property Style maxWidth(int value); -
-
set max width constraint

- -
-
@property Style minHeight(int value); -
-
set min height constraint

- -
-
@property Style maxHeight(int value); -
-
set max height constraint

- -
-
const @property uint layoutWidth(); -
-
layout width parameter

- -
-
const @property uint layoutHeight(); -
-
layout height parameter

- -
-
const @property uint layoutWeight(); -
-
layout weight parameter

- -
-
@property Style layoutHeight(int value); -
-
set layout height

- -
-
@property Style layoutWidth(int value); -
-
set layout width

- -
-
@property Style layoutWeight(int value); -
-
set layout weight

- -
-
const @property ubyte alignment(); -
-
get full alignment (both vertical and horizontal)

- -
-
const @property ubyte valign(); -
-
vertical alignment: Top / VCenter / Bottom

- -
-
const @property ubyte halign(); -
-
horizontal alignment: Left / HCenter / Right

- -
-
@property Style alignment(ubyte value); -
-
set alignment

- -
-
Style createSubstyle(string id); -
-
create named substyle of this style

- -
-
Style createState(uint stateMask = 0, uint stateValue = 0); -
-
create state substyle for this style

- -
-
const const(Style) forState(uint state); -
-
find substyle based on widget state (e.g. focused, pressed, ...)

- -
-
-
-
class Theme: dlangui.widgets.styles.Style; -
-
Theme - root for style hierarhy.

- -
Style modifyStyle(string id); -
-
create wrapper style which will have currentTheme.get(id) as parent instead of fixed parent - to modify some base style properties in widget

- -
-
const @property string backgroundImageId(); -
-
font size

- -
-
const @property uint minWidth(); -
-
minimal width constraint, 0 if limit is not set

- -
-
const @property uint maxWidth(); -
-
max width constraint, returns SIZE_UNSPECIFIED if limit is not set

- -
-
const @property uint minHeight(); -
-
minimal height constraint, 0 if limit is not set

- -
-
const @property uint maxHeight(); -
-
max height constraint, SIZE_UNSPECIFIED if limit is not set

- -
-
Style createSubstyle(string id); -
-
create new named style or get existing

- -
-
@property Style get(string id); -
-
find style by id, returns theme if not style with specified ID is not found

- -
-
const const(Style) forState(uint state); -
-
find substyle based on widget state (e.g. focused, pressed, ...)

- -
-
-
-
@property Theme currentTheme(); -
-
current theme accessor

- -
-
@property void currentTheme(Theme theme); -
-
set new current theme

- -
-
Rect decodeRect(string s); -
-
decode comma delimited dimension list or single value - and put to Rect

- -
-
ubyte decodeAlignment(string s); -
-
parses string like "Left|VCenter" to bit set of Align flags

- -
-
uint decodeTextFlags(string s); -
-
parses string like "HotKeys|UnderlineHotKeysWhenAltPressed" to bit set of TextFlag flags

- -
-
FontFamily decodeFontFamily(string s); -
-
decode FontFamily item name to value

- -
-
int decodeLayoutDimension(string s); -
-
decode layout dimension (FILL_PARENT, WRAP_CONTENT, or just size)

- -
-
bool loadStyleAttributes(Style style, Element elem, bool allowStates); -
-
load style attributes from XML element

- -
-
bool loadTheme(Theme theme, Element doc, int level = 0); -
-
load theme from XML document -

-Sample:
-
<?xml version="1.0" encoding="utf-8"?>
-<theme id="theme_custom" parent="theme_default">
-  	<style id="BUTTON"
-			backgroundImageId="btn_default_small"
-	 	>
-  	</style>
-</theme>
-
-

- -
-
bool loadTheme(Theme theme, string resourceId, int level = 0); -
-
load theme from file

- -
-
Theme loadTheme(string resourceId); -
-
load theme from XML file (null if failed)

- -
-
- -
Page generated by Ddoc. Vadim Lopatin, 2014 - - diff --git a/docs/tabs.html b/docs/tabs.html deleted file mode 100644 index 06d11d65..00000000 --- a/docs/tabs.html +++ /dev/null @@ -1,235 +0,0 @@ - - - dlangui.widgets.tabs - -

dlangui.widgets.tabs

- -DLANGUI library. -

-This module contains declaration of tabbed view controls. -

- -TabItemWidget - single tab header in tab control -TabWidget -TabHost -TabControl -

- - -

-Synopsis:
-
import dlangui.widgets.tabs;
-
-
- -

-License:
-Boost License 1.0 -

-Authors:
-Vadim Lopatin, coolreader.org@gmail.com

- -
class TabItem; -
-
tab item metadata

- -
-
class TabItemWidget: dlangui.widgets.layouts.HorizontalLayout; -
-
tab item widget - to show tab header

- -
-
class TabItemList; -
-
tab item list helper class

- -
TabItem get(int index); -
-
get item by index

- -
-
TabItem get(string id); -
-
get item by id

- -
-
TabItemList add(TabItem item); -
-
append new item

- -
-
TabItemList insert(TabItem item, int index); -
-
insert new item to specified position

- -
-
TabItem remove(int index); -
-
remove item by index

- -
-
int indexById(string id); -
-
find tab index by id

- -
-
-
-
class TabControl: dlangui.widgets.widget.WidgetGroup; -
-
tab header - tab labels, with optional More button

- -
Signal!TabHandler onTabChangedListener; -
-
signal of tab change (e.g. by clicking on tab header)

- -
-
const @property int tabCount(); -
-
returns tab count

- -
-
TabItem tab(int index); -
-
returns tab item by id (null if index out of range)

- -
-
TabItem tab(string id); -
-
returns tab item by id (null if not found)

- -
-
int tabIndex(string id); -
-
get tab index by tab id (-1 if not found)

- -
-
TabControl removeTab(string id); -
-
remove tab

- -
-
TabControl addTab(TabItem item, int index = -1, bool enableCloseButton = false); -
-
add new tab

- -
-
TabControl addTab(string id, dstring label, string iconId = null, bool enableCloseButton = false); -
-
add new tab by id and label string

- -
-
TabControl addTab(string id, string labelResourceId, string iconId = null, bool enableCloseButton = false); -
-
add new tab by id and label string resource id

- -
-
void measure(int parentWidth, int parentHeight); -
-
Measure widget according to desired width and height constraints. (Step 1 of two phase layout).

- -
-
void layout(Rect rc); -
-
Set widget rectangle to specified value and layout widget contents. (Step 2 of two phase layout).

- -
-
void onDraw(DrawBuf buf); -
-
Draw widget at its position to buffer

- -
-
-
-
class TabHost: dlangui.widgets.layouts.FrameLayout, dlangui.widgets.tabs.TabHandler; -
-
container for widgets controlled by TabControl

- -
@property TabControl tabControl(); -
-
get currently set control widget

- -
-
@property TabHost tabControl(TabControl newWidget); -
-
set new control widget

- -
-
Signal!TabHandler onTabChangedListener; -
-
signal of tab change (e.g. by clicking on tab header)

- -
-
TabHost removeTab(string id); -
-
remove tab

- -
-
TabHost addTab(Widget widget, dstring label, string iconId = null, bool enableCloseButton = false); -
-
add new tab by id and label string

- -
-
TabHost addTab(Widget widget, string labelResourceId, string iconId = null, bool enableCloseButton = false); -
-
add new tab by id and label string resource id

- -
-
void selectTab(string ID); -
-
select tab

- -
-
-
-
class TabWidget: dlangui.widgets.layouts.VerticalLayout, dlangui.widgets.tabs.TabHandler; -
-
compound widget - contains from TabControl widget (tabs header) and TabHost (content pages)

- -
Signal!TabHandler onTabChangedListener; -
-
signal of tab change (e.g. by clicking on tab header)

- -
-
TabWidget addTab(Widget widget, string labelResourceId, string iconId = null, bool enableCloseButton = false); -
-
add new tab by id and label string resource id

- -
-
TabWidget addTab(Widget widget, dstring label, string iconId = null, bool enableCloseButton = false); -
-
add new tab by id and label (raw value)

- -
-
TabWidget removeTab(string id); -
-
remove tab by id

- -
-
void selectTab(string ID); -
-
select tab

- -
-
TabItem tab(int index); -
-
returns tab item by id (null if index out of range)

- -
-
TabItem tab(string id); -
-
returns tab item by id (null if not found)

- -
-
int tabIndex(string id); -
-
get tab index by tab id (-1 if not found)

- -
-
-
-
- -
Page generated by Ddoc. Vadim Lopatin, 2014 - - diff --git a/docs/types.html b/docs/types.html deleted file mode 100644 index e0038109..00000000 --- a/docs/types.html +++ /dev/null @@ -1,147 +0,0 @@ - - - dlangui.core.types - -

dlangui.core.types

- -DLANGUI library. -

-This module declares basic data types for usage in dlangui library. - -

-Synopsis:
-
import dlangui.core.types;
-
-// points
-Point p(5, 10);
-
-// rectangles
-Rect r(5, 13, 120, 200);
-writeln(r);
-
-// reference counted objects, useful for RAII / resource management.
-class Foo : RefCountedObject {
-	int[] resource;
-	~this() {
-		writeln("freeing Foo resources");
-	}
-}
-{
-	Ref!Foo ref1;
-	{
-		Ref!Foo fooRef = new RefCountedObject();
-		ref1 = fooRef;
-	}
-	// RAII: will destroy object when no more references
-}
-
-
- -

-License:
-Boost License 1.0 -

-Authors:
-Vadim Lopatin, coolreader.org@gmail.com

- -
struct Glyph; -
-
character glyph

- -
uint id; -
-
< 0: unique id of glyph (for drawing in hardware accelerated scenes)

- -
-
ubyte blackBoxX; -
-
< 4: width of glyph black box

- -
-
ubyte blackBoxY; -
-
< 5: height of glyph black box

- -
-
byte originX; -
-
< 6: X origin for glyph

- -
-
byte originY; -
-
< 7: Y origin for glyph

- -
-
ubyte width; -
-
< 8: full width of glyph

- -
-
ubyte lastUsage; -
-
< 9: usage flag, to handle cleanup of unused glyphs

- -
-
ubyte[] glyph; -
-
< 12: glyph data, arbitrary size

- -
-
-
-
class RefCountedObject; -
-
base class for reference counted objects, maintains reference counter inplace.

- -
-
enum State: uint; -
-
widget state flags - bits

- -
Normal
-
state not specified / normal

- -
-
-
-
dchar dcharToUpper(dchar ch); -
-
uppercase unicode character

- -
-
bool isPathDelimiter(char ch); -
-
returns true if char ch is / or \ slash

- -
-
@property string exePath(); -
-
returns current executable path only, including last path delimiter

- -
-
char[] convertPathDelimiters(char[] buf); -
-
converts path delimiters to standard for platform inplace in buffer(e.g. / to \ on windows, \ to / on posix), returns buf

- -
-
string convertPathDelimiters(string src); -
-
converts path delimiters to standard for platform (e.g. / to \ on windows, \ to / on posix)

- -
-
string appendPath(string[] pathItems...); -
-
appends file path parts with proper delimiters e.g. appendPath("/home/user", ".myapp", "config") => "/home/user/.myapp/config"

- -
-
char[] appendPath(char[] buf, string[] pathItems...); -
-
appends file path parts with proper delimiters (as well converts delimiters inside path to system) to buffer e.g. appendPath("/home/user", ".myapp", "config") => "/home/user/.myapp/config"

- -
-
- -
Page generated by Ddoc. Vadim Lopatin, 2014 - - diff --git a/docs/widget.html b/docs/widget.html deleted file mode 100644 index ad689965..00000000 --- a/docs/widget.html +++ /dev/null @@ -1,211 +0,0 @@ - - - dlangui.widgets.widget - -

dlangui.widgets.widget

- -DLANGUI library. -

-This module contains declaration of Widget class - base class for all widgets. -

- -Widgets are styleable. Use styleId property to set style to use from current Theme. -

- -When any of styleable attributes is being overriden, widget's own copy of style is being created to hold modified attributes (defaults to parent style). -

- -Two phase layout model (like in Android UI) is used - measure() call is followed by layout() is used to measure and layout widget and its children.abstract -

- -Method onDraw will be called to draw widget on some surface. Widget.onDraw() draws widget background (if any). -

- - -

-Synopsis:
-
import dlangui.widgets.widget;
-
-// access attributes as properties
-auto w = new Widget("id1");
-w.backgroundColor = 0xFFFF00;
-w.layoutWidth = FILL_PARENT;
-w.layoutHeight = FILL_PARENT;
-w.padding(Rect(10,10,10,10));
-// same, but using chained method call
-auto w = new Widget("id1").backgroundColor(0xFFFF00).layoutWidth(FILL_PARENT).layoutHeight(FILL_PARENT).padding(Rect(10,10,10,10));
-
-
-
- -

-License:
-Boost License 1.0 -

-Authors:
-Vadim Lopatin, coolreader.org@gmail.com

- -
enum Visibility: ubyte; -
-
Visibility (see Android View Visibility)

- -
Visible
-
Visible on screen (default)

- -
-
Invisible
-
Not visible, but occupies a space in layout

- -
-
Gone
-
Completely hidden, as not has been added

- -
-
-
-
interface OnClickHandler; -
-
interface - slot for onClick

- -
-
interface OnCheckHandler; -
-
interface - slot for onCheckChanged

- -
-
interface OnFocusHandler; -
-
interface - slot for onFocusChanged

- -
-
enum FocusMovement: int; -
-
focus movement options

- -
None
-
no focus movement

- -
-
Next
-
next focusable (Tab)

- -
-
Previous
-
previous focusable (Shift+Tab)

- -
-
Up
-
move to nearest above

- -
-
Down
-
move to nearest below

- -
-
Left
-
move to nearest at left

- -
-
Right
-
move to nearest at right

- -
-
-
-
enum CursorType: int; -
-
standard mouse cursor types

- -
Parent
-
use parent's cursor

- -
-
-
-
struct WidgetList; -
-
widget list holder

- -
const @property int count(); -
-
returns count of items

- -
-
Widget get(int index); -
-
get item by index

- -
-
Widget add(Widget item); -
-
add item to list

- -
-
Widget insert(Widget item, int index = -1); -
-
add item to list

- -
-
int indexOf(Widget item); -
-
find child index for item, return -1 if not found

- -
-
int indexOf(string id); -
-
find child index for item by id, return -1 if not found

- -
-
Widget remove(int index); -
-
remove item from list, return removed item

- -
-
void clear(); -
-
remove and destroy all items

- -
-
-
-
class WidgetGroup: dlangui.widgets.widget.Widget; -
-
base class for widgets which have children

- -
@property int childCount(); -
-
returns number of children of this widget

- -
-
Widget child(int index); -
-
returns child by index

- -
-
Widget addChild(Widget item); -
-
adds child, returns added item

- -
-
Widget removeChild(int index); -
-
removes child, returns removed item

- -
-
Widget removeChild(string ID); -
-
removes child by ID, returns removed item

- -
-
int childIndex(Widget item); -
-
returns index of widget in child list, -1 if passed widget is not a child of this widget

- -
-
-
-
- -
Page generated by Ddoc. Vadim Lopatin, 2014 - -