kapstok / NHL-DePa2 (public) (License: Unspecified) (since 2018-11-09) (hash sha1)
Design Patterns school project; a GUI using multiple Design Patterns.
List of commits:
Subject Hash Author Date (UTC)
Fix ability to nest in Groups. fd546a42ef54bdf5d2966eb7facbbf21a6b72e1b Jan Allersma 2018-11-06 17:49:11
Fix file I/O for single entities. 093b7d31a215067212927b1d92bdbbee306ea345 Jan Allersma 2018-11-06 16:49:55
Fix file I/O issue. 25c0b40db223c806eb3ea8bd28238dedc38ca8b5 Jan Allersma 2018-11-02 16:22:59
Cleanup commenting. 445aea4a5115c9110a097bfc7ac9f7d5ad48a9e7 Jan Allersma 2018-11-02 14:33:08
Show Ornaments on Canvas. d8456f15d69550c4cb0aa615cccb96b45a77f6a6 Jan Allersma 2018-11-02 14:08:47
Support Entities for Create & Destruct commands. cc900579eedf9c6288ce1c1883122856794e05a0 Jan Allersma 2018-11-02 13:25:43
Use entities instead of shapes when constructing ornaments. 13f08847624489f60a37db55c2aedbba6b021f98 Jan Allersma 2018-11-01 17:02:47
Remove obsolete 'calcBounds' function. 475ec330736b5800d12d091415480b163dd244e2 Jan Allersma 2018-11-01 14:28:29
Setup for decorator pattern. 762914dec31b1fb1d4cf6bb0cef2e148010652a4 Jan Allersma 2018-11-01 14:12:51
Revert commit '5678eb6'. 6225242719b2cfc5ee0de9f8d05edbc7a69007a7 Jan Allersma 2018-11-01 14:10:27
Make groups movable and resizable. 1ca7c18ab103a8d1055b27f63192038fd75aef3e Jan Allersma 2018-10-17 14:51:32
Use translations instead of positions for moving shapes. 9551c7d2608f01c3950743fd97bd217aab8f5766 Jan Allersma 2018-10-16 16:11:03
Implement Visitor pattern for Groups. bd30477ce616362d3f58cef072d1ebc78077fa85 Jan Allersma 2018-10-16 13:28:37
Implement Visitor pattern for Shapes. e52412c3059c1ee5fa9abdf4a32db0f47981eee1 Jan Allersma 2018-10-16 12:43:17
Setup 'Decorator' and 'Ornament' class. 5678eb6257bcf88502078d08395a394a1c24568b Jan Allersma 2018-10-09 09:29:50
Use different strats instead of seperate Shapes. a56e1e665a0292d15139eddfd8ebdeb8c95251b4 Jan Allersma 2018-10-01 11:37:45
Make ornament interface compatible with Entities. 21383d5f200a338f8255d7d33b6989937c19fed6 Jan Allersma 2018-10-08 20:36:23
Fix bug in Rect from commit 6c91140 in other Shapes as well. 4165a5da98dd9a548a222c6160390e4e54026d48 Jan Allersma 2018-09-28 14:53:40
Build interface for ornament creation. adcf22a4e878edc45ac0775a5e15ebf0bb1a937d Jan Allersma 2018-10-08 13:53:52
Fully implement File I/O. 45cbb48489a24857cfc76144b38b12ccebfd9e61 Jan Allersma 2018-09-27 16:03:40
Commit fd546a42ef54bdf5d2966eb7facbbf21a6b72e1b - Fix ability to nest in Groups.
Author: Jan Allersma
Author date (UTC): 2018-11-06 17:49
Committer name: Jan Allersma
Committer date (UTC): 2018-11-06 17:49
Parent(s): 093b7d31a215067212927b1d92bdbbee306ea345
Signing key:
Tree: 02e20f0cf78dd4b2551e358bffbbe2b3b6ff22f5
File Lines added Lines deleted
README.md 2 1
source/brush.d 1 1
source/entities/group.d 3 4
source/frontend/menubar.d 2 2
source/groups.d 6 2
File README.md changed (mode: 100644) (index b38bb0d..20dd717)
... ... maar subgroepen niet.
49 49
50 50 - Groups worden nog niet goed geladen: ze verliezen hun kleurtje. - Groups worden nog niet goed geladen: ze verliezen hun kleurtje.
51 51
52 - Decorator moet nog 'group' en 'active' correct implementeren.
52 - Kan een `Global.Brush.clone` niet gewoon een Entity zijn? Dan hoef je
53 denk ik niet `Global.Brush.cloneGroup` te gebruiken.
File source/brush.d changed (mode: 100644) (index 763992e..f270929)
... ... module dp.brush;
2 2
3 3 import dp.ent.entity; import dp.ent.entity;
4 4
5 static bool cloneGroup;
5 static bool cloneGroup; // Move clone's group instead of clone?
6 6 static Shape clone; static Shape clone;
7 7 static string shape; static string shape;
8 8 static double red; static double red;
File source/entities/group.d changed (mode: 100644) (index 8ec8a61..f7518ee)
... ... class Group : Entity {
15 15 private double s; private double s;
16 16
17 17 this() { this() {
18 auto random = rndGen();
19 18 s = 1; s = 1;
20 19 entities = []; entities = [];
21 20 active = true; active = true;
22 21 colour = [ colour = [
23 uniform(0.00L, 1.00L, random),
24 uniform(0.00L, 1.00L, random),
25 uniform(0.00L, 1.00L, random)
22 uniform(0.00L, 1.00L, rndGen()),
23 uniform(0.00L, 1.00L, rndGen()),
24 uniform(0.00L, 1.00L, rndGen())
26 25 ]; ];
27 26 } }
28 27
File source/frontend/menubar.d changed (mode: 100644) (index ce34001..20b66c2)
... ... public class GroupMenu : MenuItem { // protected
182 182
183 183 private bool activateCallback(Event event, Widget widget) { private bool activateCallback(Event event, Widget widget) {
184 184 size_t index = existingGroups.length; size_t index = existingGroups.length;
185 existingGroups.length = Global.Groups.length;
185 existingGroups.length = Global.Groups.count;
186 186
187 187 for(size_t i = index; i < existingGroups.length; i++) { for(size_t i = index; i < existingGroups.length; i++) {
188 188 existingGroups[i] = new MenuItem("Group " ~ to!string(i)); existingGroups[i] = new MenuItem("Group " ~ to!string(i));
 
... ... public class GroupMenu : MenuItem { // protected
207 207
208 208 private bool newGroupCallback(Event event, Widget widget) { private bool newGroupCallback(Event event, Widget widget) {
209 209 Global.Brush.group = Global.Groups.newGroup; Global.Brush.group = Global.Groups.newGroup;
210 Global.selection.update("Group " ~ to!string(Global.Groups.length-1));
210 Global.selection.update("Group " ~ to!string(Global.Groups.count - 1));
211 211 return true; return true;
212 212 } }
213 213
File source/groups.d changed (mode: 100644) (index e4bec03..f8f1488)
... ... import Brush = dp.brush;
5 5
6 6 public static class Groups { public static class Groups {
7 7 private static Group[] groups = []; private static Group[] groups = [];
8 private static size_t _count = 0;
8 9
9 10 @property @property
10 public static size_t length() {
11 return groups.length;
11 public static size_t count() {
12 return _count;
12 13 } }
13 14
14 15 @property @property
 
... ... public static class Groups {
18 19
19 20 @property @property
20 21 public static Group newGroup() { public static Group newGroup() {
22 _count += 1;
21 23 if(Brush.group is null) { if(Brush.group is null) {
22 24 groups.length++; groups.length++;
23 25 groups[groups.length-1] = new Group(); groups[groups.length-1] = new Group();
 
... ... public static class Groups {
32 34
33 35 public static void clear() { public static void clear() {
34 36 groups = []; groups = [];
37 _count = 0;
38 Brush.group = null;
35 39 } }
36 40 } }
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/kapstok/NHL-DePa2

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/kapstok/NHL-DePa2

Clone this repository using git:
git clone git://git.rocketgit.com/user/kapstok/NHL-DePa2

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main