Update README and brushed up examples

This commit is contained in:
haru-s 2024-05-17 22:15:35 +09:00
parent 95c263c566
commit 2210579249
30 changed files with 188 additions and 59 deletions

View file

@ -4,16 +4,16 @@ This unofficial project is a migration of [D Forms Library (DFL)](http://wiki.dp
DFL is a Win32 windowing library for the D language. DFL is a Win32 windowing library for the D language.
## Recent major features ## Recent major features
- **Module "dfl.chart" is now comming.** - **Registered DFL to DUB.**
- TableRenderer (with example) - **Support multiple screens.**
- LineGraphRenderer (with example) - Module "dfl.chart" is now comming.
- **TimeChartRenderer (with example)** - TableRenderer (with example)
- Add simple clock "Dclock" as an example of DFL application. - LineGraphRenderer (with example)
- TimeChartRenderer (with example)
- Module "dfl.printing" is now comming. - Module "dfl.printing" is now comming.
- PrintDialog - PrintDialog
- PrintSetupDialog - PrintSetupDialog
- PrintPreviewDialog - PrintPreviewDialog
- DUB is available for DFL.
- Remove dflexe. - Remove dflexe.
- Remove GTK-based DFL. - Remove GTK-based DFL.
- Remove some bundled libraries such as user32_dfl.lib etc... (From now on, use dmd-bundled libraries such as the MinGW platform library and so on.) - Remove some bundled libraries such as user32_dfl.lib etc... (From now on, use dmd-bundled libraries such as the MinGW platform library and so on.)
@ -44,7 +44,29 @@ DFL is a Win32 windowing library for the D language.
![screen shot](./examples/linegraphrenderer/image/screenshot.png "screen shot") ![screen shot](./examples/linegraphrenderer/image/screenshot.png "screen shot")
![screen shot](./examples/timechartrenderer/image/screenshot.png "screen shot") ![screen shot](./examples/timechartrenderer/image/screenshot.png "screen shot")
## Build and Install (dfl.lib and dfl_debug.lib) ## Usage
First, you make new DUB project:
```bat
> cd examples\new_project
> dub init
```
Add DFL to local DUB registry:
```bat
> dub add dfl
> dub list
Packages present in the system and known to dub:
dfl 0.10.0: c:\your\path\dfl\0.10.0\dfl\
silly 1.2.0-dev.2: c:\your\path\silly\1.2.0-dev.2\silly\
undead 1.1.8: c:\your\path\undead\1.1.8\undead\
```
Build and run your GUI applications with DUB as below:
```bat
> dub build -a=x86_64
> dub run
```
**IMPORTANT**: DUB is building **dfl_dub.lib** that is **not** containing **undead.lib** and WINSDK libraries.
## APPENDIX: Build and Install dfl.lib and dfl_debug.lib
### 1. Set environment variables ### 1. Set environment variables
Fix the paths below: Fix the paths below:
```bat ```bat
@ -93,25 +115,6 @@ In order to make and move *.lib to paths below:
- **go.bat 32mscoff** (MSVC required) : ditto - **go.bat 32mscoff** (MSVC required) : ditto
- **go64.bat** (MSVC required) : Make and move *.lib to %dmd_path%\lib64 - **go64.bat** (MSVC required) : Make and move *.lib to %dmd_path%\lib64
## With DUB **(RECOMMENDED)**
First, add DFL to local DUB registry:
```bat
> cd dfl
> dub add-local .
> dub list
Packages present in the system and known to dub:
dfl ~master: c:\your\path\dfl\
```
Build and run your GUI applications with DUB as below:
```bat
> cd examples\hello_dfl
> dub build -a=x86_omf
> dub run
```
See also **./examples/hello_dfl/dub.json**.
**IMPORTANT**: DUB is building **dfl_dub.lib** that is **not** containing **undead.lib** and WINSDK libraries.
## License ## License
DFL is under the boost and/or zlib/libpng license. DFL is under the boost and/or zlib/libpng license.

View file

@ -12,7 +12,10 @@
"problemMatcher": [ "problemMatcher": [
"$dmd" "$dmd"
], ],
"group": "build", "group": {
"kind": "build",
"isDefault": true
},
"label": "dub: Build buttons_sample", "label": "dub: Build buttons_sample",
"detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application" "detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application"
} }

View file

@ -12,7 +12,10 @@
"problemMatcher": [ "problemMatcher": [
"$dmd" "$dmd"
], ],
"group": "build", "group": {
"kind": "build",
"isDefault": true
},
"label": "dub: Build clipboard_sample", "label": "dub: Build clipboard_sample",
"detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application" "detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application"
} }

View file

@ -12,7 +12,10 @@
"problemMatcher": [ "problemMatcher": [
"$dmd" "$dmd"
], ],
"group": "build", "group": {
"kind": "build",
"isDefault": true
},
"label": "dub: Build clippingform_sample", "label": "dub: Build clippingform_sample",
"detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application" "detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application"
} }

