diff --git a/examples/buttons/dub.json b/examples/buttons/dub.json index dba7b0d..63b4861 100644 --- a/examples/buttons/dub.json +++ b/examples/buttons/dub.json @@ -1,6 +1,6 @@ { "authors": ["haru-s"], - "copyright": "Copyright (C) 2022 haru-s", + "copyright": "Copyright (C) 2023 haru-s", "description": "DFL sample code.", "name": "buttons_example", "targetType": "executable", diff --git a/examples/label/dub.json b/examples/label/dub.json index 07ea5e6..7ba7ff8 100644 --- a/examples/label/dub.json +++ b/examples/label/dub.json @@ -1,6 +1,6 @@ { "authors": ["haru-s"], - "copyright": "Copyright (C) 2022 haru-s", + "copyright": "Copyright (C) 2023 haru-s", "description": "DFL sample code.", "name": "label_sample", "targetType": "executable", diff --git a/examples/statusbar/.gitignore b/examples/statusbar/.gitignore new file mode 100644 index 0000000..60a5f2a --- /dev/null +++ b/examples/statusbar/.gitignore @@ -0,0 +1,16 @@ +.dub +docs.json +__dummy.html +docs/ +/hello_dfl +hello_dfl.so +hello_dfl.dylib +hello_dfl.dll +hello_dfl.a +hello_dfl.lib +hello_dfl-test-* +*.exe +*.pdb +*.o +*.obj +*.lst diff --git a/examples/statusbar/.vscode/tasks.json b/examples/statusbar/.vscode/tasks.json new file mode 100644 index 0000000..a472fc9 --- /dev/null +++ b/examples/statusbar/.vscode/tasks.json @@ -0,0 +1,20 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "type": "dub", + "run": true, + "cwd": ".", + "compiler": "$current", + "archType": "$current", + "buildType": "$current", + "configuration": "$current", + "problemMatcher": [ + "$dmd" + ], + "group": "build", + "label": "dub: Build statusbar_sample", + "detail": "dub build --compiler=dmd.EXE -a=x86_64 -b=debug -c=application" + } + ] +} \ No newline at end of file diff --git a/examples/statusbar/dub.json b/examples/statusbar/dub.json new file mode 100644 index 0000000..2c2c838 --- /dev/null +++ b/examples/statusbar/dub.json @@ -0,0 +1,16 @@ +{ + "authors": ["haru-s"], + "copyright": "Copyright (C) 2023 haru-s", + "description": "DFL sample code.", + "name": "statusbar_sample", + "targetType": "executable", + "targetPath": "bin", + "dependencies": { + "dfl": { + "path": "../../../dfl" + } + }, + "lflags-windows-x86_omf-dmd": ["/exet:nt/su:windows:6.0"], + "lflags-windows-x86_mscoff-dmd": ["/SUBSYSTEM:WINDOWS", "/ENTRY:mainCRTStartup"], + "lflags-windows-x86_64-dmd": ["/SUBSYSTEM:WINDOWS", "/ENTRY:mainCRTStartup"] +} \ No newline at end of file diff --git a/examples/statusbar/dub.selections.json b/examples/statusbar/dub.selections.json new file mode 100644 index 0000000..203d1ff --- /dev/null +++ b/examples/statusbar/dub.selections.json @@ -0,0 +1,7 @@ +{ + "fileVersion": 1, + "versions": { + "dfl": {"path":"../.."}, + "undead": "1.1.8" + } +} diff --git a/examples/statusbar/shell.bat b/examples/statusbar/shell.bat new file mode 100644 index 0000000..49ab56b --- /dev/null +++ b/examples/statusbar/shell.bat @@ -0,0 +1,3 @@ +set dmd_path=c:\d\dmd2\windows +set dmc_path=c:\dmc\dm +cmd diff --git a/examples/statusbar/source/statusbar_sample.d b/examples/statusbar/source/statusbar_sample.d new file mode 100644 index 0000000..c944aae --- /dev/null +++ b/examples/statusbar/source/statusbar_sample.d @@ -0,0 +1,50 @@ +import dfl; +import std.conv; + +version(Have_dfl) // For DUB. +{ +} +else +{ + pragma(lib, "dfl.lib"); +} + +class MainForm : Form +{ + private StatusBar _statusBar; + + this() + { + this.text = "StatusBar example"; + this.size = Size(300, 300); + + _statusBar = new StatusBar(); + + StatusBarPanel panel1 = new StatusBarPanel("Click count:"); + StatusBarPanel panel2 = new StatusBarPanel("Second panel"); + StatusBarPanel panel3 = new StatusBarPanel("Third panel"); + + panel1.borderStyle = StatusBarPanelBorderStyle.SUNKEN; + panel2.borderStyle = StatusBarPanelBorderStyle.RAISED; + panel3.borderStyle = StatusBarPanelBorderStyle.NONE; + + panel1.width = 100; + + _statusBar.panels.add(panel1); + _statusBar.panels.add(panel2); + _statusBar.panels.add(panel3); + + _statusBar.showPanels = true; + _statusBar.parent = this; + + this.click ~= (Control c, EventArgs e) { + static int counter; + panel1.text = "Click count: " ~ to!string(++counter); + }; + } +} + +void main() +{ + Application.run(new MainForm()); +} diff --git a/examples/statusbar/statusbar.code-workspace b/examples/statusbar/statusbar.code-workspace new file mode 100644 index 0000000..7e696bc --- /dev/null +++ b/examples/statusbar/statusbar.code-workspace @@ -0,0 +1,12 @@ +{ + "folders": [ + { + "path": "." + } + ], + "settings": { + "d.projectImportPaths": [ + "..\\..\\..\\dfl\\source" + ] + } +} \ No newline at end of file diff --git a/examples/tabcontrol/dub.json b/examples/tabcontrol/dub.json index f426939..91bf8ab 100644 --- a/examples/tabcontrol/dub.json +++ b/examples/tabcontrol/dub.json @@ -1,6 +1,6 @@ { "authors": ["haru-s"], - "copyright": "Copyright (C) 2022 haru-s", + "copyright": "Copyright (C) 2023 haru-s", "description": "DFL sample code.", "name": "tabcontrol_sample", "targetType": "executable",