dlangui.all
- + This module is just to simplify import of most useful DLANGUI modules.Synopsis:
diff --git a/api.html b/api.html index b08dc677..c5b3a650 100644 --- a/api.html +++ b/api.html @@ -31,7 +31,7 @@
api
- + @@ -69,6 +69,11 @@-
diff --git a/collections.html b/collections.html
index 01c47ab6..25dda8f4 100644
--- a/collections.html
+++ b/collections.html
@@ -31,7 +31,7 @@
- struct Collection(T, bool ownItems = false);
- array based collection of items
- retains item order when during add/remove operations
+
+retains item order when during add/remove operations
-- bool empty();
+
- @property bool empty();
- returns true if there are no items in collection
- - size_t length();
+
- @property size_t length();
- returns number of items in collection
-
- size_t size(); +
- @property size_t size();
- returns currently allocated capacity (may be more than length)
-
- void size(size_t newSize); +
- @property void size(size_t newSize);
- change capacity (e.g. to reserve big space to avoid multiple reallocations)
-
- void length(size_t newSize); +
- @property void length(size_t newSize);
- returns number of items in collection
-
- T opIndex(size_t index); +
- ref T opIndex(size_t index);
- access item by index
-
- void add(T item, size_t index = size_t.max); +
- void add(T item, size_t index = size_t.max);
- insert new item in specified position
-
- void addAll(ref Collection!(T, ownItems) v); +
- void addAll(ref Collection!(T, ownItems) v);
- add all items from other collection
-
- Collection opOpAssign(string op)(T item); +
- ref Collection opOpAssign(string op)(T item);
- support for appending (~=, +=) and removing by value (-=)
-
- size_t indexOf(T item); +
- size_t indexOf(T item);
- returns index of first occurence of item, size_t.max if not found
-
- T remove(size_t index); +
- T remove(size_t index);
- remove single item, returning removed item
-
- bool removeValue(T value); +
- 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); +
- int opApply(int delegate(ref T param) op);
- support of foreach with reference
-
- void clear(); +
- void clear();
- remove all items
-
- T popFront(); +
- @property T popFront();
- remove first item
-
- void pushFront(T item); +
- void pushFront(T item);
- insert item at beginning of collection
-
- T popBack(); +
- @property T popBack();
- remove last item
-
- void pushBack(T item); +
- void pushBack(T item);
- insert item at end of collection
-
- T front(); +
- @property T front();
- peek first item
-
- T back(); +
- @property T back();
- peek last item
-
diff --git a/combobox.html b/combobox.html new file mode 100644 index 00000000..cc4651cd --- /dev/null +++ b/combobox.html @@ -0,0 +1,90 @@ + + + + + + + + + + +DlangUI - cross platform GUI library for D programming language - dlangui.widgets.combobox + + +++ + diff --git a/controls.html b/controls.html index 32abe284..fdc87da9 100644 --- a/controls.html +++ b/controls.html @@ -31,7 +31,7 @@+++ +DlangUI
+Cross Platform GUI for D programming language
++ Home + API Docs + Screenshots + Download .zip + + View on GitHub + + +
++ + + +dlangui.widgets.combobox
+ +This module contains Combo Box widgets implementation. +
+Synopsis:
+import dlangui.widgets.combobox; + +// creation of simple strings list +ComboBox box = new ComboBox("combo1", ["value 1"d, "value 2"d, "value 3"d]); + +// select first item +box.selectedItemIndex = 0; + +// get selected item text +println(box.text); + +
+ +
+License:
+Boost License 1.0 +
+Authors:
+Vadim Lopatin, coolreader.org@gmail.com
+ + + +
dlangui.widgets.controls
- + This module contains simple controls widgets implementation.
TextWidget @@ -63,17 +63,17 @@ Boost License 1.0 Authors:
Vadim Lopatin, coolreader.org@gmail.com
-- class VSpacer: dlangui.widgets.widget.Widget;
+
- class VSpacer: dlangui.widgets.widget.Widget;
- vertical spacer to fill empty space in vertical layouts
- - class HSpacer: dlangui.widgets.widget.Widget;
+
- class HSpacer: dlangui.widgets.widget.Widget;
- horizontal spacer to fill empty space in horizontal layouts
-
- class TextWidget: dlangui.widgets.widget.Widget; +
- class TextWidget: dlangui.widgets.widget.Widget;
- static text widget
@@ -99,7 +99,7 @@ Vadim Lopatin, coolreader.org@gmail.com
- class ImageWidget: dlangui.widgets.widget.Widget; +
- class ImageWidget: dlangui.widgets.widget.Widget;
- static image widget
@@ -122,30 +122,35 @@ Vadim Lopatin, coolreader.org@gmail.com
- set custom drawable (not one from resources)
+
+- @property ImageWidget drawable(string drawableId); +
+- set custom drawable (not one from resources)
+
- - bool empty();
+
- class ImageButton: dlangui.widgets.controls.ImageWidget;
+
- class ImageButton: dlangui.widgets.controls.ImageWidget;
- button with image only
-
- class ImageTextButton: dlangui.widgets.layouts.HorizontalLayout; +
- class ImageTextButton: dlangui.widgets.layouts.HorizontalLayout;
- button with image and text
-
- class CheckBox: dlangui.widgets.controls.ImageTextButton; +
- class CheckBox: dlangui.widgets.controls.ImageTextButton;
- checkbox
-
- class RadioButton: dlangui.widgets.controls.ImageTextButton; +
- class RadioButton: dlangui.widgets.controls.ImageTextButton;
- radio button
-
- class Button: dlangui.widgets.widget.Widget; +
- class Button: dlangui.widgets.widget.Widget;
- Text only button
@@ -161,7 +166,7 @@ Vadim Lopatin, coolreader.org@gmail.com
- class AbstractSlider: dlangui.widgets.widget.WidgetGroup;
+
- class AbstractSlider: dlangui.widgets.widget.WidgetGroup;
- base class for widgets like scrollbars and sliders
-
@@ -207,7 +212,7 @@ Vadim Lopatin, coolreader.org@gmail.com
- class ScrollBar: dlangui.widgets.controls.AbstractSlider, dlangui.widgets.widget.OnClickHandler; +
- class ScrollBar: dlangui.widgets.controls.AbstractSlider, dlangui.widgets.widget.OnClickHandler;
- scroll bar - either vertical or horizontal
@@ -220,6 +225,11 @@ Vadim Lopatin, coolreader.org@gmail.com
- sets scrollbar orientation
+
+- protected void updateState(); +
+- hide controls when scroll is not possible
+- bool onMouseEvent(MouseEvent event);
diff --git a/dialog.html b/dialog.html index 93511c0e..71c828b2 100644 --- a/dialog.html +++ b/dialog.html @@ -31,7 +31,7 @@
dlangui.dialogs.dialog
- + This module contains common Dialog implementation.
Synopsis:
@@ -60,11 +60,21 @@ Vadim Lopatin, coolreader.org@gmail.com
-- class Dialog: dlangui.widgets.layouts.VerticalLayout; +
- class Dialog: dlangui.widgets.layouts.VerticalLayout;
- base for all dialogs
-
-- void show();
+
- Widget createButtonsPanel(const Action[] actions, int defaultActionIndex, int splitBeforeIndex); + +
- create panel with buttons based on list of actions
+ +
+ - void init(); + +
- override to implement creation of dialog controls
+ +
+ - void show();
- shows dialog
diff --git a/drawbuf.html b/drawbuf.html index 1c6af425..348d1957 100644 --- a/drawbuf.html +++ b/drawbuf.html @@ -31,7 +31,7 @@
dlangui.graphics.drawbuf
- + This module contains drawing buffer implementation.
Synopsis:
@@ -83,7 +83,7 @@ Vadim Lopatin, coolreader.org@gmail.com
- abstract class DrawBuf: dlangui.core.types.RefCountedObject; +
- abstract class DrawBuf: dlangui.core.types.RefCountedObject;
- drawing buffer - image container which allows to perform some drawing operations
@@ -106,11 +106,6 @@ Vadim Lopatin, coolreader.org@gmail.com
- 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();
@@ -141,25 +136,32 @@ Vadim Lopatin, coolreader.org@gmail.com
- returns current height
+
+- void resetClipping(); +
+- init clip rectangle to full buffer size
+- @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.
+- returns clipping rectangle, or (0,0,dx,dy) when no clipping. +
+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.
+- sets new clipping rectangle, intersect with previous one.
+
+ +- @property bool isClippedOut(ref const Rect rect); +
+- returns true if rectangle is completely clipped out and cannot be drawn.
- bool applyClipping(ref Rect rc); @@ -238,6 +240,12 @@ Vadim Lopatin, coolreader.org@gmail.com
- RAII setting/restoring of clip rectangle
diff --git a/editors.html b/editors.html index a252c8d0..99930ed4 100644 --- a/editors.html +++ b/editors.html @@ -31,7 +31,7 @@
+
dlangui.widgets.editors
- + This module contains implementation of editors.
EditLine - single line editor. @@ -327,8 +327,11 @@ Vadim Lopatin, coolreader.org@gmail.com
- Replace
- insert content into specified position (range.start)
- delete content in range
- replace range content with new content
+
+delete content in range +
+ +replace range content with new content
-- abstract class EditWidgetBase: dlangui.widgets.widget.WidgetGroup, dlangui.widgets.editors.EditableContentListener, dlangui.widgets.menu.MenuItemActionHandler; +
- abstract class EditWidgetBase: dlangui.widgets.scroll.ScrollWidgetBase, dlangui.widgets.editors.EditableContentListener, dlangui.widgets.menu.MenuItemActionHandler;
- base for all editor widgets
@@ -653,11 +656,6 @@ Vadim Lopatin, coolreader.org@gmail.com
- draws caret
-
-- protected void updateScrollbars(); -
-- override to update scrollbars - if necessary
-- protected void correctCaretPos();
@@ -701,7 +699,7 @@ Vadim Lopatin, coolreader.org@gmail.com
-- class EditLine: dlangui.widgets.editors.EditWidgetBase; +
- class EditLine: dlangui.widgets.editors.EditWidgetBase;
- single line editor
-
@@ -737,34 +735,44 @@ Vadim Lopatin, coolreader.org@gmail.com
- class EditBox: dlangui.widgets.editors.EditWidgetBase, dlangui.widgets.controls.OnScrollHandler; +
- class EditBox: dlangui.widgets.editors.EditWidgetBase;
- single line editor
diff --git a/events.html b/events.html index b4e01fe5..f95400de 100644 --- a/events.html +++ b/events.html @@ -31,7 +31,7 @@
-- bool onScrollEvent(AbstractSlider source, ScrollEvent event);
+
- protected void updateHScrollBar(); -
- handle scroll event
+- update horizontal scrollbar widget position
+
+ + - update horizontal scrollbar widget position
- protected void updateVScrollBar(); + +
- update verticat scrollbar widget position
+ +
+ - bool onHScroll(ScrollEvent event); + +
- process horizontal scrollbar event
+ +
+ - bool onVScroll(ScrollEvent event); + +
- process vertical scrollbar event
+ +
+ - Point fullContentSize(); + +
- calculate full content size in pixels
- 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
-
dlangui.core.events
- + This module contains dlangui event types declarations.
Synopsis:
@@ -76,7 +76,7 @@ Vadim Lopatin, coolreader.org@gmail.com
- additional custom (Object) parameter
-
- this(Action a); +
- this(Action a);
- deep copy constructor
@@ -86,17 +86,17 @@ Vadim Lopatin, coolreader.org@gmail.com
- deep copy
-
- this(int id); +
- this(int id);
- create action only with ID
-
- this(int id, uint keyCode, uint keyFlags = 0); +
- 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); +
- this(int id, dstring label, string iconResourceId = null, uint keyCode = 0, uint keyFlags = 0);
- action with label, icon, and accelerator
@@ -160,11 +160,7 @@ Vadim Lopatin, coolreader.org@gmail.com
- mouse flag bits
+
-- Control -
- Ctrl key is down
- -
- - LButton +
- LButton
- Left mouse button is down
@@ -175,10 +171,6 @@ Vadim Lopatin, coolreader.org@gmail.com - RButton
- Right mouse button is down
-
- - Shift -
- Shift key is down
- - XButton1
- X1 mouse button is down
@@ -187,10 +179,48 @@ Vadim Lopatin, coolreader.org@gmail.com
- XButton2
- X2 mouse button is down
+
+ - Control +
- Ctrl key is down
+ +
+ - Shift +
- Shift key is down
+ - Alt
- Alt key is down
+
+
- enum MouseButton: ubyte; +
+- mouse button
@@ -237,36 +267,6 @@ Vadim Lopatin, coolreader.org@gmail.com
+ +
- returns button down state duration in hnsecs (1/10000 of second).
- - -
-- enum MouseButton: ubyte; -
-- mouse button
@@ -409,7 +409,7 @@ Vadim Lopatin, coolreader.org@gmail.com
- -
- entered text, for Text action
-
- this(KeyAction action, uint keyCode, uint flags, dstring text = null); +
- this(KeyAction action, uint keyCode, uint flags, dstring text = null);
- create key event
-
diff --git a/filedlg.html b/filedlg.html index fd394aae..1e0deef4 100644 --- a/filedlg.html +++ b/filedlg.html @@ -31,7 +31,7 @@
dlangui.dialogs.filedlg
- + This module contains FileDialog implementation.
Can show dialog for open / save. @@ -77,10 +77,16 @@ Vadim Lopatin, coolreader.org@gmail.com
- class FileDialog: dlangui.dialogs.dialog.Dialog; +
- class FileDialog: dlangui.dialogs.dialog.Dialog;
- file open / save dialog
diff --git a/fonts.html b/fonts.html index 4b88c1d7..f12e1d2b 100644 --- a/fonts.html +++ b/fonts.html @@ -31,7 +31,7 @@
+
dlangui.graphics.fonts
- + This module contains base fonts access interface and common implementation.
Font - base class for fonts. @@ -128,38 +128,13 @@ Vadim Lopatin, coolreader.org@gmail.com
- -- @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; +
- abstract class Font: dlangui.core.types.RefCountedObject;
- Instance of font with specific size, weight, face, etc.
diff --git a/ftfonts.html b/ftfonts.html index 54d49cc9..4aa660ac 100644 --- a/ftfonts.html +++ b/ftfonts.html @@ -31,7 +31,7 @@
dlangui.graphics.ftfonts
- + This file contains FontManager implementation based on FreeType library.
License:
@@ -40,11 +40,11 @@ Boost License 1.0 Authors:
Vadim Lopatin, coolreader.org@gmail.com
-- class FreeTypeFont: dlangui.graphics.fonts.Font;
+
- class FreeTypeFont: dlangui.graphics.fonts.Font;
- Font implementation based on Win32 API system fonts.
-
- - class FreeTypeFontManager: dlangui.graphics.fonts.FontManager;
+
- class FreeTypeFontManager: dlangui.graphics.fonts.FontManager;
- FreeType based font manager.
diff --git a/gldrawbuf.html b/gldrawbuf.html index 553ecfe2..f7c44349 100644 --- a/gldrawbuf.html +++ b/gldrawbuf.html @@ -31,7 +31,7 @@
dlangui.graphics.gldrawbuf
- + This module contains opengl based drawing buffer implementation.
To enable OpenGL support, build with version(USE_OPENGL); @@ -49,109 +49,6 @@ 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 onObjectDestroyedCallback(uint pobject); - -
- object deletion listener callback function type
- -
- - void onGlyphDestroyedCallback(uint pobject); - -
- object deletion listener callback function type
- -
-
- container for UI string - either raw value or string resource ID
-
- - class UIStringList;
+
- struct UIStringCollection;
-- UI string translator
+- UIString item collection.
+
-- void clear();
+
- @property int length(); + +
- returns number of items
+ +
+ - UIString[] opIndex(); + +
- slice
+ +
+ - UIString[] opSlice(); + +
- slice
+ +
+ - UIString[] opSlice(size_t start, size_t end); + +
- slice
+ +
+ - UIString opIndex(size_t index); + +
- read item by index
+ +
+ - UIString opIndexAssign(UIString value, size_t index); + +
- modify item by index
+ +
+ - dstring get(size_t index); + +
- return unicode string for item by index
+ +
+ - void opAssign(ref UIStringCollection items); + +
- Assign UIStringCollection
+ +
+ - void addAll(ref UIStringCollection items); + +
- Append UIStringCollection
+ +
+ - void opAssign(string[] items); + +
- Assign array of string resource IDs
+ +
+ - void addAll(string[] items); + +
- Append array of string resource IDs
+ +
+ - void opAssign(dstring[] items); + +
- Assign array of unicode strings
+ +
+ - void addAll(dstring[] items); + +
- Append array of unicode strings
+ +
+ - void clear();
- remove all items
- - void set(string id, dstring value);
+
- void add(string item, int index = -1);
-- set item value
+- Insert resource id item into specified position
-
- const dstring get(string id); +
- void add(dstring item, int index = -1);
-- get item value, null if translation is not found for id
+- Insert unicode string item into specified position
-
- bool load(std.stream.InputStream stream); +
- void add(UIString item, int index = -1);
-- load strings from stream
+- Insert UIString item into specified position
-
- bool load(string[] filenames); +
- void remove(int index);
-- load strings from file (utf8, id=value lines)
+- Remove item with specified index
+
+ +- int indexOf(dstring str); +
+- Return index of first item with specified text or -1 if not found.
+
+ +- int indexOf(string strId); +
+- Return index of first item with specified string resource id or -1 if not found.
+
+ +- int indexOf(UIString str); +
+- Return index of first item with specified string or -1 if not found.
- class UIStringTranslator; +
+- UI Strings internationalization translator.
+
+ +- shared void findTranslationsDir(string[] dirs...); + +
- looks for i18n directory inside one of passed dirs, and uses first found as directory to read i18n files from
+ +
+ - shared string[] convertResourcePaths(string filename); + +
- convert resource path - append resource dir if necessary
+ +
+ - shared bool load(string mainFilename, string fallbackFilename = null); + +
- load translation file(s)
+ +
+ - shared dstring get(string id); + +
- translate string ID to string (returns "UNTRANSLATED: id" for missing values)
+ +
+
- UIStringTranslator i18n; +
+- Global translator object.
+
dlangui.graphics.images
- + This module contains image loading functions.
Currently uses FreeImage. diff --git a/index.html b/index.html index 46de6b02..337c9ce4 100644 --- a/index.html +++ b/index.html @@ -31,7 +31,7 @@
index
- +@@ -76,6 +76,10 @@
- TabControl - tabs widget, allows to select one of tabs
- TabHost - container for pages controlled by TabControl
- TabWidget - combination of TabControl and TabHost
+- GridWidgetBase - abstract Grid widget
+- StringGrid - grid view with strings content
+- TreeWidget - tree view
+- ComboBox - combo box with text items
dlangui.core.collections
- + This module implements array based collection.Synopsis:
@@ -68,104 +68,105 @@ Vadim Lopatin, coolreader.org@gmail.com
Layouts
@@ -141,7 +145,7 @@ standard values are used.To develop using Visual-D, download sources for dlangui and dependencies into some directory:
+To develop using Visual-D, download sources for dlabgui and dependencies into some directory:
git clone https://github.com/buggins/dlangui.git git clone https://github.com/DerelictOrg/DerelictUtil.git @@ -224,6 +228,8 @@ standard values are used.Hello World
+Sample code: +// main.d import dlangui.all; mixin DLANGUI_ENTRY_POINT; @@ -254,6 +260,41 @@ standard values are used. }+Sample dub.json: +{ + "name": "myproject", + "description": "sample DLangUI project", + "homepage": "https://github.com/buggins/dlangui", + "license": "Boost", + "authors": ["Vadim Lopatin"], + + "targetName": "example", + "targetPath": "bin", + "targetType": "executable", + + "sourcePaths": ["src"], + + "sourceFiles": [ + "src/app.d" + ], + + "copyFiles-windows": [ + "lib/FreeImage.dll" + ], + + "copyFiles": [ + "res" + ], + + "dependencies": { + "dlangui:dlanguilib": "~master" + } +} ++ +There is sample project which is using DLangUI. + +https://github.com/buggins/dlangide
dlangui.widgets.layouts
- + This module contains common layouts implementations.Layouts are similar to the same in Android. @@ -90,7 +90,36 @@ Vadim Lopatin, coolreader.org@gmail.com
-
+ +
- uint getCursorType(int x, int y); + +
- returns mouse cursor type for widget
+ +
+ - 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).
+ +
+ - bool onMouseEvent(MouseEvent event); + +
- process mouse event; return true if event is processed by widget.
+ +
+
@@ -116,7 +145,7 @@ Vadim Lopatin, coolreader.org@gmail.com
diff --git a/linestream.html b/linestream.html index 44e74018..da1a8bbb 100644 --- a/linestream.html +++ b/linestream.html @@ -31,7 +31,7 @@
dlangui.core.linestream
- + 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. diff --git a/lists.html b/lists.html index 082be592..5a4e7ef2 100644 --- a/lists.html +++ b/lists.html @@ -31,7 +31,7 @@
dlangui.widgets.lists
- + This module contains list widgets implementation.Similar to lists implementation in Android UI API. @@ -80,7 +80,7 @@ Vadim Lopatin, coolreader.org@gmail.com
@@ -116,11 +116,82 @@ Vadim Lopatin, coolreader.org@gmail.com
+
-
- @property Orientation orientation();
+
- this(); + +
- create empty string list adapter.
+ +
+ - this(string[] items); + +
- Init with array of string resource IDs.
+ +
+ - this(dstring[] items); + +
- Init with array of unicode strings.
+ +
+ - @property ref UIStringCollection items(); + +
- Access to items collection.
+ +
+ - @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
+ +
+
+ +
+ +
+ +
- Signal!OnItemSelectedHandler onItemSelectedListener; + +
- Handle selection change.
+ +
+ - Signal!OnItemSelectedHandler onItemClickListener; + +
- Handle item click.
+ +
+ - @property Orientation orientation();
- returns linear layout orientation (Vertical, Horizontal)
@@ -264,6 +335,11 @@ Vadim Lopatin, coolreader.org@gmail.com
+
+
dlangui.core.logger
- + This module contains logger implementation.Synopsis:
diff --git a/menu.html b/menu.html index 2d9503a9..48dcb46b 100644 --- a/menu.html +++ b/menu.html @@ -31,7 +31,7 @@
dlangui.widgets.menu
- + This module contains menu widgets implementation.MenuItem - menu item properties container - to hold hierarchy of menu. @@ -208,7 +208,7 @@ Vadim Lopatin, coolreader.org@gmail.com
-
@@ -229,7 +229,7 @@ Vadim Lopatin, coolreader.org@gmail.com
@@ -270,7 +270,7 @@ Vadim Lopatin, coolreader.org@gmail.com
@@ -316,7 +316,7 @@ Vadim Lopatin, coolreader.org@gmail.com
diff --git a/platform.html b/platform.html index 5c18b6c9..95c4299f 100644 --- a/platform.html +++ b/platform.html @@ -31,7 +31,7 @@
dlangui.platforms.common.platform
- + This module contains common Plaform definitions.Platform is abstraction layer for application. @@ -143,6 +143,11 @@ Vadim Lopatin, coolreader.org@gmail.com
+
+
-
- -
-
-
- int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow);
+
- int WinMain(void* hInstance, void* hPrevInstance, char* lpCmdLine, int nCmdShow);
- workaround for link issue when WinMain is located in library
diff --git a/popup.html b/popup.html index 746685e5..4f631670 100644 --- a/popup.html +++ b/popup.html @@ -31,7 +31,7 @@
dlangui.widgets.popup
- + This module contains popup widgets implementation.
Popups appear above other widgets inside window. @@ -71,6 +71,10 @@ Vadim Lopatin, coolreader.org@gmail.com
- Point
- align to specified point
+
+- FitAnchorSize
+- if popup content size is less than anchor's size, increase it to anchor size
+
-
+ +
-
- @property void delegate(PopupWidget popup) onPopupCloseListener();
+
- Signal!OnPopupCloseHandler 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)
+- popup close signal
- popup close signal
- @property uint flags(); -
- returns popup behavior flags (combination of PopupFlags)
+- popup close listener (called right before closing) +
+set popup close listener (to call right before closing) +
+ +returns popup behavior flags (combination of PopupFlags)
- popup close listener (called right before closing) +
- @property PopupWidget flags(uint flags);
diff --git a/resources.html b/resources.html
index 40552d71..56d5287e 100644
--- a/resources.html
+++ b/resources.html
@@ -31,7 +31,7 @@
dlangui.graphics.resources
- + This module contains resource management and drawables implementation.
imageCache is RAM cache of decoded images (as DrawBuf). @@ -58,7 +58,7 @@ Boost License 1.0 Authors:
Vadim Lopatin, coolreader.org@gmail.com
-- class FrameDrawable: dlangui.graphics.resources.Drawable;
+
- class FrameDrawable: dlangui.graphics.resources.Drawable;
- solid borders (may be of different width) and, optionally, solid inner area
@@ -76,16 +76,22 @@ Vadim Lopatin, coolreader.org@gmail.com
- 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
+
+ +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);
@@ -93,7 +99,7 @@ Vadim Lopatin, coolreader.org@gmail.com
- converts XML attribute name to State (see http://developer.android.com/guide/topics/resources/drawable-resource.html#StateList)
-
- class StateDrawable: dlangui.graphics.resources.Drawable; +
- 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)
diff --git a/screenshots.html b/screenshots.html index 4fc38c3e..a3539052 100644 --- a/screenshots.html +++ b/screenshots.html @@ -31,7 +31,7 @@
screenshots
- +
diff --git a/scroll.html b/scroll.html new file mode 100644 index 00000000..5d117000 --- /dev/null +++ b/scroll.html @@ -0,0 +1,91 @@ + + + + + + + + + + +DlangUI - cross platform GUI library for D programming language - dlangui.widgets.scroll + + +++ + diff --git a/sdlapp.html b/sdlapp.html index 7f089535..77bc3992 100644 --- a/sdlapp.html +++ b/sdlapp.html @@ -10,7 +10,7 @@ -+++ +DlangUI
+Cross Platform GUI for D programming language
++ Home + API Docs + Screenshots + Download .zip + + View on GitHub + + +
++ +dlangui.widgets.scroll
+ +
+ + ++ Dlangui is maintained by buggins + +
+ This page was generated by GitHub Pages. Tactile theme by Jason Long. +DlangUI - cross platform GUI library for D programming language - src.dlangui.platforms.sdl.sdlapp +DlangUI - cross platform GUI library for D programming language - dlangui.platforms.sdl.sdlapp @@ -30,8 +30,8 @@
- src.dlangui.platforms.sdl.sdlapp
- +dlangui.platforms.sdl.sdlapp
+ This module contains implementation of SDL2 based backend for dlang library.
Synopsis:
diff --git a/signals.html b/signals.html index 4fd11c19..8951a3e9 100644 --- a/signals.html +++ b/signals.html @@ -31,7 +31,7 @@
dlangui.core.signals
- + This module contains definition of signals / listeners.
Similar to std.signals. @@ -139,17 +139,17 @@ Vadim Lopatin, coolreader.org@gmail.com
- Single listener; parameter is interface with single method
-
-- bool assigned();
+
- final bool assigned();
- returns true if listener is assigned
- - void opAssign(slot_t listenerDelegate);
+
- final void opAssign(slot_t listenerDelegate);
- assign delegate
-
- void opAssign(T1 listenerObject); +
- final void opAssign(T1 listenerObject);
- assign object implementing interface
@@ -160,7 +160,7 @@ Vadim Lopatin, coolreader.org@gmail.com
- Single listener; implicitly specified return and parameter types
-
-- bool assigned(); +
- Multiple listeners; implicitly specified return and parameter types
-- bool assigned();
+
- final bool assigned();
- returns true if listener is assigned
- - void opAssign(slot_t listener);
+
- final void opAssign(slot_t listener);
- replace all previously assigned listeners with new one (if null passed, remove all listeners)
-
- void opAssign(T1 listener); +
- final void opAssign(T1 listener);
- replace all previously assigned listeners with new one (if null passed, remove all listeners)
-
- return_t opCall(params_t params); +
- final 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); +
- final 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); +
- final void connect(slot_t listener);
- add listener
-
- void disconnect(slot_t listener); +
- final void disconnect(slot_t listener);
- remove listener
-
- void connect(T1 listener); +
- final void connect(T1 listener);
- add listener - as interface member
-
- void disconnect(T1 listener); +
- final void disconnect(T1 listener);
- add listener - as interface member
@@ -222,32 +222,32 @@ Vadim Lopatin, coolreader.org@gmail.com
- Multiple listeners; implicitly specified return and parameter types
-
-- bool assigned();
+
- final bool assigned();
- returns true if listener is assigned
- - void opAssign(slot_t listener);
+
- final void opAssign(slot_t listener);
- replace all previously assigned listeners with new one (if null passed, remove all listeners)
-
- RETURN_T opCall(T1 params); +
- final 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); +
- final 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); +
- final void connect(slot_t listener);
- add listener
-
- void disconnect(slot_t listener); +
- final void disconnect(slot_t listener);
- remove listener
diff --git a/stdaction.html b/stdaction.html index 9c274078..f7edacfb 100644 --- a/stdaction.html +++ b/stdaction.html @@ -31,7 +31,7 @@
dlangui.core.stdaction
- + Definition of standard actions commonly used in dialogs and controls.
Synopsis:
diff --git a/styles.html b/styles.html index e8ec42e2..de754222 100644 --- a/styles.html +++ b/styles.html @@ -31,7 +31,7 @@
dlangui.widgets.styles
- + This module contains declaration of themes and styles implementation.
Style - style container @@ -195,12 +195,12 @@ Vadim Lopatin, coolreader.org@gmail.com
- access to parent style for this style
-
- @property ref DrawableRef customDrawable(string id); +
- ref DrawableRef customDrawable(string id);
- get custom drawable attribute
-
- const @property string customDrawableId(string id); +
- const string customDrawableId(string id);
- get custom drawable attribute
@@ -377,7 +377,7 @@ Vadim Lopatin, coolreader.org@gmail.com
- class Theme: dlangui.widgets.styles.Style; +
- class Theme: dlangui.widgets.styles.Style;
- Theme - root for style hierarhy.
diff --git a/tabs.html b/tabs.html index 7b3abd63..a8a5416b 100644 --- a/tabs.html +++ b/tabs.html @@ -31,7 +31,7 @@
dlangui.widgets.tabs
- + This module contains declaration of tabbed view controls.
TabItemWidget - single tab header in tab control @@ -59,7 +59,7 @@ Vadim Lopatin, coolreader.org@gmail.com
- tab item metadata
-
- class TabItemWidget: dlangui.widgets.layouts.HorizontalLayout; +
- class TabItemWidget: dlangui.widgets.layouts.HorizontalLayout;
- tab item widget - to show tab header
@@ -100,7 +100,7 @@ Vadim Lopatin, coolreader.org@gmail.com
- - bool assigned();
+
- class TabControl: dlangui.widgets.widget.WidgetGroup;
+
- class TabControl: dlangui.widgets.widget.WidgetGroup;
- tab header - tab labels, with optional More button
@@ -166,7 +166,7 @@ Vadim Lopatin, coolreader.org@gmail.com
- class TabHost: dlangui.widgets.layouts.FrameLayout, dlangui.widgets.tabs.TabHandler; +
- class TabHost: dlangui.widgets.layouts.FrameLayout, dlangui.widgets.tabs.TabHandler;
- container for widgets controlled by TabControl
@@ -207,7 +207,7 @@ Vadim Lopatin, coolreader.org@gmail.com
- class TabWidget: dlangui.widgets.layouts.VerticalLayout, dlangui.widgets.tabs.TabHandler; +
- class TabWidget: dlangui.widgets.layouts.VerticalLayout, dlangui.widgets.tabs.TabHandler;
- compound widget - contains from TabControl widget (tabs header) and TabHost (content pages)
diff --git a/tree.html b/tree.html new file mode 100644 index 00000000..9ef80b56 --- /dev/null +++ b/tree.html @@ -0,0 +1,177 @@ + + + + + + + + + + +DlangUI - cross platform GUI library for D programming language - dlangui.widgets.tree + + +++ + diff --git a/types.html b/types.html index 6457a49b..c3672fe6 100644 --- a/types.html +++ b/types.html @@ -31,7 +31,7 @@+++ +DlangUI
+Cross Platform GUI for D programming language
++ Home + API Docs + Screenshots + Download .zip + + View on GitHub + + +
++ +dlangui.widgets.tree
+ +
+- enum TreeActions: int; + +
- grid control action codes
+ +- None +
- no action
+ +
+ - Up +
- move selection up
+ +
+ - Down +
- move selection down
+ +
+ - Left +
- move selection left
+ +
+ - Right +
- move selection right
+ +
+ - ScrollUp +
- scroll up, w/o changing selection
+ +
+ - ScrollDown +
- scroll down, w/o changing selection
+ +
+ - ScrollLeft +
- scroll left, w/o changing selection
+ +
+ - ScrollRight +
- scroll right, w/o changing selection
+ +
+ - ScrollTop +
- scroll top w/o changing selection
+ +
+ - ScrollBottom +
- scroll bottom, w/o changing selection
+ +
+ - ScrollPageUp +
- scroll up, w/o changing selection
+ +
+ - ScrollPageDown +
- scroll down, w/o changing selection
+ +
+ - ScrollPageLeft +
- scroll left, w/o changing selection
+ +
+ - ScrollPageRight +
- scroll right, w/o changing 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
+ +
+
+
+ Dlangui is maintained by buggins + +
+ This page was generated by GitHub Pages. Tactile theme by Jason Long. +
dlangui.core.types
- + This module declares basic data types for usage in dlangui library.
Synopsis:
@@ -69,16 +69,118 @@ Boost License 1.0 Authors:
Vadim Lopatin, coolreader.org@gmail.com
-- struct Glyph;
+
- struct Point; + +
- 2D point
+ + +
+ - struct Rect; + +
- 2D rectangle
+ +- int left; + +
- x coordinate of top left corner
+ +
+ - int top; + +
- y coordinate of top left corner
+ +
+ - int right; + +
- x coordinate of bottom right corner
+ +
+ - int bottom; + +
- y coordinate of bottom right corner
+ +
+ - @property int middlex(); + +
- returns average of left, right
+ +
+ - @property int middley(); + +
- returns average of top, bottom
+ +
+ - void offset(int dx, int dy); + +
- add offset to horizontal and vertical coordinates
+ +
+ - void expand(int dx, int dy); + +
- expand rectangle dimensions
+ +
+ - void shrink(int dx, int dy); + +
- shrink rectangle dimensions
+ +
+ - void setMax(Rect rc); + +
- for all fields, sets this.field to rc.field if rc.field > this.field
+ +
+ - void moveBy(int deltax, int deltay); + +
- translate rectangle coordinates by (x,y) - add deltax to x coordinates, and deltay to y coordinates
+ +
+ - void moveToFit(ref Rect rc); + +
- moves this rect to fit rc bounds, retaining the same size
+ +
+ - bool intersect(Rect rc); + +
- updates this rect to intersection with rc, returns true if result is non empty
+ +
+ - bool intersects(Rect rc); + +
- returns true if this rect has nonempty intersection with rc
+ +
+ - bool isPointInside(Point pt); + +
- returns true if point is inside of this rectangle
+ +
+ - bool isPointInside(int x, int y); + +
- returns true if point is inside of this rectangle
+ +
+ - bool isInsideOf(Rect rc); + +
- this rectangle is completely inside rc
+ +
+
+ - struct Glyph;
- character glyph
-- uint id; - -
- < 0: unique id of glyph (for drawing in hardware accelerated scenes)
- -
- - ubyte blackBoxX; +
- base class for reference counted objects, maintains reference counter inplace.
+
+ - struct Ref(T); + +
- reference counting support
+ +- const @property bool isNull(); + +
- returns true if object is not assigned
+ +
+ - const @property int refCount(); + +
- returns counter of references
+ +
+ - void clear(); + +
- clears reference
+ +
+ - @property T get(); + +
- returns object reference (null if not assigned)
+ +
+ - const @property const(T) get(); + +
- returns const reference from const object
+ +
+
+ - wstring fromWStringz(const(wchar[]) s); + +
- conversion from wchar z-string
+ +
+ - wstring fromWStringz(const(wchar)* s); + +
- conversion from wchar z-string
+ - enum State: uint; @@ -164,6 +307,11 @@ Vadim Lopatin, coolreader.org@gmail.com
- 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"
+
+ - string[] splitPath(string path); + +
- split path into elements, e.g. /home/user/dir1 -> ["home", "user", "dir1"], "c:\dir1\dir2" -> ["c:", "dir1", "dir2"]
+
dlangui.widgets.widget
- + 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. @@ -102,6 +102,16 @@ Vadim Lopatin, coolreader.org@gmail.com
- interface - slot for onFocusChanged
+
+- interface OnKeyHandler; +
+- interface - slot for onKey
+
+ +- interface OnMouseHandler; +
+- interface - slot for onMouse
+- enum FocusMovement: int;
@@ -147,55 +157,805 @@ Vadim Lopatin, coolreader.org@gmail.com
-- struct WidgetList; +
- class Widget;
-- widget list holder
+- Base class for all widgets. +
+
-- const @property int count();
+
- protected string _id; + +
- widget id
+ +
+ - protected Rect _pos; + +
- current widget position, set by layout()
+ +
+ - protected Visibility _visibility; + +
- widget visibility: either Visible, Invisible, Gone
+ +
+ - protected string _styleId; + +
- style id to lookup style in theme
+ +
+ - protected Style _ownStyle; + +
- own copy of style - to override some of style properties, null of no properties overriden
+ +
+ - protected uint _state; + +
- widget state (set of flags from State enum)
+ +
+ - protected int _measuredWidth; + +
- width measured by measure()
+ +
+ - protected int _measuredHeight; + +
- height measured by measure()
+ +
+ - protected bool _needLayout; + +
- true to force layout
+ +
+ - protected bool _needDraw; + +
- true to force redraw
+ +
+ - protected Widget _parent; + +
- parent widget
+ +
+ - protected Window _window; + +
- window (to be used for top level widgets only!)
+ +
+ - protected bool _trackHover; + +
- does widget need to track mouse Hover
+ +
+ - const @property bool trackHover(); + +
- mouse movement processing flag (when true, widget will change Hover state while mouse is moving)
+ +
+ - @property Widget trackHover(bool v); + +
- set new trackHover flag value (when true, widget will change Hover state while mouse is moving)
+ +
+ - uint getCursorType(int x, int y); + +
- returns mouse cursor type for widget
+ +
+ - this(string ID = null); + +
- create widget, with optional id
+ +
+ - protected const @property const(Style) style(); + +
- accessor to style - by lookup in theme by styleId (if style id is not set, theme base style will be used).
+ +
+ - protected const @property const(Style) style(uint stateFlags); + +
- accessor to style - by lookup in theme by styleId (if style id is not set, theme base style will be used).
+ +
+ - protected const @property const(Style) stateStyle(); + +
- returns style for current widget state
+ +
+ - protected @property Style ownStyle(); + +
- enforces widget's own style - allows override some of style properties
+ +
+ - const @property string id(); + +
- returns widget id, null if not set
+ +
+ - @property Widget id(string id); + +
- set widget id
+ +
+ - const bool compareId(string id); + +
- compare widget id with specified value, returs true if matches
+ +
+ - const @property uint state(); + +
- widget state (set of flags from State enum)
+ +
+ - protected void handleFocusChange(bool focused); + +
- override to handle focus changes
+ +
+ - protected void handleCheckChange(bool checked); + +
- override to handle check changes
+ +
+ - @property Widget state(uint newState); + +
- set new widget state (set of flags from State enum)
+ +
+ - @property Widget setState(uint stateFlagsToSet); + +
- add state flags (set of flags from State enum)
+ +
+ - @property Widget resetState(uint stateFlagsToUnset); + +
- remove state flags (set of flags from State enum)
+ +
+ - const @property string styleId(); + +
- returns widget style id, null if not set
+ +
+ - @property Widget styleId(string id); + +
- set widget style id
+ +
+ - const @property Rect margins(); + +
- get margins (between widget bounds and its background)
+ +
+ - @property Widget margins(Rect rc); + +
- set margins for widget - override one from style
+ +
+ - const @property Rect padding(); + +
- get padding (between background bounds and content of widget)
+ +
+ - @property Widget padding(Rect rc); + +
- set padding for widget - override one from style
+ +
+ - const @property uint backgroundColor(); + +
- returns background color
+ +
+ - @property Widget backgroundColor(uint color); + +
- set background color for widget - override one from style
+ +
+ - const @property string backgroundImageId(); + +
- background image id
+ +
+ - @property Widget backgroundImageId(string imageId); + +
- background image id
+ +
+ - const @property DrawableRef backgroundDrawable(); + +
- background drawable
+ +
+ - const @property uint alpha(); + +
- widget drawing alpha value (0=opaque .. 255=transparent)
+ +
+ - @property Widget alpha(uint value); + +
- set widget drawing alpha value (0=opaque .. 255=transparent)
+ +
+ - const @property uint textColor(); + +
- get text color (ARGB 32 bit value)
+ +
+ - @property Widget textColor(uint value); + +
- set text color (ARGB 32 bit value)
+ +
+ - @property uint textFlags(); + +
- get text flags (bit set of TextFlag enum values)
+ +
+ - @property Widget textFlags(uint value); + +
- set text flags (bit set of TextFlag enum values)
+ +
+ - const @property string fontFace(); + +
- returns font face
+ +
+ - @property Widget fontFace(string face); + +
- set font face for widget - override one from style
+ +
+ - const @property bool fontItalic(); + +
- returns font style (italic/normal)
+ +
+ - @property Widget fontItalic(bool italic); + +
- set font style (italic/normal) for widget - override one from style
+ +
+ - const @property ushort fontWeight(); + +
- returns font weight
+ +
+ - @property Widget fontWeight(ushort weight); + +
- set font weight for widget - override one from style
+ +
+ - const @property ushort fontSize(); + +
- returns font size in pixels
+ +
+ - @property Widget fontSize(ushort size); + +
- set font size for widget - override one from style
+ +
+ - const @property FontFamily fontFamily(); + +
- returns font family
+ +
+ - @property Widget fontFamily(FontFamily family); + +
- set font family for widget - override one from style
+ +
+ - const @property ubyte alignment(); + +
- returns alignment (combined vertical and horizontal)
+ +
+ - @property Widget alignment(ubyte value); + +
- sets alignment (combined vertical and horizontal)
+ +
+ - @property Align valign(); + +
- returns horizontal alignment
+ +
+ - @property Align halign(); + +
- returns vertical alignment
+ +
+ - const @property FontRef font(); + +
- returns font set for widget using style or set manually
+ +
+ - @property dstring text(); + +
- returns widget content text (override to support this)
+ +
+ - @property Widget text(dstring s); + +
- sets widget content text (override to support this)
+ +
+ - @property Widget text(UIString s); + +
- sets widget content text (override to support this)
+ +
+ - @property bool needLayout(); + +
- returns true if layout is required for widget and its children
+ +
+ - @property bool needDraw(); + +
- returns true if redraw is required for widget and its children
+ +
+ - @property bool animating(); + +
- returns true is widget is being animated - need to call animate() and redraw
+ +
+ - void animate(long interval); + +
- animates window; interval is time left from previous draw, in hnsecs (1/10000000 of second)
+ +
+ - @property auto measuredWidth(); + +
- returns measured width (calculated during measure() call)
+ +
+ - @property auto measuredHeight(); + +
- returns measured height (calculated during measure() call)
+ +
+ - @property int width(); + +
- returns current width of widget in pixels
+ +
+ - @property int height(); + +
- returns current height of widget in pixels
+ +
+ - @property int top(); + +
- returns widget rectangle top position
+ +
+ - @property int left(); + +
- returns widget rectangle left position
+ +
+ - @property Rect pos(); + +
- returns widget rectangle
+ +
+ - @property int minWidth(); + +
- returns min width constraint
+ +
+ - @property int maxWidth(); + +
- returns max width constraint (SIZE_UNSPECIFIED if no constraint set)
+ +
+ - @property int minHeight(); + +
- returns min height constraint
+ +
+ - @property int maxHeight(); + +
- returns max height constraint (SIZE_UNSPECIFIED if no constraint set)
+ +
+ - @property Widget maxWidth(int value); + +
- set max width constraint (SIZE_UNSPECIFIED for no constraint)
+ +
+ - @property Widget minWidth(int value); + +
- set max width constraint (0 for no constraint)
+ +
+ - @property Widget maxHeight(int value); + +
- set max height constraint (SIZE_UNSPECIFIED for no constraint)
+ +
+ - @property Widget minHeight(int value); + +
- set max height constraint (0 for no constraint)
+ +
+ - @property int layoutWidth(); + +
- returns layout width options (WRAP_CONTENT, FILL_PARENT, or some constant value)
+ +
+ - @property int layoutHeight(); + +
- returns layout height options (WRAP_CONTENT, FILL_PARENT, or some constant value)
+ +
+ - @property int layoutWeight(); + +
- returns layout weight (while resizing to fill parent, widget will be resized proportionally to this value)
+ +
+ - @property Widget layoutWidth(int value); + +
- sets layout width options (WRAP_CONTENT, FILL_PARENT, or some constant value)
+ +
+ - @property Widget layoutHeight(int value); + +
- sets layout height options (WRAP_CONTENT, FILL_PARENT, or some constant value)
+ +
+ - @property Widget layoutWeight(int value); + +
- sets layout weight (while resizing to fill parent, widget will be resized proportionally to this value)
+ +
+ - @property Visibility visibility(); + +
- returns widget visibility (Visible, Invisible, Gone)
+ +
+ - @property Widget visibility(Visibility visible); + +
- sets widget visibility (Visible, Invisible, Gone)
+ +
+ - bool isPointInside(int x, int y); + +
- returns true if point is inside of this widget
+ +
+ - @property bool enabled(); + +
- return true if state has State.Enabled flag set
+ +
+ - @property Widget enabled(bool flg); + +
- change enabled state
+ +
+ - @property bool clickable(); + +
- when true, user can click this control, and get onClick listeners called
+ +
+ - @property bool checkable(); + +
- when true, control supports Checked state
+ +
+ - @property bool checked(); + +
- get checked state
+ +
+ - @property Widget checked(bool flg); + +
- set checked state
+ +
+ - @property bool focusable(); + +
- whether widget can be focused
+ +
+ - @property bool wantsKeyTracking(); + +
- override and return true to track key events even when not focused
+ +
+ - @property bool focusGroup(); + +
- When focus group is set for some parent widget, focus from one of containing widgets can be moved using keyboard only to one of other widgets containing in it and cannot bypass bounds of focusGroup.
+
+If focused widget doesn't have any parent with focusGroup == true, focus may be moved to any focusable within window.
+ +
+ - @property Widget focusGroup(bool flg); + +
- set focus group flag for container widget
+ +
+ - Widget focusGroupWidget(); + +
- find nearest parent of this widget with focusGroup flag, returns topmost parent if no focusGroup flag set to any of parents.
+ +
+ - @property ushort tabOrder(); + +
- tab order - hint for focus movement using Tab/Shift+Tab
+ +
+ - @property bool visible(); + +
- returns true if this widget and all its parents are visible
+ +
+ - @property bool canFocus(); + +
- returns true if widget is focusable and visible
+ +
+ - Widget setFocus(); + +
- sets focus to this widget or suitable focusable child, returns previously focused widget
+ +
+ - Widget findFocusableChild(bool defaultOnly); + +
- searches children for first focusable item, returns null if not found
+ +
+ - bool handleAction(const Action a); + +
- override to handle specific actions
+ +
+ - protected Action findKeyAction(uint keyCode, uint flags); + +
- map key to action
+ +
+ - bool onKeyEvent(KeyEvent event); + +
- process key event, return true if event is processed.
+ +
+ - bool onMouseEvent(MouseEvent event); + +
- process mouse event; return true if event is processed by widget.
+ +
+ - Signal!OnClickHandler onClickListener; + +
- on click event listener (bool delegate(Widget))
+ +
+ - Signal!OnCheckHandler onCheckChangeListener; + +
- checked state change event listener (bool delegate(Widget, bool))
+ +
+ - Signal!OnFocusHandler onFocusChangeListener; + +
- focus state change event listener (bool delegate(Widget, bool))
+ +
+ - Signal!OnKeyHandler onKeyListener; + +
- key event listener (bool delegate(Widget, KeyEvent)) - return true if event is processed by handler
+ +
+ - Signal!OnMouseHandler onMouseListener; + +
- mouse event listener (bool delegate(Widget, MouseEvent)) - return true if event is processed by handler
+ +
+ - Widget addOnClickListener(bool delegate(Widget) listener); + +
- helper function to add onCheckChangeListener in method chain
+ +
+ - Widget addOnCheckChangeListener(bool delegate(Widget, bool) listener); + +
- helper function to add onCheckChangeListener in method chain
+ +
+ - Widget addOnFocusChangeListener(bool delegate(Widget, bool) listener); + +
- helper function to add onFocusChangeListener in method chain
+ +
+ - void requestLayout(); + +
- request relayout of widget and its children
+ +
+ - void invalidate(); + +
- request redraw
+ +
+ - protected void measuredContent(int parentWidth, int parentHeight, int contentWidth, int contentHeight); + +
- helper function for implement measure() when widget's content dimensions are known
+ +
+ - 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
+ +
+ - void applyMargins(ref Rect rc); + +
- Helper function: applies margins to rectangle
+ +
+ - void applyPadding(ref Rect rc); + +
- Helper function: applies padding to rectangle
+ +
+ - static void applyAlign(ref Rect rc, Point sz, Align ha, Align va); + +
- Applies alignment for content of size sz - set rectangle rc to aligned value of content inside of initial value of rc.
+ +
+ - void applyAlign(ref Rect rc, Point sz); + +
- Applies alignment for content of size sz - set rectangle rc to aligned value of content inside of initial value of rc.
+ +
+ - bool canShowPopupMenu(int x, int y); + +
- returns true if widget can show popup menu (e.g. by mouse right click at point x,y)
+ +
+ - void showPopupMenu(int x, int y); + +
- shows popup menu at (x,y)
+ +
+ - bool isActionEnabled(const Action action); + +
- override to change popup menu items state
+ +
+ - @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
+ +
+ - bool isChild(Widget item, bool deepSearch = true); + +
- returns true if item is child of this widget (when deepSearch == true - returns true if item is this widget or one of children inside children tree).
+ +
+ - Widget childById(string id, bool deepSearch = true); + +
- find child by id, returns null if not found
+ +
+ - @property Widget parent(); + +
- returns parent widget, null for top level widget
+ +
+ - @property Widget parent(Widget parent); + +
- sets parent for widget
+ +
+ - @property Window window(); + +
- returns window (if widget or its parent is attached to window)
+ +
+ - @property void window(Window window); + +
- sets window (to be used for top level widget from Window implementation). TODO: hide it from API?
+ +
+
- struct ObjectList(T); +
+- object list holder, owning its objects - on destroy of holder, all own objects will be destroyed
-
+ +- const @property int count();
- returns count of items
- - Widget get(int index);
+
- T get(int index);
- get item by index
-
- Widget add(Widget item); +
- T add(T item);
- add item to list
-
- Widget insert(Widget item, int index = -1); +
- T insert(T item, int index = -1);
- add item to list
-
- int indexOf(Widget item); +
- int indexOf(T item);
- find child index for item, return -1 if not found
-
- int indexOf(string id); +
- int indexOf(string id);
- find child index for item by id, return -1 if not found
-
- Widget remove(int index); +
- T remove(int index);
- remove item from list, return removed item
-
- void clear(); +
- void replace(T item, int index); +
+- Replace item with another value, destroy old value.
+
+ +- void clear();
- remove and destroy all items
- class WidgetGroup: dlangui.widgets.widget.Widget; +
- alias WidgetList = ObjectList!(Widget).ObjectList;
-- base class for widgets which have children
+- Widget list holder.
+
+ +- class WidgetGroup: dlangui.widgets.widget.Widget; +
+- Base class for widgets which have children.
- @property int childCount(); diff --git a/win32drawbuf.html b/win32drawbuf.html index a95a6384..772541ac 100644 --- a/win32drawbuf.html +++ b/win32drawbuf.html @@ -1,10 +1,46 @@ - - -
- class Win32Font: dlangui.graphics.fonts.Font; + +
- Font implementation based on Win32 API system fonts.
+ + +
+ - class Win32FontManager: dlangui.graphics.fonts.FontManager; + +
- Font manager implementation based on Win32 API system fonts.
+ +- this(); + +
- initialize in constructor
+ +
+ - bool init(); + +
- initialize font manager by enumerating of system fonts
+ +
+ - FontRef _emptyFontRef; + +
- for returning of not found font
+ +
+ - ref FontRef getFont(int size, int weight, bool italic, FontFamily family, string face); + +
- get font by properties
+ +
+ - FontDef* findFace(FontFamily family); + +
- find font face definition by family only (try to get one of defaults for family if possible)
+ +
+ - FontDef* findFace(string face); + +
- find font face definition by face only
+ +
+ - FontDef* findFace(FontFamily family, string face); + +
- find font face definition by family and face
+ +
+ - bool registerFont(FontFamily family, string fontFace, ubyte pitchAndFamily); + +
- register enumerated font
+ +
+ - void checkpoint(); + +
- clear usage flags for all entries
+ +
+ - void cleanup(); + +
- removes entries not used after last call of checkpoint() or cleanup()
+ +
+
+
dlangui.platforms.windows.win32drawbuf - -dlangui.platforms.windows.win32drawbuf
- + + + + + + + + + + +DlangUI - cross platform GUI library for D programming language - dlangui.platforms.windows.win32drawbuf + + +++ + diff --git a/win32fonts.html b/win32fonts.html index 50db42ef..d772690a 100644 --- a/win32fonts.html +++ b/win32fonts.html @@ -1,10 +1,124 @@ - - -+++ +DlangUI
+Cross Platform GUI for D programming language
++ Home + API Docs + Screenshots + Download .zip + + View on GitHub + + +
++ +dlangui.platforms.windows.win32drawbuf
+
-
Page generated by Ddoc. - ++ Dlangui is maintained by buggins + +
+ This page was generated by GitHub Pages. Tactile theme by Jason Long. +dlangui.platforms.windows.win32fonts - -dlangui.platforms.windows.win32fonts
- -
+ + + + + + + + + + +DlangUI - cross platform GUI library for D programming language - dlangui.platforms.windows.win32fonts + + +++ + diff --git a/winapp.html b/winapp.html index 56e14c0b..79f37aad 100644 --- a/winapp.html +++ b/winapp.html @@ -1,10 +1,52 @@ - - -+++ +DlangUI
+Cross Platform GUI for D programming language
++ Home + API Docs + Screenshots + Download .zip + + View on GitHub + -
Page generated by Ddoc. - +
++ +dlangui.platforms.windows.win32fonts
+ +
++ Dlangui is maintained by buggins + +
+ This page was generated by GitHub Pages. Tactile theme by Jason Long. +dlangui.platforms.windows.winapp - -dlangui.platforms.windows.winapp
- -
+ + + + + + + + + + +DlangUI - cross platform GUI library for D programming language - dlangui.platforms.windows.winapp + + +++ + diff --git a/x11app.html b/x11app.html index 0113dfcc..08f20a55 100644 --- a/x11app.html +++ b/x11app.html @@ -1,10 +1,46 @@ - - -+++ +DlangUI
+Cross Platform GUI for D programming language
++ Home + API Docs + Screenshots + Download .zip + + View on GitHub + -
Page generated by Ddoc. - +
++ +dlangui.platforms.windows.winapp
+ +
+ + ++ Dlangui is maintained by buggins + +
+ This page was generated by GitHub Pages. Tactile theme by Jason Long. +src.dlangui.platforms.x11.x11app - -src.dlangui.platforms.x11.x11app
- + + + + + + + + + + +DlangUI - cross platform GUI library for D programming language - src.dlangui.platforms.x11.x11app + + +++ ++++ +DlangUI
+Cross Platform GUI for D programming language
++ Home + API Docs + Screenshots + Download .zip + + View on GitHub + + +
++ +src.dlangui.platforms.x11.x11app
+
-
Page generated by Ddoc. - ++ Dlangui is maintained by buggins + +
+ This page was generated by GitHub Pages. Tactile theme by Jason Long. + - converts XML attribute name to State (see http://developer.android.com/guide/topics/resources/drawable-resource.html#StateList)
- class FrameDrawable: dlangui.graphics.resources.Drawable;
+