forked from buggins/dlangui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
params.json
1 lines (1 loc) · 8.64 KB
/
params.json
1
{"name":"Dlangui","tagline":"Cross Platform GUI for D programming language","body":"Dlang UI\r\n========\r\n\r\nGUI for D programming language, written in D.\r\n\r\nAlpha stage of development.\r\n\r\n* Crossplatform (Win32 and Linux are supported in current version); can use SDL2 as a backend.\r\n* Mostly inspired by Android UI API (layouts, styles, two phase layout, ...)\r\n* Supports highly customizable UI themes and styles\r\n* Supports internationalization\r\n* Hardware acceleration using OpenGL (when built with version USE_OPENGL)\r\n* Fallback to Win32 API / XCB when OpenGL is not available\r\n* Actually it's a port (with major refactoring) of GUI library for cross platform OpenGL based implementation of Cool Reader app project from C++.\r\n* Almost ready for 2D games development\r\n* Goal: provide set of widgets suitable for building of IDE.\r\n* Non thread safe\r\n\r\n\r\n\r\nWidgets\r\n-------\r\n\r\n* Widget - base class for all widgets and widget containers, similar to Android's View\r\n\r\nCurrently implemented widgets:\r\n\r\n* TextWidget - simple static text (TODO: implement multiline formatting)\r\n* ImageWidget - static image\r\n* Button - simple button with text label\r\n* ImageButton - image only button\r\n* TextImageButton - button with icon and label\r\n* CheckBox - check button with label\r\n* RadioButton - radio button with label\r\n* EditLine - single line edit\r\n* EditBox - multiline editor\r\n* VSpacer - vertical spacer - just an empty widget with layoutHeight == FILL_PARENT, to fill vertical space in layouts\r\n* HSpacer - horizontal spacer - just an empty widget with layoutWidth == FILL_PARENT, to fill horizontal space in layouts\r\n* ScrollBar - scroll bar\r\n* TabControl - tabs widget, allows to select one of tabs\r\n* TabHost - container for pages controlled by TabControl\r\n* TabWidget - combination of TabControl and TabHost\r\n\r\nLayouts\r\n-------\r\n\r\nSimilar to layouts in Android\r\n\r\n* LinearLayout - layout children horizontally or vertically depending on orientation\r\n* VerticalLayout - just a LinearLayout with vertical orientation\r\n* HorizontalLayout - just a LinearLayout with vertical orientation\r\n* FrameLayout - all children occupy the same place; usually onle one of them is visible\r\n* TableLayout - children are aligned into rows and columns of table\r\n\r\n\r\nList Views\r\n----------\r\n\r\nLists are implemented similar to Android UI API.\r\n\r\n* ListWidget - layout dynamic items horizontally or vertically (one in row/column) with automatic scrollbar; can reuse widgets for similar items\r\n* ListAdapter - interface to provide data and widgets for ListWidget\r\n* WidgetListAdapter - simple implementation of ListAdapter interface - just a list of widgets (one per list item) to show\r\n\r\nTODOs:\r\n\r\n* Multicolumn lists\r\n* Tree view\r\n\r\nResources\r\n---------\r\n\r\nResources like fonts and images use reference counting. For proper resource freeing, always destroy widgets implicitly.\r\n\r\n* FontManager: provides access to fonts\r\n* Images: .png or .jpg images; if filename ends with .9.png, it's autodetected as nine-patch image (see Android drawables description)\r\n* StateDrawables: .xml file can describe list of other drawables to choose based on widget's State (.xml files from android themes can be used directly)\r\n* imageCache allows to cache unpacked images\r\n* drawableCache provides access by resource id (string, usually filename w/o extension) to drawables located in specified list of resource directories.\r\n\r\nStyles and Themes\r\n-----------------\r\n\r\nStyles and themes are a bit similar to ones in Android API.\r\n\r\n* Theme is a container for styles. Can be load from XML theme resource file.\r\n* Styles are accessible in theme by string ID.\r\n* Styles can be nested to form hiararchy - when some attribute is missing in style, value from base style will be used.\r\n* State substyles are supported: allow to change widget appearance dynamically based on its state.\r\n* Widgets use style attributes directly from assigned style. When some attribute is being changed in widget, it creates its own copy of base style, \r\nwhich allows to modify some of attributes, while getting base style attributes if they are not changed in widget. This trick can minimize memory usage for widget attributes when \r\nstandard values are used.\r\n\r\n\r\n\r\nWin32 builds\r\n------------\r\n\r\n* Under windows, uses SDL2 or Win32 API as backend.\r\n* Optionally, may use OpenGL acceleration via DerelictGL3/WGL.\r\n* Uses Win32 API for font rendering.\r\n* Optinally can use FreeType for font rendering.\r\n\r\n\r\n\r\nBuild and run using DUB:\r\n\r\n git clone https://github.com/buggins/dlangui.git\r\n cd dlangui\r\n dub run dlangui:example1\r\n\r\n\r\n\r\nTo develop using Visual-D, download sources for dlabgui and dependencies into some directory:\r\n\r\n git clone https://github.com/buggins/dlangui.git\r\n git clone https://github.com/DerelictOrg/DerelictUtil.git\r\n git clone https://github.com/DerelictOrg/DerelictGL3.git\r\n git clone https://github.com/DerelictOrg/DerelictFI.git\r\n git clone https://github.com/DerelictOrg/DerelictFT.git\r\n git clone https://github.com/DerelictOrg/DerelictSDL2.git\r\n\r\nThen open .sln using Visual D.\r\n\r\n\r\n\r\n\r\nLinux builds\r\n------------\r\n\r\n* Uses SDL2 or XCB as a backend (SDL2 is recommended, since has better support now).\r\n* Uses shared memory images for faster drawing.\r\n* Uses FreeType for font rendering.\r\n* TODO: Use FontConfig to get font list.\r\n* OpenGL is now working under SDL2 only.\r\n* Entering of unicode characters is now working under SDL2 only.\r\n\r\n\r\nFor linux build with SDL2 backend, following libraries are required:\r\n\r\n libsdl2\r\n\r\nTo build dlangui apps with XCB backend, development packages for following libraries required for XCB backend build:\r\n\r\n xcb, xcb-util, xcb-shm, xcb-image, xcb-keysyms, X11-xcb, X11\r\n\r\nE.g. in Ubuntu, you can use following command to enable SDL2 backend builds:\r\n\r\n sudo apt-get install libsdl2-dev\r\n\r\nor (for XCB backend)\r\n\r\n sudo apt-get install libxcb-image0-dev libxcb-shm0-dev libxcb-keysyms1-dev libfreeimage-dev\r\n\r\n\r\nIn runtime, .so for following libraries are being loaded (binary packages required):\r\n\r\n freetype, opengl, freeimage\r\n\r\n\r\nBuild and run on Linux using DUB:\r\n\r\n dub run dlangui:example1\r\n\r\nDevelopment using Mono-D: \r\n\r\n* open solution dlangui/dlanguimonod.sln \r\n* build and run project example1\r\n\r\nYou need fresh version of MonoDevelop to use Mono-D. It can be installed from PPA repository.\r\n\r\n sudo add-apt-repository ppa:ermshiperete/monodevelop\r\n sudo apt-get update\r\n sudo apt-get install monodevelop-current\r\n\r\n\r\nOther platforms\r\n---------------\r\n\r\n* Other platforms support may be added easy\r\n\r\n\r\nThird party components used\r\n---------------------------\r\n\r\n* DerelictGL3 - for OpenGL support\r\n* DerelictFT + FreeType library support under linux and optionally under Windows.\r\n* DerelictFI + FreeImage library support for decoding of images\r\n* DerelictSDL2 + SDL2 for cross platform support\r\n* WindowsAPI bindings from http://www.dsource.org/projects/bindings/wiki/WindowsApi (patched)\r\n* XCB and X11 bindings (patched) when SDL2 is not used; TODO: provide links\r\n\r\n\r\nHello World\r\n--------------------------------------------------------------\r\n\r\n\t// main.d\r\n\timport dlangui;\r\n\tmixin DLANGUI_ENTRY_POINT;\r\n\r\n\t/// entry point for dlangui based application\r\n\textern (C) int UIAppMain(string[] args) {\r\n\t // resource directory search paths\r\n\t string[] resourceDirs = [\r\n\t appendPath(exePath, \"../res/\"), // for Visual D and DUB builds\r\n\t appendPath(exePath, \"../../res/\") // for Mono-D builds\r\n\t ];\r\n\r\n\t // setup resource directories - will use only existing directories\r\n\t Platform.instance.resourceDirs = resourceDirs;\r\n\t // select translation file - for english language\r\n\t Platform.instance.uiLanguage = \"en\";\r\n\t // load theme from file \"theme_default.xml\"\r\n\t Platform.instance.uiTheme = \"theme_default\";\r\n\t\r\n\t // create window\r\n\t Window window = Platform.instance.createWindow(\"My Window\", null);\r\n\t // create some widget to show in window\r\n\t window.mainWidget = (new Button()).text(\"Hello world\"d).textColor(0xFF0000); // red text\r\n\t // show window\r\n\t window.show();\r\n\t // run message loop\r\n\t return Platform.instance.enterMessageLoop();\r\n\t}\r\n","google":"","note":"Don't delete this file! It's used internally to help with page regeneration."}