capfredf
2020-11-10 15:17:58

@capfredf has joined the channel


kokou.afidegnon
2020-11-10 20:16:34

i’m reading bout the graphics manipulation tutorials from https://alex-hhh.github.io/2020/06/ishido.html. A quick one: are snips objects that have drag-and-drop properties ?


soegaard2
2020-11-10 20:19:19

Yes and no. A pasteboard editor (pasteboard%) contains items that are draggable. It can contain snips.


kokou.afidegnon
2020-11-10 20:20:12

ok,


soegaard2
2020-11-10 20:20:25

Look at Alex’s three blog posts on the chess board: https://alex-hhh.github.io/2018/10/chess-game-using-racket-s-pasteboard.html


kokou.afidegnon
2020-11-10 20:20:51

i’ve opened it too, planning to read it after this one :slightly_smiling_face:


soegaard2
2020-11-10 20:21:15

Best place to learn about the gui library.


kokou.afidegnon
2020-11-10 20:21:38

apart from his posts, are there other sources ?



kokou.afidegnon
2020-11-10 20:22:14

i have been reading that as well



kokou.afidegnon
2020-11-10 20:23:39

is this different from the GUI or it’s a subset of this ?


soegaard2
2020-11-10 20:24:18

I think of the Framework as “extras”. It’s the first place I look, when I can’t find something in gui.


soegaard2
2020-11-10 20:24:57

Btw Felleisen has implemented the 7 challenges from 7GUI: https://github.com/mfelleisen/7GUI

See https://eugenkiss.github.io/7guis/ for an explanation.


kokou.afidegnon
2020-11-10 20:25:49

ok


kokou.afidegnon
2020-11-10 20:39:54

what library do you suggest to draw a rectangle, and arrows? trying to build graph applications with edges and vertex which which will also contains some visible properties on their own


soegaard2
2020-11-10 20:41:41

Not sure. For static images, I’d use metapict - but I am biased :slightly_smiling_face:


soegaard2
2020-11-10 20:42:59

If you have a canvas, you can get the drawing context with get-dc.



kokou.afidegnon
2020-11-10 20:45:03

ok


kokou.afidegnon
2020-11-10 22:20:12

can you please explain further the role of the snip class? i’m still confused about it


sorawee
2020-11-10 22:21:22

In pasteboard or in text editor?


kokou.afidegnon
2020-11-10 22:22:03

in pasteboard


sorawee
2020-11-10 22:22:25

ok, I won’t be able to answer that. Have never used pasteboard.


kokou.afidegnon
2020-11-10 22:22:43

ok, what about in text editor ?


sorawee
2020-11-10 22:24:27

It’s pretty much the basic element that can be shown in a text editor. For example, take a look at https://docs.racket-lang.org/rosette-guide/sec_utility-libs.html?q=rosette%2Flib%2Fvalue-browser#%28part._.Examples%29


sorawee
2020-11-10 22:25:24

If a value evaluates to a snip, DrRacket will recognize it and display it in a fancy way


sorawee
2020-11-10 22:25:29

as opposed to other values


kokou.afidegnon
2020-11-10 22:26:25

so in this case, a snip is a virtual measurement unit?


sorawee
2020-11-10 22:27:08

I’m not familiar with “measurement unit”. What do you mean by that?


kokou.afidegnon
2020-11-10 22:27:35

i mean an object with default size. nvm, i’m referring to pasteboard :slightly_smiling_face:




kokou.afidegnon
2020-11-10 22:30:54

ok



spdegabrielle
2020-11-10 22:31:56

the example code in the last link is rely helpful imo


kokou.afidegnon
2020-11-10 22:32:22

thanks


kokou.afidegnon
2020-11-10 22:36:15

so, by default all snips are draggable, right ?


spdegabrielle
2020-11-10 22:37:49

on an editor canvas


kokou.afidegnon
2020-11-10 22:38:23

?


spdegabrielle
2020-11-10 22:38:45

sorry I meant pasteboard%


kokou.afidegnon
2020-11-10 22:39:10

ok


spdegabrielle
2020-11-10 22:40:54

you have to do some code if you want to drag beyond the limits of a pasteboard


kokou.afidegnon
2020-11-10 22:42:17

well, i m trying to test some rectangle to draw and drag which will be used to build diagrams later


spdegabrielle
2020-11-10 22:46:17

arrows might be useful - depending on the type of diagram you are drawing: https://docs.racket-lang.org/draw/Drawing_Conveniences.html?q=arrow#%28part._.Arrows%29


spdegabrielle
2020-11-10 22:48:01

and this example of a gui app (sans pasteboard) might be an informative example https://gist.github.com/Metaxal/0f928d1b429aa36b8c6046a77c994973


kokou.afidegnon
2020-11-10 22:48:14

ok


kokou.afidegnon
2020-11-10 22:49:52

is this part of gui or independent ?


kokou.afidegnon
2020-11-10 22:52:52

ok, i’ve gotten few hints, let me read more


spdegabrielle
2020-11-10 22:54:29

sorry I’ve been terse today - just concentrating on something else. Please come back if you have questions.


kokou.afidegnon
2020-11-11 05:25:12

ok, thanks