View file

@ -12,7 +12,10 @@
"problemMatcher": [ "problemMatcher": [
"$dmd" "$dmd"
], ],
"group": "build", "group": {
"kind": "build",
"isDefault": true
},
"label": "dub: Build contextmenu_sample", "label": "dub: Build contextmenu_sample",
"detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application" "detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application"
} }

View file

@ -12,7 +12,10 @@
"problemMatcher": [ "problemMatcher": [
"$dmd" "$dmd"
], ],
"group": "build", "group": {
"kind": "build",
"isDefault": true
},
"label": "dub: Build dclock", "label": "dub: Build dclock",
"detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application" "detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application"
} }

View file

@ -12,7 +12,10 @@
"problemMatcher": [ "problemMatcher": [
"$dmd" "$dmd"
], ],
"group": "build", "group": {
"kind": "build",
"isDefault": true
},
"label": "dub: Build draganddrop_sample", "label": "dub: Build draganddrop_sample",
"presentation": { "presentation": {
"clear": true "clear": true

View file

@ -12,7 +12,10 @@
"problemMatcher": [ "problemMatcher": [
"$dmd" "$dmd"
], ],
"group": "build", "group": {
"kind": "build",
"isDefault": true
},
"label": "dub: Build dragdroplistbox_sample", "label": "dub: Build dragdroplistbox_sample",
"presentation": { "presentation": {
"clear": true "clear": true

View file

@ -12,7 +12,10 @@
"problemMatcher": [ "problemMatcher": [
"$dmd" "$dmd"
], ],
"group": "build", "group": {
"kind": "build",
"isDefault": true
},
"label": "dub: Build hello_dfl", "label": "dub: Build hello_dfl",
"detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application" "detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application"
} }

View file

@ -12,7 +12,10 @@
"problemMatcher": [ "problemMatcher": [
"$dmd" "$dmd"
], ],
"group": "build", "group": {
"kind": "build",
"isDefault": true
},
"label": "dub: Build imagelist_sample", "label": "dub: Build imagelist_sample",
"detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application" "detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application"
} }

13
examples/label/.vscode/launch.json vendored Normal file
View file

@ -0,0 +1,13 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "C++ Launch (Windows) label",
"type": "cppvsdbg",
"request": "launch",
"cwd": "${workspaceRoot}",
"program": "./bin/label_sample.exe",
"console": "internalConsole"
}
]
}

23
examples/label/.vscode/tasks.json vendored Normal file
View file

@ -0,0 +1,23 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "dub",
"run": false,
"cwd": ".",
"compiler": "$current",
"archType": "$current",
"buildType": "$current",
"configuration": "$current",
"problemMatcher": [
"$dmd"
],
"group": {
"kind": "build",
"isDefault": true
},
"label": "dub: Build label_sample",
"detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application"
}
]
}

View file

@ -0,0 +1,12 @@
{
"folders": [
{
"path": "."
}
],
"settings": {
"d.projectImportPaths": [
"..\\..\\..\\dfl\\source"
]
}
}

View file

@ -12,7 +12,10 @@
"problemMatcher": [ "problemMatcher": [
"$dmd" "$dmd"
], ],
"group": "build", "group": {
"kind": "build",
"isDefault": true
},
"label": "dub: Build linegraphrenderer_sample", "label": "dub: Build linegraphrenderer_sample",
"detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application" "detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application"
} }

View file

@ -12,7 +12,10 @@
"problemMatcher": [ "problemMatcher": [
"$dmd" "$dmd"
], ],
"group": "build", "group": {
"kind": "build",
"isDefault": true
},
"label": "dub: Build listview_sample", "label": "dub: Build listview_sample",
"detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application" "detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application"
} }

View file

@ -12,7 +12,10 @@
"problemMatcher": [ "problemMatcher": [
"$dmd" "$dmd"
], ],
"group": "build", "group": {
"kind": "build",
"isDefault": true
},
"label": "dub: Build notifyicon_sample", "label": "dub: Build notifyicon_sample",
"detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application" "detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application"
} }

View file

@ -12,7 +12,10 @@
"problemMatcher": [ "problemMatcher": [
"$dmd" "$dmd"
], ],
"group": "build", "group": {
"kind": "build",
"isDefault": true
},
"label": "dub: Build picturebox_sample", "label": "dub: Build picturebox_sample",
"detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application" "detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application"
} }

View file

@ -12,7 +12,10 @@
"problemMatcher": [ "problemMatcher": [
"$dmd" "$dmd"
], ],
"group": "build", "group": {
"kind": "build",
"isDefault": true
},
"label": "dub: Build progressbar_sample", "label": "dub: Build progressbar_sample",
"detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application" "detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application"
} }

View file

