Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TbIcons added for widgets. #51

Merged
merged 3 commits into from
Oct 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions CoypuIDE/TbButton.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,6 @@ Class {
#tag : 'Acid'
}

{ #category : 'examples' }
TbButton class >> allButtonExamples [
<script>
| container e1 e2 e3 e4 e5 e6 |
container:= BlElement new

geometry: BlRectangleGeometry new;
layout: (BlGridLayout new
columnCount: 6;
cellSpacing: 0
);
constraintsDo: [:c |
c horizontal matchParent.
c vertical matchParent.
];
background: Color darkGray.

e1:= TbButton new.


container addChildren: { e1}.
container openInSpace.

]

{ #category : 'as yet unclassified' }
TbButton class >> layoutViewExample_1560_720 [
<script>
Expand Down
55 changes: 55 additions & 0 deletions CoypuIDE/TbIcon.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
Class {
#name : 'TbIcon',
#superclass : 'BlElement',
#instVars : [
'widgetSize'
],
#category : 'CoypuIDE-Acid',
#package : 'CoypuIDE',
#tag : 'Acid'
}

{ #category : 'examples' }
TbIcon class >> Example [
<script>
| container e1 e2 e3 e4 |
container:= BlElement new

geometry: BlRectangleGeometry new;
layout: (BlGridLayout new
columnCount: 2;
cellSpacing: 50
);
constraintsDo: [:c |
c horizontal matchParent.
c vertical matchParent.
];
background: (Color r: 249 g:239 b:224 range:255).
"background: Color white."

e1:=TbIcon_TransposeUp new.
e2:=TbIcon_TransposeDown new.
e3:=TbIcon_Accent new.
e4:=TbIcon_Selector0 new.

container addChildren: { e1. e2. e3. e4}.
container openInSpace.

]

{ #category : 'initialization' }
TbIcon >> initialize [

super initialize.
self background: (Color green alpha:0.0).
self padding: (BlInsets all:0).
self size: 50@40.
self layout: BlFrameLayout new.
self initializeIcon.

]

{ #category : 'initialization' }
TbIcon >> initializeIcon [

]
120 changes: 120 additions & 0 deletions CoypuIDE/TbIcon_Accent.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
Class {
#name : 'TbIcon_Accent',
#superclass : 'TbIcon',
#category : 'CoypuIDE-Acid',
#package : 'CoypuIDE',
#tag : 'Acid'
}

{ #category : 'example' }
TbIcon_Accent class >> Example [
<script>
| container e1 |
container:= BlElement new

geometry: BlRectangleGeometry new;
layout: (BlGridLayout new
columnCount: 2;
cellSpacing: 10
);
constraintsDo: [:c |
c horizontal matchParent.
c vertical matchParent.
];
background: (Color r: 249 g:239 b:224 range:255).
"background: Color white."

e1:=TbIcon_Accent new.

container addChildren: { e1}.
container openInSpace.

]

{ #category : 'initialization' }
TbIcon_Accent >> initializeIcon [

|e1 e2 e3 e4 e5 e6|
e1:= BlElement new
geometry: BlRectangleGeometry new;
size:2@35;
background:Color veryVeryDarkGray;
constraintsDo: [ :c |
c frame horizontal alignRight.
c frame vertical alignTop.
];
transformDo: [ :t|

t rotateBy: 10.
t translateBy:-5@ 0.
].

e2:= BlElement new
geometry: (BlRoundedRectangleGeometry cornerRadius: 1);
size: 15@4;
background: (Color veryVeryDarkGray alpha:1.0) ;

constraintsDo: [ :c |
c frame horizontal alignLeft.
c frame vertical alignCenter.
];
transformDo: [ :t|
t translateBy:2@ -4.

].


e3:= BlElement new
geometry: (BlBezierCurveGeometry controlPoints: {

(48 @ 0).
(45 @ 7).
(40 @ 15).
(33 @ 10) });
size: 10 @ 30;
background: (Color veryVeryDarkGray alpha:0.0);
outskirts: BlOutskirts centered;
border: (BlBorder paint: Color veryVeryDarkGray width:2);
transformDo:[:t|
t rotateBy:0.
t translateBy: 0@0.
].

e4:= BlElement new
geometry: (BlBezierCurveGeometry controlPoints: {

(44 @ 13).
(42 @ 15).
(38 @ 23).
(30 @ 18) });
size: 10 @ 30;
background: (Color veryVeryDarkGray alpha:0.0) ;
outskirts: BlOutskirts centered;
border: (BlBorder paint: Color veryVeryDarkGray width:2).
e5:= BlElement new
geometry: BlEllipseGeometry new;
size: 8@6;
background: Color veryVeryDarkGray ;
constraintsDo: [ :c |
c frame horizontal alignCenter.
c frame vertical alignBottom.
];
transformDo: [ :t|
t translateBy:10@ -28.
].
e6:= BlElement new
geometry: BlEllipseGeometry new;
size: 8@6;
background: Color veryVeryDarkGray ;
constraintsDo: [ :c |
c frame horizontal alignCenter.
c frame vertical alignBottom.
];
transformDo: [ :t|
t translateBy:8@ -20.

].


self addChildren: { e1 . e2. e3. e4. e5. e6}.
]
163 changes: 163 additions & 0 deletions CoypuIDE/TbIcon_Selector0.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
Class {
#name : 'TbIcon_Selector0',
#superclass : 'TbIcon',
#category : 'CoypuIDE-Acid',
#package : 'CoypuIDE',
#tag : 'Acid'
}

{ #category : 'example' }
TbIcon_Selector0 class >> Example [
<script>
| container e1 |
container:= BlElement new

geometry: BlRectangleGeometry new;
layout: (BlGridLayout new
columnCount: 2;
cellSpacing: 10
);
constraintsDo: [:c |
c horizontal matchParent.
c vertical matchParent.
];
background: (Color r: 249 g:239 b:224 range:255).
"background: Color white."

e1:=TbIcon_Selector0 new.

container addChildren: { e1}.
container openInSpace.

]

{ #category : 'initialization' }
TbIcon_Selector0 >> initializeIcon [

|e1 e2 e3 e4 e5 e6 e7 e8 e9|
self size: 60@40.
e1:= BlElement new
geometry: BlRectangleGeometry new;
size:2@28;
background:Color veryVeryDarkGray;
constraintsDo: [ :c |
c frame horizontal alignCenter.
c frame vertical alignTop.
];
transformDo: [ :t|
t translateBy:19@ 0.
].
e2:= BlElement new
geometry: BlEllipseGeometry new;
size: 15@8;
background: Color veryVeryDarkGray ;
constraintsDo: [ :c |
c frame horizontal alignCenter.
c frame vertical alignBottom.
];
transformDo: [ :t|
t rotateBy: -35.
t translateBy:14@ -8.

].

e3:= BlElement new
geometry: (BlBezierCurveGeometry controlPoints: {

(35 @ 0).
(37 @ 20).
(42 @ 2).
(45 @ 17) });
size: 10 @ 30;
background: Color veryVeryDarkGray ;
outskirts: BlOutskirts centered;
border: (BlBorder paint: Color veryVeryDarkGray width:2);
transformDo:[:t|
t translateBy:14@0.
].


e4:= BlElement new
geometry: BlRectangleGeometry new;
size:2@28;
background:Color veryVeryDarkGray;
constraintsDo: [ :c |
c frame horizontal alignCenter.
c frame vertical alignTop.
];
transformDo: [ :t|
t translateBy:2@ 0.
].
e5:= BlElement new
geometry: BlEllipseGeometry new;
size: 15@8;
background: Color veryVeryDarkGray ;
constraintsDo: [ :c |
c frame horizontal alignCenter.
c frame vertical alignBottom.
];
transformDo: [ :t|

t rotateBy: -35.
t translateBy:-3@ -8.
].

e6:= BlElement new
geometry: (BlBezierCurveGeometry controlPoints: {

(35 @ 0).
(37 @ 20).
(42 @ 2).
(45 @ 17) });
size: 10 @ 30;
background: Color veryVeryDarkGray ;
outskirts: BlOutskirts centered;
border: (BlBorder paint: Color veryVeryDarkGray width:2);
transformDo:[:t|
t translateBy:-3@0.
].

e7:= BlElement new
geometry: BlRectangleGeometry new;
size:2@28;
background:Color veryVeryDarkGray;
constraintsDo: [ :c |
c frame horizontal alignCenter.
c frame vertical alignTop.
];
transformDo: [ :t|
t translateBy:-15@ 0.
].
e8:= BlElement new
geometry: BlEllipseGeometry new;
size: 15@8;
background: Color veryVeryDarkGray ;
constraintsDo: [ :c |
c frame horizontal alignCenter.
c frame vertical alignBottom.
];
transformDo: [ :t|

t rotateBy: -35.
t translateBy:-20@ -8.
].

e9:= BlElement new
geometry: (BlBezierCurveGeometry controlPoints: {

(35 @ 0).
(37 @ 20).
(42 @ 2).
(45 @ 17) });
size: 10 @ 30;
background: Color veryVeryDarkGray ;
outskirts: BlOutskirts centered;
border: (BlBorder paint: Color veryVeryDarkGray width:2);
transformDo:[:t|
t translateBy:-20@0.
].



self addChildren: { e1 . e2. e3. e4. e5. e6. e7. e8. e9}.
]
Loading
Loading