libera/#clim - IRC Chatlog
Search
18:00:50
jackdaniel
oh, I'm glad that you like it; I've put a considerable amount of effort into that branch
18:03:29
cmack
I agree. Reading through some of your blog posts and recent commit history has helped me some in my backend writing quest
18:22:17
cmack`
I've had to switch computers for sick kid parenting. My latest hurdle is to get my test app painting using a very basic gadget. One so basic that it doesn't have any of the medium protocol implemented.
18:22:54
maxz
Is it actually intended that a scrollbar only maintains its position on a redraw of its pane when used on a pane with :incremental-redraw t or is that a bug? And how else would I be expected to maintain the position in such a case if not with a callback? Using incremental-redraw is too slow for my use case (the elements take like 5 seconds to be fully drawn) which I'm pretty sure is a bug and will submit a proper report with minimal
18:23:32
jackdaniel
cmack: I've mentioned in the SVG post that if you imlpement medium-draw-polygon, then you have all other drawing methods working (albeit slow)
18:24:34
jackdaniel
maxz: I didn't investigate that, but some people complained too about this behavior
18:25:46
jackdaniel
as of what is the expected behavior - I don't know; perhaps storing the position for the time of a redisplay to readjust it back makes sense; on the other hand :end-of-page-action :scroll (et al) would need to be disabled for that time as well
18:27:35
jackdaniel
(my point is that deciding what is the right thing is not a no-brainer and requires some thought which I did not pay to it yet)
18:28:08
maxz
Yes, that was how I somehow managed it up to now. But you have to remember to save the position on all actions and it breaks apart in some cases where you cant easily detect when such an action occurs before it is too late to save the position. So it is somewhat doable, but not a very pleasant experience.
18:28:25
cmack`
I did see that...but at the time I deferred so that I could just get /something/ on the screen first. I'll read again now that I've been in the trenches a little bit longer
18:34:40
cmack`
:) Slightly different context question: if I wanted to have a pane that was an opengl 3d view, would I still need to implement the medium protocol?
18:49:07
maxz
The scroll bar created with scrolling actually keeps it's position and works properly ...
18:49:32
maxz
I want to bang my head against my keyboard for putting up so long with the broken scrollbar and never trying scrolling in this way.
18:50:02
jackdaniel
if you are interested why they can (and often do) behave differently, then I will tell you
18:51:16
jackdaniel
by default panes created with make-clim-stream-pane (i.e if you put :application, then this operator is used), then the pane will have a) viewport, b) border (1px wide), c) stream pane
18:51:46
jackdaniel
scrolling changes the sheet-transformation between border and a viewport, while the transformation between the border and the stream pane remain the same
18:52:31
jackdaniel
on the other hand, if there is no border in between, then the code takes a slightly different path, because it is the stream pane transformation that changes
18:52:48
jackdaniel
of course they should behave the same for scrolling; my point is that this disrapency is the source of various inconsistencies
18:53:11
maxz
I think that 1px border might still be a problem btw. Not entirely sure whether it's that. But when setting the viewport to (0 0) by using scroll extent, the scrollbar can still be used to scroll further to the left.
18:53:45
jackdaniel
well, then perhaps that's something different. I'm leaving the office now, see you \o
18:53:51
maxz
And I think it might be exactly that 1px border. Since a black 1px border is then revealed.
19:00:45
maxz
Actually it does not keep the position. Well, it did. But I can't keep it that way, because I had nested scrollbars. And when having those it properly kept the position of both bars. When having only one, it does not.
19:29:53
jackdaniel
cmack: http://turtleware.eu/static/paste/76e181abf4ee0d6af68b4779493304be12d925f7-README.org; skip straight to "implementing the port", things earlier are explicitly about sdl2 (the rest is sdl2 specific, but descriptions should apply to any backend)
19:46:12
cmack`
ok, I'll probably have more questions :) It's already interesting to see the PROCESS-NEXT-EVENT isn't distributing the event. Still reading
19:53:41
maxz
When using SCROLLING, how would I pass initialization arguments to the scroll-bar? Just specifying the keywords as part of the options does not work. I guess using a gadget-value-changed-callback might be preferable in my case but it does not seem to be changeable after instantiation.
19:56:10
jackdaniel
maxz: probably (scrolling (:hscrollbar (make-pane …) :vscrollbar (make-pane …)))
19:57:56
maxz
Is there any easy way to look that up in similar cases? DESCRIBE did not offer any insight into those arguments.
20:20:11
maxz
Is there a similar way to specify the value-changed-callback for scroll-bar through scrolling?
20:24:21
maxz
Ah ... actually I will have to check whether the scroller-pane takes that directly as argument.
21:45:26
maxz
jackdaniel: I can't get it to work with scrolling in that way. First of all, the standard scroll bars remain unless I explicitly set :scroll-bars to nil. But then I can't get it to display a scoll-bar when specifying a panel with :hscrollbar (make-pane 'scroll-bar) (or also scroll-bar-pane), I'm not sure which one would be correct in this context.
21:57:39
maxz
I took a look at composition.lisp and the pane should be correct and passed to (make-pane 'scroller-pane) within scrolling. So I can't see what I'm doing wrong.