@ -12,7 +12,10 @@
"problemMatcher": [ "problemMatcher": [
"$dmd" "$dmd"
], ],
"group": "build", "group": {
"kind": "build",
"isDefault": true
},
"label": "dub: Build richtextbox_sample", "label": "dub: Build richtextbox_sample",
"detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application", "detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application",
"presentation": { "presentation": {

View file

@ -12,7 +12,10 @@
"problemMatcher": [ "problemMatcher": [
"$dmd" "$dmd"
], ],
"group": "build", "group": {
"kind": "build",
"isDefault": true
},
"label": "dub: Build scrollbar_example", "label": "dub: Build scrollbar_example",
"detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application" "detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application"
} }

View file

@ -3,7 +3,7 @@
"tasks": [ "tasks": [
{ {
"type": "dub", "type": "dub",
"run": true, "run": false,
"cwd": ".", "cwd": ".",
"compiler": "$current", "compiler": "$current",
"archType": "$current", "archType": "$current",
@ -12,7 +12,10 @@
"problemMatcher": [ "problemMatcher": [
"$dmd" "$dmd"
], ],
"group": "build", "group": {
"kind": "build",
"isDefault": true
},
"label": "dub: Build splitter_sample", "label": "dub: Build splitter_sample",
"detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application" "detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application"
} }

View file

@ -12,7 +12,10 @@
"problemMatcher": [ "problemMatcher": [
"$dmd" "$dmd"
], ],
"group": "build", "group": {
"kind": "build",
"isDefault": true
},
"label": "dub: Build statusbar_sample", "label": "dub: Build statusbar_sample",
"detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application" "detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application"
} }

View file

@ -3,7 +3,7 @@
"tasks": [ "tasks": [
{ {
"type": "dub", "type": "dub",
"run": true, "run": false,
"cwd": ".", "cwd": ".",
"compiler": "$current", "compiler": "$current",
"archType": "$current", "archType": "$current",
@ -12,7 +12,10 @@
"problemMatcher": [ "problemMatcher": [
"$dmd" "$dmd"
], ],
"group": "build", "group": {
"kind": "build",
"isDefault": true
},
"label": "dub: Build tabcontrol_sample", "label": "dub: Build tabcontrol_sample",
"detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application" "detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application"
} }

View file

@ -12,7 +12,10 @@
"problemMatcher": [ "problemMatcher": [
"$dmd" "$dmd"
], ],
"group": "build", "group": {
"kind": "build",
"isDefault": true
},
"label": "dub: Build tablerenderer_sample", "label": "dub: Build tablerenderer_sample",
"detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application" "detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application"
} }

View file

@ -3,7 +3,7 @@
"tasks": [ "tasks": [
{ {
"type": "dub", "type": "dub",
"run": true, "run": false,
"cwd": ".", "cwd": ".",
"compiler": "$current", "compiler": "$current",
"archType": "$current", "archType": "$current",
@ -12,7 +12,10 @@
"problemMatcher": [ "problemMatcher": [
"$dmd" "$dmd"
], ],
"group": "build", "group": {
"kind": "build",
"isDefault": true
},
"label": "dub: Build textbox_sample", "label": "dub: Build textbox_sample",
"detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application" "detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application"
} }

View file

@ -12,7 +12,10 @@
"problemMatcher": [ "problemMatcher": [
"$dmd" "$dmd"
], ],
"group": "build", "group": {
"kind": "build",
"isDefault": true
},
"label": "dub: Build timechartrenderer_sample", "label": "dub: Build timechartrenderer_sample",
"detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application" "detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application"
} }

View file

@ -12,7 +12,10 @@
"problemMatcher": [ "problemMatcher": [
"$dmd" "$dmd"
], ],
"group": "build", "group": {
"kind": "build",
"isDefault": true
},
"label": "dub: Build timer_sample", "label": "dub: Build timer_sample",
"detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application" "detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application"
} }

View file

@ -12,7 +12,10 @@
"problemMatcher": [ "problemMatcher": [
"$dmd" "$dmd"
], ],
"group": "build", "group": {
"kind": "build",
"isDefault": true
},
"label": "dub: Build toolbar_sample", "label": "dub: Build toolbar_sample",
"detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application" "detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application"
} }

View file

@ -12,7 +12,10 @@
"problemMatcher": [ "problemMatcher": [
"$dmd" "$dmd"
], ],
"group": "build", "group": {
"kind": "build",
"isDefault": true
},
"label": "dub: Build tooltip_sample", "label": "dub: Build tooltip_sample",
"detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application" "detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application"
} }

View file

@ -3,7 +3,7 @@
"tasks": [ "tasks": [
{ {
"type": "dub", "type": "dub",
"run": true, "run": false,
"cwd": ".", "cwd": ".",
"compiler": "$current", "compiler": "$current",
"archType": "$current", "archType": "$current",
@ -12,7 +12,10 @@
"problemMatcher": [ "problemMatcher": [
"$dmd" "$dmd"
], ],
"group": "build", "group": {
"kind": "build",
"isDefault": true
},
"label": "dub: Build trackbar_sample", "label": "dub: Build trackbar_sample",
"detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application" "detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application"
} }